Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jun 20, 2019
0 parents commit 3fb802c
Show file tree
Hide file tree
Showing 70 changed files with 5,644 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
source = colour_datasets
[report]
exclude_lines =
pragma: no cover
if __name__ == .__main__.:
pass
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.egg-info
*.pyc
*.pyo
.DS_Store
.coverage
.idea
__pycache__
build
dist
docs/_build
references
zenodo
180 changes: 180 additions & 0 deletions .style.yapf
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
[style]
# Align closing bracket with visual indentation.
align_closing_bracket_with_visual_indent=True

# Allow dictionary keys to exist on multiple lines. For example:
#
# x = {
# ('this is the first element of a tuple',
# 'this is the second element of a tuple'):
# value,
# }
allow_multiline_dictionary_keys=False

# Allow lambdas to be formatted on more than one line.
allow_multiline_lambdas=False

# Insert a blank line before a class-level docstring.
blank_line_before_class_docstring=False

# Insert a blank line before a 'def' or 'class' immediately nested
# within another 'def' or 'class'. For example:
#
# class Foo:
# # <------ this blank line
# def method():
# ...
blank_line_before_nested_class_or_def=False

# Do not split consecutive brackets. Only relevant when
# dedent_closing_brackets is set. For example:
#
# call_func_that_takes_a_dict(
# {
# 'key1': 'value1',
# 'key2': 'value2',
# }
# )
#
# would reformat to:
#
# call_func_that_takes_a_dict({
# 'key1': 'value1',
# 'key2': 'value2',
# })
coalesce_brackets=False

# The column limit.
column_limit=79

# Indent width used for line continuations.
continuation_indent_width=4

# Put closing brackets on a separate line, dedented, if the bracketed
# expression can't fit in a single line. Applies to all kinds of brackets,
# including function definitions and calls. For example:
#
# config = {
# 'key1': 'value1',
# 'key2': 'value2',
# } # <--- this bracket is dedented and on a separate line
#
# time_series = self.remote_client.query_entity_counters(
# entity='dev3246.region1',
# key='dns.query_latency_tcp',
# transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
# start_ts=now()-timedelta(days=3),
# end_ts=now(),
# ) # <--- this bracket is dedented and on a separate line
dedent_closing_brackets=False

# Place each dictionary entry onto its own line.
each_dict_entry_on_separate_line=True

# The regex for an i18n comment. The presence of this comment stops
# reformatting of that line, because the comments are required to be
# next to the string they translate.
i18n_comment=

# The i18n function call names. The presence of this function stops
# reformattting on that line, because the string it has cannot be moved
# away from the i18n comment.
i18n_function_call=

# Indent the dictionary value if it cannot fit on the same line as the
# dictionary key. For example:
#
# config = {
# 'key1':
# 'value1',
# 'key2': value1 +
# value2,
# }
indent_dictionary_value=True

# The number of columns to use for indentation.
indent_width=4

# Join short lines into one line. E.g., single line 'if' statements.
join_multiple_lines=True

# Use spaces around default or named assigns.
spaces_around_default_or_named_assign=False

# Use spaces around the power operator.
spaces_around_power_operator=True

# The number of spaces required before a trailing comment.
spaces_before_comment=2

# Insert a space between the ending comma and closing bracket of a list,
# etc.
space_between_ending_comma_and_closing_bracket=True

# Split before arguments if the argument list is terminated by a
# comma.
split_arguments_when_comma_terminated=False

# Set to True to prefer splitting before '&', '|' or '^' rather than
# after.
split_before_bitwise_operator=False

# Split before a dictionary or set generator (comp_for). For example, note
# the split before the 'for':
#
# foo = {
# variable: 'Hello world, have a nice day!'
# for variable in bar if variable != 42
# }
split_before_dict_set_generator=True

# If an argument / parameter list is going to be split, then split before
# the first argument.
split_before_first_argument=False

# Set to True to prefer splitting before 'and' or 'or' rather than
# after.
split_before_logical_operator=False

# Split named assignments onto individual lines.
split_before_named_assigns=True

# The penalty for splitting right after the opening bracket.
split_penalty_after_opening_bracket=30

# The penalty for splitting the line after a unary operator.
split_penalty_after_unary_operator=10000

# The penalty for splitting right before an if expression.
split_penalty_before_if_expr=0

# The penalty of splitting the line around the '&', '|', and '^'
# operators.
split_penalty_bitwise_operator=300

# The penalty for characters over the column limit.
split_penalty_excess_character=4500

# The penalty incurred by adding a line split to the unwrapped line. The
# more line splits added the higher the penalty.
split_penalty_for_added_line_split=30

