First time here? Check out the FAQ!
answered 2017-07-20 23:27:30 -0600
for multiple components / labels you will have to make a binary mask for each single label as in:
for l in labels[1:]: # ignore background mask = labels[labels==l] # select pixels for label l cv2.moments(mask)