MATLAB Answers

how to calculate area, perimeter and circularity of objects in an image using regionprops

3 views (last 30 days)
Muhammad Asim
Muhammad Asim on 5 Sep 2019
Answered: Catalytic on 5 Sep 2019
I tried this code for the image, it runs smoothly but doesn't show results.I want to calculate the area, perimeter and circularity for each object in this image and show results in the end. Kindly help me with this and please mention where the problem exists.
B = bwlabel(img9);
stats = regionprops(B,'Area', 'Perimeter');
allAreas = [stats.Area];
allPerimeters = [stats.Perimeter];
circularities = (4 * pi * allAreas) ./ allPerimeters .^2;
stats = regionprops('table',img9, 'Area', 'Perimeter');

  0 Comments

Sign in to comment.

Answers (1)

Sign in to answer this question.