Coder Social home page Coder Social logo

Comments (3)

sobotka avatar sobotka commented on May 26, 2024

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.

from colour-demosaicing.

Jiazheng411 avatar Jiazheng411 commented on May 26, 2024

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,
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
image
And I do a mosaicing followed by demosaicing, the image looks much lighter,\

CFA_BGGR = mosaicing_CFA_Bayer(img, 'BGGR')
reinter_CFA_BGGR = demosaicing_CFA_Bayer_bilinear(CFA_BGGR, 'BGGR')
colour.plotting.plot_image(colour.cctf_encoding(reinter_CFA_BGGR))

image
is this expected? Or what can I do to eliminate this effects?

from colour-demosaicing.

sobotka avatar sobotka commented on May 26, 2024

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...

from colour-demosaicing.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.