Demosaicing an Unsupported .RAW Format

Hi, RawTherapee!

My basic question is: How can I run the raw data from a Dcraw-unsupported camera (Teledyne Dalsa Genie Nano C4020) through RT’s demosaicing algorithms?

Longwinded explanation of my situation and attempts to far:
I have some raw files which I need to run through demosaicing algorithms, preferably the variety provided by RawTherapee :slight_smile:. These files are in a very simple format: 12-bit-per-pixel GB/RG Bayer little-endian data, where each 12 bits is put into 16 bits (so 4 leading 0s on every pixel), at 4112 x 3008 pixels. No headers or buffering; the image data starts at byte 0. I can get images of the same format in another Bayer pattern, like RG/GB which seems common, if needbe.

RawTherapee 5.1 does not recognize these files. I’ve tried every step of this thread -

  • and RT’s File Explorer still won’t even recognize that any of my .raw files are there. Even tried renaming their file extensions to things like .cr2, and File Explorer just won’t see em (while it will load other files like PNGs, JPEGs and DNGs).

That shouldn’t be a roadblock though, because by file association, I have forced RawTherapee to open my 12-bpp .raw files. What I get is… this.


Lovely. Following the advice of this thread -

  • I have spent a week trying to convert my files to .DNG, trying 4 different tools and libraries. The files I get into RawTherapee all have the weirdest, most unrealistic colors you could ask for. My team has not yet developed color correction matrices for this camera, but that XYZ-related color correction should be for fine-tuning. I’ll be just fine without the fine-tuning for now… all I need are some images where the sky is blue and the grass is green! I’ll even put up with treating each pixel as 16-bit, resulting in a very dark image. It’s just gotta be a demosaiced image and I can work from there.

I’m wondering if there is any way to force RawTherapee to recognize and demosaic my 12-in-16 bit .raw files, with its various available Bayer demosaicing algorithms like Amaze, HPHD, etc. Perfectly willing to use commandline or write code that makes calls to RawTherapee’s source, though I’m completely unfamiliar with this library. I’m happy to work either on Windows 10 or on my Ubuntu VM, as necessary. Perhaps there’s a 16-bit Bayer format which exists already for another camera, which I could shoehorn/reformat my data into?

Thank you for your time!,

Tanner Atwater
tatwater@aeroptic.com

You could try to generate floating point dng files as hdrmerge does. Here’s a pointer to the source.

Also, as you’re a for-profit using libre software, consider supporting via donations or hardware.

1 Like

Can you upload some samples ?.