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

Error when loading FLIR jpg #13

Closed
lossberger opened this issue Aug 7, 2020 · 2 comments
Closed

Error when loading FLIR jpg #13

lossberger opened this issue Aug 7, 2020 · 2 comments
Labels
incorrect file type non-radiometric file type used, causing error

Comments

@lossberger
Copy link

When importing an FLIR jpg according to the instructions from https://github.com/gtatters/Thermimage (OS: Win 10) using the following code the error message beyond is shown and import is stopped.

Code:
_install.packages("Thermimage")
library(Thermimage)
image <- paste0(system.file("..........thermo.jpg", package="Thermimage"))
cams<-flirsettings(".............thermo.jpg", "........./exiftool-12.03/", camvals="")
cams
img<-readflirJPG("............thermo.jpg", "........../exiftool-12.03/")

Error message in console:

img<-readflirJPG("........../thermo.jpg", ".............../exiftool-12.03/")
Error in if (cams$Info$RawThermalImageType == "TIFF") { :
argument is of length zero

So far I havent been able to determine where the problem is situated, therefore I am looking forward for answers or suggestions.

Thanks a lot in advance.

@gtatters
Copy link
Owner

gtatters commented Aug 7, 2020

these errors are sometimes pathing errors (ie. exiftool is not properly installed). I would first suggest you verify exiftool is installed first, and don't specify the location to see if it can pick it up in the normal location (C:/windows/System32). I only included the customised path example to allow users to attempt to troubleshoot, but I advise you install exiftool in an appropriate folder in windows that is in the PATH environment (c:/windows).

Sometimes people suggest they are loading a flir jpg, but it is not a radiometric image, which might be the problem. Have you tried the example in the flirsettings function to verify this?

Example using the flirsettings function:

library(Thermimage)
## Sample flir jpg included with Thermimage package:

imagefile<-paste0(system.file("extdata/IR_2412.jpg", package="Thermimage"))

## Extract meta-tags from thermal image file ##
cams<-flirsettings(imagefile, exiftool="installed", camvals="")

If you have spaces in file or folder names, it might be a problem. I would also suggest looking at other closed issues for help, as similar issues have come up.

The error message you are getting, assuming R can find the file and path, suggests that the jpg is not a radiometric jpg, but without a sample file I cannot be sure.

@lossberger
Copy link
Author

lossberger commented Aug 11, 2020

Hi,

Thanks for the answer and the guidlines provided.

Indeed it was a combination of a pathing problem as well as a problem regarding the FLIR jpg.

Thanks a lot.

@gtatters gtatters added the incorrect file type non-radiometric file type used, causing error label Aug 20, 2020
gtatters added a commit that referenced this issue Aug 20, 2020
This issue was closed.
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