Hi all,
I thought my workflow for getting more accurate pre-processed elevation data out of the EXIF meta-data might be useful for some on here. Improvements welcome of course. This is currently what works best for me.
OBJECTIVEFor non-survey grade projects without using pre-sampled Ground Control Points, to get as accurate as possible elevation data prior to processing in Photoscan Pro. In other words to get the most accurate map/model/orthomossaic/DEM etc as possible without using RTK GPS.
PROBLEMThe usual metadata tag that is used by these applications is the ‘GPSaltitude’ tag. Currently DJI populate this from the aircraft's GPS unit. The altitude recorded here is grossly inaccurate. We need to fix this as far as we can.
BASIC WORKFLOW- Establish and record the altitude above mean sea level of your take-off point.
- Back in the office we need to process the meta-data from all the photos taken poking a more accurate figure into the GPSaltitude tag.
Thankfully DJI do record another tag called RelativeAltitude which populates the tag based on the height above your take-off point using the aircrafts barometer.
We want to add this RelativeAltitude value to the calibrated barometer reading we took from our phone/device at take-off to come up with an altitude above sea level figure for each photograph.
Then we want to write this combined value into the GPSaltitude tag that Photoscan Pro can use.
PREREQUISITES • Go here and get the free Exiftool command line tool from Phil Harvey
http://www.sno.phy.queensu.ca/~phil/exiftool/• For ease of use and file management I use a GUI version layer on top of this called exiftoolGUI.exe. Get it from here:
http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2750.0.html • I use the Exiftool AND the exiftoolGUI. You can just use the command-line tool if you are confident and familiar with using it. I like the easiest way out though!
• Download a barometer app for your phone/device. One that can be calibrated. As barometers are based on air pressure it needs calibrated around the time of take-off with some known weather station in your area to allow for the variance introduced by weather conditions.
WORKFLOW1. Record this AMSL altitude reading from the Barometer app at your take-off point at the time of photo aquisition.
2. Back in the office MAKE A COPY of the photos you want to process in a separate folder. THIS IS A MUST. If you cock the EXIF meta data up you cannot get it back!
3. In the ExiftoolGUI navigate to the folder that contains the COPIES of your photos.
4. At the bottom of the central pane there is a button labelled ‘Exiftool direct’…click it
5. In the command text box paste this text...
-n -GPSAltitudeRef=0 -tagsFromFile @ -RelativeAltitude>GPSAltitude *.*
and press enter. A small info box shows the status of the process. This copies the RelativeAltitude value into the GPSAltitude tag for all the photos in the folder
6. Now we want to add the AMSL value that we took from our phone/device at take-off. Delete any previous text from the command text box.
7. Take the previously recorded AMSL altitude from the phone/device and DIVIDE IT BY 2. Not sure why this has to be done (I may not have exactly the right syntax to use the full value…anyway this way it works!)
8. Paste this text in the command text box...
-n -tagsFromFile @ -GPSAltitude+=ALT *.*
BUT replace the ‘ALT’ with your 'divided by 2 value' and press enter.
DONE
Always check and compare the metadata with the original files to make sure it did what you wanted it to do. Analyse the pop-up status info box for any errors.
Now you can process in Photoscan Pro as usual.
Any suggestions welcome of course...its just what works for me.