Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.76k stars 313 forks source link

Raspberry Pi HQ Camera RAW Support #6003

Open dustinkerstein opened 3 years ago

dustinkerstein commented 3 years ago

It'd be great to see RawTherapee support the new Raspberry Pi HQ camera's hybrid JPEG/RAW format. For the first time Raspberry included an interchangeable C/CS mount, and the Sony IMX477 is a significant step-up compared to their previous cameras. RawTherapee already does a great job with the converted DNG from PyDNG - which converts the RAW embedded in the somewhat unique hybrid JPEG/RAW captured by raspistill and picamera (note that picamera's documentation about the bayer data doesn't include info pertinent to the IMX477). While the PyDng -> RawTherapee workflow is quite solid, it would be awesome if RawTherapee could directly use the hybrid JPEG/RAW file.

I've uploaded white framesets taken with both raspistill and picamera and included both the original hybrid JPEG/RAW and a resulting DNG that was converted via PyDNG to https://filebin.net/d0it4elbcx29zsnv/pi_hq.zip?t=2brmflco (also attached - pi_hq.zip). Let me know if you need any further photos or information. Thanks!

Also, Raspberry did make earlier V1 and V2 revisions of their camera that had different sensors. I will post over at the Pi forum to see if folks can upload white framesets for those cameras as well - unfortunately I don't have access to them currently.

dustinkerstein commented 3 years ago

I managed to get ahold of Pi v1.3 and v2.1 cameras and have created the white framesets with the Pi's hybrid JPEG/RAW files - V1andV2.zip

Let me know if you need anything else. Thanks!

jdw1953 commented 3 years ago

It might be easier than what has been suggested here so far. Since RawTherapee utilizes DCRAW and a forked version of DCRAW supporting all the Raspberry Pi cameras (including the new HQ version) exists here: https://github.com/6by9/dcraw Then perhaps simply recompiling RawTherappee with this 6by9 modified dcraw.c is all that is needed.

jdw1953 commented 3 years ago

Also a patch for LibRaw was provided here for another approach for supporting the Raspberry Pi cameras. Unfortunately a lot of image editors that utilize LibRaw will not have this patch yet since official LibRaw updates occur about once a year (in January I think). Anyway the code utilized in the 6by9's dcraw or libraw patches are the best and quickest way to add support for this camera type I think. https://github.com/6by9/LibRaw