The HWND MyWin;//get the control handle (IDC_VIDEO is picture controls)
CvcamSetProperty (0, CVCAM_PROP_ENABLE, CVCAMTRUE); Choose your first camera//
Int width=800;
Int height=600;
MyWin=: : GetDlgItem (m_hWnd, IDC_ShowImg);
CvcamSetProperty (0, CVCAM_PROP_WINDOW, & amp; MyWin);//Selects a window for
CvcamSetProperty (0, CVCAM_RNDWIDTH, & amp; Width);
CvcamSetProperty (0, CVCAM_RNDHEIGHT, & amp; Height);
CvcamSetProperty (0, CVCAM_PROP_CALLBACK, callback);//callback function will handle each frame
CvcamInit ();
CvcamStart ();
CvWaitKey (0);
CvcamStop ();
CvcamExit ();
return ;
My computer is win732, do a simple target tracking, use other ways to open the camera display is black, but this method but don't know how to collect images, strives for the guidance of the great god!!!!!!
CodePudding user response:
Should write a loop that constantly acquisitionCodePudding user response:
Advice to compile the first link debug OpenCV bring relevant example code,