Processing .Raw images using ffmpeg or OpenCV

孤人 提交于 2019-12-08 05:22:39

问题


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:

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:


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.



来源:https://stackoverflow.com/questions/15031183/processing-raw-images-using-ffmpeg-or-opencv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!