New answers tagged


You must Normalise the values. If the values divide by (sum of them), that will not be happend.


I would suggest decomposing the black pixels into connected components using standard algorithms. (For instance, OpenCV has an implementation of this, I believe.) Then, classify each component based on your rules. (I'm not seeing what boundary tracing offers over connected component labelling, but you could try it too if you wanted.) I recommend you try ...

Top 50 recent answers are included