开发者

Conform colors between 2 RGB images in OpenCV

开发者 https://www.devze.com 2023-04-05 22:13 出处:网络
i\'ve two RGB images of the 开发者_StackOverflow社区same subject with different color values...my goal is to conform colors and merge images. i\'ve tried by converting RGB->HSV space and equalizing v

i've two RGB images of the 开发者_StackOverflow社区same subject with different color values...my goal is to conform colors and merge images. i've tried by converting RGB->HSV space and equalizing v channel, but the result is unsatisfactory. Some solutions?

Thanks a lot.


You can convert both images in to black and white and than scale the color pixel values ..in particular range and then start comparing it.


Calculate the histograms of both images. They should be the same, but they probably aren't (given the question).

To take a simple example, in one picture 50% of the blue values might be below 110, while in the other 50% are below 130. You then will want to convert 110 to 120 in the first image, and 130 to 120 in the second.

You'd want to do the same for 25% and 75%; depending on the actual differences you might want to partition the histograms in even smaller parts.

Remember to do this for all three histograms.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号