capturing camera ?
i'm using VS2010 conbined with OpenCV 2.2 ! i've tryied programming to capturing camera but the result as the picture below: i've configed property as follow:
*VC++ Directories:
+Include Directories... add: 'C:\OpenCV2.1\include\opencv;'
+Library Directories... add: 'C:\OpenCV2.1\lib;'
+Source Directories... add folders in path "...\\include\\Opencv2"
*C/C++ =>General=>add “C:\OpenCV2.2\include”.
*Linker:
+General=>Additional Library Directories => add “C:\OpenCV2.2\lib”.
*Input=>Additional Dependencies:
opencv_imgproc220d.lib
opencv_core220d.lib
opencv_highgui220d.lib
opencv_ml220d.lib
opencv_video220d.lib
opencv_features2d220d.lib
opencv_calib3d220d.lib
opencv_objdetect220d.lib
opencv_contrib220d.lib
opencv_legacy220d.lib
opencv_flann220d.lib
And here is the code:
#include "stdafx.h"
#include "highgui.h"
int _tmain(int argc, _TCHAR* argv[])
{
CvCapture* capture = cvCaptureFromCAM(0);
IplImage* src = NULL;
cvNamedWindow("Webcam",0);
while(1)
{
src = cvQueryFrame(capture);
if(!src) break;
char c = cvWaitKey(30);
if(c == 27) break;
cvShowImage("Webcam",src);
}
cvReleaseImage(&src);
cvDestroyWindow("Webcam");
return 0;
}
hope for help! ^~^ !
well, you're supposed to click 'OK' there, so what's your 'real' question ? there's nothing obviously wrong with your code. ( well, apart from 2.2 being a bit old, and using IplImages instead of cv::Mat's )
Yes, i think the problem here is configuration for property! but i do not know which error i've got!