I got my Seek Thermal SDK! - Page 1
Forum section: electronics / general

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 05:00:16 am
content: 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).

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 05:17:39 am
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 06:30:19 am
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 06:35:59 am
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 07:37:23 am
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 07:48:47 am
content: 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.

author: Fraser
author_rank: Super Contributor
timestamp: September 23, 2021, 12:27:08 pm
content: 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.

author: Fraser
author_rank: Super Contributor
timestamp: September 23, 2021, 12:37:03 pm
content: 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.

author: Fraser
author_rank: Super Contributor
timestamp: September 23, 2021, 12:44:36 pm
content: 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.

author: Fraser
author_rank: Super Contributor
timestamp: September 23, 2021, 12:55:15 pm
content: 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 ?

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 07:47:29 pm
content: Quote from: Fraser on September 23, 2021, 12:44:36 pmIn 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 08:02:50 pm
content: 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:QuoteI'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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 08:24:49 pm
content: Looking at this enum for selecting the setting that you want to get or set:Code:/*** 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, // 4SETTING_TEMP_UNITS, // 4SETTING_TIMEOUT, // 4SETTING_CONTROL, // 4SETTING_EMISSIVITY, // 4SETTING_BACKGROUND, // 4SETTING_THERMOGRAPHY_VERSION, // 4SETTING_TEMP_DIODE_ROOM, // 4SETTING_TEMP_DIODE_SLOPE, // 4SETTING_TEMP_DIODE_OFFSET, // 4SETTING_GLOBAL_THERM_ADJUST, // 4SETTING_SCENE_THERM_ADJUST, // 8SETTING_ENVIRONMENT_THERM_ADJUST, // 8SETTING_SPECIFIC_THERM_ADJUST, // 12SETTING_TRANSIENT_CORRECTION_ENABLE, // 4SETTING_TRANSIENT_CORRECTION_PARAMS, // 8SETTING_SMOOTHING, // 4SETTING_AUTOSHUTTER, // 4SETTING_MINMAX, // 24SETTING_SHARPENING, // 4SETTING_ENABLE_TIMESTAMP, // 4SETTING_RESET_TIMESTAMP, // 4SETTING_TRIGGER_SHUTTER, // 4// AGC SettingsSETTING_AGC_MODE, // 4SETTING_HISTEQ_BIN_COUNT, // 4SETTING_HISTEQ_INPUT_BIT_DEPTH, // 4SETTING_HISTEQ_OUTPUT_BIT_DEPTH, // 4SETTING_HISTEQ_HIST_WIDTH_COUNTS, // 4SETTING_HISTEQ_PLATEAU_VALUE, // 4SETTING_HISTEQ_GAIN_LIMIT, // 4SETTING_HISTEQ_GAIN_LIMIT_FACTOR_ENABLE, // 4SETTING_HISTEQ_GAIN_LIMIT_FACTOR, // 4SETTING_HISTEQ_GAIN_LIMIT_FACTOR_XMAX, // 4SETTING_HISTEQ_GAIN_LIMIT_FACTOR_YMIN, // 4SETTING_HISTEQ_ALPHA_TIME, // 4SETTING_HISTEQ_TRIM_LEFT, // 4SETTING_HISTEQ_TRIM_RIGHT, // 4SETTING_LINMINMAX_MODE, // 4SETTING_LINMINMAX_MIN_LOCK, // 4SETTING_LINMINMAX_MAX_LOCK, // 4SETTING_LINMINMAX_ACTIVE_MIN_VALUE, // 4SETTING_LINMINMAX_ACTIVE_MAX_VALUE, // 4FEATURE_OEM = 1000, // Size in bytes and type dependent on setting. Please contact Seek for details. Use FEATURE_OEM + index with additional settings provided by SeekSETTING_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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 08:34:26 pm
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 08:43:19 pm
content: Quote from: Fraser on September 23, 2021, 12:37:03 pmI'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?

author: Fraser
author_rank: Super Contributor
timestamp: September 23, 2021, 09:31:11 pm
content: 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.

author: Ben321
author_rank: Frequent Contributor
timestamp: September 23, 2021, 10:17:59 pm
content: Quote from: Fraser on September 23, 2021, 09:31:11 pmCompatible 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.

author: Bill W
author_rank: Super Contributor
timestamp: September 23, 2021, 10:56:26 pm
content: is the FFC better / worse / different if you do not use the inbuilt shutter, but blank the lens manually instead ?might give some clues

author: gabiz_ro
author_rank: Regular Contributor
timestamp: September 27, 2021, 07:27:56 pm
content: 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.

author: Alaaosama123
author_rank: Newbie
timestamp: June 15, 2024, 10:20:25 pm
content: Has anyone tried using seek thermal compact SDK with raspberry pi and it worked? It works fine on ubuntu but doesn’t work on raspberry pi 3b+, anyone has any idea?