Scanning background noise filtering
이전 댓글 표시

Hello everybody. I am an absolutly newbie at mathlab.
I am looking for a way for removal scanning background noise for this kind of noise.
I have found some works titled "Marginal noise removal of document images", but dont know how to performe it at matlab.
I'm attaching an example of the scanning background noise talking about.
The background noise is basically at the top of the scanned image.
Thanks!
댓글 수: 1
KALYAN ACHARJYA
2018년 6월 23일
Share one scan image (Example)
채택된 답변
추가 답변 (1개)
Image Analyst
2018년 6월 23일
The image is shaded at the top. Because the image has gray scale images in it, we can't just assume that all pixels darker than a certain amount should be set to white. So what I'd do it to get the average vertical profile of the N left most columns to look for that shading:
grayImage = rgb2gray(rgbImage);
verticalProfile = sum(grayImage(:, 1:50), 2); % Sum of 50 left most columns.
% Normalize to get a percentage of the brightest line
verticalProfile = verticalProfile / max(verticalProfile);
Now divide each column in the RGB image by that percentage. Cast to double, divide each color channel, cast back to uint8. Should be simple. Give it a try.
댓글 수: 2
Wilbert Von
2018년 6월 23일
편집: Image Analyst
2018년 6월 23일
Image Analyst
2018년 6월 23일
You need to read the image into a variable. You can't just call imread() and not accept the data into any variable. Do this:
rgbImage = imread('jpg1.jpg');
[rows, columns, numColorChannels] = size(rgbImage);
if numColorChannels == 3
grayImage = rgb2gray(rgbImage);
else
grayImage = rgbImage;
end
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
