I'm a French student and I'm doing an intern ship in a French image processing software company, and I've got some questions about V4L2 and more precisely, the video formats.
In the application, I just need to capture frames of web-cams and display the result. After research, I found the capture example on the http://v4l2spec.bytesex.org/ website. So now, I capture correctly the frames.
During the initialisation of the device, I'm doing a VIDIOC_G_FMT in order to get the format description of the webcam. Then, I tried to change the pixelformat. Indeed, I wanted the YUYV FORMAT because I need to get the raw data for treatment.
My problem is, after the VIDIOC_S_FMT, the pixelformat field is set back to JPEG FORMAT (and the colorspace too) and so, I don't get raw data, but compressed jpeg data.
I know that the VIDIOC_S_FMT try to change these fields but if the driver don't authorise them, it will put the originals back. But, I really need to get the raw data of the captured picture, so is there by any chance, another solution to 'force' and capture the images in an Uncompressed format ? Or is it really set by the driver and so, no chance to have the raw ?
I really looked for answers everywhere on the web, so I'm losing hope and that's why I'm asking you that today. I'm sorry if my comment is misplaced or if the answer has already been posted.