I got school task again. This time, my teacher gave me task to create algorithm to count how many ducks on picture.
The picture is similar to this one:

I think I should use pattern recognition for searching how many ducks on it. But I don’t know which pattern match for each duck.
Here’s one way:
Hough transform for circles:
So that’s very terse, but it can get you started.