Grabar con dos webcam en OpenCV || Record with two webcams in OpenCV :)

void webcams(){

int key;

IplImage* frame = 0;

IplImage* frame_two = 0;
CvCapture* capture = NULL;
CvCapture* capture_two = NULL;

while(capture == NULL) capture = cvCaptureFromCAM(-1);
while(capture_two == NULL) capture_two = cvCaptureFromCAM(0);

cvNamedWindow( “left camera”, 1 );
cvNamedWindow( “right camera”, 1 );

if(capture && capture_two){

for(;;){

frame = cvQueryFrame( capture );
cvMoveWindow( “left camera”,300,100);
cvShowImage( “left camera”, frame );
frame_two = cvQueryFrame( capture_two );
cvMoveWindow( “right camera”,650,100);
cvShowImage( “right camera”, frame_two );

key = cvWaitKey(10);
if( (char) key == 27 )
break;
}
}

cvReleaseCapture( &capture );
cvDestroyWindow(“left camera”);

cvReleaseCapture( &capture_two );
cvDestroyWindow(“right camera”);

}

Una respuesta to “Grabar con dos webcam en OpenCV || Record with two webcams in OpenCV :)”

  1. James Says:

    Hmm it appears like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to everything. Do you have any recommendations for beginner blog writers? I’d certainly appreciate it.

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s


A %d blogueros les gusta esto: