News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Export GPS and orientation to text for ContextCapture 3d reconstruction

Started by GekoDiveBali, February 11, 2017, 08:05:20 AM

Previous topic - Next topic

GekoDiveBali

Hi,

Thanks for this great tool.

Working with ContextCapture, I need to export a single columned text file with filename, GPS (X, Y, Z in decimal), orientation angle (Omega,  Phi, Kapa) for all jpeg pictures in a folder. Is there a way to extract the orientation info from files (pictures taken with a DJI drone).

Looking at previous threads, I understand how to extract all info except orientation angle as follows:
exiftool -filename -gpslatitude -gpslongitude -gpsaltitude -?orientationOmega? -?orientationPhi? -?orientationKappa? -n -T DIR > metadata.txt

Your help is much appreciated! Thanks in advance



Phil Harvey

Did you run ExifTool on one of the files to see what tags are available? (reading FAQ 2 may help you to determine the tag names).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

GekoDiveBali

Hi Phil,
Thanks for your answer. I'll check exif tags for DJI drones and revert back to you asap. I think this could be useful for other users of DJI drones...

GekoDiveBali

OK, so here are the tag names for relevant info in the exif files:
GPSLatitude
GPSLongitude
GPSAltitude or AbsoluteAltitude or another relative altitude
CameraPitch
CameraRoll
CameraYaw

I've guessed this ws the command line needed:
exiftool -filename -GPSLatitude -GPSLongitude -AbsoluteAltitude -CameraPitch -CameraRoll -CameraYaw -n -T DIR > metadata.txt

Ran a test and this is the text output:
DJI_0657.JPG   -8.53875072222222   115.509250583333   +130.58   -89.9000015258789   0   157
DJI_0658.JPG   -8.53884780555556   115.508932083333   +130.68   -89.9000015258789   0   163.5

If anyone else needs to use this, please note there are other GPS altitude tags in the exif file generated by the DJI drone (at least while using the Altizure iOS app). One of them is an altitude relative to the take off altitude and maybe more adequate/accurate in some cases. Hopefully, one of these use data from the barometer!

Thanks for creating Exiftool, this will save me hours...

Phil Harvey

If you can send me a couple of samples and tell me as much as you can about anything ExifTool isn't decoding from them then I will try to add support for extracting this information.  My email is philharvey66 at gmail.com.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

GekoDiveBali

Hey Phil,

It looks like everything is in order straight out of the box. If I find one of the 3 altitude tags is more accurate, I'll update the command line so others can benefit from this.

Thanks again for your time!