Developer

GeoTagging Images on Mission Planner

3689491142?profile=original

Introdution

Geo-tagged aerial pictures are very useful for mosaic mapping as well as the creation of accurate 3D models from a terrain.

Michael Oborne added a great tool for injecting GPS data on the EXIF tags by using APM's telemetry log from a flight.
This tutorial was created to show you how does it work.
This is a work from Sandro Benigno and Guto Santaella who kindly provided the sample files and screenshots used for making this tutorial.

 

Step by Step

 

1: Open the Mission Planner and press "Ctrl+F". It will open a hidden screen, like shown here:

3689491066?profile=original

2: Click the button "Geo ref images".
It will give you access to the Geo Tagging resource as shown below:

3689491209?profile=original

3: Click the button "Browse Log" and select the telemetry log (.tlog) of the flight related to the shooting session.
Note: You can use both sources: the "Logs" folder from Mission Planner install or you can download it from the APM's dataflash through the USB port.
4: Click the button "Browse Directory" and select the folder where your aerial pictures was downloaded from your camera.

3689491155?profile=original

5: Just to illustrate, the screen below shows the mission used for creating this tutorial:

3689491079?profile=original

6: The next step is clicking on "Estimate Offset". It will try to extract the offset from the "Log Start Time" and the "Shooting Time" from the first picture taken.
The result shows "offset should be about...". You need to take the guessing and insert it manually on the field "Seconds offset".

3689491166?profile=original

7: Click the button "Do it" and wait until the processing is finished. The number shown in "Done... matches" must be the number of pictures taken. Otherwise it means that the sync isn't good enough.
8: After the previous step you can verify the positioning of each picture on Google Earth by clicking "Location Kml".

3689491094?profile=original

9: Looking at the example above you'll see the estimated position of a picture. You can click any images at the list on left to check it. If the position is not accurate you can step back and retry it from the step "6" by increasing or decrasing the "Seconds offset" a little bit, just like a fine tuning.
10: After finishing the tuning, all you need to do is click "Geo Tag Images". This process will add geographic data to your picture, i.e. Latitude, Longitude and Altitude.
The processing creates new files with a suffix "_geotag". The original set of pictures remains untouched.

3689491177?profile=original

11: You can check your pictures by visualizing the file properties details. You should see the inserted GPS tags on the EXIF data.

3689491269?profile=original
Thanks to Michael Oborne by one more awesome tool! ;)

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • I am totally confused...

    I use the flash log, and I am getting an error msg. Am I taling the wrong log ? There are so many for a single session.

     

    Read Log
    Log Read
    Read images
    images read
    start Processing
    Done 0 matchsRead Log
    Log Read
    Read images
    images read
    start Processing
    Log min 13/04/2014 02:00:00 max 13/04/2014 11:06:47
    Photo IMG_2198 time 13/04/2014 10:46:46
    Photo IMG_2198 13/04/2014 10:46:46 vs Log 13/04/2014 02:00:00
    offset should be about 31606
    Read Log
    Log Read
    Read images
    images read
    start Processing
    Log min 13/04/2014 10:46:46 max 13/04/2014 19:53:33
    Photo IMG_2198 time 13/04/2014 10:46:46
    Photo IMG_2198 13/04/2014 10:46:46 vs Log 13/04/2014 10:46:46
    offset should be about 0
    Error System.FormatException: Input string was not in a correct format.
    at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
    at System.Double.Parse(String s)
    at MissionPlanner.Georefimage.dowork(String logFile, String dirWithImages, Single offsetseconds, Boolean dooffset) in c:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\georefimage.cs:line 507
    at MissionPlanner.Georefimage.BUT_doit_Click(Object sender, EventArgs e) in c:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\georefimage.cs:line 1288

  • Has anyone solved the issue or created a tutorial for inserting heading and imu data along with the geotag?
  • Thanks a lot Guto,

    I also found out that using the log file (downloaded using usb) the moment when a picture is taken starts with "CAM" with all the information I need for the moment(GPS coordinates, altitude, yaw, pitch and roll).

    Thanks again,

    Inti
  • Distributor

    Hello @E_Luna,

    Well, that tool was wrote by Michel Oborne and works only like above (of course). But in your case you could use the Mission Planner to write your own code as well! take a look:
    Open your Mission Planner and go into Flight Data screen and click "Telemetry Log" and "Tlog > Kml or Graph", a popup windows will appear then click on "Convert to CSV" and point for your flight log. Voilá, now you have created a excel file inside your log folder. I believe it is what you need to extract all information from the flight log.

     ;-)

    Good luck!

    Guto Santaella

     

  • I should have written that I would like to have just one row for a specific time instead of several rows for the same time(more or less because there are changes in ms).

    Time / GPS_North/GPS_East/Altitude/Roll/Pith/Yaw/Servo_7_output

    thanks,
  • Hello Guto and Sandro, this is an awesome tool indeed!thank you!

    I would like to access the information from the tlog (could be also from APM’s dataflash through the USB port). In my case the shoots are taken using servo_7_output. Normal impulse (no photos taken) is 1100 and when it takes a photo the impulse is 1900. With this information I will like to filter the time, GPS position, altitude and attitude and then just add the image name list.

    Could you share the data structure of the log files in order to get all the variables in columns for each time recorded (rows)?

    thanks a lot!
  • Hi, is that possible to us choose a possibility to get the altitude data from the barometer? If not could that be a choice compiled in the next version.
  • Developer

    @ALK: you must contact Sandro for this problem...

  • I´m not 100% sure but i think the way how the gps coordinates will be found is different to the orginal script.
    And the main goal is.. it´s works for me. i couldnt get the orginal script running.
    I build a list of images and a list of gps coordinates found in the gpx file.
    I compare the datetime from the images with all coordinates datetimes.
    After looking at the orginal code i guess the problem is somewhere with 

    System.Globalization.CultureInfo things in c#. It´s for local conversion of doubles like 1,0 and 1.0.

  • Developer

    Milz, whats the difference from the default software? 

    I'm having another type of issue, take a look here:

    http://diydrones.com/forum/topics/geotagging-help-what-s-wrong-with...

This reply was deleted.