stretch dynamic range keeping original ratios of the color channels

asked 2019-03-12 11:10:53 -0500

Hey,

I'd like to separately adjust the dynamic range of each color channel of an image but under the constraint that the original ratios in each bin shouldn't deviate more than some fixed percentage. Any idea how one can implement that? Is there maybe even something already there in OpenCV?

edit retag flag offensive close merge delete

Comments

Not sure exactly how you want to "adjust the dynamic range" but maybe this will give you some ideas. https://docs.opencv.org/2.4/doc/tutor...

Chris gravatar imageChris ( 2019-03-13 05:19:27 -0500 )edit

By adjusting, I really mean just stretching it out to use the full spectrum per color channel. But if I do this naively, the image won't look good and sort of grey-washed. That's why I'd like to keep most of the original's ratios. I've had a look at the histogram tutorial but this just explains the very basic functionality.

orbiter1 gravatar imageorbiter1 ( 2019-03-13 06:35:55 -0500 )edit