PT Boat Forum


Moderated by: Dick, Jeff D

The PT Boat Forum ª PT Boats of WWII ª  PT Boats - General

Page: 1 of 1

« Back to Topic Index Page 84 | Replies: 3

 Author  Topic: Scaling Scanned Drawings
Jeff D

Moderator
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of Jeff D   Send Email To Jeff D Posted on: Jun 25, 2013 - 6:58am
Sometimes I find it handy to scale a scanned drawing so I can measure directly from it by using the mouse to draw a selection box that you can see the size of in pixels. For example, if I use the mouse to draw a selection at the outer edges of a part and it is 400 x 325, if I've scaled the image to 10 pixels per inch I know the part is 40" x 32.5". This only works well if the drawing is accurate and of a decent size. And you'll need to know the width or height of at least 1 object on the drawing like the length of the ship.

It's not hard. Basically, you need a number to multiply the width or height of the image by, so you can resize it to scale. The steps are:
-Find the size in pixels of a part with a known dimension.
-Optional: Scale the dimension and / or convert to another system of measurement such as imperial to metric.
-Adjust the numbers and divide the dimension by the pixels.
-Using the resulting number, multiply by the image width or height.
-Resize the image.

Details:

The following uses a well known free image viewing tool, Irfanview. I've used it since 2000 as my default image viewer. If you decide to try it, pay attention to the install dialog. Nowadays I think it asks if you want to install something like Yahoo toolbar. You'll probably want to uncheck the box. I also install the separate plugin pack. If you can't see what I describe below such as image size, check menu / View (show status bar and caption). Irfanview is available here: http://www.irfanview.com.

What ever you use, it needs to be able to draw a selection box that you can see the size of in pixels. You also need to know the image size in pixels. In Irfanview, image size is shown in the bottom toolbar on the left.

The usual way to draw a selection box is to position the cursor to the upper left of where you want the box to be, left click and hold, then drag to the lower right until the box is drawn. In Irfanview, the size in pixels is displayed in the caption (upper) bar. You can left click the selection box to zoom to its size before beginning, to be able to adjust the box edges accurately. To adjust the box borders, hover over over an edge, left click and hold, and drag to size. You can also crop to the selection.

The image I'll use as an example is of a PT boat day room cabin 2500 x 1000 pixels in size. If you want to try the example it is here: http://www.pt103.com/images/asst/dayRoomCabinScaleTest.jpg.

I need to know 2 dimensions, of 1 item in the image. The larger the item in the image the more accurate the results will be. In this case, the item is the 2nd turret ring from the top which I know is 51.5" diameter. I'd rather use the larger day room cabin, which I know is 143" from outside of the fwd and aft bulkheads, but the aft end is not visible in this view.

I also need to know the item's width in pixels in the image. Zoom into the turret top and draw a selection box that is the width of the item. I came up with 624 pixels. I now know that 51.5" = 624 pixels in the image.

Convert to scale if desired. For 1/35 scale, 51.5" divided by 35 = 1.4714285714285714285714285714286". Keep all the decimals you can for now. Convert to metric if desired, 37.374271mm in this case. So now we have:

Full Scale:
51.5" = 624 pixels

1/35th Scale:
1.4714285714285714285714285714286" = 624 pixels
or
37.374271mm = 624 pixels

Now I need to decide whether to scale up (preferred) or down. Sometimes this is a hard choice. The image is already large so I don't want to enlarge it too much. I can also crop out just the area I want to get measurements from which will make the end result smaller.

I'll use the full scale dimension above. Looking at "51.5" = 624 pixels", I see that the smaller of the 2 numbers is 51.5. Move the decimal and / or add zeroes to the smaller number until the numbers are as close as possible. In this case, 515. Moving the decimal or adding zeroes only affects the final scale, for example whether 1" = 10 pixels or 100.

Divide this number by the 624 pixels, I can see I'll be scaling the image down a bit because the result is less than 1, 0.82532051282051282051282051282051. I'll call this the scaling factor. It is actually a percentage, in this case I want the image about 82.5 percent of the original. The scaling factor should be between 0 and 10. If I didn't want to scale down at all, I'd have to enlarge the image by about 825 percent using a scale factor of 8.2532051282051282051282051282051. Note that you can move the decimal here also.

In Irfanview, look in the lower left for the image size given in width x height. Use whichever is larger, the 2500 width in this example. Multiply 2500 x the scaling factor which results in 2063.30128205128205128205128205. Get rid of the decimals by rounding up or down, 2063 in this case. This is the width I want to resize the image to.

In Irfanview, on the menu click Image, then Resize/Resample. Make sure "Preserve aspect ratio" is checked. Enter 2063 under "Set new size / Width".

The image is now scaled. Checking the results, drawing a selection of the turret ring gives me a width of 515. So now 515 pixels = 51.5". The image is scaled to 10 pixels per inch.

Save the image with something like "_Scaled" appended to the image's name.

If separate images are to the same scale, you can use the same scaling factor on them all.

This method can also work on photographs but perspective warp really affects things. I only do this if no better reference is available. Best results will be from smaller objects in the center of the image, with the scaling reference object and object you want to measure about the same distance from the camera.

I've also put these instructions up on my web site on the bottom of this page: http://www.pt103.com/Scaling_Tool.html



Total Posts: 2200 | Joined: Dec 21, 2006 - 1:30am | IP Logged

  Jerry Gilmartin

TOP BOSS
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of Jerry Gilmartin   Send Email To Jerry Gilmartin Posted on: Jun 25, 2013 - 11:21am
Wow Jeff!
My head hurts just reading this! I have a new found respect for you to be able to do all this! Thanks for taking the time to explain it to everybody. We all appreciate all the hard work you put into our favorite subject...PT Boats!

Jerry Gilmartin

Total Posts: 1469 | Joined: Oct 8, 2006 - 11:16pm | IP Logged

Jeff D

Moderator
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of Jeff D   Send Email To Jeff D Posted on: Jun 25, 2013 - 3:11pm
You're right Jerry, my long winded version sure does look confusing. But it's not bad, just a few steps you can do in a minute or two.

I used it today, wasn't sure if a number was a 3 or a 5 on a drawing but this cleared it up.

Thanks to you too Jerry. You're a wealth of PT knowledge and you helped restore a REAL PT BOAT!


Total Posts: 2200 | Joined: Dec 21, 2006 - 1:30am | IP Logged

TheBridge

TOP BOSS
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of TheBridge  Posted on: Jun 25, 2013 - 3:47pm
Jeff - I know of your scaling work and have greatly admired for many years (yes, its been years now!)

Similar to what you do, I to create scale drawing by converting a drawing (such as one of the 3200+ PDFs files from the Dick Washichek ELCO Blueprint library) to BMP or JPG format. Next, set the appropriate CorelDraw scale (that is, set it to the drawing space scale to that of your model). Then use 'import' fiunction of CorelDraw to import the BMP/JPG. Resize the image to fit one of the stated or known dimensions of some part of the drawing (most of the ELCO blueprints have been draw accurately, useless it is otherwise stated on the drawing itself, but it is also good to cross check this). CorelDraw also had a handy dimension tool which is handy for this. This image can then be printed out on your printer and have a ready to go scale drawing on which to cut/glue scratch built parts.

Bridge

Total Posts: 315 | Joined: Nov 22, 2009 - 3:04pm | IP Logged


Lock Topic

 

Forum Legend

New Member

Reply to topic

More than 25 posts | Full Member

Reply to topic with quoted message

More than 50 posts | Advanced Member

Edit Message

More than 150 posts | MASTER

View profile

More than 300 posts | TOP BOSS

Email member