Working on my own Seek Compact Pro controller software - Page 1
Forum section: electronics / general

author: Ben321
author_rank: Frequent Contributor
timestamp: November 23, 2017, 08:51:52 pm
content: 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.

author: joe-c
author_rank: Frequent Contributor
timestamp: November 24, 2017, 08:49:30 pm
content: Quote from: Ben321 on November 23, 2017, 08:51:52 pmYes, 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:for (int i = 2736; i < data.Length; i += 2) {ushort val = (ushort)(data[i + 1] << 8 | data);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);}

author: Ben321
author_rank: Frequent Contributor
timestamp: November 24, 2017, 11:23:21 pm
content: Quote from: joe-c on November 24, 2017, 08:49:30 pmIt 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.

author: Bill W
author_rank: Super Contributor
timestamp: November 25, 2017, 02:07:20 am
content: 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

author: Ben321
author_rank: Frequent Contributor
timestamp: November 25, 2017, 02:15:51 am
content: Quote from: Bill W on November 25, 2017, 02:07:20 amAn interesting thing is this though. Even the actual thermal image (all pixels are thermal data) is larger than advertised. The thermal image is 324x254.