In the course of usual grunt work of a CAD monkey, you are likely to run across old drawing files. When I say files I'm not talking about computer files, but good-ole hard copies. Many blueprints, drawings and drafting files are still out there in hard-copy formats. Some of these hard-copy formats have fared better than others. Occasionally one of the old drawing will need to be referenced or re-created and the original is severely degraded. Time has treated some of these wonderful old drawing poorly and this is the stage for today's play: 'The Struggle of Recovering Scanned Drawings'. .. a Drama in two parts... or maybe three parts..

This is not an exhaustive look or an examination of best practices for cleaning up scanned drawings. Its just one way I have found to turn poor quality drawing into usable documents again. I will say i have seen some pretty fancy things that can be done with programs like Autodesk Raster Design, so dont necesarily commit to this method until you have explored other options out there. 

Most drawings are such that a drastic recovery process isn't necessary as the information is legible to a sufficient degree. This process isn't meant for every old digitized drawing you run across. This process should be left up those drawings that are in such bad shape that they have to be recovered or that the content is so critical that you have just have to have recovered. What I'm getting at here is that this is a semi intensive process and you have to balance time invested against the possible result. Not all drawing can be recovered... some times they are just a loss. I realize there are probably better ways to do this and that there are companies that do this sort of thing professionally, but I'm a one man wrecking crew on a negative shoe string budget. In short this is my way of 'fucking this chicken'. 

So if you are lucky, you are not the one digging these things out of where ever they have been gathering dust. If you are doing the digging, be careful... these things may not have been touched since before the time polio was eradicated. I'm joking of course but it is an interesting thing to come across hand drawn plans from the time of your parents birth. If you are the one who has the original hard copy great! If not, some of the below options may not be available to you.

First step is to get the file digitized. Scan it at a reasonable DPI. Generally the higher DPI the better, but eventually you don't get any "better" information from a drawing the higher the resolution. I like to see DPI of 300 to 600. Most of the time I can get away with 300.

So the next big question is weather or not to go with black and white or color. For this process I have found better results Starting with color drawings. 

