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:
2: Click the button "Geo ref images".
It will give you access to the Geo Tagging resource as shown below:
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.
5: Just to illustrate, the screen below shows the mission used for creating this tutorial:
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".
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".
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.
11: You can check your pictures by visualizing the file properties details. You should see the inserted GPS tags on the EXIF data.
Thanks to Michael Oborne by one more awesome tool! ;)
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
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
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
Time / GPS_North/GPS_East/Altitude/Roll/Pith/Yaw/Servo_7_output
thanks,
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!
@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.
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...