TAILIEUCHUNG - McGraw-Hill PDA Robotics 2003 (By.Laxxuss) Part 12

Tham khảo tài liệu 'mcgraw-hill pda robotics 2003 () part 12', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | PDA Robotics Activate the motion detection CAPTUREPARMS cap_params long struct_size sizeof CAPTUREPARMS capCaptureGetSetup h_capwin cap_params struct_size FALSE FALSE FALSE 3600 reset after 60 second test TRUE Throw away the audio for now . will use same algorithm for sound detection FALSE 1 capCaptureSetSetup h_capwin cap_params struct_size Set the callback to which the vidoe will be stramed BOOL ret capSetCallbackOnVideoStream h_capwin LPVOID stream_callback capCaptureSequenceNoFile h_capwin else Unchecked the motion detection Motion Sense OFF capCaptureAbort h_capwin TRUE The video frames will be sent to this callback function where we will compare the last video frame sent to the current LRESULT stream_callback HWND hWnd LPVIDEOHDR lpVHdr static initialized static DWORD frame_same_total static last_frame_bytes 198 Chapter 10 The PDA Robotics Command Center static DWORD trigger_threshold static BYTE last_frame_data BYTE frame_data BYTE malloc size_t lpVHdr- dwBytesUsed We will run into a problem if the frame buffer size has increased user switched the video format settings while detecting motion .so realloc to the correct size. if initialized last_frame_data BYTE malloc size_t lpVHdr- dwBytesUsed last_frame_bytes size_t lpVHdr- dwBytesUsed else Ensure that the bytes used hasn t changed. User may change video settings along the way. Resize our frame buffer if last_frame_bytes size_t lpVHdr- dwBytesUsed AfxMessageBox Reallocating the frame buffer sise last_frame_data BYTE realloc last_frame_data size_t lpVHdr- dwBytesUsed last_frame_bytes size_t lpVHdr- dwBytesUsed if frame_data NULL last_frame_data NULL Frame data couldn t be allocated return FALSE memcpy frame_data lpVHdr- lpData lpVHdr- dwBytesUsed if initialized memcpy .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.