pwkit | Miscellaneous science/astronomy tools | Machine Learning library
kandi X-RAY | pwkit Summary
kandi X-RAY | pwkit Summary
Miscellaneous science/astronomy tools.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return a pager
- Open an image
- Generate slices around a sequence of values
- Create a ppplot
- Parse command line arguments
- Register a Command object
- Populates the commands with the given values
- Initialize the default environment
- Function decorator
- Create an image for a model
- Compute the probability density function over a time series
- Calculate the weighted variance of x
- Create a tty plot
- Make a multi - spectrum plot
- Calculate the lmder1 function for the lmder1 algorithm
- Invoke an astropy fits
- Integrate quadratic quadrature
- Calculate a newton function
- Create a xyph plot
- Compute the conf conf
- Make a spectrum plot
- Solve the problem with scipy
- Calculate the distance between two points
- Invoke epic aliases
- Read the contents of a viz file
- Handles flagmanager
pwkit Key Features
pwkit Examples and Code Snippets
>>> int(round(colour.models.eotf_inverse_sRGB(0.18) * 255))
118
0.18116424424986022
Community Discussions
Trending Discussions on pwkit
QUESTION
I have referred to the following stackoverflow thread for computing the color correction matrix.
As referred in the thread mentioned above, I want to convert from the sRGB color space to linear sRGB space, I'm trying to use the pwkit colorspace mapper code for the conversion.
However, i'm unsure about the resulting linear sRGB values, since the function requires sRGB in range [0-1], is dividing the sRGB values by 255.0, the correct approach? How to verify that the linear sRGB values returned by the function are correct?
...ANSWER
Answered 2019-Jul-15 at 06:50From a terminology standpoint and assuming your image was effectively sRGB encoded, i.e. following IEC 61966-2-1:1999, you are decoding sRGB encoded non-linear light values by applying the sRGB Electro-Optical Transfer Function (EOTF), a type of colour component transfer function (CCTF) thus saying:
I want to convert from the sRGB color space to linear RGB space
is not correct because you are still effectively using sRGB encoded colours, the only difference is that prior to using the decoding CCTF they were non-linearly encoded. An additive RGB colourspace is defined by a set of three components: primaries, whitepoint and CCTFs. By using the CCTF you have not changed at all the primaries or whitepoint, i.e. the gamut is the same, thus what you should say is more along those lines:
I want to convert from the sRGB color space to linear sRGB color space
Now to verify that your approach is correct, you can compare with a reference implementation such as Colour whose code is used in the SO thread you referenced: 18% gray is 118 upon non-linear encoding using sRGB inverse EOTF:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pwkit
You can use pwkit like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page