필터 지우기
필터 지우기

Is there any method to calculate segmentation coefficent automatically according the same size of my boundary area.

조회 수: 1 (최근 30일)
I have a breast mammogram image.
you can see on files , image 1 show boundary of tumour suspicious area(inside red circles)
I made segmentation with using im2bw function and with segmentation coefficient number 0.75
and I got second image.
But when I use 0.63 segmentation coefficient number, I got closer size of in my first image's bounding circles.
But I am trying this every step and every step to get closest size with my bounding size
I mean I am trying many coeefficient number to get closest size of segmentation tumour with the my first image's inside bounding circles size tumour.
How will I calculate coeefficient number automatically or easier way ?
img=imread('image.jpg');
A=im2bw(img,0.75);
figure,imshow(A);
B=im2bw(img,0.63);
figure,imshow(B);

답변 (1개)

Srija Kethiri
Srija Kethiri 2022년 5월 30일
Hi Ali,
I am assuming by segmentation coefficient you are referring to the threshold for segmentation
You can use the graythresh() function to find the threshold for segmentation.
X = graythresh(img);
C = im2bw(img,X);
Refer to this documentation to know more about the function graythresh- Global image threshold using Otsu's method - MATLAB graythresh (mathworks.com)
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by