ExifTool Forum

ExifTool => Newbies => Topic started by: DimitrisTsi on June 06, 2022, 06:34:53 AM

Title: Geotagging thermal images
Post by: DimitrisTsi on June 06, 2022, 06:34:53 AM
Hello everyone.
The issue might sound basic to some but i have no experience with exiftools, and although i have tried many variations of this i still cannot get the result i want.
I have two sets of images acquired from a custom uav system mounted with an optical and a thermal camera.
Both are triggered simultaneously, the difference is the software only geotags the optical images.
So what i am trying to do is to a) extract this information from the optical images and b) geotag the thermal images with this info.
In constantly get the following message when trying to geotag the thermal images:

Warning: No writable tags set from <tif_image_name>
Any help would be greatly appreciated! I am obviously doing something wrong, but i am not sure what it is.
I attach a sample of the optical/thermal images
Many thanks!
Title: Re: Geotagging thermal images
Post by: StarGeek on June 06, 2022, 12:23:20 PM
Quote from: DimitrisTsi on June 06, 2022, 06:34:53 AM
In constantly get the following message when trying to geotag the thermal images:

Warning: No writable tags set from <tif_image_name>

It's hard to tell what's wrong since you don't show what command you were using.  But that sounds like you're trying to copy tags from the tiff file, not to it.

Looking at those files, I would say you would want to use this command
exiftool -TagsFromFile DSC00500_geotag.JPG -GPS:all -AllDates Record_2022-05-27_16-13-32.tiff

This will copy all the GPS tags and the three most important EXIF time tags from the jpg to the tiff file.

One problem that would make it hard to do this in batch is the fact that the names of the files are completely different with nothing in common.

The jpg also has a second copy of the ModifyDate in the wrong location (IFD1 when it should be IFD0) in the file.  This isn't something to worry about though, as it won't be copied to the tiff file.
C:\>exiftool -G1 -a -s -ModifyDate Y:\!temp\ccc\thermal\sample_data\opt_geotagged\DSC00500_geotag.JPG
[IFD0]          ModifyDate                      : 2022:05:27 15:13:14
[IFD1]          ModifyDate                      : 2022:05:27 15:13:1
Title: Re: Geotagging thermal images
Post by: DimitrisTsi on June 07, 2022, 12:54:40 AM
This worked instantly, many thanks!
Would changing the names of the thermal images to match the optical (or vice versa) help for the batch process?
Title: Re: Geotagging thermal images
Post by: StarGeek on June 07, 2022, 09:05:12 AM
Quote from: DimitrisTsi on June 07, 2022, 12:54:40 AMWould changing the names of the thermal images to match the optical (or vice versa) help for the batch process?

Yes.

Assuming the tiffs and jpgs have the same name and are in the same directory, your command would be
exiftool -ext tiff -TagsFromFile %d%f.jpg -GPS:all -AllDates /path/to/files/

The -ext (-extension) option (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension) has been added here to limit the processing to just .tiff files as you wouldn't want to copy the data from the jpeg files back onto itself.  It probably wouldn't hurt anything but it would waste time.

The %d stands for the directory path of the tiff file being processed, including a trailing slash.  The %f is the base name without the extension.  If the jpgs were in a different directory, you would replace the %d with that path.  If you needed to recurse into subdirectories (see the -r (-recurse) option (https://exiftool.org/exiftool_pod.html#r-.--recurse)) with a different directory, then the %d would need modification.  See the Advanced Features of the -w (-TextOut) option (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut).  No change would be needed to the %d for recursing if the tiffs and jpgs are in the same directory.

These command create backup files.  You can add the -overwrite_original option (https://exiftool.org/exiftool_pod.html#overwrite_original) to suppress the creation of backup files.  You can add the -P (-preserve) option (https://exiftool.org/exiftool_pod.html#P--preserve) to preserve the FileModifyDate.