jelle737 / Vevor-Thermal-Utilities

Small script to extract raw temperature data from Vevor and Infiray thermal camera images
MIT License
7 stars 0 forks source link

issue with running the code #1

Open mhmdajami opened 1 year ago

mhmdajami commented 1 year ago

hi @jelle737 hope you are doing well. I'm trying to open an image using your code but I couldn't it's not the same camera you mention the camera I'm using is xcore micro 3 lite and the error I'm facing is: open_IRG_image.py:30: RuntimeWarning: overflow encountered in ushort_scalars img_sample = img_sample[:width_180height_240].reshape(height_240,width_180) Traceback (most recent call last): File "open_IRG_image.py", line 30, in img_sample = img_sample[:width_180height_240].reshape(height_240,width_180) ValueError: cannot reshape array of size 0 into shape (512,640)

this image is not corrupted and working in the software. also another thing can i use the same way or do you have any example to open irv video for the same camera? thank you very much hope to hear from you soon Ajami

jelle737 commented 1 year ago

Hi, An example file from your camera would be useful. The header is just guessing what data means what. I assumed width and height are in there since it matched for my camera, but your numbers 512 & 640 seem different. Although since the error mentions cannot reshape array of size 0, maybe the format it's too much different from my camera.

width_180 = img_metadata[5]
height_240 = img_metadata[4]

https://github.com/jelle737/Vevor-Thermal-Utilities/blob/6024fba145bca9cf32143bad67cacf53e4bdadd7/src/usageExample.py#LL17C1-L18C10

As for the video, in my camera it's just the false colour preview, there is no true thermal data in the video.