Object Detection (Connected-Components)
Counting Connected Components in an Image
Based on the pixel intensity distribution exhibited on the Histogram, the original image is segmented at Threshold T=10. The objects of interest is represented by the smaller peak while the larger peak represents the background. All pixels less than 10 (object of interest) are assigned 1 while pixels greater than 10 are assigned 0. The resulting segmented image is presented below.
The algorithm identified 3 components as shown below