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

1 回表示 (過去 30 日間)
Stelios Fanourakis
Stelios Fanourakis 2019 年 9 月 27 日
編集済み: Matt J 2019 年 9 月 27 日
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 件のコメント
Matt J
Matt J 2019 年 9 月 27 日
"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?
Stelios Fanourakis
Stelios Fanourakis 2019 年 9 月 27 日
Yeah. The last white pixels of every column. If you notice they form a wave shape curve between them. Can I connect them?

サインインしてコメントする。

回答 (1 件)

Matt J
Matt J 2019 年 9 月 27 日
編集済み: Matt J 2019 年 9 月 27 日
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)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by