Borrar filtros
Borrar filtros

Circularity evaluation on image

1 visualización (últimos 30 días)
Niccolò de Cesare
Niccolò de Cesare el 9 de Mayo de 2017
Comentada: Niccolò de Cesare el 9 de Mayo de 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

Respuestas (1)

KSSV
KSSV el 9 de Mayo de 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 comentario
Niccolò de Cesare
Niccolò de Cesare el 9 de Mayo de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by