ExifTool Forum

General => Metadata => Topic started by: Susan Frankenstein on May 26, 2020, 04:24:19 PM

Title: flir windows vs osx metadata
Post by: Susan Frankenstein on May 26, 2020, 04:24:19 PM
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?
Title: Re: flir windows vs osx metadata
Post by: Phil Harvey on May 26, 2020, 09:11:20 PM
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
Title: Re: flir windows vs osx metadata
Post by: Susan Frankenstein on May 27, 2020, 09:39:00 AM
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.
Title: Re: flir windows vs osx metadata
Post by: Phil Harvey on May 27, 2020, 09:43:46 PM
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
Title: Re: flir windows vs osx metadata
Post by: Susan Frankenstein on May 28, 2020, 09:35:30 AM
Okay. Thanks so much for all of your help.