Effacer les filtres
Effacer les filtres

Remove black line/spot from a picture

3 vues (au cours des 30 derniers jours)
hadi
hadi le 10 Oct 2013
Modifié(e) : hadi le 10 Oct 2013
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)

Réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by