Open blackbird2908 opened 3 years ago
I have been trying today and this is no easy task. I managed to understand how the radiometric data is converted to temperatures, so the inverse operation can be easily done by fixing some of the parameters. Also I read the forum from the exiftool and how they reverse engineered the FLIR propietary metadata.
The blocking point right now is generating a ".jpg" with the required Exif tags. Most of the tools I analized are used only to read and not to write tags. Exiftool was promising, got it working with Python, but has the FLIR tags as not writable (RawThermalImage is the one to overwritte). The only way I see is by writing myself a tool to write the needed tags, however this means a lot investigation and work.
I leave here documentation on the exif tags for myself: https://web.archive.org/web/20190624045241if_/http://www.cipa.jp:80/std/documents/e/DC-008-Translation-2019-E.pdf
Fortunately, I found a workaround to load the images in the ThermoVision from Joe-C as you wanted.
Their program allows for decoding thermal data in byte arrays (Just what a bmp is). For this to work you need to follow these steps:
Code to generate the thermal grayscale bmp:
import uniTThermalImage
import PIL.Image
filename_input = "Images/IMG_Typical.bmp"
filename_output = "Images/thermal_output.bmp"
uti_obj = uniTThermalImage.UniTThermalImage()
uti_obj.init_from_image(filename_input)
pillow_img = PIL.Image.fromarray(uti_obj.raw_img_np)
pillow_img.save(filename_output)
try:
uti_obj_out = uniTThermalImage.UniTThermalImage()
uti_obj_out.init_from_image(filename_output)
except Exception:
print("Expected execption as new file does not contain embedded thermal data")
print("Start offset:", uti_obj_out.bmp_header['data_start_byte'])
print("T Min:", uti_obj.temp_min)
print("T Max:", uti_obj.temp_max)
Bravo. Thank you for your research on this issue. Nice solution and it works very well. The only drawback are the initial settings in the IR decoder import, which would have to be entered always anew manually for each image. By the way I've found another interesting way to analyze and work with the Uni-t thermal images in conjunction with your brillant Python script:
Add calibration bar tool and thermal LUT menu (e.g. ironbow):
There are so many plugins and functions. For example, I've installed the "Interactive 3D surface plot plugin":
Try it out.
@Santi-hr, @blackbird2908,
thanks a lot for your contribution to import UTi260B images into ThermoVision from Joe-C.
We might also post in the following forum thread where Joe-C is answering to questions about his great software: https://www.eevblog.com/forum/thermal-imaging/freeware-software-for-thermal-analysis-thermovision_joec
His last answer ist from 2021-01-24. So perhaps he is open to support the direct loading of those special BMP files from UTi260B. Then we wouldn't need to run the Python script each time.
I would let you guys go ahead and ask, since you've had the most work with the subject so far. But I could also pot this request and provide test images to Joe-C.
What do you think?
Best regards Florian
Thanks for your findings @blackbird2908. I added an option to the script to generate those tab-delimited files.
I agree that currently importing the images to ThermoVision is quite tedious. Being an easy to load file I guess he won't have much trouble adding support for these range of thermal cameras. I might later create an account and let him know, thanks @flotux2
Asking the founder of ThermoVision for adding the UTI260 is a very good idea. By the way I've just seen, that you have posted already in the eevblog.com forum. Thanks
joe-c published yesterday a debug version of his great software that seems to support our thermal camera! I will test it now to see if it is really working. I've already sent him some example pictures that he requested in his post.
Very nice. Thank you for your postback. It works very well except the min max hotspot visualization.
My comment in Youtube has been deleted due of quoting web links: Here are just 2 files I have found, but there are plenty of them. https://file.io/8IMuFEnm5icF and https://file.io/du8qtfidmgnZ and some helpful links: https://exiftool.org/TagNames/FLIR.html https://irinfo.org/04-01-2006-colbert/ https://fossies.org/linux/Image-ExifTool/lib/Image/ExifTool/FLIR.pm Thank you so much. You will help many people out there with this