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.
Features¶
The following CFA (Colour Filter Array) demosaicing algorithms are implemented:
- Bilinear
- Malvar (2004)
- DDFAPD - Menon (2007)
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.
Primary Dependencies¶
Colour - Demosaicing requires various dependencies in order to run:
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]'
Usage¶
API¶
The main reference for Colour - Demosaicing is the manual:
Colour - Demoisaicing Manual¶
Reference¶
Colour - 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. |
colour_demosaicing
mosaicing_CFA_Bayer (RGB[, pattern]) |
Returns the Bayer CFA mosaic for a given RGB colourspace array. |
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. |
Examples¶
Various usage examples are available from the examples directory.
Contributing¶
If you would like to contribute to Colour - Demosaicing, please refer to the following Contributing guide for Colour.