Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

CvCapture* capture = cvCreateCameraCapture(0); is not working for me... c++ w10

$
0
0
but VideoCapture cap(0); is working for me..it opens the camera.. please anyone give solution.. #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; using namespace std; int main( int argc, char** argv ) { cvNamedWindow( "Example2", CV_WINDOW_AUTOSIZE ); CvCapture* capture = cvCaptureFromCAM(0); IplImage* frame; while(1) { frame = cvQueryFrame( capture ); if( !frame ) break; cvShowImage( "Example2", frame ); char c = cvWaitKey(33); if( c == 27 ) break; } cvReleaseCapture( &capture ); cvDestroyWindow( "Example2" ); } above shows the code...but when cv: :videocapture used cvQueryFrame gets error as there are no pointer in use...how to solve this..?

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>