The Naked Scientists

The Naked Scientists Forum

Author Topic: Is it possible to correct a distorted image and learn its proportions?  (Read 2637 times)

Offline Supercryptid

  • Hero Member
  • *****
  • Posts: 606
    • View Profile
    • http://www.angelfire.com/sc2/Trunko
I'm trying to figure out if there is some way to use geometry, trigonometry, etc. to "flatten" a particular image I am interested in. I don't know what angle the computer screen is at relative to the camera in the photos, but I figure the rectangles on the screen in the images must have corner angles at ninety degrees each.

I actually have two angles of the image:





Can anyone help?


 

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
If only I could remember a little drafting from High School...  No, not CAD, we had pencils & triangles.

Anyway, it is handy to have boxes around your parts.

If you connect the "parallel" lines in the boxes, you should arrive at a horizontal and a vertical vanishing point.  I presume all the parallel lines would actually hit the same two vanishing points.

All you need to do is to make the non parallel lines parallel.  And, of course, correct the right angles to right angles.

With any luck, your right view and left views will come out the same.
« Last Edit: 03/10/2012 04:18:44 by CliffordK »
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8129
  • Thanked: 53 times
    • View Profile
I did this using GIMP, but by eye so I wouldn't bet your life it's accurate* ...





YouTube tutorial on perspective correction in GIMP ...

[* The camera lens has added some radial distortion which I haven't attempted to remove ].
« Last Edit: 03/10/2012 12:29:18 by RD »
 

Offline Supercryptid

  • Hero Member
  • *****
  • Posts: 606
    • View Profile
    • http://www.angelfire.com/sc2/Trunko
Many thanks, RD!

Unfortunately, this has only raised more questions for me than answers...

I'm attempting to measure the leading edge sweep on an aircraft wing and the values that your corrected images have is less than 45 degrees. Based on what I've seen of it, I'm almost certain that it's more than 45 degrees (going by my eyes). If you could correct one more perspective image (the top view of the airplane in the image), RD, I would be very grateful. That would help a lot. If not, I suppose I can try it myself:

 

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
Gimp is a free program:

http://www.gimp.org/

It is primarily a Linux program, but there should be both Windows and Linux versions available.  It is very powerful with some tools, but, a little cumbersome with other aspects.




Two things became obvious as I tried to rotate the object using Gimp.
  • One looses the X-Y scaling (at least with Gimp).  So, one really needs some kind of proportional X-Y scale to make it come out right.
  • Gimp (and probably no program) can not truly do a 3-D projection to 2-D transformation.  Potentially one can come close with the scale, but the 3D details may obscure the 2-D layout
Assuming the two initial photos are of the same monitor/image, and are to a true scale, then one could potentially merge the two images.  Then determine the true aspect ratio of the Dell monitor.  By setting the proper aspect ratio of the monitor, one might be able to recover the true aspect ratio for the image.

Of course, pixels may not be square, so it may depend on how well calibrated the initial image was.
 

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
Is the leading edge of the wingtip at a right angle? 
That might be enough to calibrate your X-Y scale.

It is quite possible that both the leading and trailing edge of the wings are at 45 angles.
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8129
  • Thanked: 53 times
    • View Profile
... one really needs some kind of proportional X-Y scale to make it come out right ...

If the dotted lines running horizontally and vertically have the same number of dots-per-unit-length, (effectively rulers), then they could be used to ensure the aspect ratio was correct ...


« Last Edit: 04/10/2012 12:55:38 by RD »
 

Offline Supercryptid

  • Hero Member
  • *****
  • Posts: 606
    • View Profile
    • http://www.angelfire.com/sc2/Trunko
Many thanks, RD! =)
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8129
  • Thanked: 53 times
    • View Profile
The repeated 45 degree angles could be an anti-radar measure rather than an aerodynamic thing: to minimise the amount of any radar beam reflected from the wing back to the source.
 

The Naked Scientists Forum


 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums