I have attached an image which consists of objects. The problem is to find the count of the objects present in the image. I have tried opencv template matching but it is not invariant to scale, rotation and deformation means if I take a patch of object from this image and try to do template matching then there will some of the object which will not match juts because they are little bit deformed or differently oriented. The problem with template matching is first I have to take the template from the query image itself. So if the image is at different there will not be matches.
Is there any better way to tackle this kind of problem.
P.S. The objects need not to be same every time.

