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

0 Members and 1 Guest are viewing this topic.

Offline Nyx_

  • Newbie
  • Posts: 6
Re: Software for Xtherm T3s and HT-301
« Reply #25 on: June 19, 2020, 03:34:55 pm »
Thank you zrq. Appreciate your help. I'll take a look into it and see if I can make it to work. Appreciate your help.
 

Offline bermak

  • Newbie
  • Posts: 1
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #26 on: June 20, 2020, 05:09:39 pm »
Does HT-201 also work as usb webcam?
I’m thinking of getting a thermal camera to see which part of my notebook caused GPU/CPU throttling while use.
ht-201 is almost half price of 301 which is more budget friendly.
 

Offline PachekoVA

  • Newbie
  • Posts: 1
  • Country: br
Re: Software for Xtherm T3s and HT-301
« Reply #27 on: June 20, 2020, 07:51:35 pm »
can you send me the example xthermDLL?
 

Online zrqTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #28 on: June 21, 2020, 03:37:59 am »
For some reason, I feel a bit relutant to send the files to Zero Posters, unless they can show a proof of purchase.
 

Offline rmp94

  • Newbie
  • Posts: 4
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #29 on: July 20, 2020, 10:53:14 pm »
Were you able to reverse out compute_atmo_trans() from the compiled DLL or did you use that book's equation as your own atmospheric transmission function? That's pretty neat and not that obvious of an equation.
 

Online zrqTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #30 on: July 21, 2020, 01:39:16 am »
I reversed it and found it coincident with what I found in the book.
« Last Edit: July 23, 2020, 03:44:12 pm by zrq »
 

Offline SaitComplete

  • Newbie
  • Posts: 1
  • Country: ru
Re: Software for Xtherm T3s and HT-301
« Reply #31 on: July 23, 2020, 05:11:40 am »
hello can you send yours ubuntu files ? i can buy it
 

Offline Zhao

  • Newbie
  • Posts: 7
  • Country: us
Re: Software for Xtherm T3s and HT-301
« Reply #32 on: September 06, 2020, 10:29:37 pm »
Hello, I am planning to order an Xtherm T3s from alibaba to save ~150 bucks over the HT-301, which is available on Amazon with fast shipping. I wonder if there are any major quirks with T3s compared to HT-301?

One thing I have noticed is the difference in temperature range:
 - HT-301 claims to work for -20 to 400 deg C (there are some sources citing -20 to 300 and -20 to 120+ deg C).
 - T3S only officially support -20 to 120 deg C. Higher temperature range is reserved for T3Pro.
I wonder if this is strictly enforced in the FW or it can be walked around with 3rd party software such as ThermViewer. T3Pro is much more expensive compared to T3s or HT-301. If T3s is hard-capped in temperature range, it will make more sense to get the HT-301 instead.

The other thing is about the permanent logo. According to cnxunuo, the logo seems to be baked into the raw data. I wonder if there are ways to get around. I plan to play with the raw data in OpenCV so it will be pretty nasty if there is a logo on the corner. I wonder if HT-301 has the same issue.
noise:
t3s wins, by a huge margin, mostly noise even in low contrast days, with its knockoff 17um VOx.
Thermapp losed, very bad pixel noise,
however BOSON 640is a 12um core, it has extra noise and streak pattern than tau2 etc, but usable. note that this is the industrial (40mK version of boson)


lens:
t3s is a piece of garbage, its lens is so bad that when you focus on the center, the edge has weird out-of-focus artifact, dot becomes weird smudge.
BOSON 640 has weird issue of one corner became noticeably less sharp, which has already happened out of the box when new, very dissapointed.
Thermapp wins, its lens is the best.

boson uses a NV21 YUV webcam protocol, works without any trouble
thermapp uses proprietary protocol, needs linux software to trick it
t3s also uses YUV webcam protocol, however some idiot decided to permanently put their ugly logo on screen...

Thanks!
 

Dave92F1

  • Guest
Re: Software for Xtherm T3s and HT-301
« Reply #33 on: September 10, 2020, 01:12:11 am »
Mind sending me a link to your SDK?

I have a HT-301; would like to interface it to a Windows PC and analyze images in NumPy.
 

Offline valerian

  • Newbie
  • Posts: 1
  • Country: fr
Re: Software for Xtherm T3s and HT-301
« Reply #34 on: September 11, 2020, 07:44:27 am »
Hello,
Can you send me the SDK link please
Regards,
 

