Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To find the centroid you probably want to use moments. To differentiate them by color, you can calculate the moments for each of the three channels to get the average color for the shape.