building photoshop-style black-white-conversion
Hi all!
I'm trying to separate some coloured object from my background. Before starting with OpenCV I'm using a test image in Photoshop to check which color channels or which combination of color channels are the best.
There is a filter "black-and-white" (which is in fact a grayscale converter) which offers 6 trackbars for each shade of the colors:
red, yellow, green, cyan, blue, magenta
reaching from -200 to +300
I then try to find the best combination of this 6 settings to seperate my object as good as possible (for example the background becomes black, the object white).
If I found the perfect combination, how will an algorithm in OpenCV look to rebuild this gray-scale conversion using the values found in Photoshop?
Thanks and regards!
What OpenCV algorithm are you using? BinaryThreshold? Filter? What have you tried so far?
I already loop through all the pixels and apply a custom grayscale conversion (http://answers.opencv.org/question/12947/custom-grayscale-conversion/) but I want to understand how the weight for R, G and B can be calculated depending on the setting in Photoshop. How to they correspond?