# The penalty of splitting a list of "import as" names. For example:
#
# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1,
# long_argument_2,
# long_argument_3)
#
# would reformat to something like:
#
# from a_very_long_or_indented_module_name_yada_yad import (
# long_argument_1, long_argument_2, long_argument_3)
split_penalty_import_names=0

# The penalty of splitting the line around the 'and' and 'or'
# operators.
split_penalty_logical_operator=300

# Use the Tab character for indentation.
use_tabs=False

49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
sudo: true
language: python

matrix:
fast_finish: true
include:
- python: 3.6
env:
- PYTHON_VERSION="3.6"
- python: 2.7
env:
- PYTHON_VERSION="2.7"

notifications:
slack: colour-science:Y6lPPcN7y53Js94geqUpqsAP

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost-all-dev
- libopenexr-dev
- libilmbase-dev

before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p /home/travis/miniconda
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes --quiet conda
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- PACKAGES="python=${PYTHON_VERSION}"
- PACKAGES="${PACKAGES} numpy"; if [ ${NUMPY_VERSION} ]; then PACKAGES="${PACKAGES}=${NUMPY_VERSION}"; fi
- PACKAGES="${PACKAGES} scipy"; if [ ${SCIPY_VERSION} ]; then PACKAGES="${PACKAGES}=${SCIPY_VERSION}"; fi
- cd /home/travis/build/colour-science/colour-datasets

install:
- conda create --yes --quiet -n colour-datasets-test ${PACKAGES} pip setuptools nose
- source activate colour-datasets-test
- pip install colour-science coverage coveralls flake8 mock==1.0.1 tqdm

script:
- flake8 colour_datasets
- nosetests --nocapture --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE --with-coverage --cover-package=colour_datasets colour_datasets

after_success:
- coveralls
46 changes: 46 additions & 0 deletions BIBLIOGRAPHY.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@inproceedings{Jiang2013,
abstract = {Camera spectral sensitivity functions relate scene
radiance with captured RGB triplets. They are important for many
computer vision tasks that use color information, such as
multispectral imaging, color rendering, and color constancy. In
this paper, we aim to explore the space of spectral sensitivity
functions for digital color cameras. After collecting a database
of 28 cameras covering a variety of types, we find this space
convex and two-dimensional. Based on this statistical model, we
propose two methods to recover camera spectral sensitivities using
regular reflective color targets (e.g., color checker) from a
single image with and without knowing the illumination. We show
the proposed model is more accurate and robust for estimating
camera spectral sensitivities than other basis functions. We also
show two applications for the recovery of camera spectral
sensitivities - simulation of color rendering for cameras and
computational color constancy.},
author = {Jiang, Jun and Liu, Dengyu and Gu, Jinwei and
Susstrunk, Sabine},
booktitle = {2013 IEEE Workshop on Applications of Computer
Vision (WACV)},
doi = {10.1109/WACV.2013.6475015},
isbn = {978-1-4673-5054-9},
issn = 21583978,
month = jan,
pages = {168--179},
publisher = {IEEE},
title = {{What is the space of spectral sensitivity functions
for digital color cameras?}},
url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6475015},
year = 2013,
}
@misc{Labsphere2019,
author = {Labsphere},
doi = {10.5281/zenodo.3245875},
title = {{Labsphere SRS-99-020}},
year = 2019,
}
@misc{X-Rite2016,
author = {X-Rite},
title = {{New Color Specifications for ColorChecker SG and
Classic Charts}},
url = {https://xritephoto.com/ph_product_overview.aspx?ID=938\&Action=Support\&SupportID=5884},
urldate = {2019/06/14},
year = 2016,
}
17 changes: 17 additions & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Contributors
============

Development & Technical Support
-------------------------------

- **Thomas Mansencal**, *Visual Effects Artist @ Weta Digital*

Project coordination, overall development.

About
-----

| **Colour - Datasets** by Colour Developers
| Copyright © 2019 – Colour Developers – `[email protected] <[email protected]>`_
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
| `https://github.com/colour-science/colour-datasets <https://github.com/colour-science/colour-datasets>`_
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2019, Colour Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Colour Developers nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL COLOUR DEVELOPERS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include LICENSE
include *.bib
include *.rst
graft colour_datasets/examples
prune colour_datasets/examples/.ipynb_checkpoints
global-exclude __pycache__
global-exclude *.pyc
global-exclude *.pyo
global-exclude ._*
global-exclude .DS_Store
Loading

0 comments on commit 3fb802c

Please sign in to comment.