필터 지우기
필터 지우기

Circularity evaluation on image

조회 수: 1 (최근 30일)
Niccolò de Cesare
Niccolò de Cesare 2017년 5월 9일
댓글: Niccolò de Cesare 2017년 5월 9일
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

답변 (1개)

KSSV
KSSV 2017년 5월 9일
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
Niccolò de Cesare
Niccolò de Cesare 2017년 5월 9일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by