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.

Table of Contents
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 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 tests suite dependencies are installed as follows:
pip install --user 'colour-demosaicing[tests]'
The documentation building dependencies are installed as follows:
pip install --user 'colour-demosaicing[docs]'
The overall development dependencies are installed as follows:
pip install --user '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¶
colour_demosaicing
|
Returns the demosaiced RGB colourspace array from given Bayer CFA using bilinear interpolation. |
|
Returns the demosaiced RGB colourspace array from given Bayer CFA using Malvar (2004) demosaicing algorithm. |
|
Returns the demosaiced RGB colourspace array from given Bayer CFA using DDFAPD - Menon (2007) demosaicing algorithm. |
Ancillary Objects
colour_demosaicing
|
Returns the demosaiced RGB colourspace array from given Bayer CFA using DDFAPD - Menon (2007) demosaicing algorithm. |
colour_demosaicing
|
Returns the Bayer CFA mosaic for a given RGB colourspace array. |
colour_demosaicing
|
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. 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.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.6 Code of Conduct¶
The Code of Conduct, adapted from the Contributor Covenant 1.4, is available on the Code of Conduct page.