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 New BSD License 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.2 Installation

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.

1.2.1 Primary Dependencies

Colour - Demosaicing requires various dependencies in order to run:

1.2.2 Pypi

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

pip install colour-demosaicing

The tests suite dependencies are installed as follows:

pip install 'colour-demosaicing[tests]'

The documentation building dependencies are installed as follows:

pip install 'colour-demosaicing[docs]'

The overall development dependencies are installed as follows:

pip install 'colour-demosaicing[development]'

1.3 Usage

1.3.1 API

The main reference for Colour - Demosaicing is the manual:

Colour - Demosaicing Manual

Reference
Colour - Demosaicing
Bayer CFA Demosaicing and Mosaicing
Demosaicing

colour_demosaicing

demosaicing_CFA_Bayer_bilinear(CFA[, pattern])

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

demosaicing_CFA_Bayer_Malvar2004(CFA[, pattern])

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

demosaicing_CFA_Bayer_Menon2007(CFA[, …])

Returns 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, …])

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

Mosaicing

colour_demosaicing

mosaicing_CFA_Bayer(RGB[, pattern])

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

Masks

colour_demosaicing

masks_CFA_Bayer(shape[, pattern])

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

Indices and tables
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. URL: http://linkinghub.elsevier.com/retrieve/pii/S1076567010620058, 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. URL: http://ieeexplore.ieee.org/document/4032820/, doi:10.1109/TIP.2006.884928.

1.3.2 Examples

Various usage examples are available from the examples directory.

1.4 Contributing

If you would like to contribute to Colour - Demosaicing, please refer to the following Contributing guide for Colour.

1.5 Bibliography

The bibliography is available in the repository in BibTeX format.

1.6 Code of Conduct

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

1.7 About

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