Skip to content

Commit

Permalink
Merge branch 'release/v0.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Nov 28, 2020
2 parents 9124403 + 401bc03 commit b6b2ea2
Show file tree
Hide file tree
Showing 30 changed files with 435 additions and 355 deletions.
145 changes: 41 additions & 104 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,135 +3,72 @@ name: Continuous Integration
on: [push, pull_request]

jobs:
unix-build:
name: Unix Build
continuous-integration:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [ubuntu-18.04, macOS-10.14]
python-version: [2.7, 3.6, 3.7]
os: [macOS-latest, ubuntu-18.04, windows-latest]
python-version: [2.7, 3.6, 3.7, 3.8]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Environment Variables
run: |
CI_PYTHON_VERSION=${{ matrix.python-version }}
CI_PACKAGE=colour_demosaicing
CI_SHA=${{ github.sha }}
CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
CI_SLACK_SUCCESS_NOTIFICATION="payload={\"attachments\": [{\"color\": \"#4CAF50\", \"author_name\": \"Python ${{ matrix.python-version }} build on ${{ matrix.os }}\", \"text\": \"Build for commit *${CI_SHA:0:7}* succeeded!\", \"title\": \"${{ github.repository }}@${{ github.ref }}\", \"title_link\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks\", \"footer\": \"Triggered by ${{ github.actor }}\"}], \"username\":\"Github Actions @ ${{ github.repository }}\", \"channel\":\"#continuous-integration\", \"icon_url\":\"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png\"}"
CI_SLACK_FAILURE_NOTIFICATION="${CI_SLACK_SUCCESS_NOTIFICATION/4CAF50/F44336}"
CI_SLACK_FAILURE_NOTIFICATION="${CI_SLACK_FAILURE_NOTIFICATION/succeeded/failed}"
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
echo ::set-env name=CI_PACKAGE::$CI_PACKAGE
echo ::set-env name=CI_SHA::$CI_SHA
echo ::set-env name=CI_SLACK_WEBHOOK::$CI_SLACK_WEBHOOK
echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::$CI_SLACK_SUCCESS_NOTIFICATION
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::$CI_SLACK_FAILURE_NOTIFICATION
echo ::set-env name=COVERALLS_REPO_TOKEN::$COVERALLS_REPO_TOKEN
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour_demosaicing" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install gnu-sed
ln -s /usr/local/bin/gsed /usr/local/bin/sed
shell: bash
- name: Install Poetry
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --preview
PATH=$HOME/.poetry/bin:$PATH
echo ::set-env name=PATH::$PATH
- name: Install Package Dependencies
run: |
poetry install
poetry env use $CI_PYTHON_VERSION
source $(poetry env info -p)/bin/activate
python -c "import imageio;imageio.plugins.freeimage.download()"
- name: Lint with flake8
run: |
source $(poetry env info -p)/bin/activate
flake8 $CI_PACKAGE --count --show-source --statistics
- name: Test with nosetests
python get-poetry.py --version 1.0.10
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Update pyproject.toml file (Python 2.7)
if: matrix.python-version == '2.7'
run: |
source $(poetry env info -p)/bin/activate
python -W ignore -m nose --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
- name: Upload Coverage to coveralls.io
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
sed -i.bak 's/python = "~2.7 || ^3.6"/python = "~2.7"/g' pyproject.toml
sed -i.bak '/colour-science = "\^0\.3\.16"/ a qtconsole = "4.7.7"' pyproject.toml
shell: bash
- name: Update pyproject.toml file (Python 3.x)
if: matrix.python-version != '2.7'
run: |
source $(poetry env info -p)/bin/activate
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
- name: Notify Slack
if: always()
sed -i.bak 's/python = "~2.7 || ^3.6"/python = "^3.6"/g' pyproject.toml
shell: bash
- name: Update pyproject.toml file (Windows, Python 2.7)
if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
run: |
if [ "${{ job.status }}" == "Success" ]; then CI_SLACK_NOTIFICATION="$CI_SLACK_SUCCESS_NOTIFICATION"; else CI_SLACK_NOTIFICATION="$CI_SLACK_FAILURE_NOTIFICATION"; fi
if [ -z "$CI_SLACK_WEBHOOK" ]; then echo \"SLACK_WEBHOOK\" secret is undefined!; else curl -k -d "$CI_SLACK_NOTIFICATION" -X POST $CI_SLACK_WEBHOOK; fi
windows-build:
name: Windows Build
strategy:
matrix:
os: [windows-2019]
python-version: [2.7, 3.6, 3.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Environment Variables
run: |
set CI_PYTHON_VERSION=${{ matrix.python-version }}
set CI_PACKAGE=colour_demosaicing
set CI_SHA=${{ github.sha }}
set CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
set CI_SLACK_SUCCESS_NOTIFICATION="payload={\"attachments\": [{\"color\": \"#4CAF50\", \"author_name\": \"Python ${{ matrix.python-version }} build on ${{ matrix.os }}\", \"text\": \"Build for commit *"%CI_SHA:~0,7%"* succeeded!\", \"title\": \"${{ github.repository }}@${{ github.ref }}\", \"title_link\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks\", \"footer\": \"Triggered by ${{ github.actor }}\"}], \"username\":\"Github Actions @ ${{ github.repository }}\", \"channel\":\"#continuous-integration\", \"icon_url\":\"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png\"}"
set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION:4CAF50=F44336%
set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION:succeeded=failed%
set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
echo ::set-env name=CI_SHA::%CI_SHA%
echo ::set-env name=CI_SLACK_WEBHOOK::%CI_SLACK_WEBHOOK%
echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::%CI_SLACK_SUCCESS_NOTIFICATION%
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::%CI_SLACK_FAILURE_NOTIFICATION%
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
shell: cmd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --preview
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
echo ::set-env name=PATH::%PATH%
shell: cmd
sed -i.bak '/colour-science = "\^0\.3\.16"/ a pywin32 = "228"' pyproject.toml
shell: bash
- name: Install Package Dependencies
run: |
call poetry install
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
python -c "import imageio;imageio.plugins.freeimage.download()"
shell: cmd
poetry install
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Lint with flake8
run: |
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
flake8 %CI_PACKAGE% --count --show-source --statistics
shell: cmd
poetry run flake8 $CI_PACKAGE --count --show-source --statistics
shell: bash
- name: Test with nosetests
run: |
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
python -W ignore -m nose --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
shell: cmd
poetry run python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
shell: bash
- name: Upload Coverage to coveralls.io
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
run: |
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
shell: cmd
- name: Notify Slack
if: always()
run: |
IF "${{ job.status }}"=="Success" (set CI_SLACK_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION%) ELSE (set CI_SLACK_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION%)
IF "%CI_SLACK_WEBHOOK%"=="" (echo "SLACK_WEBHOOK" secret is undefined!) ELSE (curl -k -d %CI_SLACK_NOTIFICATION% -X POST %CI_SLACK_WEBHOOK%)
shell: cmd
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
shell: bash
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ repos:
rev: 3.7.8
hooks:
- id: flake8
exclude: examples
exclude: examples|setup\.py
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.23.0
hooks:
- id: yapf
exclude: setup\.py
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ build:
image: latest

python:
version: 3.6
version: 3.7
pip_install: true
extra_requirements:
- read-the-docs
70 changes: 34 additions & 36 deletions BIBLIOGRAPHY.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
@incollection{Losson2010c,
title = {Comparison of Color Demosaicing Methods},
booktitle = {Advances in Imaging and Electron Physics},
author = {Losson, O. and Macaire, L. and Yang, Y.},
year = 2010,
volume = 162,
pages = {173--265},
issn = 10765670,
doi = {10.1016/S1076-5670(10)62005-8},
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 -
Expand All @@ -8,42 +16,43 @@ @incollection{Losson2010c
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,
isbn = {978-0-12-381316-9},
}
@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},
title = {High-Quality Linear Interpolation for Demosaicing of
Bayer-Patterned Color Images},
booktitle = {International Conference of Acoustic, Speech and
Signal Processing},
author = {Malvar, Henrique S and He, Li-Wei and Cutler, Ross
and Way, One Microsoft},
year = 2004,
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{$>$}},
}
@article{Menon2007c,
title = {Demosaicing With Directional Filtering and a
posteriori Decision},
author = {Menon, Daniele and Andriani, Stefano and Calvagno,
Giancarlo},
year = 2007,
month = jan,
volume = 16,
pages = {132--141},
issn = {1057-7149},
doi = {10.1109/TIP.2006.884928},
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
Expand All @@ -56,21 +65,10 @@ @article{Menon2007c
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,
}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This Code of Conduct applies within all project spaces, and it also applies when
## Enforcement


Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Thomas Mansencal and Michael Mauderer via email at thomas.mansencal@gmail.com and michael@mauderer.me respectively. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Thomas Mansencal and Michael Mauderer via email at thomas@colour-science.org and michael@colour-science.org respectively. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ About
-----

| **Colour - Demosaicing** by Colour Developers
| Copyright © 2015-2019 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`__
| Copyright © 2015-2020 – Colour Developers – `colour-developers@colour-science.org <colour-developers@colour-science.org>`__
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
| `https://github.com/colour-science/colour-demosaicing <https://github.com/colour-science/colour-demosaicing>`__
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2019, Colour Developers
Copyright (c) 2015-2020, Colour Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Colour - Demosaicing
|actions| |coveralls| |codacy| |version|

.. |actions| image:: https://github.com/colour-science/colour-demosaicing/workflows/Continuous%20Integration/badge.svg
.. |actions| image:: https://img.shields.io/github/workflow/status/colour-science/colour-demosaicing/Continuous%20Integration?label=actions&logo=github&style=flat-square
:target: https://github.com/colour-science/colour-demosaicing/actions
:alt: Develop Build Status
.. |coveralls| image:: http://img.shields.io/coveralls/colour-science/colour-demosaicing/develop.svg?style=flat-square
Expand Down Expand Up @@ -58,22 +58,22 @@ Primary Dependencies

**Colour - Demosaicing** requires various dependencies in order to run:

- `Python >= 2.7 <https://www.python.org/download/releases/>`__ or
`Python >= 3.5 <https://www.python.org/download/releases/>`__
- `Colour Science <https://www.colour-science.org>`__
- `python>=2.7 <https://www.python.org/download/releases/>`__ or
`python>=3.5 <https://www.python.org/download/releases/>`__
- `colour-science <https://pypi.org/project/colour-science/>`__

Pypi
^^^^

Once the dependencies satisfied, **Colour - Demosaicing** can be installed from
Once the dependencies are satisfied, **Colour - Demosaicing** can be installed from
the `Python Package Index <http://pypi.python.org/pypi/colour-demosaicing>`__ by
issuing this command in a shell::

pip install colour-demosaicing
pip install --user colour-demosaicing

The overall development dependencies are installed as follows::

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

Usage
-----
Expand Down Expand Up @@ -114,6 +114,6 @@ About
-----

| **Colour - Demosaicing** by Colour Developers
| Copyright © 2015-2019 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`__
| Copyright © 2015-2020 – Colour Developers – `colour-developers@colour-science.org <colour-developers@colour-science.org>`__
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
| `https://github.com/colour-science/colour-demosaicing <https://github.com/colour-science/colour-demosaicing>`__
4 changes: 2 additions & 2 deletions TODO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ About
-----

| **Colour - Demosaicing** by Colour Developers
| Copyright © 2015-2019 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`_
| Copyright © 2015-2020 – Colour Developers – `colour-developers@colour-science.org <colour-developers@colour-science.org>`__
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
| `https://github.com/colour-science/colour-demosaicing <https://github.com/colour-science/colour-demosaicing>`_
| `https://github.com/colour-science/colour-demosaicing <https://github.com/colour-science/colour-demosaicing>`__

0 comments on commit b6b2ea2

Please sign in to comment.