Blob detection is applied after the morphological operation to detect connected component, a group of pixel that belongs to individual objects in image. The results are the centroid positions and areas of the objects in the pixel coordinates. Only the detected objects with the specified size are used for the counting process.