Introduction - If you have any usage issues, please Google them yourself
This source developed by Visual Studio 2013 and Incuded by Open CV Library. This example that using Open CV to process an image and automatically counting number of object that is showed. Treshold was used here