필터 지우기
필터 지우기

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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by