Geotag from *.xmp

Started by gverhoev, March 12, 2013, 12:40:51 PM

Previous topic - Next topic

gverhoev

Hi all,

we are experimenting with a camera-coupled IMU and GNSS sensor. However, the Hz of the IMU and GNSS receiver is much higher than the time digitization accuracy of my Nikons.  Anyhow, we want to embed pitch, roll, yaw as well as geodetic coordinates in the Exif metadata (thus on a sub-second basis).

One idea would be to generate an individual, identically named *.xmp file (with these data) for every image. However, is there any ExifTool command that would allow me to embed these data from the XMP sidecar files into the Exif tags? (so also embedding pitch and roll)

We could also create a *.GPX file out of our logs, the *.GPX file only containing the data from those moments a photo was acquired . To have this work, I would need a command that updates the image creation time from our log file (which holds the GPS time) on an instance by instance basis so that I can afterwards synchronize; an other option could be to work directly with the time-uncorrected image and look for corresponding data from the *.GPX file. As an example: write the position and pitch, roll and yaw data for image three using the third trackpoint in the *.GPX file.

Could anyone help me with any of these commands or is there maybe another easy way that I overlook.

Cheers,

Geert

Phil Harvey

Hi Geert,

ExifTool can write GPS information to XMP sidecar files using the XMP-exif tags.  And the sample config file has example XMP-exif GPSPitch and GPSRoll tags (you can use GPSImgDirection for the yaw).

Copying between EXIF and XMP is easy.  Read about this in the -tagsFromFile section of the application documentation.

About the sub-second resolution, I don't think I can help much with how to synchronize this at your end, but the EXIF and XMP date/time tags both support sub-second resolution.

- 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 ($).

gverhoev

Hi Phil,

yes, I managed that ExifTool writes Pitch and Roll, both as Exif and as XMP-exif. I also managed to copy the Pitch and Roll + GPS info embedded in the sidecar xmp to the NEF file. This works on a file by file basis.
However, if I have a folder with 20 *.NEFs and 20 *.xmps (all with identical names), how do I force Exiftool to only extract (from the XMP) and embed (in the NEF) the data for files with the same name, all in one run?

Cheers,

Geert

Phil Harvey

Hi Geert,

exiftool -tagsfromfile %d%f.xmp -@ xmp2gps.args -ext nef DIR

The file "xmp2gps.args" is included in the arg_files directory of the full ExifTool distribution.

- 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 ($).