Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing images causes loss of resolution #7

Closed
cambriec opened this issue Nov 21, 2019 · 3 comments
Closed

Importing images causes loss of resolution #7

cambriec opened this issue Nov 21, 2019 · 3 comments
Assignees
Labels
incorrect file type non-radiometric file type used, causing error

Comments

@cambriec
Copy link

Hi Glenn,

When I am importing images and then using dim(), it'll read a resolution much smaller than the original picture. For example, the original resolution is 320x240, but the output of the function reads 80x60.
I'm not sure why this happens since I followed the your tutorial and this didn't happen with your sample image.
Any help or insight to why this is happening is much appreciated!

Thanks!

@gtatters
Copy link
Owner

Hi there,

Any chance you could attach a sample image otherwise this is difficult to diagnose. Many of the entry level consumer flir cameras deceive the user into thinking the resolution is 320x240 when the fundamental sensor is only 80x60, but I cannot tell for sure.

Glenn

@cambriec
Copy link
Author

cambriec commented Nov 22, 2019

FLIR1351

This is shot with a Flir C2, I just looked up the model online and it does say that the IR sensor is 80x60. Not really related to the R package, but this just makes it more difficult, or perhaps less accurate, when analyzing in Image J. That's why I was wondering why importing the images made the resolution so low.

@gtatters
Copy link
Owner

From the terminal window:

exiftool -*width* -*height* FLIR_C2.jpg

Exif Image Width                : 320
Raw Thermal Image Width         : 80
Embedded Image Width            : 640
Image Width                     : 320
Exif Image Height               : 240
Raw Thermal Image Height        : 60
Embedded Image Height           : 480
Image Height                    : 240

There are multiple "images" inside the file. The thermal cam is only 80x60, while the digital image is either 320x240 or even as high as 640x480. FLIR creates an overlay image from the digital camera's halo/outline of the field of view to overlay on top of the raw thermal image. The thermal image must be artificially increased in size, but not in actual resolution, producing the blurry thermal image you see in the native jpg.

The Thermimage package is only designed to extract the raw thermal signal contained in these jpg files, so unfortunately, the resolution is only as great as the sensor size. Thermimage relies on Exiftool's -rawthermalimage extraction function at this time.

Sometimes FLIR employs a supermax resolution whereby they digitally increase resolution by sampling the 'jitter' from handheld cameras but usually this supermax only doubles the resolution (i.e. 160x120). I don't think they can bump it any higher but I could be wrong.

The problem with the thumbnail jpg loaded into ImageJ is contamination from the digital image overlay (the dull white halo). That will obscure and influence temperature estimates, plus we don't know what FLIR has done to upsample the image to create that effect. I would argue that the raw data are better than any digitally manipulated data, and it is likely that the upsampled image has averaged some of the temperatures by smoothing across pixels.

The consumer grade thermal cameras are not rated highly accurate as well. Use cautiously if you need accurate temperatures.

Closing issue as being beyond Thermimage to fix. If a more astute observer of exif headers can point to where the upsampled thermal image is in the file without the digital image overlay, please comment.

@gtatters gtatters added the incorrect file type non-radiometric file type used, causing error label Feb 21, 2020
@gtatters gtatters self-assigned this Feb 21, 2020
gtatters added a commit that referenced this issue Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incorrect file type non-radiometric file type used, causing error
Projects
None yet
Development

No branches or pull requests

2 participants