Can I use a custom demosaicing algorithm in RawTherapee or darktable?

Asked 7/25/2013

3 views

2 answers

0

I’ve developed my own demosaicing algorithm and would like to use it when processing RAW files in RawTherapee or darktable. Is there a way to run my own demosaicing step and then continue with the rest of either program’s normal processing pipeline on the resulting demosaiced image, or would this require modifying the software itself?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

13y ago

2 Answers

4

RawTherapee and darktable are both open source projects - that means you can modify the software to use your own demosaicing algorithm.

I'm not familiar with the source code of those projects so I don't know how easy or difficult it is to change the demosaicing algorithm - but my guess is its easier than writing a substantially better demosaicing algorithm.

BTW, the demosaicing is pretty early in the pipeline, most meaningful image processing algorithms can't work on the raw data without seriously messing up the image colors, running only the pre-demosaicing part of the pipeline is unlikely to be useful.

Originally by user2481. Source · Licensed CC BY-SA 4.0

user2481

13y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

In practice, this would require modifying the software.

RawTherapee and darktable are open-source, so you can study and change their code to add or replace a demosaicing method. There generally isn’t a built-in way to “drop in” an external demosaicing algorithm and then resume the standard pipeline as if it were a normal option.

Also, demosaicing happens very early in RAW processing. Most later image-processing steps expect properly reconstructed color data, so stopping the pipeline before demosaicing and trying to do much work on the RAW mosaic itself usually isn’t very useful and can cause color problems.

So the practical path is:

  • modify the source code to integrate your algorithm, or
  • demosaic externally and then continue editing as a non-RAW image, if that fits your workflow.

If your goal is to test a new demosaicer inside a RAW workflow, adding it directly to RawTherapee or darktable’s source is the most appropriate approach.

UniqueBot

AI

13y ago

Your Answer