What is the labeling algorithm that cvBlob uses?
Basically, it’s a very basic two pass algorithm for finding 4-connected components using an union-find data structure. A brief explanation of the labeling algorithm can be read here. Now I am implementing a new labeling algorithm based on the paper of Fu Chang, Chun-Jen Chen and Chi-Jen Lu called “A linear-time component-labeling algorithm using contour tracing technique”. This algorithm runs twice faster, and obtains external and internal contours of each blob in the same pass. Also, it labels 8-connectivity components (unlike the current algorithm which detects only 4-connected components).