-
Notifications
You must be signed in to change notification settings - Fork 0
3. Cell morphology from binary mask
Jane Ling edited this page Jul 6, 2023
·
3 revisions
The original mask from output of suite2p looks like this:

Note that some cells are broken or with disconnected parts.
binary_closing from the package skimage.morphology is used to fill the gaps. Here is the image after binary closing:

binary_opening from the package skimage.morphology is used to remove the long and thin parts of the cells, presumably the axons or dendrites. Here is the image after binary opening:

measure.find_contours from the package skimage is used to obtained the contours of the cells:

regionprops from the package skimage.measure is used to calculate the dimensions of the cells, including their axes and orientations:
