Author Topic: Software for Xtherm T3s and HT-301  (Read 39088 times)

0 Members and 1 Guest are viewing this topic.

Offline Odiug

  • Newbie
  • Posts: 9
  • Country: de
Re: Software for Xtherm T3s and HT-301
« Reply #50 on: February 06, 2021, 10:20:59 pm »
Pawel, thanks a lot for your detailed explanation. I need to have a closer look.

I am still wondering what those are:
Code: [Select]
    flt_10003360 = f32(m3, 6);
    flt_1000335C = f32(m3, 10);
    flt_1000339C = f32(m3, 14);
    flt_10003398 = f32(m3, 18);
    flt_10003394 = f32(m3, 22);

Seems they go into the calculation of np_Ttot by calculating these coefficients from those polynoms:
Code: [Select]
    v23 = flt_10003360 * coretmp_**2 + flt_1000335C * coretmp_;
    v22 = flt_1000339C * fpatmp_**2 + flt_10003398 * fpatmp_ + flt_10003394;

Is there information out there about the values in the frame meta data? Besides what as been figured out so far.
I assume the SDK also does not provide anymore details and the DLL is just a black box to be fed with frames.

I remember I have seen something about which bolometer is used in the HT-301. Does someone know?
But I assume there is no publicly available information aka datasheets about that one. Pretty much the same situation as with CMOS sensors nowadays.

Regards
Guido
 
The following users thanked this post: stawel

Offline Messers

  • Newbie
  • Posts: 3
  • Country: de
Re: Software for Xtherm T3s and HT-301
« Reply #51 on: April 24, 2021, 04:27:47 am »
Hi!
As in this thread much information about both HTI-301 and T3s can be found, following question:
I have both thermal cameras and what I really love is HTI-301 is working out of the box as an UVC Webcam with a white-hot color palette. The T3s is recognized as a Webcam, too, but it outputs some green-greyish crumble, which is totally unusable. On the Android app both cameras produce the same thermal image quality (at least in my eyes). So, if anyone in here can give me a hint how to get a UVC video stream out of the T3s, this would be really great!
Greetings,
Marcel
 

Offline therwp

  • Contributor
  • Posts: 34
  • Country: us
Re: Software for Xtherm T3s and HT-301
« Reply #52 on: May 20, 2021, 03:52:28 pm »
You can just plug your HT-301 into your computer and stream it to VLC?
 

Offline ArsenioDev

  • Regular Contributor
  • *
  • Posts: 236
  • Country: us
    • DiscountMissiles: my portfolio and landing page
Re: Software for Xtherm T3s and HT-301
« Reply #53 on: May 20, 2021, 04:31:40 pm »
VLC or any other UVC supporting app, you can even do Zoom calls with it (I did that for a semester, confused the hell out of my professors)
 

Offline rajeshmag

  • Newbie
  • Posts: 3
  • Country: in
Re: Software for Xtherm T3s and HT-301
« Reply #54 on: August 09, 2021, 03:25:35 am »
Hi, I bought an HT-301 and received it just a few days ago. Can you please share the software to run it on Windows 10?

Email: rajeshmag1@gmail.com
UploadLink: https://www.dropbox.com/request/A3o8k9QCG5fj1CBSFU82

Thank you,
Rajesh
 

Offline publioelon

  • Contributor
  • Posts: 16
  • Country: br
Re: Software for Xtherm T3s and HT-301
« Reply #55 on: October 03, 2021, 06:05:10 am »
Can anyone share the Python SDK which the user zrq was willing to share a while ago? I got my Xtherm T3C , I managed to get it working via USB, but I can't change the color palette or calibrate the temperature measurement
« Last Edit: October 03, 2021, 06:06:51 am by publioelon »
 

Offline zrqTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #56 on: October 31, 2021, 12:54:17 pm »
Sorry for not able to reply to all the PMs as I have some personal issues with my school work. As someone already posted the reversed code to get temperature data from the UVC frames. I don't think anyone will need the low quality "SDK" anymore. I attached the code and a python demonstration script for your reference if you can not find the code.
 
The following users thanked this post: hydrabus, publioelon, ahsan

Offline Karl_S

  • Newbie
  • Posts: 6
  • Country: au
Re: Software for Xtherm T3s and HT-301
« Reply #57 on: December 26, 2021, 01:53:15 am »
Hi,
I really like that script-idea as I've got a T3S.
However, when I try to run the script I keep on getting following messages:

[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video1): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video3): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video4): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video5): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video6): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video7): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video8): can't open camera by index
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video9): can't open camera by index
Traceback (most recent call last):
  File "./pyplot.py", line 22, in <module>
    cap = ht301_hacklib.HT301()
  File "/home/karl/Public/FLIR-Test Software/ht301_hacklib.py", line 245, in __init__
    video_dev = self.find_device()
  File "/home/karl/Public/FLIR-Test Software/ht301_hacklib.py", line 276, in find_device
    raise Exception("device not found!")
Exception: device not found!


The interesting thing is this message keeps coming up for all video channels up to 9 except on 2 which happens to be my camera input as confirmed in VLC.
Has anyone any idea why that is ?
I'm using Kubuntu 20.04 which is almost identical to Ununtu 20.04
Any help would be appreciated.

- Update: After many hours of research I've managed to get rid of above mentioned message, but when running the "excample-simple" script I get:

raceback (most recent call last):
  File "/home/karl/Public/FLIR-Test Software/example_simple.py", line 11, in <module>
    ret, frame = cap.read()
  File "/home/karl/Public/FLIR-Test Software/ht301_hacklib.py", line 291, in read
    ret, frame_raw, frame, meta = self.read_()
  File "/home/karl/Public/FLIR-Test Software/ht301_hacklib.py", line 282, in read_
    frame = frame.reshape(self.FRAME_HEIGHT, self.FRAME_WIDTH)
ValueError: cannot reshape array of size 307200 into shape (292,384)
« Last Edit: December 26, 2021, 06:56:47 am by Karl_S »
 

Offline ericb

  • Contributor
  • Posts: 16
  • Country: fr
Re: Software for Xtherm T3s and HT-301
« Reply #58 on: December 31, 2021, 10:50:33 am »
Hello,

After a github fork, I finaly made it work under Linux (tested both x86_64 and aarch64). Can someone confirm the script works ? (I expect I didn"t break anything on Windows)

git clone https://github.com/ebachard/ht301_hacklib

cd ht301_hacklib
python3 opencv.py

Note: you'll have to export PYTHONPATH, in order to find the folder containing the cv2 python3 module.

e.g. on my machine I added in ( ~/.bashrc) the following lines:

Code: [Select]
PYTHONPATH=${PYTHONPATH}:~/Devel/OpenCV/opencv-4.5.5/build/python_loader::~/Devel/OpenCV/opencv-4.5.5/build/python_loader:/usr/local/opencv4/lib/python3.8/site-packages/cv2/python-3.8

export PYTHONPATH

IMPORTANT : if you install OpenCV from your distro, the lines above are uselss (I simply do my own OpenCV build from sources, and can select whatever OpenCV version doing that)

Thanks in advance for your feedback. Time to really stop now ;-)
« Last Edit: December 31, 2021, 11:49:36 am by ericb »
 

Offline Karl_S

  • Newbie
  • Posts: 6
  • Country: au
Re: Software for Xtherm T3s and HT-301
« Reply #59 on: January 01, 2022, 02:37:00 am »
Thanks for the latest version.

(Using Kubuntu 20.04)
When running pyplot.py I'm getteing following message now:

Let's start ...
isHt301 is True
device is valid

FPS =  25.0
fourcc =  1448695129

initial status of CAP_PROP_CONVERT_RGB =  1.0
set device property CAP_PROP_CONVERT_RGB ...
after the setting of CAP_PROP_CONVERT_RGB we have :   0.0
set device property CAP_PROP_ZOOM to 0x8004
Traceback (most recent call last):
  File "/home/karl/Public/FLIR-Test Software/Version4/pyplot.py", line 23, in <module>
    ret, frame = cap.read()
  File "/home/karl/Public/FLIR-Test Software/Version4/ht301_hacklib.py", line 353, in read
    ret, frame_raw, frame, meta = self.read_()
  File "/home/karl/Public/FLIR-Test Software/Version4/ht301_hacklib.py", line 335, in read_
    frame = frame.reshape(self.FRAME_HEIGHT, self.FRAME_WIDTH)
ValueError: cannot reshape array of size 307200 into shape (292,384)


I suspect it may be my T3S as it has different resolution (256x192) compared to the HT-301
Also have to admit did use the distro version and may have that problem that you've described. ......will work on installing it from source.

When running
ht301_hacklib.py
I get just a blank screen in konsole. - Nothing else happening.

--> Update:
 Been installing cv via source but discovered another underlying problem: The script picks up my build in camera first,(I'm using a laptop computer) rather than the USB 3TS.
I guess this was part of the problem all along.
Anyone any ideas how to change that? ....Should I enter the cam myself in the script rather than let it search for it ?
Thanks
« Last Edit: January 01, 2022, 07:51:18 am by Karl_S »
 

Offline ericb

  • Contributor
  • Posts: 16
  • Country: fr
Re: Software for Xtherm T3s and HT-301
« Reply #60 on: January 01, 2022, 10:30:43 am »
Hello,

Thanks for the feedback.

As short answer, what you see is simply usefull information I had to retrieve to fix some issues with the initial version on Linux. I'll comment them in a future version.

About your issue : everything is based on the resolution, and what you can try is to put YOUR width / height values (256x192 IIRC) and try.  I'm not sure it will work, because we suppose the last 4 lines contain the radiometric information, but the modification is IMHO mandatory.

After a fast read, I'd suggest you to change the following lines, in ht301_hacklib.py :

Code: [Select]
class HT301:
    FRAME_WIDTH   = 384
    FRAME_HEIGHT = 292

And replace them with :

Code: [Select]
class HT301:
    FRAME_WIDTH   = 256
    FRAME_HEIGHT = 192

If we are not too wrong, the reshape could work (but I can be wrong).  To anyone who know better than me, please correct me if I'm wrong.

+ maybe change debug = 0 for debug = 1   (line 7) to improve verbosity

Second part : detect the right device.

I see you are on Linux. So it's easy :-)   FYI, the recent kernel see some v4l2 devices differently, causing a double detection, mainly the integrated webcam are causing trouble. For further information please have a look at : https://bugzilla.kernel.org/show_bug.cgi?id=199575

In some words, your integrated webcam is seen as two devices.

To fix this second issue, what I'd suggest you is to proceed as follow :

connect your IR camera
open a terminal
type :

Code: [Select]
v4l2-ctl --list-devices
N.B. : if v4l2-ctl is not found, please install v4l-utils  (the exact package name depends on your distribution)

If the IR camera is seen as device 2 (I'm probably close), just change the range in find_device method, around line 308.

Current code:

Code: [Select]
    for i in range(0,4):

Modified :

Code: [Select]
    for i in range(2,4):

(no need to go after 4, excepted if you are using more devices connected to your machine)

HTH and Happy New Year to everyone :-)

« Last Edit: January 01, 2022, 10:32:53 am by ericb »
 
The following users thanked this post: therwp

Offline Karl_S

  • Newbie
  • Posts: 6
  • Country: au
Re: Software for Xtherm T3s and HT-301
« Reply #61 on: January 01, 2022, 02:20:09 pm »
First of all also a happy new year and all the best for 2022.

Thanks for your reply.
The reduced search value did help and now appears to pick up my FLIR . - Thanks
But unfortunately still have the screen size problem. I had already previously attempted to use my camera specific values, but no luck.
I've noticed Zhao made some remarks about that ( "I have the same issue. A simple reshape worked for me. See my previous post with code."--  Reply #35 on: September 21, 2020, 12:36:07)
and appears he'd managed to fix his problem but unfortunately don't have enough knowledge to work out how I can apply his fix / code to solve my problem.
His code:

import numpy as np
import cv2

cap = cv2.VideoCapture(1)
cap.set(cv2.CAP_PROP_CONVERT_RGB, 0)
# Use raw mode
cap.set(cv2.CAP_PROP_ZOOM, 0x8004)
# Calibrate
#cap.set(cv2.CAP_PROP_ZOOM, 0x8000)
while(True):
    ret, frame = cap.read()

    frame = frame.reshape(292,384,2) # 0: LSB. 1: MSB
    # Remove the four extra rows
    frame = frame[:288,...]
    # Convert to uint16
    dt = np.dtype(('<u2', [('x', np.uint8, 2)]))
    frame = frame.view(dtype=dt).astype(np.float32)
    # Sketchy auto-exposure
    frame -= frame.min()
    frame /= frame.max()
    gray = np.clip(frame, 0, 1) ** (1/2.2)

    cv2.imshow('frame',gray)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

The odd thing I've noticed is the doubled value in regards to frame size I get in the messages when executing opencv.py. The first reference ( 100352) is exactly double than the second reference in the last line ( 50176)

Let's start ...
isHt301 is True
device is valid

FPS =  25.0
fourcc =  1448695129

width: 256 height: 196
initial status of CAP_PROP_CONVERT_RGB =  1.0
set device property CAP_PROP_CONVERT_RGB ...
after the setting of CAP_PROP_CONVERT_RGB we have :   0.0
set device property CAP_PROP_ZOOM to 0x8004

(process:9563): Gtk-WARNING **: 01:17:04.698: Locale not supported by C library.
        Using the fallback 'C' locale.
frame.size =  100352
Traceback (most recent call last):
  File "/home/karl/Public/FLIR-Test Software/Version4/opencv.py", line 15, in <module>
    ret, frame = cap.read()
  File "/home/karl/Public/FLIR-Test Software/Version4/ht301_hacklib.py", line 353, in read
    ret, frame_raw, frame, meta = self.read_()
  File "/home/karl/Public/FLIR-Test Software/Version4/ht301_hacklib.py", line 335, in read_
    frame = frame.reshape(self.FRAME_HEIGHT, self.FRAME_WIDTH)
ValueError: cannot reshape array of size 50176 into shape (192,256)

--> Update:
Just solved it,.....only to an extend  :-\
The catch with the resolution is those extra 4 lines containing the data. So in order to have correct resolution set it is necessary to add 4 lines.
In my case 256x192 didn't work as script expected to see 50176 pixels. But 256x196 does result in that value.

But as it happens this is of little joy to me as it now repeatedly carries out the script yet now actual video footage.  :-[

« Last Edit: January 01, 2022, 02:38:17 pm by Karl_S »
 

Offline ericb

  • Contributor
  • Posts: 16
  • Country: fr
Re: Software for Xtherm T3s and HT-301
« Reply #62 on: January 02, 2022, 04:15:49 pm »
@Karl_S7

Indeed, looks like you are not far. Maybe there are two tracks :

- idx : I can be plain wrong, but looks like the index (probably the Interface descriptor length) is wrong, or the frames are stored another way. Using a random value will cause frames to become undisplayable. Testing on my side, means changing the idx value with my HT-301-ht gives same type of error btw. I even found other value working (... ?)

What you could do is try to use another value than 48 in ht301_hacklib . Sorry, didn't investigate more

- wrong dtype in frames ? (realy not sure)

Yet another last suggestion :  lsusb -v  could help too to find the header size.

Of course, it would be great to find a real, or at least more documentation, that's so easy when things are open ...

HTH
« Last Edit: January 02, 2022, 04:19:01 pm by ericb »
 

Offline Karl_S

  • Newbie
  • Posts: 6
  • Country: au
Re: Software for Xtherm T3s and HT-301
« Reply #63 on: January 04, 2022, 02:31:25 am »
Thanks for all the help.

Did try different values but no joy.
It appears to be that the data stream is not correctly decoded, but that's just my thought.
Anyway, spent so much on this time to give it a break. But as it happens managed to get the original xtherm operational on my PC. - Somewhat unstable but at least working.

Once again, thanks.
 

Offline thermalengineer

  • Contributor
  • !
  • Posts: 46
  • Country: us
Re: Software for Xtherm T3s and HT-301
« Reply #64 on: January 08, 2022, 01:04:47 am »
Hello, recently my student recommended me to buy InfiRay T2S+, it is said that its software algorithm and demo programs have been updated perfectly, have you heard of this product?  Now I am entangled between T3S and T2S+, I hope you can give me some advice. Thank you very much!  :)
 

Offline Karl_S

  • Newbie
  • Posts: 6
  • Country: au
Re: Software for Xtherm T3s and HT-301
« Reply #65 on: January 08, 2022, 04:36:05 am »
My understanding is the 's" stands for search and hence the optics are designed for long range view, not up close as required for inspection of electronic boards and other components.
The resolution is also the same as to the T2L
The "+" stands for higher temperature rating - up to 450C
As to software: Not sure but I understand it uses the same software anyway which is known to be very unstable (despite just having had another upgrade in December)
The only other software I'm aware made by this company is linked to their WIFi enabled devices.
Also from my tests so far it would appear that a simple c-type USB connector is not sufficient to make it work (on a mobile phone & tablet that is). I've discovered that many cheaper phones & tablets only have a USB 2.0 support despite having a c-type port. (buyer beware). Only an actual USB 3.0 and up will work.
(This is rather annoying as the type-c was supposed to be for USB 3.0 and higher. So that some manufacturer still use it but only support USB 2.0 sux)
« Last Edit: January 08, 2022, 04:46:43 am by Karl_S »
 

Offline alberth

  • Newbie
  • Posts: 1
  • Country: de
Re: Software for Xtherm T3s and HT-301
« Reply #66 on: March 19, 2022, 02:51:03 am »
Hallo, I'm searching for the sdk for the t2L, would be great if someone could help me.
 

Offline ahsan

  • Newbie
  • Posts: 2
  • Country: pk
Re: Software for Xtherm T3s and HT-301
« Reply #67 on: June 19, 2022, 06:02:19 pm »
hello,
can you send me the code file you have modified to get temperature of each pixel
Thanks
 

Offline Angel1024

  • Newbie
  • Posts: 7
  • Country: ru
Re: Software for Xtherm T3s and HT-301
« Reply #68 on: September 08, 2022, 10:25:01 am »
Hi, good news!
At least is possible to get worked ht301_hacklib on windows 11 with T3S
Stawel fixed a shape problem in his script on Github
https://github.com/stawel/ht301_hacklib/
and i add some strings in ht301_hacklib.py from line 293

Code: [Select]
if device_strings[3] == 'T3-317-13': frame_ok = True
            else:
                if device_strings[5] == 'T3S-A13': frame_ok = True
                else:
                     if debug > 0: print('frame meta no match:', device_strings)
after it worked well
https://github.com/stawel/ht301_hacklib/issues/5

Has maked single "all-in-one" exe for it (pyinstaller --noconfirm --onefile --windowed) and share it. It must work with HT-301 (if you have it please try) and T3S (my one is). T3Pro i think it need to update strings - something like "T3Pro-A13" but not sure, i not have this cam.
Here is the link for exe
https://www.mediafire.com/file/1fy3o2gm8imu5ow/opencv.zip/file
controls:
c-calibrate
s-screenshot
q-quit
closing window by pressing cross with mouse not working its will appear again, just press q to quit :)


