First time here? Check out the FAQ!
answered 2016-09-04 05:20:08 -0600
connectedComponents returns a "labels" image, where each blob has its own id.
using that, Mat firstBlob = (labels==1); would paint your example image.
Mat firstBlob = (labels==1);