How to convert 12bit raw file to 12bpp image file

Hi, the sensor I’m using is Sony IMX334, and the raw data output is like this

$v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘RG12’
Name : 12-bit Bayer RGRG/GBGB
Size: Discrete 3864x2180
Interval: Discrete 0.017s (60.000 fps)

How Can I convert this file to12bpp image file or other kind of file I can use for image analysis?
Thanks a lot.

Try 7yuv free tools

I tried
But I don’t know why I can only get the fist channel of color

Maybe try googling raw viewer tools to check.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.