MATLAB Answers

How can I link the last white dot line pixels of the image?

Stelios Fanourakis 님이 질문을 제출함. 27 Sep 2019
최근 활동 Matt J 님이 편집함. 27 Sep 2019
Hi
I want to link the last white pixels (lines,dots) of the image as you see it. Measuring from bottom to top of the image are the first white dot like pixels you see.
Thank you

  댓글 수: 5

표시 이전 댓글 수: 2
The last white pixels are like random dots or short little lines in a flow like a wave. Please, see the last white pixels on the image or the first white pixels as you count from bottom to top. I need to connect those white little short lines between them to create that kind of flow/wave as a curve line.
"the first white pixels as you count from bottom to top"
I don't know what this means. Do you mean the bottom-most white pixel in each column of the image?
Yeah. The last white pixels of every column. If you notice they form a wave shape curve between them. Can I connect them?

로그인 to comment.

답변 수: 1

Answer by Matt J
on 27 Sep 2019
Edited by Matt J
on 27 Sep 2019

This assumes that every column has at least one white pixel in it:
Image=cumsum(Image,1,'reverse')>0;
B=bwboundaries(Image);
newImage=accumarray(B{1},1,size(Image)) ;
imshow(newImage)

  댓글 수: 0

로그인 to comment.



Translated by