How to measure the size for an irregular object on a binary image ? such perimeter and length

Answers (1)

For perimeters, use regionprops()
props = regionprops(mask, 'Perimeter');
allPerimeters = [props.Perimeter]
For Feret diameters (lengths), use bwferet().
If you want to extract only the largest blob, use bwareafilt
mask = bwareafilt(mask, 1);

Categories

Tags

Asked:

on 10 Jun 2020

Commented:

on 13 Jun 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!