Ask Your Question

Revision history [back]

Basically like @berak suggested you not reading your code. The following line selects the largest blob.

int k = getBiggestContourIndex(contours);

If yoy want to detect all blobs, get amount of elements from contour vector, then iterate over it using a for loop and do processing for each blob in the loop.