What you are looking for is called "Blob" detection, which detects groups of objects that stand out from their environment. Depending on the complexity that you need, you can also track area, bulge, perimeter, bounding box, etc. Blobs are used in many machine vision and control applications.
There are many installed algorithms in the Wiki, etc.
There are also image processing libraries that you can learn, and this suggests that AForge is an open source library written in C #: aforge.net
Or just search for "Blob Detection" and you will find a ton of information about what you need.
Good luck
source share