필터 지우기
필터 지우기

find main area of image

조회 수: 1 (최근 30일)
Very Determined
Very Determined 2019년 12월 6일
편집: Image Analyst 2019년 12월 10일
Hello,
I am trying to lear how I can remove the small objects to find the main area of the image (the black section between the long lines (edges)? I want ot get rid of external and internal objects.
Thanks for the helps
Capture.PNG

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 12월 6일
#Approximate Here
se = strel('line',3,3);
BW1=imdilate(binaryImage,se);
BW2=bwareafilt(~BW1,1);
se = strel('line',3,3);
BW3=imerode(BW2,se);
se=strel('disk',7);
result=imclose(BW3,se);
imshow(result);
ui.png
  댓글 수: 8
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 12월 6일
편집: KALYAN ACHARJYA 2019년 12월 6일
#Try
BW = rgb2gray(imread('Capture.png'));
figure,imshow(BW)
BW = imbinarize(BW);
se = strel('line',3,3);
BW1=imdilate(BW,se);
BW2=bwareafilt(~BW1,1);
se = strel('line',3,3);
BW3=imerode(BW2,se);
se=strel('disk',7);
result=imclose(BW3,se);
figure,imshow(result);
Very Determined
Very Determined 2019년 12월 6일
Great. It works. So I have to convert it from RGB first.
Thak you again.

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

추가 답변 (1개)

Image Analyst
Image Analyst 2019년 12월 6일
Looks like you're doing an edge detection for some reason. Can I see the original image? Because usually edge detection is NOT what you want to do, for exactly the reasons you are seeing. It would probably be better to use a different segmentation method, like thresholding.
  댓글 수: 4
Image Analyst
Image Analyst 2019년 12월 10일
I changed the keyword to subject. It looks like the images are no longer there for some reason, perhaps because you took them down from your site.
Very Determined
Very Determined 2019년 12월 10일
편집: Very Determined 2019년 12월 10일
Thank you.

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

Community Treasure Hunt

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

Start Hunting!

Translated by