# Multiple Object Detection shows single blob in binary image

**URL:** <https://forum.opencv.org/t/multiple-object-detection-shows-single-blob-in-binary-image/8879>\
**Category:** C++\
**Created:** [May 23, 2022, 1:06pm UTC](https://forum.opencv.org/t/multiple-object-detection-shows-single-blob-in-binary-image/8879 "2022-05-23T13:06:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neeraj\_Navlakha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/neeraj_navlakha/32/5274_2.png) [@Neeraj\_Navlakha](https://forum.opencv.org/u/Neeraj_Navlakha)\
**Post date:** [May 23, 2022, 1:06pm UTC](https://forum.opencv.org/t/multiple-object-detection-shows-single-blob-in-binary-image/8879/1 "2022-05-23T13:06:49Z")

</div>

0

I am working on pool ball tracking and detection with an IR camera using OpenCV in C++. I am able to segment the ball as blobs in a Binary image. The problem occurs when multiple pool balls are touching each other. The algorithm considers it as a single large blob. I have tried :

1. Various parameters for erosion and dilation.
2. Distance transform and watershed algorithm.
3. Convexity Defects. Can someone please give suggestions for the same?  
 ![blob](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/a/a9ea1473a6f8f4455c22d4f8754fe238d90ef18a.png)
