EEVblog Electronics Community Forum

Products => Thermal Imaging => Topic started by: IwuzBornanerd on June 10, 2020, 08:02:41 am

Title: Linux software to convert lists of numbers (e.g. Seek tiffs) into color images
Post by: IwuzBornanerd on June 10, 2020, 08:02:41 am
I tried to make the title more descriptive but the system wouldn't let me make it longer.

In earlier posts where this topic has come up I have said that I have a "crude" program to read Seek tiffs.  There are 2 reasons I called it crude:

1) It was 2 programs; one to read the tiff & write the 2nd & 3rd page data to plain text files, and a second program to read the text files & display an image.  And that second program was adapted from my camera driving program.

2) There is no "file open dialog" so it was not possible to start the program & then select a file to process.  Initially I even had to change the code & recompile to load a different file(!).

But as the topic has continued to come up and I used it more I have refined it to the point that I actually enjoy using it, but as is often said: "YMMV".  It is now one program & there is still no "file open dialog" (since SDL2 has none), but it can be set up as an "open with" selection when you right-click on a file name.  AND now someone has actually asked for the program, so I am going to "toss it out there" and see what happens.  I have tried to make installation as simple as I can and in so doing have found that someone will probably have trouble no matter what I do.

What it is capable of:

I have not implemented any image rotation & Seek tiffs seem to sometimes end up rotated inexplicably.  The Thermviewer files appear to be written right to left instead of left to right & I don't know if that is consistent or not & I have not tried to correct for it; although I think it would be fairly easy to do.

To install the program, first unzip the archive into your home directory.   If using Xarchiver, make sure the "ensure containing folder" box is NOT checked (that box was not there under Wheezy).  This should place a configuration directory ".TImanipulator" and a program directory "TImanipulator" under your home directory.

Then, if you are using a Debian system (such as Raspbian on Raspberry Pi) you can run the Install.sh shell script (note the capital I).   Open a terminal in the TImanipulator directory & type ./Install.sh.  If noting happens make sure the execute "permission" is set on the file, and that there were no typos.

IF you are NOT using Debian/Raspbian, you will have to install the SDL2, OpenCV & libtiff development packages in your normal way.  The necessary packages are libsdl2-dev, libsdl2-ttf-dev, libopencv-highgui-dev, libopencv-core-dev, libopencv-imgproc-dev, & libtiff5-dev.  Installing these should also cause their dependencies to be installed.

One of the main ways I tested this was to take the Raspbian Buster July image I had downloaded last year, burned it to a uSD card, booted that on a Pi3A+, ran "sudo apt-get update" & then upgrade; THEN I had to run "sudo apt full-upgrade" to keep pcmanfm from crashing.  Then I unzipped my archive & ran the install script.  Then I set up the "open with" option & ran the program on several files & tested the operation.  I also tested it on Raspbian stretch on that Pi and with Debian Buster on my laptop.  As far as I know the procedure & program works fine in all those cases, with the caveat that anything older than Buster does not need 2 of the shared libraries specified in the makefile.  So if you want to install it on older systems, read the makefile before compiling to hopefully avoid errors related to those libraries.

Linux being Linux, there are bound to be other issues on other systems.  If anyone finds such anomalies please post them on this thread.

The program & TImanipulatorReadme,html instructions are in the attached zip file.