Azzera filtri
Azzera filtri

Circularity evaluation on image

1 visualizzazione (ultimi 30 giorni)
Niccolò de Cesare
Niccolò de Cesare il 9 Mag 2017
Hi everybody,
i've a question on Circularity evaluation of the image below.
This is a test image on which i'm working:
And this is the code:
close all
clear all
I=imread('Cerchio2.png');
I=rgb2gray(I);
imshow(I)
th = graythresh(I);
IcropEqTh = im2bw(I,th);
imshow(IcropEqTh)
stats = regionprops(IcropEqTh,'Area','Perimeter','Solidity','MajorAxisLength','MinorAxisLength','Orientation');
So, in the image i've two forms, a circle and an ellipse, in the "stats" vector i get only one value for each parameter but in the figure there are two forms and i expect to get two values for each parameter. Why this?
There's a method to evaluate on the same image the parameters for each forms?
Thanks in advance

Risposte (1)

KSSV
KSSV il 9 Mag 2017
close all
clear all
I=imread('Cerchio2.png');
I=rgb2gray(I);
imshow(I)
th = graythresh(I);
IcropEqTh = im2bw(I,th);
for i = 1:2
Icrop = imcrop(IcropEqTh) ;
imshow(Icrop)
stats(i) = regionprops(Icrop,'Area','Perimeter','Solidity','MajorAxisLength','MinorAxisLength','Orientation');
end
Crop the area when prompted, First crop for circle and then ellipse.
  1 Commento
Niccolò de Cesare
Niccolò de Cesare il 9 Mag 2017
I could do it for this test image, but for the final work i should do it on a image with a cellular population and it's impossibile because cells are too many. I would like to have an automatic process.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by