Greetings,
I have a scan of an old building plans like this - https://imgur.com/a/C2eCHJa
The original scan is a delirious 180 Mb tiff file.
I'm working on a downsized version of 6000 pixels wide
i'm wondering if i have any chance of cleaning that up so that i endup with just the lines and the markings
tried various stuff like blurring, contour, etc, but it seems that the grain (it's not the scanner grain, it's actually there on the paper, thanks to old photocopying machines) is defeating the algos.
would anyone have good suggestions?
Cheers
Old building plans / bad copy
Old building plans / bad copy
Last edited by ramkam on 2018-11-22T18:53:25-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Old building plans / bad copy
If you are on a unix-like system, you can try my textcleaner script at my link below.
# input
# textcleaner by itself
# textcleaner followed by some morphology for thickening and connected-components for removing dot noise
________________
Please, always provide your IM version and platform when asking questions, since syntax may differ.
Also provide your exact command line and your images, if possible.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
# input
# textcleaner by itself
Code: Select all
textcleaner -f 50 -o 7 -g -e stretch dIU7OeT.jpg dIU7OeT_clean1.png
# textcleaner followed by some morphology for thickening and connected-components for removing dot noise
Code: Select all
textcleaner -f 50 -o 7 -g -e stretch dIU7OeT.jpg miff:- | \
convert - -morphology open octagon:2 -type bilevel \
-define connected-components:area-threshold=15 \
-define connected-components:mean-color=true \
-connected-components 4 \
dIU7OeT_clean2.png
________________
Please, always provide your IM version and platform when asking questions, since syntax may differ.
Also provide your exact command line and your images, if possible.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
Re: Old building plans / bad copy
Many thanks. Looks good! Will try that now