Ask Your Question

simons's profile - activity

2017-05-17 18:31:19 -0500 commented question Grayscale with weighted colors

@berak: I'm well aware that OpenCV is not Photoshop, however Photoshop is a handy tool to pre-process images quickly for testing. I found a good set of parameters to separate the foreground from background for object detection in my case. Usually the greyscale conversion is just a weighted sum of the color channels like described in your link Y←0.299⋅R+0.587⋅G+0.114⋅B. Photoshop does the same here, but the weighting is different and I think it is using the hue value (secondary colors). I just couldn't figure out how the percent values map to the actual intensity in the greyscale image yet.... My goal is to implement a function in C++ which takes the same percentage values and applies the greyscale conversion in the same way as Photoshop in this case.

2017-05-17 14:02:50 -0500 asked a question Grayscale with weighted colors

I'm trying to reproduce the results of Photoshop's "Black and White" color adjustments (Image -> Adjustments -> Black and White) in OpenCV, however I was not able to figure out how they calculate the resulting intensity image. What confuses me is that they use percentages in the HSV color space, and I'm not sure to what the percentage relates to, the "value" channel? Also the percentages range from -200% to +300%....

I created some samples using a color wheel, maybe somebody could give me a hint about how to calculate the intensity?

Thanks a lot in advance :)

Link to full image

image description