Filter löschen
Filter löschen

Circularity evaluation on image

1 Ansicht (letzte 30 Tage)
Niccolò de Cesare
Niccolò de Cesare am 9 Mai 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

Antworten (1)

KSSV
KSSV am 9 Mai 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 Kommentar
Niccolò de Cesare
Niccolò de Cesare am 9 Mai 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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by