I am using OpenCV for a C++ application. I have a 8 bit binary image that has some objects. The objects are all colored 255, whereas everything in the background is colored
Starting from version 3.0, OpenCV has connectedComponents function.