1 Colour - Demosaicing#

A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities.

It is open source and freely available under the BSD-3-Clause terms.

https://raw.githubusercontent.com/colour-science/colour-demosaicing/master/docs/_static/Demosaicing_001.png

1.1 Features#

The following CFA (Colour Filter Array) demosaicing algorithms are implemented:

  • Bilinear

  • Malvar (2004)

  • DDFAPD - Menon (2007)

1.1.1 Examples#

Various usage examples are available from the examples directory.

1.2 User Guide#

User Guide#

The user guide provides an overview of Colour - Demosaicing and explains important concepts and features, details can be found in the API Reference.

Installation Guide#

Because of their size, the resources dependencies needed to run the various examples and unit tests are not provided within the Pypi package. They are separately available as Git Submodules when cloning the repository.

Primary Dependencies#

Colour - Demosaicing requires various dependencies in order to run:

Pypi#

Once the dependencies are satisfied, Colour - Demosaicing can be installed from the Python Package Index by issuing this command in a shell:

pip install --user colour-demosaicing

The overall development dependencies are installed as follows:

pip install --user 'colour-demosaicing[development]'

Bibliography#

[LMY10]

O. Losson, L. Macaire, and Y. Yang. Comparison of color demosaicing methods. In Advances in Imaging and Electron Physics, volume 162, pages 173–265. 2010. doi:10.1016/S1076-5670(10)62005-8.

[MHCW04]

Henrique S Malvar, Li-Wei He, Ross Cutler, and One Microsoft Way. High-quality linear interpolation for demosaicing of bayer-patterned color images. In International Conference of Acoustic, Speech and Signal Processing, 5–8. Institute of Electrical and Electronics Engineers, Inc., May 2004. URL: http://research.microsoft.com/apps/pubs/default.aspx?id=102068.

[MAC07]

Daniele Menon, Stefano Andriani, and Giancarlo Calvagno. Demosaicing with directional filtering and a posteriori decision. IEEE Transactions on Image Processing, 16(1):132–141, January 2007. doi:10.1109/TIP.2006.884928.

1.3 API Reference#

API Reference#

Colour - Demosaicing#

Bayer CFA Demosaicing and Mosaicing#
Demosaicing#

colour_demosaicing

demosaicing_CFA_Bayer_bilinear(CFA[, pattern])

Return the demosaiced RGB colourspace array from given Bayer CFA using bilinear interpolation.

demosaicing_CFA_Bayer_Malvar2004(CFA[, pattern])

Return the demosaiced RGB colourspace array from given Bayer CFA using Malvar (2004) demosaicing algorithm.

demosaicing_CFA_Bayer_Menon2007(CFA[, ...])

Return the demosaiced RGB colourspace array from given Bayer CFA using DDFAPD - Menon (2007) demosaicing algorithm.

Ancillary Objects

colour_demosaicing

demosaicing_CFA_Bayer_DDFAPD(CFA[, pattern, ...])

Return the demosaiced RGB colourspace array from given Bayer CFA using DDFAPD - Menon (2007) demosaicing algorithm.

Mosaicing#

colour_demosaicing

mosaicing_CFA_Bayer(RGB[, pattern])

Return the Bayer CFA mosaic for a given RGB colourspace array.

Masks#

colour_demosaicing

masks_CFA_Bayer(shape[, pattern])

Return the Bayer CFA red, green and blue masks for given pattern.

Indices and tables#

1.4 Code of Conduct#

The Code of Conduct, adapted from the Contributor Covenant 1.4, is available on the Code of Conduct page.

1.5 Contact & Social#

The Colour Developers can be reached via different means:

1.6 About#

Colour - Demosaicing by Colour Developers
Copyright 2015 Colour Developers – colour-developers@colour-science.org
This software is released under terms of BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause