Old building plans / bad copy

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ramkam
Posts: 2
Joined: 2018-11-21T15:43:39-07:00
Authentication code: 1152

Old building plans / bad copy

Post 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
Last edited by ramkam on 2018-11-22T18:53:25-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Old building plans / bad copy

Post 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
ramkam
Posts: 2
Joined: 2018-11-21T15:43:39-07:00
Authentication code: 1152

Re: Old building plans / bad copy

Post by ramkam »

Many thanks. Looks good! Will try that now
Post Reply