« Last Edit: September 09, 2022, 03:43:41 am by Angel1024 »
 
The following users thanked this post: MegaVolt, RBsonic

Offline Angel1024

  • Newbie
  • Posts: 7
  • Country: ru
Re: Software for Xtherm T3s and HT-301
« Reply #69 on: October 23, 2022, 06:19:12 am »
Two good APPs for t3s for Windows. Supersmall, superfast, supereffective.

xThrem Demo - viewer with pallete changing and two modes -20-120C and 400C

Fix Dead Pixel - for dead pixel skipping, chinese language interface only,but you can use google camera translator in recognize text mode from pictures.
There have english manual in archive.
This app flashing dead pixel map into device memory - don't use it if you don't sure.
« Last Edit: October 23, 2022, 07:09:11 am by Angel1024 »
 
The following users thanked this post: MegaVolt, zrq, RBsonic

Offline Angel1024

  • Newbie
  • Posts: 7
  • Country: ru
Re: Software for Xtherm T3s and HT-301
« Reply #70 on: November 08, 2022, 05:04:24 am »
Another app PCXthermDemo_v2r9
Small size & fast
*RAW/YUW modes
*exposition adjustment
*120/400C switch
*mouse cursor tracking measure
*user defined point measure
*logging
*alarm
*histagramm
*user defined colour pallete (DIY pallete)

IMHO this one is best one at this moment
« Last Edit: November 08, 2022, 07:10:50 am by Angel1024 »
 
The following users thanked this post: Fraser, RBsonic

Offline Danielsan79

  • Contributor
  • Posts: 21
  • Country: de
Re: Software for Xtherm T3s and HT-301
« Reply #71 on: December 11, 2022, 01:03:39 am »
I just bought my first thermal camera, its a totally unknown model from guide, model MobIR 2S. Marketed as the first thermal camera for smartphone with autofocus. I am a bit disapointed from teh quality, thats why i think i send it back and buy the HT-301. Does it make any difference in buying the HT-301 or Infiray T3s ? Or should i just buy the cheaper offering? Somebody has a T3S and a xiaomi redmi11 on android 10 and its working with the original app?
« Last Edit: December 11, 2022, 04:13:12 pm by Danielsan79 »
 

Offline akosvr

  • Newbie
  • Posts: 2
  • Country: hu
Re: Software for Xtherm T3s and HT-301
« Reply #72 on: February 18, 2023, 06:09:09 pm »
Hi! Also please, may I get the sdk?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf