Sep 12, 2024
import cv2
import numpy as np
from matplotlib import pyplot as plt
from skimage import ndimage
from scipy import ndimage
from skimage import io, color, measure
cv2.imread
and convert to grayscale.1 pixel = 0.5 microns
).np.ones((3,3), np.uint8)
).ndimage.label
to label connected components in the binary mask.measure.regionprops
to extract properties such as area, equivalent diameter, orientation, etc.