mardi 3 mars 2015

Binary Image, Concentrations of White Dots with OpenCV


Given a binary image of black, with a few sporadic white dots, I'm looking for a way to "lasso" a majority of the white dots inside a bounding rectangle. Consider this image:


enter image description here


See how not all of the dots are enclosed, but just the clusters (or set of clusters) where there are clearly more white dots than anywhere else?


I already know how to put a bounding box around all of the white dots with OpenCV. Can anyone direct me as to how I can analyze this image for one big concentration of dots, ignoring any peripheral dots which are not really part of a group?


N.B.: This bounding box doesn't have to be skew. Even a convex hull would be nice as output.


I can adjust the size, color, alpha, location, density, etc. of these dots. So if your thoughts involve doing something with these dots in order to process them, that might work.




Aucun commentaire:

Enregistrer un commentaire