finding the area of segmented region

조회 수: 3 (최근 30일)
Nauratul Suqda
Nauratul Suqda 2020년 6월 27일
댓글: darova 2020년 6월 29일
hi there, i need your help regarding the area of segmented region. I have to find the area of pink coloured region(denoised image) correspond to this gray scale image. would you please help to find the solution?
  댓글 수: 1
Nauratul Suqda
Nauratul Suqda 2020년 6월 27일
gray scale image inside the file . thank you in advanced for your kindness.

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

답변 (2개)

darova
darova 2020년 6월 28일
Try this
I0 = imread('image.png');
I1 = double(I0);
imshow(I0);
h = msgbox('pick a color');
uiwait(h)
p = round(ginput(1)); % round to integer
RGB = double( I0(p(2),p(1),:) ); % extract color
% find color
I2 = abs(I1(:,:,1)-RGB(1)) < 10 & ...
abs(I1(:,:,2)-RGB(2)) < 10 & ...
abs(I1(:,:,3)-RGB(3)) < 10;
imshowpair(I0,I2)
  댓글 수: 2
Nauratul Suqda
Nauratul Suqda 2020년 6월 28일
thank you somuch for the solution .. thankk youuu
darova
darova 2020년 6월 29일

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


Image Analyst
Image Analyst 2020년 6월 28일
  댓글 수: 4
Nauratul Suqda
Nauratul Suqda 2020년 6월 29일
Sir i want to ask . What would be the value for threshold1 and threshold2?
Image Analyst
Image Analyst 2020년 6월 29일
It's whatever value the contour is at. Exactly how did you call contour() to produce that function? You must have told it what contour levels to use, didn't you? Or did you just take whatever contour() chose by itself? Again, I don't see why my answer in yoru duplicate question can't give you the area. Why are you even calling contour at all?

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by