2
votes

After reading Wikipedia page of Raw image format which is the digital negative of any image.

To be viewed or printed, the output from a camera's image sensor has to be processed, that is, converted to a photographic rendering of the scene, and then stored in a standard raster graphics format such as JPEG. This processing, whether done in-camera or later in a raw-file converter, involves a number of operations, typically including

I have some .raw files grabbed from my Logitech c920 using v4l2 example but when I display the image it looks like this: raw frame file a raw image where in other frames I can see my shadow

Does anyone knows how to process such files to see the complete frame ?

Here is a link to the original .raw file

1
how did you display it ? raw probably means here, that it's not processed and that there are no 'headers' appended to it. still, it has some format. most sensors use something like yuv. so, if you can find out, what the native format for your camer is, then it's an easy cvtColor() in opencv, to get it to nice rgb or such - berak
I tried to convert it from yuv to rgb but I failed,this image is displayed as raw. - Ahmed Kato
There are many different ways to store and represent YUV data. It just looks like you got the wrong decoding. - slhck
Right now it is a PNG, so it is irrelevant to the problem. Include a link to the raw file. - mmgp
There are two definitions of a raw format image. The first is a dump of pixels with no formatting applied. The second is a camera specific format containing unfiltered data from a sensor chip. The quote you give applies to second definition, but the first definition is the one that actually applies to your sample. The sensor data has already been processed into pixels and it's just a matter of determining their format. - Mark Ransom

1 Answers

6
votes
ffmpeg -f rawvideo -s 640x480 -pix_fmt yuyv422 -i frame-1.raw frame-1.jpg

The options were set based on the v4l2 code linked, and the resulting image is the one you would expect to get.