letmaik / rawpy

📷 RAW image processing for Python, a wrapper for libraw
https://pypi.python.org/pypi/rawpy
MIT License
587 stars 67 forks source link

How to process bayer10? #222

Closed nfhktwrbq closed 3 months ago

nfhktwrbq commented 5 months ago

I have a raw binary file from the RPI camera ov5647. This image is a bayer10 format with the BGGR pattern. I got this image with a command: libcamera-raw --frames 1 --width 1920 --height 1080 -o bayer10.raw But when I call rawpy.imread(bayer10.raw) I get LibRawFileUnsupportedError: b'Unsupported file format or not RAW file' How to process the raw image from ov5647?

kmilos commented 5 months ago

You need to convert to DNG first: https://github.com/schoolpost/PiDNG

This also seems to suggest libcamera-raw should output DNG directly? https://github.com/schoolpost/PiDNG/issues/61