text.png how to remove vertical lettering on a photo?

4 ビュー (過去 30 日間)
betty
betty 2022 年 1 月 6 日
コメント済み: betty 2022 年 1 月 6 日
how to remove all of the vertical text in the image below? i'm trying the following code but it doesn't work
I=imread('text.png');
figure,imshow(I)
[r c]=ginput(4);
BW1=roipoly(I,r,c);
figure , imshow(BW1)
J = regionfill(I,r,c);
figure , imshow(J)

採用された回答

Simon Chan
Simon Chan 2022 年 1 月 6 日
regionfill supports grayscale image and your input image is a black and white image only.
Therefore, regionfill gives an error.
In your case, just use:
I(BW1)=0
to give you the final image
  7 件のコメント
Simon Chan
Simon Chan 2022 年 1 月 6 日
The function was introduced in R2018b, so I think you have an eariler MATLAB version.
betty
betty 2022 年 1 月 6 日
yes, I am using R2018a.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by