1 | initial version |
If you look at what the HSV colorspace is, it should be pretty obvious. Take the V channel (or covert RGB to gray, basically same thing) and look for very low values.
Exactly 0 is perfect black, and some threshold above is what appears black to you. You have to manually pick that threshold, there's no exact value.