Dear all, I'm a newbie in all this webcam stuff and trying the Luvcview source code. Luvcview is useful to me because it allows to display images from two videcameras at the same time. Doing the same with OpenCV retrieves corrupted images.
I want to access the pixel information. I'm able to convert YUYV format to 24RGB easily using the Pyuv422torgb24 function, and the display the images using a 24bits BGR format directly. Unfortunately, I cannot do the same with the MJPEG format. I realize that the image is decompressed into the videoIn->framebuffer buffer before displaying it, but I don't know how to access the pixel information correctly. I have tried to copy the image into an OpenCV buffer in this way: opencv->imageData[curr_pos] = videoIn->framebuffer[curr_pos++]; // B opencv->imageData[curr_pos] = videoIn->framebuffer[curr_pos++]; // G opencv->imageData[curr_pos] = videoIn->framebuffer[curr_pos++]; // R However, all I see are vertical lines and my silhouette repeated three times on the image. As you can see, I'm assuming this information is stored in BGR format in the videoIn->framebuffer. The questions are: which is the correct form to access the information captured with the MJPEG format? and, using this format speeds up the capturing process after all? Best regards, Hector. _________________________________________________________________ Participa en nanometrajes y gana grandes premios http://cine.prodigymsn.com/nanometraje _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
