Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You question is really generic. For example are your objects from the beginning like that or your example image is the result of some pre-processing procedure (e.g. thresholding, findcontours, etc.)?

Because if it is the latter you should consider that in the original image there are some features that you not using and that could be really useful (e.g. edges of the overlapping, touching objects). In this case applying some distance transform in combination with watershed algorithm would solve your problem. Have a look here.

If your case is the former then you might need to follow a more advanced approach, that could be for example finding the convex hulls of the objects, or maybe some template matching, etc.

You question is really generic. For example are your objects from the beginning like that or your example image is the result of some pre-processing procedure (e.g. thresholding, findcontours, etc.)?

Because if it is the latter you should consider that in the original image there are some features that you not using and that could be really useful (e.g. edges of the overlapping, touching objects). In this case applying some distance transform in combination with watershed algorithm would solve your problem. Have a look here.here.

If your case is the former then you might need to follow a more advanced approach, that could be for example finding the convex hulls of the objects, or maybe some template matching, etc.