ht301_hacklib icon indicating copy to clipboard operation
ht301_hacklib copied to clipboard

Best project , It's possible add T2S+ ?

Open bee1999 opened this issue 1 year ago • 13 comments

Cool project , but i have T2S+ , It's possible to add T2S+ for use ?

bee1999 avatar Jan 24 '23 11:01 bee1999

Cool project , but i have T2S+ , It's possible to add T2S+ for use ?

Have you tried it for T2S+? Does it work?

lamnguyenvu98 avatar Mar 22 '23 16:03 lamnguyenvu98

Have you tried it for T2S+? Does it work?

Just based on the resolution of T2S+: 256X192 it should not work (at least at this moment)

stawel avatar Mar 22 '23 19:03 stawel

Have you tried it for T2S+? Does it work?

Just based on the resolution of T2S+: 256X192 it should not work (at least at this moment)

You mean it should work, right?

lamnguyenvu98 avatar Mar 23 '23 06:03 lamnguyenvu98

You mean it should work, right?

no, it should NOT work,

we currently explicitly check if the resolution is right: https://github.com/stawel/ht301_hacklib/blob/master/ht301_hacklib.py#L286 and https://github.com/stawel/ht301_hacklib/blob/master/ht301_hacklib.py#L243-L246

but even if you change the code above, we additionally assume there are 4 extra lines of meta data, what gives us 4x384x2 Bytes. Since the width resolution of T2S+ is 256, the meta data will definitely look different.

stawel avatar Mar 23 '23 11:03 stawel

You can find the required offsets for other models here: https://gitlab.com/netman69/inficam/-/blob/master/libinficam/src/main/jni/InfiCam/InfiFrame.cpp

I might give it a try to create a pull request, but am not yet sure when I'll have the time to do so.

wwagemans avatar Mar 27 '23 13:03 wwagemans

interesting, I haven't seen this project before, I'll add a link to it

I might give it a try to create a pull request,

this is always appreciated :)

stawel avatar Mar 27 '23 22:03 stawel

hm... maybe It is also worth checking out: https://github.com/cmair/ht301_hacklib

note: This fork is a hack to support InfiRay T2S+!

stawel avatar Mar 27 '23 23:03 stawel

@stawel I think there are some problem with the temperature with TS2+ in line 170: https://github.com/cmair/ht301_hacklib/blob/7bb81ae60ac66edd498447052eb0ee04e056e667/ht301_hacklib.py#L170

    fpatmp_ = 20.0 - (float(Tfpa_raw) - 7800.0) / 36.0;

Should it be correct by following: https://github.com/cmair/ht301_hacklib/blob/7bb81ae60ac66edd498447052eb0ee04e056e667/ht301_hacklib.py#L170 ?

    fpatmp_ = 20.0 - (float(Tfpa_raw) - 8617.0) / 37.682;

or I must got a fever with 40°😂

image

GuoPingPan avatar Apr 08 '23 02:04 GuoPingPan

hm... maybe It is also worth checking out: https://github.com/cmair/ht301_hacklib

note: This fork is a hack to support InfiRay T2S+!

I can confirm this fork works with a T2S+. However I haven't got the high temperature mode working yet

tdamsma avatar Jun 14 '23 12:06 tdamsma

I tried to write a class that support different resolutions. Most of my code was based on this repo, this gitlab one and the SDK. This code works for my case (a T2 camera) and I haven't tested on other camera models. I would love to have some feedback though.

https://github.com/lamnguyenvu98/xtherm-python

lamnguyenvu98 avatar Jun 15 '23 04:06 lamnguyenvu98

I tried to write a class that support different resolutions. Most of my code was based on this repo, this gitlab one and the SDK. This code works for my case (a T2 camera) and I haven't tested on other camera models. I would love to have some feedback though.

https://github.com/lamnguyenvu98/xtherm-python

Did you find by any chance find the correct temperature scaling parameters for the 450C mode?

I only saw your comment now and in the meantime I also did some work in #11 to get the TS2+ working (including the 450C mode). I'll have a look at what you did to see how it compares

tdamsma avatar Jun 19 '23 15:06 tdamsma

@lamnguyenvu98 I think your approach to make a python port of the InfiCam repo is a great idea. Whish I saw it earlier. Getting started, it took me quite some time to figure out there is a whole line of camera's like the HT-301 and Infiray TS2+ that are pretty much the same. Would be great to combine support in a single python library with a nice and discoverable name.

Looking into the InfiCam repo it mentions:

/* NOTE Decompiled libthermometry.so from the android lib handles 400C range for 640px wide
 *   cameras differently, having different offsets for calibration values in that mode.
 * I couldn't wrap my head around how that worked so it's not implemented here.
 */

So it only has the correct values for the normal temperature mode. But perhaps I can do some data fitting to get these out.

tdamsma avatar Jun 20 '23 07:06 tdamsma

See #13 for a proposed rewrite of this lib based on https://github.com/lamnguyenvu98/xtherm-python

tdamsma avatar Jun 22 '23 14:06 tdamsma