Demosaicing and High Dynamic Range Imaging with Python

We have released two complementary image processing Python packages:

  • Colour - Demosaicing which implements various CFA (Colour Filter Array) demosaicing algorithms and related utilities.
  • Colour - HDRI which implements various HDRI / Radiance image processing algorithms.

Colour has its roots in a company being created to deliver high quality images for the VFX industry with an emphasis on colour processing correctness, dynamic range and resolution.

While most of the pipeline was providing good guidance over the authoring process, the radiance image generation was entirely delegated to third-party applications. Because of the lack of precise control over the processing and the missing automation, it was an area we needed to revisit.


The company is unfortunately stalled since a few years. On the bright side it gave birth to Colour.

The two new packages we have released today are the early outcome of my most recent exploration of High Dynamic Range Imaging. It was an opportunity to assess the viability of generating radiance images directly with the Python scientific toolchain and compare various approaches.

A key aspect of that effort was to find out if there is a true benefit at creating the radiance image prior to CFA (Colour Filter Array) demosaicing, unfortunately, we don't have yet a definite answer.

Both packages provide examples notebooks:

Some of the notebooks rely on third-party libraries or applications to run such as

They are not mandatory and the data they provide can be acquired in various different ways. We don't advocate an approach or another.

That work wouldn't have been possible without the excellent Advanced High Dynamic Range Imaging Book and the tremendous amount of publications we gathered (over 30 publications related to demosaicing and 20 publications for HDRI).

Finally, we recommend that you read Posterior Sparisty-Directed Demosaicking and Robust Patch-Based HDR Reconstruction of Dynamic Scenes publications which are probably the state of the art although patented to various degrees.

We take that opportunity to wish you a great 2016 year!


Comments powered by Disqus