since a few days, I work on a camera Mako (use ethernet (GigE)). I need to get back the video flow to integrate it on a software house. I try to use the library of OpenCV on the code::blocks but I always have an error saying that it does not manage to see the Video flow. Could anybody help me? Thank you so much for your help :)
#include <opencv2/imgproc/imgproc_c.h>
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
int main(int argc, char** argv)
{
printf("Press ESC to exit\n");
cvNamedWindow( "First Example of PVAPI Integrated", CV_WINDOW_AUTOSIZE );
CvCapture* capture = cvCreateCameraCapture( CV_CAP_PVAPI );
assert( capture != NULL );
IplImage* frame;
while(1)
{
frame = cvQueryFrame(capture);
if(!frame) break;
cvShowImage( "First Example of PVAPI Integrated", frame);
char c = cvWaitKey(2500);
if( c == 27) break;
}
cvReleaseCapture( &capture );
cvDestroyWindow( "First Example of PVAPI Integrated" );
}