1 | initial version |
Even though Haar cascade returns the Object boundary, It is not Accurate! I would not rely on that results alone! Especially when you are trying to find the distance/depth from the image, you need more accuracy!
So i recommend you to take that as a input and then threshold your image ROI to find the Exact size of your Ball.