-
Notifications
You must be signed in to change notification settings - Fork 53
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
Multiple Errors Loading SEQ File #63
Comments
After playing a bit around with the python files, I can conclude, that the problem is probably the seq.py file. import numpy as np
from flirpy.io.seq import Seq
import matplotlib.pyplot as plt
#test = Seq("testrec1.seq", height=320, width=240) #as soon as supplied, error!
test = Seq("testrec1.seq")
print (len(test))
file0 = test[0]
file0.get_meta() # prints fine!
rad_image = file0.get_radiometric_image()
plt.imshow(rad_image) # looks great!
file1 = test[1] #test last file
print(file1.get_meta()) # prints same error! Any help welcome! |
Any idea what the difference between your two frames are? e.g. test[0] works but test[1] doesn't? |
As it is a video, I hope it is just the timestamp. Edit 1: I see that I never checked or asked myself if flirpy can handly video .seq files - does it? |
A SEQ is just a series of frames encoded as FFF files - it's basically a stack of images in a single file. So there isn't really a difference between a single frame SEQ and a multi-frame SEQ. What Flirpy does is (1) try to locate the boundaries between FFF files (this is straightforward and seems robust) and then (2) decode the file to get the image and metadata out. I'd suggest rolling back to an earlier release of flirpy and see if that helps (e.g. 0.1 or 0.2). There might be API changes, but the split script in the repo should work. Older versions of flirpy used Exiftool to do the splitting and that seemed more reliable - Flirpy will first split the SEQ into a folder full of "raw" FFF files and then it will use Exiftool to convert them. You could try extracting the frame (e.g. test[1]), writing it to a file (e..g "test.fff") and seeing if Exiftool can read it. This is kind of a longstanding issue that I've not had time to fix - basically the current SEQ decoder seems to bug out with the endian-ness of certain files. It seems that SEQ files made by different cameras are not identical, which is annoying. |
I will check and try! Thank you very much for your tool and help :) |
Update: I discovered that FLIR released a python API: https://flir.custhelp.com/app/answers/detail/a_id/3504/~/getting-started-with-flir-science-file-sdk-for-python It can be installed without any license. During install I had to contact support - they told me to use replace the file Maybe this is an option for other users with incompatible seq files :) |
Ah so you need the SDK for this, and it seems this isn't free? (2k EUR or so)
I'm glad you found a solution though, hopefully in the future we can bring support to more cameras within flirpy. |
You can actually just download it here and use it (just create an account with a temp email): https://flir.custhelp.com/app/account/fl_download_software I did not have to enter any licenses. Of course I don't know if one can include it in any 3rd party packages but it seems like it is usable standalone. |
Thanks, I'll take a look - which package is it? For example we could just import it in flirpy and ask the user to install it in their python environment. Then I don't think we'd need to worry about licensing, we just call functions from the SDK. |
This sounds like a good idea! The provided examples give a good introduction to the API package. |
Hi everybody,
I am new to python and thermal imaging. I hope this error is trivial an can be resolved easily.
I recorded a .seq file with a T420 FLIR Camera. Running
ython .\flirpy\scripts\split_seqs --width 320 --height 240
in the folder produced the following output:error.log
Unfortunately I am not experienced enough to debug the error myself. It seems to be some problem with the meta data. After playing around with the cli arguments I managed to create the .txt files in the raw folder. All meta data listed there is correct.
Can you guide me in the right direction to fix this or is it an error with the general code? If needed I can supply the relevant files, but I would prefer to send them privately.
The text was updated successfully, but these errors were encountered: