I am working with binary images in which there are a lot of small blobs. I would like to count the number of blobs and have found out that contours are commonly used to do that. However, the information I get does not allow me to measure certain parameters such as the area and the perimeter of these blobs. Does anybody have any recommendations how to do this with Python?
import cv2
from skimage.measure import regionprops
img = cv2.imread(img_path, cv2.IMREAD_GRAYSCALE)
image, contours, hierarchy = cv2.findContours(img,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)`