How to measure circularity??
35 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nisreen Sulayman
il 20 Dic 2014
Risposto: yousra zafar
il 21 Nov 2019
How to measure circularity ? What is wrong in this code?
CC=bwconncomp(BW); %BW binary image
labeled=labelmatrix(CC);
stats = regionprops(CC, 'all');
stats.circularity = ((stats.Perimeter) .^2 )./ (4*(pi*(stats.Area)))
Risposta accettata
Image Analyst
il 20 Dic 2014
You didn't use brackets. Try it this way
allPerimeters = [stats.Perimeter];
allAreas = [stats.Area];
allCircularities = allPerimeters .^ 2 ./ (4 * pi* allAreas);
12 Commenti
Più risposte (6)
Matt J
il 21 Dic 2014
It might also be useful to check whether the Eccentricity and Solidity of a region are above a certain threshold.
6 Commenti
Image Analyst
il 22 Dic 2014
You can look at my code in my answer where the blobs are labeled with their number in the first figure, and then each blob is cropped out to a separate image with the blob number in the title above the blob.
Nisreen Sulayman
il 19 Gen 2015
12 Commenti
Image Analyst
il 21 Gen 2015
First segment the image to get a binary mask of that thing. Then mask it
red = grayImage;
red(mask) = 255;
green = grayImage;
green(mask) = 0;
blue = grayImage;
blue(mask) = 0;
rgbImage = cat(3, red, green, blue);
imshow(rgbImage);
Nisreen Sulayman
il 29 Gen 2015
Modificato: Nisreen Sulayman
il 29 Gen 2015
7 Commenti
murk hassan memon
il 4 Apr 2018
stats.circularity = ((stats.Perimeter) .^2 )./ (4*(pi*(stats.Area))) i am getting an error of this sign ^ as such the error is too many input argument.. is there any other method to find the circularity ? if yes? then kindly help me out
Matt J
il 4 Apr 2018
@murk,
You have multiple objects in "stats" so you need to do something like,
result = ([stats.Perimeter] .^2 )./ (4*(pi*[stats.Area]))
Souhardya Roy
il 6 Lug 2018
The formula is inverse of what is given.
2 Commenti
yousra zafar
il 19 Nov 2019
can you share the code for finding circular objects . i am also working on aneurysm detection. any guidance from your side will he highly appreciated
yousra zafar
il 21 Nov 2019
i,m unable to run the code text.m attcahed above, getting error : file not found , can you share with me the image C:\Users\Rose\Documents\Temporary\im.jpg
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Segmentation and Analysis in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!