I'm trying to detect ping pong ball using my own trained Haar classifier(not so good one) and then to calculate ball distance from camera.I calibrated camera and used those parameters alongside with known ball dimensions in real world and ball size on picture,and the formula works fine when I detect ball just the right. The problem is Haar classifier sometimes detect ball slightly smaller, and sometimes slightly bigger then it is in picture so I got wrong distance values.Like here:
My question is, can Haar or Cascade classifiers be used for this purpose, or they are here only to detect that there is object but can't detect the exact size? Will the classifier trained on larger set of images be more accurate here?(currently using haar trained on 730 positives and 1870 negatives images on 12 stages)