Write XYZ and Yaw Pitch Roll from csv

Started by andrewm24, May 14, 2020, 03:39:09 PM

Previous topic - Next topic

andrewm24

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?

StarGeek

First, you need to download the example.config file.  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 and FAQ #26.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

andrewm24

Thank you so much.  I'll give this a try!

andrewm24

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.

StarGeek

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), they're built into exiftool.

I have no clue about where to put your other data.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

The pix4d.config file 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
...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 ($).