FLIR tools messing with EXIF data

Started by OrBy, October 31, 2014, 08:34:10 PM

Previous topic - Next topic

OrBy

It looks like newer versions of FLIR Tools has changed the way EXIF data is being embedded in images it saves.
(FLIR Tools 5.0 (5.0.14283.1002), exiftool-9.74)

If I take a image right off my FLIR E4 and run "exiftool -php -flir:all -q" on it I get:

Array(Array(
  "SourceFile" => "FLIR0075.jpg",
  "ImageTemperatureMax" => 1,
  "ImageTemperatureMin" => 0,
  "CreatorSoftware" => "",
  "Emissivity" => 0.95,
  "ObjectDistance" => "1.00 m",
  "ReflectedApparentTemperature" => "20.0 C",
  "AtmosphericTemperature" => "20.0 C",
  "IRWindowTemperature" => "20.0 C",
  "IRWindowTransmission" => 1.00,
  "RelativeHumidity" => "50.0 %",
  "PlanckR1" => 14020.368,
  "PlanckB" => 1382.9,
  "PlanckF" => 2.5,
  "AtmosphericTransAlpha1" => 0.006569,
  "AtmosphericTransAlpha2" => 0.012620,
  "AtmosphericTransBeta1" => -0.002276,
  "AtmosphericTransBeta2" => -0.006670,
  "AtmosphericTransX" => 1.900000,
  "CameraTemperatureRangeMax" => "250.0 C",
  "CameraTemperatureRangeMin" => "-20.0 C",
  "CameraModel" => "FLIR E4",
  "CameraPartNumber" => "63901-0101",
  "CameraSerialNumber" => 63900644,
  "CameraSoftware" => "22.0.0",
  "LensModel" => "FOL7",
  "LensPartNumber" => "",
  "LensSerialNumber" => "",
  "FieldOfView" => "45.0 deg",
  "FilterModel" => "",
  "FilterPartNumber" => "",
  "FilterSerialNumber" => "",
  "PlanckO" => -7342,
  "PlanckR2" => 0.02656248,
  "RawValueMedian" => 10916,
  "RawValueRange" => 1088,
  "DateTimeOriginal" => "2014:05:17 19:12:07.017+00:00",
  "FocusStepCount" => 70,
  "FocusDistance" => "0.0 m",
  "PaletteColors" => 224,
  "AboveColor" => "170 128 128",
  "BelowColor" => "50 128 128",
  "OverflowColor" => "67 216 98",
  "UnderflowColor" => "41 110 240",
  "Isotherm1Color" => "100 128 128",
  "Isotherm2Color" => "100 110 240",
  "PaletteMethod" => 0,
  "PaletteStretch" => 2,
  "PaletteFileName" => "\\FlashBFS\\system\\iron.pal",
  "PaletteName" => "Iron",
  "Palette" => "(Binary data 672 bytes, use -b option to extract)",
  "RawThermalImageWidth" => 320,
  "RawThermalImageHeight" => 240,
  "RawThermalImageType" => "PNG",
  "RawThermalImage" => "(Binary data 74364 bytes, use -b option to extract)",
  "Real2IR" => 1.30262422561646,
  "OffsetX" => -16,
  "OffsetY" => "+17",
  "PiPX1" => 0,
  "PiPX2" => 320,
  "PiPY1" => 0,
  "PiPY2" => 240,
  "EmbeddedImageWidth" => 640,
  "EmbeddedImageHeight" => 480,
  "EmbeddedImageType" => "JPG",
  "EmbeddedImage" => "(Binary data 78189 bytes, use -b option to extract)",
  "PeakSpectralSensitivity" => "10.4 um"
));

But if I open and re-save that same file with FLIR Tools now I get is the following:

Array(Array(
  "SourceFile" => "FLIR0075.jpg",
  "ImageTemperatureMax" => 1,
  "ImageTemperatureMin" => 0,
  "Emissivity" => 0.95
));

Older versions like FLIR Tools 4.0 (4.0.13284.1003) don't seem to cause this issue.

I don't know if there is another way of getting that same info out with the current version of exiftool, or if it needs to be updated to deal with changes, or maybe FLIR Tools has removed the data. Any feedback would be helpful.

Attached are example images.

Phil Harvey

Thanks for the report, and the sample image.  The problem is that they changed the version number (from 100 to 101):

> exiftool "Resaved FLIR0075.jpg" -warning -a
Warning                         : GPS pointer references previous ExifIFD directory
Warning                         : Unsupported FLIR FFF version


But it looks as if the metadata format is the same, so I will add support for this version, and ExifTool 9.75 will read the FLIR information from this file.

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

OrBy

Thanks for the quick update and I am glad it sounds like it will be a simple fix. If you need any more info or testing just let me know!

tomas123

Hi OrBy,

as I see here
http://www.eevblog.com/forum/testgear/flir-e4-thermal-imaging-camera-teardown/msg541362/#msg541362
http://www.eevblog.com/forum/testgear/flir-e4-thermal-imaging-camera-teardown/msg540597/#msg540597
we are one of few users which converting Flir images with great Exiftool  ;)

... but hundreds of users are hacking the Flir Ex / Exx cams

@Phil: If you need some assistance in debugging let me know it.

PS: The current Mac version of Flir Tools is unchanged (old version 2.1)

Tomas

OrBy

I guess so. I find the only way I get the images the way I want them is with the FLIR.PHP script that use EXIFTool and ImageMagic that you worked on. BFIC looked like it had promise but it seems to have been abandoned.

The only thing that I really think would improve that FLIR.PHP is if the color scale could be auto scaled from the height of the image since pano's are often a odd resolution.

// draw color scale
exec($convert . ' -size 16x430 gradient: ' . $pal . ' -clut -mattecolor ' . $font_color . ' -frame 1x1 -set colorspace rgb -mattecolor gray -frame 1x1 "gradient.png"');

to like
// draw color scale
exec($convert . ' -size 16x(image height minus some number to make it fit nice) gradient: ' . $pal . ' -clut -mattecolor ' . $font_color . ' -frame 1x1 -set colorspace rgb -mattecolor gray -frame 1x1 "gradient.png"');

But that is likely a topic for another forum.

Cheers! :)

OrBy

Just finished up with testing 9.75. Looks like everything is working correctly now! Thanks :)