flir windows vs osx metadata

Started by Susan Frankenstein, May 26, 2020, 04:24:19 PM

Previous topic - Next topic

Susan Frankenstein

When I use exifTool -b rawflirimag > outfile on a windows machine versus OS X I get two different RawThermalIamageTypes for the same file. On my mac I have tried extracting both at the command prompt and within matlab and get the same information.

Windows: RawThermalImageType = TIFF
OS X: RawThermalImageType = .E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.F.E.E.E.E.E.E.F.E.F.E.[snip]

Also, on windows the temperatures are in C while on OS X they are in K. When I go further to look at the actual radiometer values, they are different as well.

Has anyone else encountered this?

Phil Harvey

On MacOS:

> exiftool tmp/NVL_IR_F00013405.IMG -rawthermalimage -b > a.tif
> exiftool a.tif
ExifTool Version Number         : 11.99
File Name                       : a.tif
Directory                       : .
File Size                       : 150 kB
File Modification Date/Time     : 2020:05:26 21:10:39-04:00
File Access Date/Time           : 2020:05:26 21:10:40-04:00
File Inode Change Date/Time     : 2020:05:26 21:10:39-04:00
File Permissions                : rw-r--r--
File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
Subfile Type                    : Full-resolution image
Image Width                     : 320
Image Height                    : 240
Bits Per Sample                 : 16
Compression                     : Uncompressed
Photometric Interpretation      : BlackIsZero
Strip Offsets                   : 204
Samples Per Pixel               : 1
Rows Per Strip                  : 240
Strip Byte Counts               : 153600
X Resolution                    : 72
Y Resolution                    : 72
Planar Configuration            : Chunky
Resolution Unit                 : inches
Image Size                      : 320x240
Megapixels                      : 0.077
Base Name                       : a
File Extension                  : tif
File Type Description           : Tagged Image File Format
Physical Image Size             : 4.4x3.3 inches


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

Susan Frankenstein

I have tried the below both within matlab and at the command line.  I've also tried batch running in batch mode within matlab and get the same results.

single:
[status00,cmdout00] = system(['/usr/local/bin/exiftool ',iname, ...
                                  ' -rawthermalimage -b > ',oname]);
barch:
[status00,cmdout00] = system(['/usr/local/bin/exiftool -ext IMG ' ...
                              '-rawthermalimage -b -w .tif', ...
                              '  -r. ',outfold]);

The problem comes when I try to read the files using in matlab:
[fidm,~] = fopen(oname,'r','ieee-le');
nrow = 240; ncol = 320;
    ir_raw = fread(fidm,[nrow,ncol],'uint16');
    fclose(fidm);

I get incorrect radiances in the first column and when I plot I see odd banding, both horizontally and vertically. I've tried with and without the 'ieee-le' (little endia) but that doesn't make a difference. I've also tried different integer types.

Phil Harvey

I don't think this is an exiftool problem, and I have no experience with MatLab, so I don't know if I can help here...

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

Susan Frankenstein

Okay. Thanks so much for all of your help.