Once you have the drawing scanned, or some other way digitized, the dirty work can begin. For my purposes I use Gimp. ( Its free but check the user agreement for you particular circumstances and uses. This job could be done with Photoshop as well or any other professional raster editing software. The general idea of building a compilation drawing made from different layers can be achieve on many platforms. So if you have a preferred program which can do this, go nuts. The steps may be a little different per program but the main idea is not program specific. 

First Act: I'm going to show you how this works in the case the you are sent a Black and White PDF as this is probably what you will more than likely encounter. B&W PDF doesn't always have good results... it just the nature of B&W. To make this exciting I have also got a skewed and mirrored drawing. Basically im assuming they turned the job of scanning this over to an intern who is one night of binge drinking away from a lower tier of IQ classification. 

1: Open the file using Gimp



Once the program opens you will be prompted with a PDF conversion window. Click on import to bring it in. 



2: If you dont care about mirroring you can skip forward to step 3. So how do you correct a mirrored scanned drawing in gimp?  You simply got to IMAGE>TRANSFORM>FLIP HORIZONTALLY.

Sometimes the old drawings were treated like transparency drawings. In other words they intentionally mirror the drawings and then flip them over and draw additional information on them. It was a pretty clever way to rev drawings and reuse drawing content, but these things don't translate well to digitization so you actually have to feed them in backwards and then mirror it afterwards. Many scanner have the ability to make this adjustment internally, but i'm assuming the worst here.

There is also a tool on the tool palette that can flip but i'll leave that up to the overachievers to find.





3: If you dont care about de skewing you can skip forward to step 4. How do you fix a skewed drawing in gimp? Due to a bug in gimp we will take a roundabout method of solving this issue. First what we need to do is to open the layers dialog. This is done by clicking on WINDOWS>DOCKABLE DIALOGS>LAYERS.



Next you need to create a layer the we will use to Judge the degree to which we need to 'un-skew' the bluprint. 


After that we will change our color so that we use a stark color in contrast with the scanned flat file. You do this by clicking on the color swatch at the bottom of the tools. 


Next we will draw a horizontal line on our new layer. Make sure you click the new layer in the layer dialog box. We will use the pencil from the tools. To the best of your ability start by clicking the pencil are the top corner of the title block or drawing frame. Next press and hold CNTRL + SHFT. Holding down those button will force a straight line. Make the line as long as the Title block or drawing border line.


Next part is where the roundabout-ness comes in. There is a bug in gimp which brings the rotated image to to top of the layer stack so we are going to rotate our line to determine the amount of rotation that will need to be applied to our drawing. So we will initiate the rotate command on our line layer.

Make sure you have the Line layer selected. Initiate the rotate command from the tools. This will put a mesh over the drawing area. In the center is a circular cross-hair. Place this at the point of rotation.



Zoom into the other end of you line and apply a rotation until the rotated line is in line with your drawings title block. At this point take note of the degree of rotation in the dialog. Cancel the operation.


Next you will select the actual drawing layer and then apply the negative of the rotation angle. Initial the rotate command and place the cross hair in the same location as last time and the rotate by the opposite amount that the line would have been rotated. I'm my case my line would have been rotated by 30 so to un-skew the drawing i’ll have to rotate it by -30.



You may have to play around to get your numbers right but thats the general process using gimp. After all this is done delete the line layer as we will not need it any further.

Next we will clip the drawing as rotating left some empty space in the image canvas. So we will go to the selection tool and draw a square around the relevant space around the drawing. Once we have a good selection we will crop by going to IMAGE>CROP TO SELECTION.


4: Getting to the nitty gritty of cleaning a drawing.

What you will need to do now is create three separate layers in your layers dialog. Right click to get the menu. The reason you create three is that you will create a composite of two of those layers and the third one is there as backup if you screw up the others along the way.


The general idea here is that you can adjust the values of a particular drawing to gain clarity in some parts of drawing but often this comes at the cost of obscuring others. So the end goal here is to take advantage of these different adjustments and then create a composite by cutting away ‘bad’ parts of one adjustment revealing the layers underneath which are from a better adjustment.

I will set the first contrast as the contrast which cleans up the border and darker parts most. The second contrast adjustment will focus on the other parts of the drawing which will make the outer darker parts of the drawing worse. Once these contrasts are done we will erase the bad parts of contrast 2 which will reveal the good parts of 1.





Next rename your layers. I tend to rename the according to what i’ll be doing to them. In this case i’ll be renaming them to contrast 1 and contrast 2.

After they are renamed, turn off the visibility of the other two layers to isolate the layer that you will be adjusting first.


Make sure your intended layer is selected in the layer dialog and then initial the contrast command by going to COLORS>BRIGHTNESS-CONTRAST.


At this part you will just have to play with the setting until you find something that works with your particular drawing. In this example I’m focusing on the outer parts. In the lower outlined redbox you can see an area that I’m focusing on to make it as ‘clear’ as i can. Once you are satisfied click ok. 


 You will next repeat these step on the next layer. Be sure to select the second layer and turn it on by click the eye. Initiate the contrast command and play with it to highlight the other parts of the drawing. Once you are satisfied with this click ok.



Now we are going to get into the business of erasing. Select eraser from the tools We will also want to be able to change our eraser setting so we will open a tool options dialog. WINDOWS>TOOL OPTIONS

We need to remember that we now want both our contrasted layers set to visible and we want to make sure our top layer is selected. This is the layer we will be erasing from.



You can adjust the brush size and type and other options. THe more you play with the program the more you can take advantages of the options available. For simplicity i want a eraser with a fuzzy brush. It looks like a circle that fades in as opposed to just a circle. This is some time referred to as feathering.

You can also adjust the brush size and depending on you drawing size and the ‘cleaning’ you will be doing you will want different size brushes. All these changes are made in the Tool Options Dialog box.


Next you go about the business of guess and check and erasing. Often you will encounter parts that look better before erasing so don't be afraid to use the undo command and redo the erasing. Frequently i will use the eraser for cleaning around ‘delicate’ elements of the drawing and I will use the SELECT tool and just delete the selection (see below). Either way you are removing parts of the top layer to reveal the layer beneath.




For a Before and after see the next image. This image might not be the best to illustrate as it’s not too bad of an image but one can still see the difference between the two and it serves to illustrate the general idea.




As I indicated earlier you can get better results if you work from a color drawing. The end result will be a black and white drawing but often the “color” is only the color of the paper which theoretically should be white any way.

The process is the same except initially you will work to turn the color image to grayscale. This is done by going to COLORS>DESATURATE.



In the desaturate there are some options you can play with. Occasionally i’ll make duplicates of the color image and then use the different values in the desaturate dialogue on different layers to start the changing of the layers.




Next create the layers just as had been done in the previous example.


As was done on the previous example run the contrast command on the first contrast layer. Since this version was created using an image there is a larger variation of of colors available to us so we can apply different color changing methods methods. I choose to alter the curve though i could have probably achieved similar results adjusting threshold or one of the other color adjusting tools. To adjust the the curves got to COLOR>CURVES. Make sure your curve layer is selected.


Below is an example of the setting i used for this file. Your setting will depend on the image you start with. Just Grab the lien and make adjustments and watch what happens to the image.


Next up just start erasing as was done in the previous example. Remember to select the top layer so that when you erase the layer beneath it is revealed. You will notice a stark difference between the color image and the B&W image in the erasing example below.

NOTE: If you find that you are not erasing to the layer beneath you may need to add the alpha channel to each one of your layers. If this is happening to you do this for every layer you have. Right click on the drawing the go to LAYER>TRANSPARENCY>ADD ALPHA CHANNEL.







So that's the process I have had some success using. As mentioned there may be better ones out there and if you find them by all means use them. It's a relatively intensive process so it shouldn't be done to every drawing. Time wise it's quicker than tracing and re- creating a drawing. I don't have a version of something like Raster Design so i can't compare the time difference between this and that, but if you are limited in your options this method may be what you need to get you through you project.


Happy Document Recovering.