-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
400 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,76 @@ | ||
@incollection{Losson2010c, | ||
abstract = {Mono-CCD color cameras acquire only one color component at each pixel by means of their color filter array (CFA) covering the CCD sensor. To obtain a color image, a procedure - called demosaicing - is then necessary to estimate the other two missing color components at each pixel. This chapter deals with the quality of color images generated in such a way. We attempt to determine which demosaicing method provides the best results according to several comparison criteria, particularly for subsequent needs of color image analyses like edge detection.}, | ||
author = {Losson, O. and Macaire, L. and Yang, Y.}, | ||
booktitle = {Advances in Imaging and Electron Physics}, | ||
doi = {10.1016/S1076-5670(10)62005-8}, | ||
file = {:Users/kelsolaar/Google Drive/Documents/Mendeley Desktop/Losson, Macaire, Yang - 2010 - Comparison of Color Demosaicing Methods.pdf:pdf}, | ||
isbn = {9780123813169}, | ||
issn = {10765670}, | ||
number = {C}, | ||
pages = {173--265}, | ||
title = {{Comparison of Color Demosaicing Methods}}, | ||
url = {http://linkinghub.elsevier.com/retrieve/pii/S1076567010620058}, | ||
volume = {162}, | ||
year = {2010} | ||
abstract = {Mono-CCD color cameras acquire only one color | ||
component at each pixel by means of their color filter array (CFA) | ||
covering the CCD sensor. To obtain a color image, a procedure - | ||
called demosaicing - is then necessary to estimate the other two | ||
missing color components at each pixel. This chapter deals with | ||
the quality of color images generated in such a way. We attempt to | ||
determine which demosaicing method provides the best results | ||
according to several comparison criteria, particularly for | ||
subsequent needs of color image analyses like edge detection.}, | ||
author = {Losson, O. and Macaire, L. and Yang, Y.}, | ||
booktitle = {Advances in Imaging and Electron Physics}, | ||
doi = {10.1016/S1076-5670(10)62005-8}, | ||
isbn = 9780123813169, | ||
issn = 10765670, | ||
number = {C}, | ||
pages = {173--265}, | ||
title = {{Comparison of Color Demosaicing Methods}}, | ||
url = {http://linkinghub.elsevier.com/retrieve/pii/S1076567010620058}, | ||
volume = 162, | ||
year = 2010, | ||
} | ||
@inproceedings{Malvar2004a, | ||
abstract = {<p>This paper introduces a new interpolation technique for demosaicing of color | ||
images produced by single-CCD digital cameras. We show that the proposed simple | ||
linear filter can lead to an improvement in PSNR of over 5.5 dB when compared to | ||
bilinear demosaicing, and about 0.7 dB improvement in R and B interpolation when | ||
compared to a recently introduced linear interpolator. The proposed filter also | ||
outperforms most nonlinear demosaicing algorithms, without the artifacts due to | ||
nonlinear processing, and a much reduced computational complexity.</p>}, | ||
author = {Malvar, Henrique S and He, Li-Wei and Cutler, Ross and Way, One Microsoft}, | ||
booktitle = {International Conference of Acoustic, Speech and Signal Processing}, | ||
file = {:Users/kelsolaar/Google Drive/Documents/Mendeley Desktop/Malvar et al. - 2004 - High-Quality Linear Interpolation for Demosaicing of Bayer-Patterned Color Images.pdf:pdf}, | ||
month = {may}, | ||
pages = {5--8}, | ||
publisher = {Institute of Electrical and Electronics Engineers, Inc.}, | ||
title = {{High-Quality Linear Interpolation for Demosaicing of Bayer-Patterned Color Images}}, | ||
url = {http://research.microsoft.com/apps/pubs/default.aspx?id=102068}, | ||
year = {2004} | ||
abstract = {<p>This paper introduces a new interpolation | ||
technique for demosaicing of color images produced by single-CCD | ||
digital cameras. We show that the proposed simple linear filter | ||
can lead to an improvement in PSNR of over 5.5 dB when compared to | ||
bilinear demosaicing, and about 0.7 dB improvement in R and B | ||
interpolation when compared to a recently introduced linear | ||
interpolator. The proposed filter also outperforms most nonlinear | ||
demosaicing algorithms, without the artifacts due to nonlinear | ||
processing, and a much reduced computational complexity.</p>}, | ||
author = {Malvar, Henrique S and He, Li-Wei and Cutler, Ross | ||
and Way, One Microsoft}, | ||
booktitle = {International Conference of Acoustic, Speech and | ||
Signal Processing}, | ||
month = may, | ||
pages = {5--8}, | ||
publisher = {Institute of Electrical and Electronics Engineers, | ||
Inc.}, | ||
title = {{High-Quality Linear Interpolation for Demosaicing | ||
of Bayer-Patterned Color Images}}, | ||
url = {http://research.microsoft.com/apps/pubs/default.aspx?id=102068}, | ||
year = 2004, | ||
} | ||
@article{Menon2007c, | ||
abstract = {Most digital cameras use a color filter array to capture the colors of the scene. Downsampled versions of the red, green, and blue components are acquired, and an interpolation of the three colors is necessary to reconstruct a full representation of the image. This color interpolation is known as demosaicing. The most effective demosaicing techniques proposed in the literature are based on directional filtering and a posteriori decision. In this paper, we present a novel approach to this reconstruction method. A refining step is included to further improve the resulting reconstructed image. The proposed approach requires a limited computational cost and gives good performance even when compared to more demanding techniques.}, | ||
author = {Menon, Daniele and Andriani, Stefano and Calvagno, Giancarlo}, | ||
doi = {10.1109/TIP.2006.884928}, | ||
file = {:Users/kelsolaar/Google Drive/Documents/Mendeley Desktop/Menon, Andriani, Calvagno - 2007 - Demosaicing With Directional Filtering and a posteriori Decision.pdf:pdf}, | ||
isbn = {2003506969}, | ||
issn = {1057-7149}, | ||
journal = {IEEE Transactions on Image Processing}, | ||
keywords = {Bayer pattern,Color filter array (CFA) interpolation,Demosaicing,Digital cameras,Directional filtering}, | ||
month = {jan}, | ||
number = {1}, | ||
pages = {132--141}, | ||
pmid = {17283772}, | ||
title = {{Demosaicing With Directional Filtering and a posteriori Decision}}, | ||
url = {http://ieeexplore.ieee.org/document/4032820/}, | ||
volume = {16}, | ||
year = {2007} | ||
abstract = {Most digital cameras use a color filter array to | ||
capture the colors of the scene. Downsampled versions of the red, | ||
green, and blue components are acquired, and an interpolation of | ||
the three colors is necessary to reconstruct a full representation | ||
of the image. This color interpolation is known as demosaicing. | ||
The most effective demosaicing techniques proposed in the | ||
literature are based on directional filtering and a posteriori | ||
decision. In this paper, we present a novel approach to this | ||
reconstruction method. A refining step is included to further | ||
improve the resulting reconstructed image. The proposed approach | ||
requires a limited computational cost and gives good performance | ||
even when compared to more demanding techniques.}, | ||
author = {Menon, Daniele and Andriani, Stefano and Calvagno, | ||
Giancarlo}, | ||
doi = {10.1109/TIP.2006.884928}, | ||
isbn = 2003506969, | ||
issn = {1057-7149}, | ||
journal = {IEEE Transactions on Image Processing}, | ||
keywords = {Bayer pattern,Color filter array (CFA) | ||
interpolation,Demosaicing,Digital cameras,Directional filtering}, | ||
month = jan, | ||
number = 1, | ||
pages = {132--141}, | ||
pmid = 17283772, | ||
title = {{Demosaicing With Directional Filtering and a | ||
posteriori Decision}}, | ||
url = {http://ieeexplore.ieee.org/document/4032820/}, | ||
volume = 16, | ||
year = 2007, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,19 +12,24 @@ Colour - Demosaicing | |
|
||
Technical support. | ||
|
||
- **Maximilian Schambach** | ||
|
||
Memory optimizations. | ||
|
||
Issues & Discussions | ||
-------------------- | ||
|
||
- @Zoldike | ||
- @jiawen | ||
- @laihaotao | ||
- @m0ose | ||
- @maaleske | ||
- @timmeinhardt | ||
|
||
About | ||
----- | ||
|
||
| **Colour - Demosaicing** by Colour Developers | ||
| Copyright © 2015-2018 – Colour Developers – `[email protected] <[email protected]>`_ | ||
| Copyright © 2015-2019 – Colour Developers – `[email protected] <[email protected]>`_ | ||
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause | ||
| `http://github.com/colour-science/colour-demosaicing <http://github.com/colour-science/colour-demosaicing>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ Primary Dependencies | |
- `Python 2.7 <https://www.python.org/download/releases/>`_ or | ||
`Python 3.5 <https://www.python.org/download/releases/>`_ | ||
- `NumPy <http://www.numpy.org/>`_ | ||
- `Colour Science <https://www.colour-science.org>`_ | ||
- `OpenImageIO <https://github.com/OpenImageIO/oiio>`_ | ||
|
||
Pypi | ||
|
@@ -74,6 +75,10 @@ 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 | ||
----- | ||
|
||
|
@@ -93,7 +98,7 @@ Contributing | |
------------ | ||
|
||
If you would like to contribute to `Colour - Demosaicing <https://github.com/colour-science/colour-demosaicing>`_, | ||
please refer to the following `Contributing <http://colour-science.org/contributing/>`_ | ||
please refer to the following `Contributing <https://www.colour-science.org/contributing/>`_ | ||
guide for `Colour <https://github.com/colour-science/colour>`_. | ||
|
||
Bibliography | ||
|
@@ -107,6 +112,6 @@ About | |
----- | ||
|
||
| **Colour - Demosaicing** by Colour Developers | ||
| Copyright © 2015-2018 – Colour Developers – `[email protected] <[email protected]>`_ | ||
| Copyright © 2015-2019 – Colour Developers – `[email protected] <[email protected]>`_ | ||
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause | ||
| `http://github.com/colour-science/colour-demosaicing <http://github.com/colour-science/colour-demosaicing>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,14 @@ Colour - Demosaicing - TODO | |
TODO | ||
---- | ||
|
||
- colour_demosaicing/__init__.py | ||
|
||
- Line 51 : # TODO: Remove legacy printing support when deemed appropriate. | ||
|
||
About | ||
----- | ||
|
||
| **Colour - Demosaicing** by Colour Developers | ||
| Copyright © 2015-2018 – Colour Developers – `[email protected] <[email protected]>`_ | ||
| Copyright © 2015-2019 – Colour Developers – `[email protected] <[email protected]>`_ | ||
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause | ||
| `http://github.com/colour-science/colour-demosaicing <http://github.com/colour-science/colour-demosaicing>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,19 @@ | |
|
||
from __future__ import absolute_import | ||
|
||
import numpy as np | ||
import os | ||
import subprocess # nosec | ||
|
||
import colour | ||
|
||
from .bayer import ( | ||
demosaicing_CFA_Bayer_bilinear, demosaicing_CFA_Bayer_DDFAPD, | ||
demosaicing_CFA_Bayer_Malvar2004, demosaicing_CFA_Bayer_Menon2007, | ||
masks_CFA_Bayer, mosaicing_CFA_Bayer) | ||
|
||
__author__ = 'Colour Developers' | ||
__copyright__ = 'Copyright (C) 2015-2018 - Colour Developers' | ||
__copyright__ = 'Copyright (C) 2015-2019 - Colour Developers' | ||
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause' | ||
__maintainer__ = 'Colour Developers' | ||
__email__ = '[email protected]' | ||
|
@@ -42,8 +46,24 @@ | |
|
||
__major_version__ = '0' | ||
__minor_version__ = '1' | ||
__change_version__ = '3' | ||
__change_version__ = '4' | ||
__version__ = '.'.join( | ||
(__major_version__, | ||
__minor_version__, | ||
__change_version__)) # yapf: disable | ||
|
||
try: | ||
version = subprocess.check_output( # nosec | ||
['git', 'describe'], cwd=os.path.dirname(__file__)).strip() | ||
version = version.decode('utf-8') | ||
except Exception: | ||
version = __version__ | ||
|
||
colour.utilities.ANCILLARY_COLOUR_SCIENCE_PACKAGES['colour-demosaicing'] = ( | ||
version) | ||
|
||
# TODO: Remove legacy printing support when deemed appropriate. | ||
try: | ||
np.set_printoptions(legacy='1.13') | ||
except TypeError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,14 @@ | |
|
||
from __future__ import division, unicode_literals | ||
|
||
import numpy as np | ||
from scipy.ndimage.filters import convolve | ||
|
||
from colour.utilities import tstack | ||
from colour.utilities import as_float_array, tstack | ||
|
||
from colour_demosaicing.bayer import masks_CFA_Bayer | ||
|
||
__author__ = 'Colour Developers' | ||
__copyright__ = 'Copyright (C) 2015-2018 - Colour Developers' | ||
__copyright__ = 'Copyright (C) 2015-2019 - Colour Developers' | ||
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause' | ||
__maintainer__ = 'Colour Developers' | ||
__email__ = '[email protected]' | ||
|
@@ -60,10 +59,11 @@ def demosaicing_CFA_Bayer_bilinear(CFA, pattern='RGGB'): | |
References | ||
---------- | ||
- :cite:`Losson2010c` | ||
:cite:`Losson2010c` | ||
Examples | ||
-------- | ||
>>> import numpy as np | ||
>>> CFA = np.array( | ||
... [[0.30980393, 0.36078432, 0.30588236, 0.3764706], | ||
... [0.35686275, 0.39607844, 0.36078432, 0.40000001]]) | ||
|
@@ -92,15 +92,15 @@ def demosaicing_CFA_Bayer_bilinear(CFA, pattern='RGGB'): | |
[ 0.67058827, 0.18431373, 0.10196078]]]) | ||
""" | ||
|
||
CFA = np.asarray(CFA) | ||
CFA = as_float_array(CFA) | ||
R_m, G_m, B_m = masks_CFA_Bayer(CFA.shape, pattern) | ||
|
||
H_G = np.asarray( | ||
H_G = as_float_array( | ||
[[0, 1, 0], | ||
[1, 4, 1], | ||
[0, 1, 0]]) / 4 # yapf: disable | ||
|
||
H_RB = np.asarray( | ||
H_RB = as_float_array( | ||
[[1, 2, 1], | ||
[2, 4, 2], | ||
[1, 2, 1]]) / 4 # yapf: disable | ||
|
@@ -109,4 +109,6 @@ def demosaicing_CFA_Bayer_bilinear(CFA, pattern='RGGB'): | |
G = convolve(CFA * G_m, H_G) | ||
B = convolve(CFA * B_m, H_RB) | ||
|
||
return tstack((R, G, B)) | ||
del R_m, G_m, B_m, H_RB, H_G | ||
|
||
return tstack([R, G, B]) |
Oops, something went wrong.