How to calculate altitude from a aerial photography taken with a GoPro3be.

edited October 2013 in General
How to calculate altitude from a aerial photography taken with a GoPro3be.
altitudeCalculation

I was wondering how to estimate altitude by measuring length of a known object from a flat Aerial photography taken from my GoPro attached on a kite or on my Phantom. Browsing on internet I found this nice article: http://balloons.space.edu/habp/photogrametry/
Why not trying this method on my pictures to roughly estimate the altitude? Roughly, because normally the lens used for high altitude photography are more like 35 mm flat lens with a minimum lens distortion and the GoPro lens is 2.8mm (very wide angle) with lot of lens distortion.
What do I need:
• A display (or a printout) of a non cropped picture from the GoPro . It’s important to use a non cropped image which is a scaled version of the image display on the sensor.
• The picture must be as flat as possible. The lens plan must be parallel to the ground plan.
• The ref line to measure must be centered in the middle of the picture to minimize lens distortion.
• The line to measure must be parallel to one of the edge of the picture (horizontal or vertical).
• Size of the Gopro sensor : 5.70x4.28 mm
• Size of the pict on the display : 220x170 mm
• Object length on picture = 80mm
• Object length in Google earth= 93000 mm
The formula to calculate altitude is Altitude=Focal Length / Representative Fraction.
The representative fraction is the distance printed on the camera sensor divided by the measured distance on the ground.
Because my ref object to measure is vertical, I’m using the height size of the (display/sensor) as calculation variable. If the measured object was horizontal I would have take the width of the picture/sensor.
So let start the calculation:
RF=(80mm*(4.28mm/170mm))/93000mm=2.165 E-05
Altitude= Focal Length / RF=2.8/2.165 E-05=129287 mm= 129m

My estimate altitude when I took the shot was 140m. The calculation sound coherent for me.
What do you think of it?

Comments

  • edited October 2013
    Yep that's it. The error in the calculation will be a combimation of scaling error on Google earth, the tilt ( if any) in the image, the rise and fall of the ground in the shot ( taking the base line at sea level is a great idea!) and the distorion parameters of the lens.

    I fly with an Immersion RC GPS screen overlay which is good to the nearest metre.

    Wish I could work so high!

    B
  • Hi - I created a spreadsheet to calculate flying height based on the length of an object on the ground (orrientation is not important) and information in the EXIF header. I'm not sure how to attach a file so I posted it on my ftp site: ftp://ftp.amnh.org/pub/people/horning/FlyingHeightCalculator.ods

    The spreadsheet is in the LibraOffice ODS format but I think you should be able to read it with Excel. If not I can convert it and post the Excel file. You need to enter data in cells with the black font for the heading and the headings with the green font will be calculated for you.
    You should be able to get the following parameters from the EXIF:
    Focal length
    FocalPlaneXResolution
    FocalPlaneYResolution

    To get the object length on the sensor you'll need to measure the length of the object using software what lets you measure the length of the reference object, in pixels, on the photo. I use GIMP but I expect Photoshop and other software has the same capability.

    This hasn't been tested so I'd welcome feedback.

    Ned
  • i did mot thought about the exif to extract fixal length and focal plane resolution. thanks for the tip.
    i'll try your sheet later. i have few flat shot to try with.
  • @ nedhorning: Never thought of it - that's way better than a GPS logger! Thanks!
  • edited October 2013
    @nedhorning Excel doesn't translate the formula from ODS file. Do you have a google sheet version of it, or can you export it in excel format ? or copy here the formulas for F2 G2 H2 i'll past it on the excel file and post you back the excel fie.
  • Sorry about that. I posted an Excel version on the ftp site: ftp://ftp.amnh.org/pub/people/horning/FlyingHeightCalculator.xls
    In case that doesn't work the formulas are:
    F2: =D2/(((B2+C2)/2)/25.4)
    G2: =F2/(E2*1000)
    H2: =A2/(G2*1000)
  • @nedhorning I just try your sheet with the photo above.
    From the exif i can read FocalPlaneXResolution 72px/in FocalPlaneYResolution=72px/inch
    Foclal lenght = 2.8mm
    The ref object measured in pixel is 1450px the lenght on google earth is 93m.
    The result given by your calulation is flying height =0.5m
    I'm afraid to say that something is wrong.
  • Sorry for the problems. I just looked at an image that was recorded by a GoPro 2 camera and it doesn't have the FocalPlaneXResolution tag in the EXIF data. FocalPlaneXResolution and FocalPlaneYResolution represent the number of pixels/inch on the sensor and what you used was the XResolution tag which is very different. I supposed you could estimate a value for FocalPlaneXResolution and FocalPlaneYResolution if you can find the dimensions of the GoPro sensor in inches then divide that by the number of pixels for the appropriate dimension.

    I had hoped this approach would work for most cameras but didn't realize it wasn't universally recorded as an EXIF tag. My next step was to create a addition to my ImageJ plugin to automate flying height calculations by having the user draw a line on the image and entering the object length. Oh well, back to the drawing board...
  • Why don't you use the approach i took on my calculation. In the exif you have the height and width of the file in pixel and the height and width on the sensor in inc (i did it in mm in my calculation, sorry i'm a metric system man) in my case was X conversion factor =5.70mm/220mm=0.0259 y conversion factor=4.28mm/170mm=0.0251 you multiply the lenght measured by this factor and you have the projected length on the sensor. am i correct ?
  • Your approach certainly works well but I like the idea of only having to do one measurement on the screen. I used the numbers you put in your original post to calculate FocalPlaneXResolution and FocalPlaneYResolution and this is what I got for the GoPro 3:
    FocalPlaneXResolution = 4000 pixels / 5.70 mm * 25.4 mm/inch = 17824.56 pixels/inch
    FocalPlaneYResolution = 3000 pixels / 4.28 mm * 25.4 mm/inch = 17803.74 pixels/inch

    I prefer metric too but the cameras I looked at used pixels/inch for FocalPlaneXResolution so I stuck with that convention.

    I calculated that the object (dock) size on the sensor was 1412 pixels long. Using those numbers the spreadsheet calculated a flying height of 129.3 m.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion