May-08-2022, 05:06 PM
(May-08-2022, 04:29 PM)deanhystad Wrote: You should display the grayscale image you produce and the greyscale image that is produced by cv2. That might help you figure out why the thresholding isn't producing the result you want. I don't think using mean is correct. Red and Blue are perceived to be dark colors, and Green a bright color, but in your equation all contribute equally to the brightness of the pixel.
I don't think that the problem is in grayscale filter. For comparison,
this is a result of mean grayscale filter
And this is a result of cv2 build-in grayscale filter (cv2.COLOR_BGR2GRAY)
As you see, no so much difference