Debayering SW and bayer pattern?

Which SW is good for debayering a raw image without colour information?
I checked a couple of SW, like RawTherapee, and I can select debayering method, but how do I specify the bayer pattern? Also, the picture seems to be upside down.

That is, which SW can do the debayering and lets me specify the bayer pattern, and how?
Preferably on Windows, but Linux is an option too.

Do you have a raw sample we could try?

darktable has demosaicing for monochrome.

I have, but it’s a bit big.
My question, really, is, if I know the bayer pattern is GBRG, the values are 16-bit gray-levels, and the sensor is read from the bottom to top, how do I tell, say, RawTherapee that? Or are there other programs, that I could use, that allow me to specify those?
(I do realize, that reversing the line order, the pattern becomes RGGB.)

If you don’t mind writing your own software for it you can use librtprocess which just breaks out RawTherapee’s demosaicing code into functions usable for other applications.

Or you put you raw data bytestream inside a DNG container with the required minimal metadata for most raw processors to understand what they’re dealing with.

See e.g. what PiDNG does for RaspberryPi camera modules, and also search the forum for some alternatives we have discussed already.

Thanks, have to check.

That looks like a quite good option! Thanks!

Ha, not in 1.3 but a thing I recently added to rawproc for just that purpose is the ability to edit the metadata in-program. Specifically, if I read in a TIFF with mosaic data, I can add Libraw.CFAPattern with a string that specifies the pattern, “GBRG” in this case, oh, and also set Libraw.Mosaiced to “1”, and with that the demosaic tool will process the image accordingly. To use it you’d need to compile rawproc from the github master branch…

Okay, maybe I’m headed for 1.4…

1 Like

ImageJ or Fiji

image

Sorry, but the link to the plugin does not work. Do you have a solution? I am very much interested in this.

Hermann-Josef

You can likely find it here if that is outdated…

Found this

and this…

I think Matlab will do this if you have access

Also here…

@priort
Thanks, that worked!

Hermann-Josef

1 Like

Thanks, @priort! Have to try the imageJ and the plugins.

ImageJ is a sort of core image processing tool that is very old …stems from NIH in the US but has served as a backbone for a number of projects and thousands of plug-ins…many for microscopy…but I did a quick google and found this… not sure if it is useful some of these are niche projects…

https://www.astro.louisville.edu/software/astroimagej/

Thanks, got to check that too. (Bookmarked it.)

Last one…had to keep scanning the plugin list :slight_smile: Have a great Sunday…beautiful day here in Ontario…hope the same for you…

https://www.astro.physik.uni-goettingen.de/~hessman/ImageJ/Book/

Bookmarked that too, thanks.
And yes, nice day here too, except for occasional small showers.
Great Sunday to you too!