ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: andrewm24 on May 14, 2020, 03:39:09 PM

Title: Write XYZ and Yaw Pitch Roll from csv
Post by: andrewm24 on May 14, 2020, 03:39:09 PM
I read through the documentation and I have no clue how to proceed.  I have a csv file with x, y, z and yaw, pitch, roll from a drone and need to tag a folder of images for use in Pix4D.  How do I do this?
Title: Re: Write XYZ and Yaw Pitch Roll from csv
Post by: StarGeek on May 14, 2020, 03:54:03 PM
First, you need to download the example.config file (https://exiftool.org/config.html).  Save it to the same directory that exiftool is in and rename it .ExifTool_config.  This will allow the writing of the GPSRoll and GPSPitch tags.  Note that these are non-standard tags and may not be read by many programs.

You need to make sure that your CSV has a header name of SourceFile above the filenames.  The headers for the other data needs to be the standard GPS tag names, GPSLatitude, GPSLongitude, GPSAltitude, GPSRoll, GPSPitch and GPSImgDirection for the yaw.  Then, you need to duplicate the GPSLatitude, GPSLongitude, and GPSAltitude tags and add Ref to the end of the names e.g GPSLatitudeRef, GPSLongitudeRef, and GPSAltitudeRef.

You then need to change the directory to the one that holds the images and then run this command (including the dot at the end)
exiftool -csv=/path/to/file.csv .

Read the docs for the -csv option (https://exiftool.org/exiftool_pod.html#csv-CSVFILE) and FAQ #26 (https://exiftool.org/faq.html#Q26).
Title: Re: Write XYZ and Yaw Pitch Roll from csv
Post by: andrewm24 on May 14, 2020, 06:20:28 PM
Thank you so much.  I'll give this a try!
Title: Re: Write XYZ and Yaw Pitch Roll from csv
Post by: andrewm24 on May 14, 2020, 06:33:16 PM
I forgot I also need Horz and Vert accuracy fields.

Where are the GPSLatitude, GPSLongitude, and GPSAltitude tags?  I don't see them in the example.config file.
Title: Re: Write XYZ and Yaw Pitch Roll from csv
Post by: StarGeek on May 14, 2020, 08:07:24 PM
Quote from: andrewm24 on May 14, 2020, 06:33:16 PM
Where are the GPSLatitude, GPSLongitude, and GPSAltitude tags?  I don't see them in the example.config file.

Those are standard tags (see GPS tag page (https://exiftool.org/TagNames/GPS.html)), they're built into exiftool.

I have no clue about where to put your other data.
Title: Re: Write XYZ and Yaw Pitch Roll from csv
Post by: Phil Harvey on May 15, 2020, 08:20:32 AM
The pix4d.config file (https://raw.githubusercontent.com/exiftool/exiftool/master/config_files/pix4d.config) included with the distribution provides definitions that allow you to write the Yaw, Pitch and Roll tags used by Pix4D.  It also defines the GPSXYAccuracy and GPSZAccuracy tags that I think you want to write.

- Phil