Author Topic: I got my Seek Thermal SDK!  (Read 3353 times)

0 Members and 1 Guest are viewing this topic.

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
I got my Seek Thermal SDK!
« on: September 23, 2021, 05:00:16 am »
I went to developer.seek.com and registered an account there, including an explanation of my intended application (that was a required field to fill out on the registration form). I explained that even though I didn't have one of the OEM cores, that I did have a Seek Compact Pro for Android with micro-USB connector, as well as a micro-USB to USB adapter to allow it to connect to a PC, and that I planned to use the SDK to develop Windows software for personal use to experiment with my Seek Compact Pro on my Windows PC. A few hours later I got back an email that said my developer account was activated! I'm surprised they didn't outright deny my request for access to the SDK, since the SDK is normally intended to normally be used to develop software for the OEM cores, and is also clearly aimed at businesses (with the registration form even going so far as to ask what company you work for that will be developing a thermal imaging product, and making that a required question that you need to answer, which I simply filled out with the answer "none").

And I'm not joking. To prove that they did actually give me access to the developer portal, here's a screenshot its main page (no confidential info is here, just the links to pages with such info and downloads for the SDK, so I think it's safe to post this screenshot).

 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #1 on: September 23, 2021, 05:17:39 am »
Ok, I just tried the oldest version of their viewer (the one that comes with SDK 3.8) with my Seek Compact Pro connected to my laptop via a micro-USB to USB adapter. And it WORKS! By the way I had to first uninstall the WinUSB driver it was using (that was what I'd installed with Zadig before, in order to use 3rd party software with it), and then install their OFFICIAL Seek driver for it. The software locked up when using the WinUSB driver. Here's a screenshot of the display from this older viewer software.
« Last Edit: September 23, 2021, 06:37:08 am by Ben321 »
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #2 on: September 23, 2021, 06:30:19 am »
I also tried the viewers that come with the newer SDKs (4.0 and 4.1) and these have terrible flat-field correction! The flat field correction that is performed by the viewer in SDK 3.8 is great, but all the later ones leave a HUGE gradient. No matter how long you leave the camera running, it NEVER corrects for this gradient. I'm not sure if this is an issue with the programming of the viewer itself, or an issue with the DLL that contains the API functions (I haven't looked myself to see if FFC is done in the viewer's source code, or if it calls a DLL function to do it). Here's a screenshot from the viewer in SDK 4.1 to show you just how bad the gradient is. This was captured while the Seek Compact Pro was looking at an object with a constant temperature across its surface.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #3 on: September 23, 2021, 06:35:59 am »
Here's a screenshot of the same object, but this time using the viewer that comes with SDK 3.8. Yes, there's a lot of noise, but that's to be expected with an object that is of constant temperature, as the viewer is using AGC to stretch even small temperature differences (mostly from noise) of the flat temperature surface into a wide range of values for display in the viewer window.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #4 on: September 23, 2021, 07:37:23 am »
I just realized that there was a difference in the AGC mode between these two viewers. The 4.1 and 4.0 versions I had set to use linear AGC, but the 3.8 version viewer only offered one mode (though it wasn't stated) which clearly histogram equalizing AGC. Even then though, that doesn't make up for the terrible FFC of the 4.1 and 4.0 versions of the viewer (and possibly an issue with the underlying FFC function in the DLL if it has one). I know this because I went back and set the viewer for SDK 4.1 to use histogram equalizing AGC, and still the gradient is very obvious.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #5 on: September 23, 2021, 07:48:47 am »
In keeping with the other screenshots (with the exception of the one I mistakenly took while it was set to linear AGC mode), for the sake of consistency I kept histogram equalizing AGC mode enabled on the much more full featured standalone viewer called Seek Simple Viewer (version 3.0), which also was made with SDK 3.8 (just like the one that came with SDK 3.8). This viewer, the Seek Simple Viewer (as with the viewer that came with SDK 3.8), also has excellent FFC, as can be seen from the screenshot below.

It seems that the issue is that with SDK versions 4.0 and newer, something went terribly wrong with the development team in the Seek Thermal company, resulting in a team that threw out the old (and properly functioning) FFC algorithm for some reason, and implemented a new (and completely broken) FFC algorithm.
« Last Edit: September 23, 2021, 07:45:05 pm by Ben321 »
 

Offline Fraser

  • Super Contributor
  • ***
  • Posts: 13165
  • Country: gb
Re: I got my Seek Thermal SDK!
« Reply #6 on: September 23, 2021, 12:27:08 pm »
SEEK Thermal have made it a lot easier to obtain their SDK since the introduction of their developer kits that are sold through retail outlets. They are facing stiff competition from Chinese cores so it is in their interests to help developers of products that uses their core. Once the pandemic hit and SEEK Thermal core sales sky rocketed to meet the demand for fever detection cameras, SEEK Thermal had no time to examine business cases and just provided developer access to whoever met basic approval requirements such as not being in an embargoed country.
« Last Edit: September 23, 2021, 07:22:49 pm by Fraser »
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline Fraser

  • Super Contributor
  • ***
  • Posts: 13165
  • Country: gb
Re: I got my Seek Thermal SDK!
« Reply #7 on: September 23, 2021, 12:37:03 pm »
The MK1 Seek thermal phone dongle camera suffered from poor FFC and presented a temperature gradient over the displayed image. This issue was resolved with a software ‘FIX’ but SEEK Thermal never revealed the cause of the problem or their solution to it. It is believed that the poor FFC is caused by the FFC shutter design but Seek Thermal have kept that design throughout their core development. It would appear that the FFC event shows the limitations of the FFC shutter design but software post processing hides the issue from the user. As to why some SDK versions work in this respect and later versions do not, I cannot say as I have no insight into the SEEK Thermal software design. It is an interesting discovery though.

« Last Edit: September 23, 2021, 01:43:57 pm by Fraser »
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline Fraser

  • Super Contributor
  • ***
  • Posts: 13165
  • Country: gb
Re: I got my Seek Thermal SDK!
« Reply #8 on: September 23, 2021, 12:44:36 pm »
Regarding the two data output types…. The SEEK Thermal Radiometric cores offer the unadulterated pixel value output for Radiometric applications where accurate temperature data for each pixel is required. The other mode is what I call “Pretty Picture” mode where Histogram Equalisation is used to improve the image and make it look nicer to the user. It is RGBA mode and is not Radiometric as the equalisation trashes the pixel values displayed. There are variables that may be adjusted to set the level of image enhancement applied to the data coming out of the SEEK Thermal cores but the cores documentation is not wonderful in detailing the use of these functions.
« Last Edit: September 23, 2021, 12:48:23 pm by Fraser »
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline Fraser

  • Super Contributor
  • ***
  • Posts: 13165
  • Country: gb
Re: I got my Seek Thermal SDK!
« Reply #9 on: September 23, 2021, 12:55:15 pm »
I find it interesting that SEEK Thermal have never detailed the proprietary data stream that passes between the camera and host computer across a USB link. From the SDK documentation you will see that SEEK Thermal consider the camera hardware, USB link and Software API to be a complete closed module and 3rd party software can only access functions provided by the API and cannot directly communicate with the camera hardware. This is this challenge that members of this forum faced when wanting to write better software for this camera series, as you know. Reverse engineering the data passing across the USB link was relatively straight forward but understanding the purpose of the various data packages/images was the challenge and SEEK Thermal offer no insight into this which is a pity. I do not know why they kept the communications between the camera and the host API secret but they must have their reasons. We could be seeing the frame rate regulations issue rearing it’s ugly head again ?

If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #10 on: September 23, 2021, 07:47:29 pm »
Regarding the two data output types…. The SEEK Thermal Radiometric cores offer the unadulterated pixel value output for Radiometric applications where accurate temperature data for each pixel is required. The other mode is what I call “Pretty Picture” mode where Histogram Equalisation is used to improve the image and make it look nicer to the user. It is RGBA mode and is not Radiometric as the equalisation trashes the pixel values displayed. There are variables that may be adjusted to set the level of image enhancement applied to the data coming out of the SEEK Thermal cores but the cores documentation is not wonderful in detailing the use of these functions.

In this case, I wasn't talking about 2 data types. I was talking about 2 AGC modes. There's the linear AGC mode and the histogram equalized AGC mode. Both of these operate only on the RGB display stream, not the radiometric data stream.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #11 on: September 23, 2021, 08:02:50 pm »
I discovered something else very interesting. While I did have to click accept on an NDA on the developer portal, which said for me not to redistribute anything marked as confidential (and indeed there are a number of PDF files there that say "confidential" on them), the program called Seek Simple Viewer isn't marked as confidential. In fact, the LICENSE.txt file that comes with it says this:
Quote
Copyright (c) [2020] [Seek Thermal, Inc.]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The Software may only be used in combination with Seek cores/products.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

I'm not a lawyer, but my layman interpretation of that is that it basically says permission is granted to anybody who obtains the software to do whatever they want with it, including redistributing it, and even selling copies of it. It doesn't say distribution is limited to being among employees within the company authorized to use the software. The only restrictions are that it must only be used with Seek products, and that this license must be distributed with any copies of the software. So it sounds like the Seek Simple Viewer software is NOT covered by the NDA.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #12 on: September 23, 2021, 08:24:49 pm »
Looking at this enum for selecting the setting that you want to get or set:
Code: [Select]
/**
 * Defines the list of settings.
 * Seekware_SetSetting and Seekware_GetSeting are valid for settings less than or equal to SETTING_THERMOGRAPHY_VERSION
 * Seekware_SetSettingEx and Seekware_GetSettingEx are valid for all settings.
 */
typedef enum sw_settings {                      //  Size in Bytes:
    SETTING_ACTIVE_LUT,                         //  4             
    SETTING_TEMP_UNITS,                         //  4             
    SETTING_TIMEOUT,                            //  4             
    SETTING_CONTROL,                            //  4             
    SETTING_EMISSIVITY,                         //  4             
    SETTING_BACKGROUND,                         //  4             
    SETTING_THERMOGRAPHY_VERSION,               //  4             
    SETTING_TEMP_DIODE_ROOM,                    //  4             
    SETTING_TEMP_DIODE_SLOPE,                   //  4             
    SETTING_TEMP_DIODE_OFFSET,                  //  4             
    SETTING_GLOBAL_THERM_ADJUST,                //  4             
    SETTING_SCENE_THERM_ADJUST,                 //  8             
    SETTING_ENVIRONMENT_THERM_ADJUST,           //  8             
    SETTING_SPECIFIC_THERM_ADJUST,              //  12             
    SETTING_TRANSIENT_CORRECTION_ENABLE,        //  4             
    SETTING_TRANSIENT_CORRECTION_PARAMS,        //  8             
    SETTING_SMOOTHING,                          //  4             
    SETTING_AUTOSHUTTER,                        //  4             
    SETTING_MINMAX,                             //  24             
    SETTING_SHARPENING,                         //  4             
    SETTING_ENABLE_TIMESTAMP,                   //  4             
    SETTING_RESET_TIMESTAMP,                    //  4             
    SETTING_TRIGGER_SHUTTER,                    //  4             

    // AGC Settings
    SETTING_AGC_MODE,                           //  4             
    SETTING_HISTEQ_BIN_COUNT,                   //  4             
    SETTING_HISTEQ_INPUT_BIT_DEPTH,             //  4             
    SETTING_HISTEQ_OUTPUT_BIT_DEPTH,            //  4             
    SETTING_HISTEQ_HIST_WIDTH_COUNTS,           //  4             
    SETTING_HISTEQ_PLATEAU_VALUE,               //  4             
    SETTING_HISTEQ_GAIN_LIMIT,                  //  4             
    SETTING_HISTEQ_GAIN_LIMIT_FACTOR_ENABLE,    //  4             
    SETTING_HISTEQ_GAIN_LIMIT_FACTOR,           //  4             
    SETTING_HISTEQ_GAIN_LIMIT_FACTOR_XMAX,      //  4             
    SETTING_HISTEQ_GAIN_LIMIT_FACTOR_YMIN,      //  4             
    SETTING_HISTEQ_ALPHA_TIME,                  //  4             
    SETTING_HISTEQ_TRIM_LEFT,                   //  4             
    SETTING_HISTEQ_TRIM_RIGHT,                  //  4             
    SETTING_LINMINMAX_MODE,                     //  4             
    SETTING_LINMINMAX_MIN_LOCK,                 //  4             
    SETTING_LINMINMAX_MAX_LOCK,                 //  4             
    SETTING_LINMINMAX_ACTIVE_MIN_VALUE,         //  4             
    SETTING_LINMINMAX_ACTIVE_MAX_VALUE,         //  4             

    FEATURE_OEM = 1000,                         //  Size in bytes and type dependent on setting. Please contact Seek for details.       Use FEATURE_OEM + index with additional settings provided by Seek
    SETTING_LAST = 100000,
} sw_settings;

It looks like I would need to use Seekware_SetSettingEx (not Seekware_SetSetting) to set the autoshutter mode, as it comes after SETTING_THERMOGRAPHY_VERSION in the enum. However, I realized that the only difference between the Ex and normal versions of Seekware_SetSetting (and Seekware_GetSetting) was that the Ex versions of these functions allow you to pass any arbitrary sized data as the value, while the normal versions of these functions allow you to pass only a 4-byte value. As such, I tested and confirmed, that MOST of the settings in this enum can be retrieved with Seekware_GetSetting, and set with Seekware_SetSetting, as most of the settings here fit in 4 bytes. The ONLY settings you actually need to use Seekware_SetSettingEx and Seekware_GetSettingEx for are SETTING_SCENE_THERM_ADJUST, SETTING_ENVIRONMENT_THERM_ADJUST, SETTING_SPECIFIC_THERM_ADJUST, SETTING_TRANSIENT_CORRECTION_PARAMS, and SETTING_MINMAX.

Theoretically the Ex settings functions might also do something else inside their own code in the DLL, but the interface they present is different only by how big the value is that you are allowed to pass to the settings (looking at how the arguments are defined for the functions in the seekware.h file). And so far, all of the settings I've tried to adjust have been 4-byte settings, and they have all worked with the normal Seekware_GetSetting and Seekware_SetSetting, and produced the intended results. Of course if internally the Ex versions are doing something very different, I might end up (in a worst case scenario) corrupting the firmware settings on the camera, but I haven't experienced this with my Seek Compact Pro FastFrame camera.
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #13 on: September 23, 2021, 08:34:26 pm »
Also looking at the driver inf file (a human readable settings file for driver installation) in the SDK, it looks like all it does is associate the WinUSB driver with with the Seek camera, a driver that comes with Windows. It doesn't install any proprietary driver files (.sys files). This surprised me then that my camera didn't work with the SDK when I used Zadig to associate WinUSB with the camera (in that case it only worked with 3rd party software). In order to work with the official SDK viewer, I HAD TO use their inf file to associate the WinUSB driver with the camera. It seems that the SDK must check the name of the camera (as it would appear in Device Manager), to make sure that the driver was WinUSB driver was associated with the camera the official Seek way. What I notice is that using the inf file to associate the driver caused the camera to be called Seek Thermal Camera, but when using Zadig it was called PIR324 Thermal Camera. Maybe the official seekware.dll internally runs a check on what the Windows reports that the device's name is, to make sure that it was only installed the official way.
« Last Edit: September 23, 2021, 10:20:34 pm by Ben321 »
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #14 on: September 23, 2021, 08:43:19 pm »
The MK1 Seek thermal phone dongle camera suffered from poor FFC and presented a temperature gradient over the displayed image. This issue was resolved with a software ‘FIX’ but SEEK Thermal never revealed the cause of the problem or their solution to it. It is believed that the poor FFC is caused by the FFC shutter design but Seek Thermal have kept that design throughout their core development. It would appear that the FFC event shows the limitations of the FFC shutter design but software post processing hides the issue from the user. As to why some SDK versions work in this respect and later versions do not, I cannot say as I have no insight into the SEEK Thermal software design. It is an interesting discovery though.

I'm using a Seek Compact Pro FastFrame, not the original Seek Compact. Wouldn't the Compact Pro have had that issue fixed? Or is this FFC issue an issue for all of the USB cellphone dongle cameras, prior to the OEM cores being released?

I wonder if the newer versions of the SDK handle FFC differently, because they were released mainly with the OEM cores in mind, so they removed the "extra" code needed to properly perform FFC on the older cameras (the cellphone dongles). One thing I notice is that in the newer SDKs they provide a program called seekcamera-fsc.exe which is supposedly for performing an FFC calibration of the camera and setting the camera's internal FFC data. I wonder if they expect you to run this program, before you run the viewer, on newer versions of the SDK? If so and it actually does store the data in the camera itself, would that also fix the underlying camera-side issue you mentioned, even when connecting it to your phone?
 

Offline Fraser

  • Super Contributor
  • ***
  • Posts: 13165
  • Country: gb
Re: I got my Seek Thermal SDK!
« Reply #15 on: September 23, 2021, 09:31:11 pm »
Ben321,

The short answer is that I do not know. The temperature gradient issue was resolved on the MK1 dongle camera but as SEEK Thermal never revealed the cause of the issue or the software fix they used to combat it, we do not know whether later cameras have the same issue with FFC or not. It was my understanding that the current SDK was compatible with all SEEK Thermal cameras and cores that use a ‘USB to host’ link. That is to say it will not work with the SEEK Shot or SEEK Reveal series. There is no mention of FFC issues or incompatibilities.
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: I got my Seek Thermal SDK!
« Reply #16 on: September 23, 2021, 10:17:59 pm »
Ben321,

The short answer is that I do not know. The temperature gradient issue was resolved on the MK1 dongle camera but as SEEK Thermal never revealed the cause of the issue or the software fix they used to combat it, we do not know whether later cameras have the same issue with FFC or not. It was my understanding that the current SDK was compatible with all SEEK Thermal cameras and cores that use a ‘USB to host’ link. That is to say it will not work with the SEEK Shot or SEEK Reveal series. There is no mention of FFC issues or incompatibilities.

Compatible yes. The SDK will work with any Seek USB camera. But the quality of the image (including any FFC issues) probably varies by which camera it is. Fortunately the older SDK 3.8 seems to implement a software fix for it, even in cameras that lack the proper FFC in the camera itself. Unfortunately, all newer SDKs don't seem to implement that software fix.

I posted about the issue on the Seek developer forums yesterday, including screenshots. Apparantly (at least for new members) all posts (or at least new threads) have to be approved by a moderator. As of now, the thread has not yet appeared in the forum. I wonder if they intentionally avoided allowing that thread, because it would publicize an embarrassing defect in their product?

If my thread does appear there, I will post here again to let you know.
« Last Edit: September 23, 2021, 10:24:07 pm by Ben321 »
 

Offline Bill W

  • Super Contributor
  • ***
  • Posts: 1102
  • Country: gb
    • Fire TICS
Re: I got my Seek Thermal SDK!
« Reply #17 on: September 23, 2021, 10:56:26 pm »
is the FFC better / worse / different if you do not use the inbuilt shutter, but blank the lens manually instead ?

might give some clues

Offline gabiz_ro

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ro
Re: I got my Seek Thermal SDK!
« Reply #18 on: September 27, 2021, 07:27:56 pm »
In my case seekware-sdl can show image from camera but SeekSimpleViewer detect camera, show fps,frame,temperature min,spot,max ... seems OK but all I have is white screen after I press Start.
What I'm doing wrong?

Seems it was a problem on my notebook.
(tested on another notebook (also Intel graphic video) and one PC and works fine)
On my notebook with switchable graphics,with integrated Intel video white screen,switched to ATI card and image is OK now.
« Last Edit: October 12, 2021, 06:58:12 am by gabiz_ro »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf