Page 1 of 1

Old building plans / bad copy

Posted: 2018-11-21T16:09:57-07:00
by ramkam
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

Re: Old building plans / bad copy

Posted: 2018-11-21T17:24:12-07:00
by fmw42
If you are on a unix-like system, you can try my textcleaner script at my link below.

# input
Image


# textcleaner by itself

Code: Select all

textcleaner -f 50 -o 7 -g -e stretch dIU7OeT.jpg dIU7OeT_clean1.png
Image

# 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
Image


________________

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

Posted: 2018-11-21T23:52:01-07:00
by ramkam
Many thanks. Looks good! Will try that now