Scanning background noise filtering
Mostrar comentarios más antiguos

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 comentario
KALYAN ACHARJYA
el 23 de Jun. de 2018
Share one scan image (Example)
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 23 de Jun. de 2018
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 comentarios
Wilbert Von
el 23 de Jun. de 2018
Editada: Image Analyst
el 23 de Jun. de 2018
Image Analyst
el 23 de Jun. de 2018
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
Categorías
Más información sobre Convert Image Type en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
