I've defined contours in skimage following documenation:
contours = measure.find_contours(img, 0.8)
In OpenCV area could be obtained using:
cv2.contourArea(cnt)
Does skimage contains something similar (functionality for contour features)?
I didn't find any similar function in scikit-image, however with some manipulation of the data you can use the function from opencv. You only need to expand the numpy object and convert it to float32 UMat.
# Expand numpy dimensions
c = np.expand_dims(countour.astype(np.float32), 1)
# Convert it to UMat object
c = cv2.UMat(c)
area = cv2.contourArea(c)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With