Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Do you have a suggestion to efficiently normalize the area of regions in a binary image created from thresholding?
Dear community,
I have thresholded my way to center-regions of bacterial cells in a bright field image, which I would eventually like to use to measure fluorescence images. My current problem is that my thresholding results in regions of variable sizes, e.g. between 1 and 10 pixels. I would prefer that all regions are 4-6 pixels in size. I would like to add that morphology is a very important factor here, i.e. cells that are elongated have an elongated region, which is something I'd like to retain.
A possible solution i was thinking was, set a desired region size interval, e.g. 4-6, and then in a while loop extract regions below the interval and dilating them, while extracting and eroding regions above the interval until they all fit within the interval. But with my limited coding experience I am guessing there are more robust and less time consuming solutions? Atleast using dilation and erosion with a disk, I would retain morphology overall.
Thank you for your time.
![](/matlabcentral/answers/uploaded_files/124214/mask.png)
![](/matlabcentral/answers/uploaded_files/124215/brightfield.png)
2 commentaires
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!