Filters for Line Drawings

BB
Posted By
bruce_bobier
Mar 11, 2007
Views
331
Replies
14
Status
Closed
Hi Everyone!

I’m working on a research project to compare binarization algorithms, and I would like to make some test images that resemble the types of lines that occur in architectural elevation drawings (examples at: <http://cs-club.org/~bbobier/exampleImages.jpg)>. I was wondering what kind of filters anyone could recommend for me to create these sorts of lines in photoshop; I’ve tried creating a simple 4px line and applying "splatter" and "diffuse", as well as "torn edges," although I’m not entirely satisfied with the results yet.

Any ideas?

Bruce.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

RA
Rafael_Aviles
Mar 11, 2007
Bad link…
P
Phosphor
Mar 11, 2007
Keep experimenting. That’s what I’d do.

Settings for those kinds of distortion will be dependent upon image resolution, so keep that in mind.
B
Bernie
Mar 11, 2007
Try painting the lines in greyscale with a medium-soft brush then converting to bitmap mode with a diter.

And as Phos said, experiment!
D
deebs
Mar 11, 2007
Bruce:

the bad link has been commented on but I think the bitmap in & bitmap out methodology may not be the best approach. Besides, some of these things are or were standard image processing 101 at Uni.

A far more fruitful approach would seem to be bitmap in & vector out.

Why?
Well vectors can be used as building block in other programs and tend to contain relevant information (bitmaps count noise and artefacts as logically equivalent to the stuff that really is important anyway).

A far neater approach is vector output (smaller file sizes for a start). I haven’t seen the blueprint as the link is dodgy but these tend to have a limited visual vocabulary. A listing of objects used probably followed a physical template fitting to the times the blueprints were made. An electronic/digital equivalent of those templates would be a good dictionary to start from. It also seems a pleasant way to algorithmically tackle the more general issue possibly in which horizontal line scans best fit a proposed visual "word" from a dictionary to fit a bitmap sector.)

Approach #1
Visual intellisense? rather than text based it is merely a linking of vector objects.

Approach #2
A probabilistic algorithm that ties in a bitmap object with it’s best fit vector equivalent.

Either of the above should be pleasantly do-able in an application that can work equally fluently with bitmap and/or vector objects.
A visual intellisense where in code is presented as vector objects
B
Bernie
Mar 11, 2007
deebs, have you actually looked at the image?

go to <http://cs-club.org/~bbobier/>

then select the exampleImages.jpg fiel.

That being said. an actual vector drawing would be better from the getgo
BB
bruce_bobier
Mar 11, 2007
Thanks for the replies everyone; Sorry for the broken link, it attached a ")" on the end of it. The image can be seen at:

<http://cs-club.org/~bbobier/exampleImages.jpg>

This experiment is actually part of a larger project which will create vector objects from the bitmap data. There’s lots of these elevation drawings around in archives, and they are created with pen and paper, and then scanned in. My research will be creating a method to vectorize them.

The first phase is to binarize the images in matlab, so I will be creating images of various scales (e.g. 512×512 up to 3000×3000) and looking at each algorithm’s accuracy. So the problem here is to create some synthetic input images that simulate the lines that could occur in a real elevation drawing. The thing is, the high resolution elevation drawings I’m using come from the Library of Congress, and in their resolutions, you can really see how the original artist’s ink bled a bit in the paper, making the lines much less crisp.

Hope that cleared things up a bit!

Bruce.
BB
bruce_bobier
Mar 11, 2007
On a related note, the Library of Congress’s site is at: <http://memory.loc.gov/ammem/collections/habs_haer/>

Search for your city name and see what comes up. It’s a survey of Historic Buildings in the US, with lots of photos and drawings; pretty cool reading!
D
deebs
Mar 11, 2007
I "see" this as an application of a visual spellchecker wherein the dictionary should be rather well defined (the templates in use at the time the blueprints were drafted.

I also "see" this as two separate issues:

(a) how to undo bitmap artfacts and crud intduced by hardware that created the digital files that now need cleaned up. And that is a fine motivation.

Or
(b) how to extract meaningful information from a bitmap image that has a priori a rather limited vusual dictionary.

Both approaches seem fine however I intuitively align with option (b) as the easier to do. As all it is is a visual spellcheck of a crudded up data file and ten direct that bitmap input into an easily (emphasis on easily) recognised format that can readily be accessed by other aplications.
MD
Michael_D_Sullivan
Mar 11, 2007
You might want to consider using a CADD program that’s designed for architectural work. TurboCAD 12 Professional allows you to import a rasterized image file, such as a JPEG or BMP. You have the option to trace it into vector format (and then do a lot of cleanup) or just draw vector-based architectural drawings over it manually.
D
deebs
Mar 11, 2007
These seem much easier options rather than cleanup a bitmap, deal with the consequences of that cleanup, … whereas merely overdrawing a vector on top of a bitmap (with skill) seems a much easier, robust and wholesome solution.
D
deebs
Mar 11, 2007
On the other hand, for discussion purposes, traditional spellchecking runs left to right or right to left according to conventions invoked when the file was created.

With electronic circuitry bueprints should a visual spellchecker start with the positive line in point and end with nevative in point?

Or with archirectural blueprints should a visual spellchecker start with first perimeter and use a nested algorithm working towards some centric point?
BB
bruce_bobier
Mar 11, 2007
I agree Deebs, that tracing the original elevation drawings in a tracing program would indeed be a much easier and robust solution. However, given the incredible number of elevation drawings that are out there, a more automated approach is needed.

I entirely agree with the notion of a ‘visual spellchecker,’ and this will definitely be included in the recognition/vectorization phase, such that when a line or shape is detected, it will be checked against a visual dictionary of elements to aide in the labeling of that shape. That part is going to be loads of fun too. 🙂

As you pointed out in your point (a), removing all of the noise and artefacts that were introduced by the scanning hardware will definitely be an issue in this problem, and is first attacked by trying to find the best way to binarize the images. To do this, it’s far to difficult to use the full drawings (as I can’t control for a lot of other factors that may affect the performance), so I’m trying to create some synthetic images that are representative of the lines and background in an elevation drawing (e.g. image (A) in the original link).
BB
bruce_bobier
Mar 11, 2007
Good question Deebs;
As a reference and example of the types of elevation drawings that I’m looking at, take a look at: < http://memory.loc.gov/pnp/habshaer/pa/pa0800/pa0824/photos/1 37144pv.jpg>

There’s definitely a lot of ways to perform such a spell checker, and the approach of iteratively working inwards from a perimeter would be solid starting point.
D
deebs
Mar 11, 2007
Two approaches?

One is to identify the crud and seek to remove it. Problem: consequences of removing crud in bitmap images always seems to create another problem.

A second way (and one more suited to digital signal pocessing?) is to say: I don ‘t care about noise, crud and artefacts. There is a limited visual dictionary of sorts (this is not an absolute dictionary but on that relates to the time that (a) the blueprint was composed and (b) the hardware used to digitise the blueprint.) Then seek to extract the relevant information from the fog of previous stuff.

EDIT
On the JPG posted it would seem wise to create a visual dictionary based on the source files then to run a visual spellcheck based on that dictionary that relates to the blueprint in question. The fading/edges and folds seem non-entities in such an approach.

There are, or so it seems to me, only finitely many "visual words" in the blueprint.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections