Author Topic: Thermal Spectrum for Thermal Expert Q1  (Read 1246 times)

0 Members and 1 Guest are viewing this topic.

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Thermal Spectrum for Thermal Expert Q1
« on: May 03, 2019, 06:51:17 am »
Hi All,
I have had my TE-Q1 for over a year now. Usually I would take images with it. Mostly grey scale or iron palette. I never cared too much about temperature data because calibration is difficult and this emissivity settings thing.

My main focus was always relative values. Looking for things that get hot in my electronics projects or finding cold spots.

When I got my TE-Q1 I had the desire to have more control over the colour palette and save images as PNG instead of JPEGs. I contacted Thermal Expert for the SDK.

I started experimenting with some code bits to create dynamic colour palettes. After a few experiments I’m finally able to share my proto type with this community.

It is currently in beta state and very badly programmed. Its good enough for me right now – but with the recent discussions of request for a 3rd party TE-Q1 app I though of sharing it early.

Main features:
-   Dynamic colour palettes
-   Save images as PNG
My to do list:
-   Clean up Code
-   Create settings menu for more control over the app
-   Save settings per colour palette
-   Create custom colour palettes creator
-   Image Enhancing algorithms experiments (edge directed interpolation)

I'm open for for any input. but keep in mind this is just a hobby project and i'm not a professional andorid developer.

Feel free to install and test the application https://play.google.com/store/apps/details?id=de.axinit.thermalspectrum
I can easily add new colour palettes. So if your favourite is missing please let me know. RGB codes preferred.
The app got tested a on few devices and I had no issues with the layout. I know that low resolution devices might encounter overlapping UI elements please share screenshots so I can take care of it.
 
The following users thanked this post: joe-c

Offline bugi

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: fi
  • Hobbyist using the ultra slow and unsure method
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #1 on: May 03, 2019, 08:03:01 am »
A kind of shortcut for allowing user-made palettes could be to read palette images from suitable directory, filename being the palette name. Users can then create whatever color palette they like in an image editor on PC (or wherever, save it, load it to that directory, and if the app has successfully found and read it, it will appear in the palette selection. If crude, the image must be of exactly correct width (or height) etc.; if convenient, the app could automatically scale down larger image (and ignore rest of size in the other axis) and pick the colors then. In the convenient mode, the user could take a photo of a random rainbow logo, copy it to the right directory, and use that as a palette :P

(I'd think it is easier to read directories, image files, and pick the colors from those, than designing and coding a GUI for editing multi-color palettes.)
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #2 on: May 03, 2019, 04:41:12 pm »
i thought about this option. Since the palettes are only 2 to 8 (or more) RGB codes there is no need for image reading. I can store them in an XML file. that can also contain default values for sigma and gamma.
 

Offline bugi

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: fi
  • Hobbyist using the ultra slow and unsure method
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #3 on: May 03, 2019, 05:27:43 pm »
If I read between lines, that means all palettes have smooth gradients between those 2-8 defined colors (sharp step done by having the color points closer together or even next to each other). An image file can have arbitrary curves and/or steps. Well, so can XML file, if it just contains more steps. But again, it is often easier for users to create a palette image in an image editor program than creating an XML that produces the same end result. (And saves from needing to create that palette editor.)

However, I guess the best would be to have both. Some people know how to do such XML file even manually, but wouldn't know which program could do the image editing with gradients.
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #4 on: May 03, 2019, 05:49:13 pm »
the colour palette is generated out of x number of RBG values. The mixing and contrast is adjusted live via the sliders. Image palettes are fixed and can't be shifted like that.

See the screenshots attached of my testing app. the colors are the same for each of the 3 examples. only the sliders are moved. you dont need to generate a full 255 values of RGB data. all that is needed are min 2  different colours. and you can have as many as you want. the "NightVision" uses 8 different values.
 

Offline bugi

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: fi
  • Hobbyist using the ultra slow and unsure method
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #5 on: May 03, 2019, 06:03:03 pm »
Yeah, the image-palettes would be fixed, but then again, once a good palette is found, it typically does not need tweaking (or in some cases must not have changes to remain comparable between taken images).

Both solutions have their advantages and disadvantages.
 

Offline frenky

  • Supporter
  • ****
  • Posts: 961
  • Country: si
    • Frenki.net
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #6 on: May 03, 2019, 06:52:53 pm »
I can't test the app right now because I am at work but what I miss most in offical apps is:
- png export in 384x288 resolution
- png export in 2x resolution with good upscale algorithm (bicubic, bilinear, b-spline, lanczos...)
 

Offline polar

  • Contributor
  • Posts: 10
  • Country: ch
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #7 on: May 07, 2019, 06:06:12 pm »
I've been using your app the last view days and so far like it better than the original one if one is not interested in temperatures but rather just want to detect hotspots, which is my usual usecase.   I bought the Q1 a few weeks ago and after using the official app I planned to write a simple app for myself doing exactly what I want. I have some background in writing apps for android just for my personal needs, but this was mostly focused on opengl. But I havent found the time yet and also modifying the Q1 in terms of hardware (shutter for FFC, different case with interface for other lenses) has higher priority. Your app is very close to what I had in mind, saving me quite some time  :). It seems to use less CPU than the original one. I used it quite extensively and never had a crash or freeze, so I would say it is very stable.  I kile the sigma/gamma adjustments, really perfect for me.
Something easy to add: Put in an option for saving the PNG in original resolution, rather than upscaled by a factor of two.

Thanks for your work.
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 1320
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #8 on: May 07, 2019, 06:31:19 pm »
I downloaded and tried this app. It is pretty good and seems much better behaved than the official one. Although I generally use the camera to see hotspots, I do miss the temperature reading with this app - seeing something is relatively hot is only half a solution and knowing it is absolutely warm or hot (or even cool) is a big part.

What I would like to see is a picklist for the palettes. Pressing for the next tends to lead to fast presses to get to the previous one and overshooting, so round you go again.

The gamma and sigma adjustments are great, although I tend to have at least one near the end of the scale.

The filter button has a significant efffect, but I don't know what it's doing - can you elaborate on that please?

Nice app :)
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #9 on: May 08, 2019, 05:46:19 am »
Hi

Thanks for the kind feedback. There hasn’t been lots of installed yet so this is well received 😉

Regarding the 2 points mentioned.

Once I get around to setup a config menu for certain things, I can definitely add a no 2x button. But it’s using Bitmap.createScaledBitmap with bilinear filter on for better results.
The filter button is the same as to the official app “Image Enhancement” in the submenu. it’s a contrast enhance and noise reduction that is applied on the raw data within the SDK. You will get detail in sections that are usually clipped especially in really hot surfaces.
But I found in some cases it seemed to make images look to be lower resolution especially in low contrast situations therefore it can be toggled on or off.
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 1320
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #10 on: May 08, 2019, 05:58:36 am »
Ah-ha! I pondered for a long time what the filter might be - that explains it perfectly, thanks  :-+
 

Offline billyt

  • Contributor
  • Posts: 23
  • Country: al
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #11 on: May 14, 2019, 03:12:20 pm »
I have used the app for a while and it looks good and promising, but as @dunkemhigh said it is missing temperature measurements that we all need and other basic functions from the stock app, such as point, alarm, min/max, etc. I understand it is only the beginning of your project, so keep it up and focus on making it more functional and we are here to support your efforts.
Thank you for an alternative to stock app.
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #12 on: June 01, 2019, 09:59:45 pm »
little update from my end.

i submitted the update to the playstore and should be available within few hours.

- settings are now saved on exit of the app. the previous palette will be selected after restart incl the gamma and sigma values
- new settings menu for some settings
  - scaling factor (1x, 2x, 3x) effects saved image and the temperature font
  - min max temperatures for the scale can be displayed on the right side
  - colour palettes can be changed via buttons in menu
- temperature and scale are burned into the image that is saved

 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 1320
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #13 on: June 02, 2019, 12:48:32 am »
Wow, that's brilliant. I've set this as my default TE-Q1 handler :)

Although I am kind of falling out with my TE - the USB connection is very dodgy (not the phone or connector, as far as I can tell, since it happens with all my phone and all connectors),  but when it works this app is shaping up to be very good indeed.

Question about the levels: these are saved between runs, but could they have different settings for each palette? Most palettes are fine with the same levels, but I think the white hot is just too contrasty and low gamma when used with the settings for, say, iron.
 

Online Conure

  • Contributor
  • Posts: 24
  • Country: se
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #14 on: June 02, 2019, 06:31:12 am »
Nice that you can choose scaling. No longer have to scale down every oversized blurry image manually.

Any plans for being able to flip the image XY so you can hold the camera upside down with a cable?
Any plans for some noise reduction feature?
How does the sigma slider work?
« Last Edit: June 02, 2019, 06:43:01 pm by Conure »
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #15 on: June 02, 2019, 06:10:00 pm »
@dunkemhigh: i just pushed a new version to the beta channel which saves settings per colour palette. so blackhot/whitehot vs others is not a problem anymore. should arrive in few hours

@Conure:
- i will check how easy such a feature can be implemented. definitely once i got my "3D printed" enclosure i have the need to flip and mirror the screen - then it will come as a feature to the app
- already experimented with multi frame capture for median noise reduction - but i wasn't happy with the performance. so no quick wins therefore nothing visible in the app
- the sigma slider sets the value of how much colours are mix – it is a value in the colour interpolation algorithm
 
The following users thanked this post: dunkemhigh

Offline Klaus

  • Contributor
  • Posts: 8
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #16 on: June 02, 2019, 08:15:55 pm »
Very nice peace of software. Because of my holder I also need the mirror and flip function, that would be a nice improvement. Best Regards
Klaus
« Last Edit: June 02, 2019, 08:24:13 pm by Klaus »
 

Offline Klaus

  • Contributor
  • Posts: 8
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #17 on: June 20, 2019, 05:42:56 am »
I have tested the new version. The mirror and flip function is a little bit buggy, does not work like the original software. When using it the number of the temperature are also rotating and have the wrong angel.
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #18 on: June 20, 2019, 07:18:36 am »
i know ;) still early version. just experimenting here. The image is fine for your application? what settings you use, just rotate or just mirror or both?

an currently the weather is too nice to stay inside and do coding. therefor programing is slow - no rainy weekends on the forecast
 

Offline Klaus

  • Contributor
  • Posts: 8
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #19 on: June 21, 2019, 05:22:12 am »
Hi, the image is very good. I'm using both options. It interesting that after a restart the option mirror is on and rotation is off. When I switch than mirror off and rotation on the picture is fine!
 

Offline Musclor

  • Contributor
  • Posts: 12
  • Country: es
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #20 on: July 15, 2019, 10:47:30 am »
Looks really exciting and well build, but no dice on my Huawei Mate 20x . Works with the standard thermal expert app with the same cable though :(
I suspect thermal expert is trying to 'take over' the control of the cam when it's plugged in, is there a way around this? or should I maybe change something in my dev settings?

UPDATE: works on a pixel 3 XL, but only after uninstalling the thermal expert app first (again, I suspect the apps are battling over the control over the camera :))

In terms of the app itself, it's brill - fast, bug-free etc... yes features are few but I have a surface tablet with joe-c software on it if I needed something like that ;)

Congrats! PS: any plans to move to open source? I've been thinking of building a similar app but with a feature similar to msft ICE in order to very quickly run a high-res scan of an arm or a leg (for medical purposes). Would be happy to contribute.
 

Offline agh768

  • Contributor
  • Posts: 12
  • Country: de
Re: Thermal Spectrum for Thermal Expert Q1
« Reply #21 on: July 19, 2019, 04:46:11 pm »
On my phone i had no issues having both the official and my app installed. You must be quick to confirm so that the app is allowed to use the device.

My workflow is
1. Attach Q1
2. Wait for default app to start
3. Close default App
4. Start other App
5 Confirm use of USB device and use app normally.

I don’t plan to open source this version of the App. My App Development Skills have been dormant for a very long time and this is just some hacked together thing that worked pretty well for now.
If you have some Ideas we can discuss offline on how and if such feature is possible. I had a version with Multiframe  mean averaging working but the performance was really bad. therefore it never made it into the App.

Due to nice weather app development is currently on hold ;) no bad weather weekends to deep dive into the code for optimizations

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf