필터 지우기
필터 지우기

Fill the lines in the images

조회 수: 3 (최근 30일)
mustafa alnasser
mustafa alnasser 2015년 10월 1일
댓글: mustafa alnasser 2015년 10월 1일
Dear All;
I have a line among the image and i have tried to fill using imfill but I could not do it , any idea to fill this image (attached)

답변 (1개)

Image Analyst
Image Analyst 2015년 10월 1일
Draw lines down the edges then call imfill, then erase the lines
row1 = find(binaryImage(:, 1), 1, 'first');
row2 = find(binaryImage(:, 1), 1, 'end');
row3 = find(binaryImage(:, end), 1, 'first');
row4 = find(binaryImage(:, end), 1, 'end');
% Seal edges
binaryImage(:, 1) = true;
binaryImage(:, end) = true;
% Fill in the line.
binaryImage = imfill(binaryImage, 'holes');
% Erase temporary lines on edges that we made.
binaryImage(:, 1) = false;
binaryImage(:, end) = false;
% Fill in left and right edges.
binaryImage(row1:row2, 1) = true;
binaryImage(row3:row4, end) = true;
  댓글 수: 1
mustafa alnasser
mustafa alnasser 2015년 10월 1일
Thank your for help . However, The image becomes completely white with method.
I have tried bwareaopen , it works but if the the area sized that needs to be filled is very large

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by