Defines various RGB colourspace volume computation objects:
Randomly samples the Lab colourspace volume and returns the ratio of samples within the given RGB colourspace volume.
Parameters: |
|
---|---|
Returns: | Within RGB colourspace volume samples count. |
Return type: | integer |
Notes
The doctest is assuming that np.random.RandomState() definition will return the same sequence no matter which OS or Python version is used. There is however no formal promise about the prng sequence reproducibility of either Python or *Numpy implementations: Laurent. (2012). Reproducibility of python pseudo-random numbers across systems and versions? Retrieved January 20, 2015, from http://stackoverflow.com/questions/8786084/reproducibility-of-python-pseudo-random-numbers-across-systems-and-versions
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> sample_RGB_colourspace_volume_MonteCarlo(sRGB, 10e3, random_state=prng)
9...
Computes given RGB colourspace volume limits in Lab colourspace.
Parameters: |
|
---|---|
Returns: | RGB colourspace volume limits. |
Return type: | ndarray |
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> RGB_colourspace_limits(sRGB)
array([[ 0... , 100... ],
[ -79.2263741..., 94.6657491...],
[-114.7846271..., 96.7135199...]])
Performs given RGB colourspace volume computation using Monte Carlo method and multiprocessing.
Parameters: |
|
---|---|
Returns: | RGB colourspace volume. |
Return type: | float |
Notes
The doctest is assuming that np.random.RandomState() definition will return the same sequence no matter which OS or Python version is used. There is however no formal promise about the prng sequence reproducibility of either Python or *Numpy implementations: Laurent. (2012). Reproducibility of python pseudo-random numbers across systems and versions? Retrieved January 20, 2015, from http://stackoverflow.com/questions/8786084/reproducibility-of-python-pseudo-random-numbers-across-systems-and-versions
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> processes = 1
>>> RGB_colourspace_volume_MonteCarlo(
... sRGB, 10e3, random_state=prng, processes=processes)
859...
Returns given RGB colourspace percentage coverage of Pointer’s Gamut volume using Monte Carlo method.
Parameters: |
|
---|---|
Returns: | Percentage coverage of Pointer’s Gamut volume. |
Return type: | float |
Notes
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> RGB_colourspace_pointer_gamut_coverage_MonteCarlo(
... sRGB,
... 10e3,
... random_state=prng)
83...
Returns given RGB colourspace percentage coverage of visible spectrum volume using Monte Carlo method.
Parameters: |
|
---|---|
Returns: | Percentage coverage of visible spectrum volume. |
Return type: | float |
Notes
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> RGB_colourspace_visible_spectrum_coverage_MonteCarlo(
... sRGB,
... 10e3,
... random_state=prng)
36...