You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, @KelSolaar , thanks a lot for the lib.
I noticed that the demosaicing function does not return the output in [0,1] range, how can I make it in [0,1] range?
def demosaicing_CFA_Bayer_bilinear(CFA, pattern='RGGB'):
Notes
-----
- The definition output is not clipped in range [0, 1] : this allows for
direct HDRI / radiance image generation on *Bayer* CFA data and post
demosaicing of the high dynamic range data as showcased in this
`Jupyter Notebook <https://github.com/colour-science/colour-hdri/\
blob/develop/colour_hdri/examples/\
examples_merge_from_raw_files_with_post_demosaicing.ipynb>`__.
The text was updated successfully, but these errors were encountered:
Jiazheng411
changed the title
How to make demosaicing function return RGB values in [0,1] range.
How to make demosaicing function return RGB values in [0,1] range?
Jan 3, 2021
You will want to find well saturation maximums and minimum for each photosite plane via numpy.amax and then normalize. (photosite - photosite_min) / (photosite_max - photosite_min) should work to normalize to 1.0, for example.
Thanks a lot.
By the way, I found the images showed using colour.plotting.plot_image(colour.cctf_decoding(IMG)) is darker than the original image.
for example, this is the original image,
after I read the image using img = colour.read_image(img_path)
this is what colour.plotting.plot_image(colour.cctf_decoding(img)) looks like
And I do a mosaicing followed by demosaicing, the image looks much lighter,\
Most sensor data is linearly encoded. That is, it is not encoded for display. The subject of preparing colour data for display is likely a wholly other matter.
The linear data then would require some sort of nonlinear curvature to scale and prepare the data for output.
The most simple transform would be to use the display’s inverse EOTF to encode the sensor-linear values for display linear output. For example, using the sRGB inverse EOTF, or more likely, a generic inversion of a 2.2 power function, would prepare linear encoded colour data for projection out of a commodity sRGB-like display.
What you are likely to discover after that unfolds further down the rabbit hole...
Hi, @KelSolaar , thanks a lot for the lib.
I noticed that the demosaicing function does not return the output in [0,1] range, how can I make it in [0,1] range?
The text was updated successfully, but these errors were encountered: