I've scanned a page of notebook paper and my scanner always introduces this weird noise.
I want to keep the lines and also the notes themselves.
Any ideas?
Example: https://i.imgur.com/4dl23SS.jpg
Remove difficult noise from scan
-
- Posts: 8
- Joined: 2017-09-12T07:00:23-07:00
- Authentication code: 1151
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove difficult noise from scan
brighthero wrote: ↑2017-09-12T07:05:01-07:00 I've scanned a page of notebook paper and my scanner always introduces this weird noise.
I want to keep the lines and also the notes themselves.
Any ideas?
Example: https://i.imgur.com/4dl23SS.jpg
Please always provide your IM version and platform/OS, since syntax and scripting differs.
If on Unix-like system, you can use my script text cleaner to improve your document.
Code: Select all
textcleaner -f 25 -o 10 4dl23SS.jpg 4dl23SS_clean25x10.jpg
Otherwise, try
Code: Select all
convert 4dl23SS.jpg -negate -lat 25x25+10% -negate 4dl23SS_lat25x10.jpg
-
- Posts: 8
- Joined: 2017-09-12T07:00:23-07:00
- Authentication code: 1151
Re: Remove difficult noise from scan
Thanks man, I really like your website and have used your scripts before.
The only problem I have with your script is that the filter removes big dark shapes, like logos and so on (see the punch holes in the page). Is there any way to prevent this?
The only problem I have with your script is that the filter removes big dark shapes, like logos and so on (see the punch holes in the page). Is there any way to prevent this?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove difficult noise from scan
Increase the -f argument until it does not remove the holes. The argument will depend upon how large a region you want to preserve. But it will take longer. At -f 75 it leaves the holes. But at -f 50 they are only about half filled. So somewhere in between they get filled.
Re: Remove difficult noise from scan
Did you try to put a black background behind your notepad page (during scanning)? Depending on the paper, that might help a lot.
Re: Remove difficult noise from scan
you can shorten this tofmw42 wrote: ↑2017-09-12T09:06:38-07:00Code: Select all
convert 4dl23SS.jpg -negate -lat 25x25+10% -negate 4dl23SS_lat25x10.jpg
Code: Select all
convert 4dl23SS.jpg -lat 25x25-10% 4dl23SS_lat25x10.jpg
Black paper reduces bleed through of writing on the back but darkens the image with thin paper which is the problem here. If there is no writing then white paper produces a cleaner scan of thin paper.
As a quick clean up (for those on Win) you can then use composite to add the cleaned image to the original, using the cleaned image as a mask.