Offline Zhao

  • Newbie
  • Posts: 7
  • Country: us
Re: Software for Xtherm T3s and HT-301
« Reply #35 on: September 21, 2020, 12:36:07 am »
Hello, I wonder if I can get a copy of your code that converts the raw data from HT301 / T3s / T3Pro to temperature readings.

I have recently purchased a T3Pro after knowing how hackable it is. Based on your posts, I'm now able to stream the 16-bit raw data from the camera (code and result attached).

I appreciate your work!

Code: [Select]
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()
« Last Edit: September 21, 2020, 12:44:47 am by Zhao »
 
The following users thanked this post: therwp

Offline therm_space

  • Newbie
  • Posts: 1
  • Country: kr
Re: Software for Xtherm T3s and HT-301
« Reply #36 on: October 14, 2020, 11:34:32 pm »
Zrq:
I joined EEVvblog yesterday to find some information to read images and thermal data from T3s from my linux PC. Can you share any information to create dynamic library?
Thanks in advance.
 

Offline alexwhittemore

  • Frequent Contributor
  • **
  • Posts: 365
Re: Software for Xtherm T3s and HT-301
« Reply #37 on: October 17, 2020, 02:45:07 am »
Mr Lin frankly stated that they won't fix the issue with S10/ Android 10.

Are you freaking kidding? How is this company SO bad at software?

For Xtherm T3s (almost identical to HT-301), here is the link to the SDK

Now that I've got one of these 301s in my hands, I'd love a copy of your SDK!
 

Offline alexwhittemore

  • Frequent Contributor
  • **
  • Posts: 365
Re: Software for Xtherm T3s and HT-301
« Reply #38 on: October 25, 2020, 05:09:12 am »
Enjoy the great camera on any platform you prefer ;)

Thanks for sending along the SDK! I'm trying to run the Python example under linux (Ubuntu 20.04, x86_64 desktop VM). I've managed to install opencv and pyqt5, but I'm running into an error here:

Code: [Select]
if not (rawFrame.size == 292 * 384 * 2):
                print('ERROR: Incorrect frame size, wrong camera selected?')
                print('Frame size: {}'.format(rawFrame.size))
                exitNow()

rawFrame.size appears to be 336384, which is actually 292 * 384 * 3. I think that means 3 bytes per pixel instead of the expected 2? It doesn't make any sense to me why that'd be.
 

Online zrqTopic starter

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #39 on: October 25, 2020, 04:32:39 pm »
This looks weird to me, when I was using Ubuntu 18.04, I never have such an issue. Sorry but I don't really have an idea. Is the acquisition mode wrong and OpenCV is getting some RGB data?
 

Offline alexwhittemore

  • Frequent Contributor
  • **
  • Posts: 365
Re: Software for Xtherm T3s and HT-301
« Reply #40 on: October 25, 2020, 05:24:20 pm »
This looks weird to me, when I was using Ubuntu 18.04, I never have such an issue. Sorry but I don't really have an idea. Is the acquisition mode wrong and OpenCV is getting some RGB data?

Oh definitely an interesting though to chase down. Sounds extremely plausible.
 

Offline Tavana

  • Newbie
  • Posts: 9
  • Country: 00
Re: Software for Xtherm T3s and HT-301
« Reply #41 on: November 10, 2020, 04:31:12 pm »
May I ask you to please send me SDK for ht-301 ?
 

Offline Zhao

  • Newbie
  • Posts: 7
  • Country: us
Re: Software for Xtherm T3s and HT-301
« Reply #42 on: November 14, 2020, 08:32:18 pm »
I have the same issue. A simple reshape worked for me. See my previous post with code.

This looks weird to me, when I was using Ubuntu 18.04, I never have such an issue. Sorry but I don't really have an idea. Is the acquisition mode wrong and OpenCV is getting some RGB data?

Oh definitely an interesting though to chase down. Sounds extremely plausible.
 

Offline rasselfast

  • Newbie
  • Posts: 4
  • Country: ru
Re: Software for Xtherm T3s and HT-301
« Reply #43 on: December 18, 2020, 07:51:39 pm »
Received my copy of HT-301, found fixed pixels. Pixels have a halo. Dust on the matrix? It was not possible to unscrew the lens, rested against the retainer. I will disassemble.

I made an adapter and connected it to a Windows computer, found two dead pixels. In the official application, they are not visible, probably interpolation overwrites them, or a map of dead pixels is loaded. I am interested in the ability to get RAW data for extracting temperature data in Windows environment.

LINK REMOVED FOR PRIVACY CONSIDERATION (pm me to request it, tks)

I would be grateful for your SDK!

« Last Edit: December 18, 2020, 07:53:41 pm by rasselfast »
 

Offline mell

  • Newbie
  • Posts: 1
  • Country: ru
Re: Software for Xtherm T3s and HT-301
« Reply #44 on: January 13, 2021, 10:13:33 am »
Hi everybody!
Hi Mr. zrq!
Mr. zrq,
let me ask you to check your forum mailbox.
 
 

Offline Odiug

  • Newbie
  • Posts: 9
  • Country: de
Re: Software for Xtherm T3s and HT-301
« Reply #45 on: January 30, 2021, 09:41:39 pm »
Hi All,

Since yesterday I am also a proud owner of an HT-301. And I also would like to use it freely under Linux preferably with temperature information.

@Zhao: Thanks for the Python OpenCV script. Works fine for me.

So what do we know about the device already? From Zhao's script I deduce that with some UVC properties we can control certain things. The "calibrate" or shutter (the clicking sound) is also something I can confirm from looking at the APK with jadx-gui. I guess it takes a dark frame for calibration. In the app you can manually trigger it by touching the shutter symbol (lower left of UI).
From the apk, I also learned that most of the interesting stuff happens in libUVCCamera.so, which also calls libthermometry.so. I will probably try to continue my reverse engineering, but it is a bit tedious as my Android programming experience is rather limited.

I saw that eric in another thread has the palette working. Is this also something being controlled by a property setting, or does this happen in libUVCCamera.so?

@zrq: What can I do to convince you sharing the SDK with me?  :) How did you obtain it? NDA?

Regards
Guido
 

Offline stawel

  • Newbie
  • Posts: 3
  • Country: pl
Re: Software for Xtherm T3s and HT-301
« Reply #46 on: January 30, 2021, 09:57:35 pm »
This is my first  message, so hello everyone! :)

I recently bought a HT-301 thermal camera, unfortunately I couldn't find a software which would meet my needs,
so I wrote my own, maybe some of you will be interested:

https://github.com/stawel/ht301_hacklib/tree/master

it's a very simple (hacked) python script which is able to display the temperature in Celsius
and runs on ubuntu 20.04 (not sure if it will run on windows).

The temperature calculation is based on this project:
https://github.com/mcguire-steve/ht301_ircam
currently the values are probably a little bit off, but are good enough for me.
I've tried to 'decipher' what is going on there with little success, but found some useful papers:
https://www.mdpi.com/1424-8220/17/8/1718

unfortunately I don't have time to develop it further, as the current state meets my needs, so do what you want with it.

best regards,
Pawel
 
The following users thanked this post: rajeshmag, Odiug

Offline Odiug

  • Newbie
  • Posts: 9
  • Country: de
Re: Software for Xtherm T3s and HT-301
« Reply #47 on: January 30, 2021, 10:21:18 pm »
Hi Pawel

Thanks a lot for sharing your software and the other references. That's just what I was looking for.
Ah, I see, ht301_ircam contains a decompiled version of Xtherm.dll.  ;)

Regards
Guido
 
The following users thanked this post: MegaVolt

Offline stawel

  • Newbie
  • Posts: 3
  • Country: pl
Re: Software for Xtherm T3s and HT-301
« Reply #48 on: January 30, 2021, 11:34:22 pm »
what a interesting suggestion :)
hm.. I myself was wondering what a strange code standard they have in the original ros project ;)

but to be honest, the only part that was not changed (or only slightly changed) is:
https://github.com/stawel/ht301_hacklib/blob/master/ht301_hacklib.py#L74-L94
which I don't fully understand (and variable names associated with this code)

