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 :
- Various parameters for erosion and dilation.
- Distance transform and watershed algorithm.
- Convexity Defects. Can someone please give suggestions for the same?