Author Topic: Working on my own Seek Compact Pro controller software  (Read 2631 times)

0 Members and 1 Guest are viewing this topic.

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Working on my own Seek Compact Pro controller software
« on: November 23, 2017, 08:51:52 pm »
I'm using Visual Basic 6, to write my own program to control and acquire images from the Seek Compact Pro. Most of the main code (the code initializing it and grabbing frames) is a direct VB6 port of the C# code written by joe-c here at EEVBlog. So big thanks to him for his awesome work.

Now here's a few things I noticed when working with my program. The size of the frame actually sent by the Seek Compact Pro is not 320x240. It's actually 342x260. There's a lot of non-image data present in the frame. The top 4 lines, the bottom 2 lines, and the rightmost 18 lines are all non-image pixels. Also interestingly, even the image itself is not 320x240. It's actually a bit larger than this, at 324x254.
 

Offline joe-c

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: de
    • Joe-c.de
Re: Working on my own Seek Compact Pro controller software
« Reply #1 on: November 24, 2017, 08:49:30 pm »
...The size of the frame actually sent by the Seek Compact Pro is not 320x240. It's actually 342x260. There's a lot of non-image data present in the frame.

Yes, you have to start from byte 2736 and discard 22 bytes after each line.
i don't get deeper to it but the full frame was acquired with this:
Code: [Select]
for (int i = 2736; i < data.Length; i += 2) {
    ushort val = (ushort)(data[i + 1] << 8 | data[i]);
    if (x < W) {
        if (val > 2000 && val < 12000) {
            AVR += val; cnt++;
            Data[x, y] = (ushort)val;
        }
    }
    x++;
    if (x == W + 22) {
        y++;
        x = 0;
        if (y == H) {
            break;
        }
    }
}
if (cnt > 0) {
    AvrValue = (ushort)(AVR / cnt);
}
Freeware Thermal Analysis Software: ThermoVision_Joe-C
Some Thermal cameras: Kameras
 
The following users thanked this post: nikitasius

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Working on my own Seek Compact Pro controller software
« Reply #2 on: November 24, 2017, 11:23:21 pm »
...The size of the frame actually sent by the Seek Compact Pro is not 320x240. It's actually 342x260. There's a lot of non-image data present in the frame.

Yes, you have to start from byte 2736 and discard 22 bytes after each line.
i don't get deeper to it but the full frame was acquired with this:
Code: [Select]
for (int i = 2736; i < data.Length; i += 2) {
    ushort val = (ushort)(data[i + 1] << 8 | data[i]);
    if (x < W) {
        if (val > 2000 && val < 12000) {
            AVR += val; cnt++;
            Data[x, y] = (ushort)val;
        }
    }
    x++;
    if (x == W + 22) {
        y++;
        x = 0;
        if (y == H) {
            break;
        }
    }
}
if (cnt > 0) {
    AvrValue = (ushort)(AVR / cnt);
}

It turns out there is a simpler way of doing it. If you start on the first pixel the fifth line (x=0 y=4) of the overall larger image, that's also the first pixel of the actual thermal image. No need to worry about the byte location. In fact, in my program at this point, I've already copied the the byte array into an Integer array ("Integer" is what VB6 calls a 16bit integer, what C++ would call a "Short"). I do this CopyMemory from Byte array to Integer array as early as possible, because that's what I'll be working with.


And then there's still the weird thing about the width and height of the actual thermal image as well. Not only do you have to crop the thermal image out of the frame returned by the thermal imager, it turns out that even that actual thermal image isn't 320x240. It's actually 324x254, which is kinda weird, because the specs given for the Seek Compact Pro on their official website is that it has a 320x240 thermal resolution (the microbolometer array is supposed to have exactly 320x240 physical sites on the chip that sense temperature). It seems that the actual resolution is a bit better than advertised.
 

Offline Bill W

  • Super Contributor
  • ***
  • Posts: 1102
  • Country: gb
    • Fire TICS
Re: Working on my own Seek Compact Pro controller software
« Reply #3 on: November 25, 2017, 02:07:20 am »
Could be that the extra data are not thermally sensitive pixels but just interesting values fed through the ADC as an easy way to get them into the processing.

Bill

Offline Ben321Topic starter

  • Frequent Contributor
  • **
  • Posts: 894
Re: Working on my own Seek Compact Pro controller software
« Reply #4 on: November 25, 2017, 02:15:51 am »
Could be that the extra data are not thermally sensitive pixels but just interesting values fed through the ADC as an easy way to get them into the processing.

Bill

An interesting thing is this though. Even the actual thermal image (all pixels are thermal data) is larger than advertised. The thermal image is 324x254.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf