フィルターのクリア

Remove black line/spot from a picture

3 ビュー (過去 30 日間)
hadi
hadi 2013 年 10 月 10 日
編集済み: hadi 2013 年 10 月 10 日
hi, can anyone guide me on how to remove the black line above the words on figure 2.
I just want to have the image of the letter and number, if you can make the words darker it is better.
figure 1
figure 2
this is the code that i used to get from figure 1 to figure 2.
%read image
BW = imread( 'test20.jpg' )
figure(1),imshow(BW),title('test');
%adjust intensity
BW = imadjust(BW,[0 1],[]);
% - Read RGB image and convert to BW.
BW = im2bw(BW) ;
% - Build vectors of logicals targeting all-black rows/cols.
colId = ~sum( BW, 1 ) ;
rowId = ~sum( BW, 2 ) ;
% - Make them all white.
BW(:,colId) = 1 ;
BW(rowId,:) = 1 ;
% - Show result.
figure(2), imshow(BW)

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by