unfortunately this also means that I probably introduced my own mistakes  :-[
 
The following users thanked this post: rajeshmag, ericb

Offline stawel

  • Newbie
  • Posts: 3
  • Country: pl
Re: Software for Xtherm T3s and HT-301
« Reply #49 on: February 06, 2021, 12:29:18 am »

I was asked what I was able to figure out about the XthermDll.cpp code so here it is, maybe it will be useful to some of you.
(bare in mind that I may have introduced some errors to the code)

useful materials:
https://en.wikipedia.org/wiki/Stefan%E2%80%93Boltzmann_law
https://www.mdpi.com/1424-8220/17/8/1718   (sensors-17-01718-v2.pdf)
https://github.com/mcguire-steve/ht301_ircam
https://github.com/stawel/ht301_hacklib


#################### sub_10001010 ###################################
sub_10001010: - calculate: water vapour content coefficient, transmittance of atmosphere and part of object temperature equation (formula (2))

code mapping:
https://github.com/mcguire-steve/ht301_ircam/blob/fd6daa8fcee96835d52e200f53451d613718cc66/src/XthermDll.cpp#L13-L48
https://github.com/stawel/ht301_hacklib/blob/a54853a62323c5d6d2befac636568590f433a87b/ht301_hacklib.py#L34-L64
sensors-17-01718-v2.pdf  page:4
    variables in 'ht301_hacklib.py code', [XthermDll.cpp code]:
    'w', [v0] - water vapour content coefficient, formula (4)
    't', [flt_100133AC] - transmittance of atmosphere, formula (3)
    'part_emi_t_1', [flt_100133A8] - part of formula (2) (denominator without the Stefan-Boltzmann constant)
    'part_Tatm_Trefl', [flt_100033A0] - part of formula (2) (part of the numerator without the Stefan-Boltzmann constant)

note 1: h0, h1, h2, h3 coefficients from paper differ from XthermDll.cpp code
note 2: XthermDll.cpp code uses mostly 32 bit floats so numbers have bigger rounding errors

#################### sub_10001180 #####################################
sub_10001180 - generate lookup table (LUT)
sensor raw values are mapped from [0, 16384] -> object temperature (floats)

code mapping:
https://github.com/mcguire-steve/ht301_ircam/blob/fd6daa8fcee96835d52e200f53451d613718cc66/src/XthermDll.cpp#L72-L141
https://github.com/stawel/ht301_hacklib/blob/a54853a62323c5d6d2befac636568590f433a87b/ht301_hacklib.py#L74-L94
this is the part which I don't fully understand, but it's essentially formula (2) with some addons:
    variables (which I understand) in 'ht301_hacklib.py code', [XthermDll.cpp code]:
    'np_Ttot', [v20] - Total radiation temperature (is the name correct?) (Wtot = o*Ttot^4, formula (2))
    'np_Tobj_C', [v18] - object temperature in Celsius (formula (2), note Stefan-Boltzmann constant is not needed because we are using Ttot^4 instead of Wtot)
    'np_result', [*p] - np_result = np_Tobj_C + distance_c * (np_Tobj_C - airtmp_)  - some "magic" addon, this is the temperature presented to user, probably not needed (?)
    'distance_c', [(v16 - 1.125) / 100.] - helper variable used in "magic" addon

some additional info:
      result = 4;
      v17 = 1.0;
      while (1) {
         v12 = v20;
         if (result & 1)
            v17 = v17 * v12;
         result >>= 1;
         if (!result)
            break;
         v20 = v12 * v12;
      }
   is a fancy way of saying: v17 = v20**4, or np_Ttot**4

#################### UpdateParam #####################################
read calibration data (Non-uniformity correction (NUC) data(?), shutter closed) and calculate LUT

code mapping:
https://github.com/mcguire-steve/ht301_ircam/blob/fd6daa8fcee96835d52e200f53451d613718cc66/src/XthermDll.cpp#L143-L199
https://github.com/stawel/ht301_hacklib/blob/a54853a62323c5d6d2befac636568590f433a87b/ht301_hacklib.py#L118-L137
(the two lines: https://github.com/mcguire-steve/ht301_ircam/blob/fd6daa8fcee96835d52e200f53451d613718cc66/src/XthermDll.cpp#L198-L199
are here: https://github.com/stawel/ht301_hacklib/blob/a54853a62323c5d6d2befac636568590f433a87b/ht301_hacklib.py#L70-L71 )

################## GetTmpData  #######################################
get min, max,.. temperatures in the current frame
code mapping:
https://github.com/mcguire-steve/ht301_ircam/blob/fd6daa8fcee96835d52e200f53451d613718cc66/src/XthermDll.cpp#L252-L295
https://github.com/stawel/ht301_hacklib/blob/a54853a62323c5d6d2befac636568590f433a87b/ht301_hacklib.py#L163-L187

 
The following users thanked this post: RBsonic, rajeshmag, Odiug, thijsd


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf