Author Topic: Export GPS and orientation to text for ContextCapture 3d reconstruction  (Read 2498 times)

GekoDiveBali

  • Newbie
  • *
  • Posts: 4
    • Geko Dive Bali
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


« Last Edit: February 11, 2017, 08:22:18 AM by GekoDiveBali »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: Export GPS and orientation to text for ContextCapture 3d reconstruction
« Reply #1 on: February 11, 2017, 09:43:33 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

GekoDiveBali

  • Newbie
  • *
  • Posts: 4
    • Geko Dive Bali
Re: Export GPS and orientation to text for ContextCapture 3d reconstruction
« Reply #2 on: February 11, 2017, 08:41:01 PM »
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

  • Newbie
  • *
  • Posts: 4
    • Geko Dive Bali
Re: Export GPS and orientation to text for ContextCapture 3d reconstruction
« Reply #3 on: February 12, 2017, 06:00:13 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: Export GPS and orientation to text for ContextCapture 3d reconstruction
« Reply #4 on: February 12, 2017, 07:40:40 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

GekoDiveBali

  • Newbie
  • *
  • Posts: 4
    • Geko Dive Bali
Re: Export GPS and orientation to text for ContextCapture 3d reconstruction
« Reply #5 on: February 12, 2017, 08:12:24 PM »
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!

BangkokPhoto

  • Jr. Member
  • **
  • Posts: 26
Lol; is this CED?