Thermal surveillance with cheap smartphone thermal cameras (but not the phone) - Page 1
Forum section: electronics / general

author: IwuzBornanerd
author_rank: Frequent Contributor
timestamp: September 28, 2017, 09:17:07 pm
content: I finally wrote some rudimentary surveillance code into my Seek software... Surveillance was my original intended purpose for this camera but I was concerned that the extreme noise & low pixel count would render it useless for that purpose.In one image I have, a rabbit sitting at a distance of 30-40 feet is about 50 pixels so I set the frame-to-frame pixel count difference to 50. Since I have observed as much as 3 degrees Fahrenheit of random noise, I set my threshold for +/-3 degrees F for the 50 pixels. With that pair, the false triggers were not too bad, but then I discovered that the false triggers involved only one frame (mostly right after the shutter frame) so I made the code record video only if there were 2 consecutive frames that had 50 pixels different by more than 3 degrees. This eliminated all false triggers (at night) & I even found that I could go to 25 pixels different by more than 2*F. I also had the software zero out the background whenever the camera temperature had changed by 5*F by using the current scene as a reference frame to re-compute the gain coefficients. This helped keep the noise down.My immediate concern for using the thing was finding out what had been dropping large turds within my fenced-in back yard. Once I started monitoring the yard, the first thing I saw out of the ordinary was an Opossum. You can see it in the shittingpossum video in the archive linked below. The other video has a rabbit hopping around. In these videos, the bottom of the scene is about 20-25 feet away & the top is 48 feet away. And this is a Seek XR. While the images are little more than "blobs", the system does quite reliably detect small animals in the yard, and I was pleased with the performance.Edit: When I first posted this Xarchiver refused to make a zip archive for me so I made it tar. I now have a zip which hopefully everyone can access.

author: Vipitis
author_rank: Frequent Contributor
timestamp: September 28, 2017, 11:39:25 pm
content: Is your software based around the sensor directly or would it work with any grey scale video input?I like the idea of having a detector like feature and pair it with multiframe superresolution to get a tiny bit more detail.

author: IwuzBornanerd
author_rank: Frequent Contributor
timestamp: September 29, 2017, 12:10:07 am
content: The program as a whole is written for the Seek cameras with the 206x156 resolution and does not accept input from other devices. But if you are referring to the motion detection part...For the motion detection I simply store a frame in a separate array and when the next frame comes in I compare each pixel with the stored frame and if there are enough pixels different by the specified threshold temperature I write the frames to video. The comparison is done on the calculated temperature values for each pixel and the values are integers that represent the temperature above -40, so that part of the functionality is like comparing grayscale images and could be easily adapted for other image sizes. It's a simple operation, I think.

author: IwuzBornanerd
author_rank: Frequent Contributor
timestamp: September 29, 2017, 06:17:49 am
content: For those of you more interested in what the 2-legged critters are doing, here is a sample of the view out the front of the house. The camera is on a window sill less than 1 meter above the ground and not far from the level of the street, so you get an interesting view of vehicle exhaust systems. About 2 seconds into the video you see me go to the mailbox at the left edge of the scene. I am about 70 feet from the camera at that point. The people you see in the upper left corner later on are going into & out of the house across the street & that is about 130 feet from the camera. This is using the Seek XR I bought in June of 2015. The video covers evening of one day to a little past noon the next day.

author: IwuzBornanerd
author_rank: Frequent Contributor
timestamp: October 21, 2017, 06:39:48 am
content: After I determined that the Seek was useful for my purpose I bought a new non-XR Seek (in January 2017). The new ones have so much less noise that with a smoother palette I made I can run surveillance at 0.1 degree F resolution & still have a reasonably clean image. With the distinct color palette I need to use 0.2 degree resolution. I get more detail in the videos but it is still difficult to identify some creatures. What is just so cool is that after the software calibrates out the background and the camera temperature then changes slightly, I can see not only the tree in the back yard but the fence and even the terrain! You can see the tree and barely the fence at one point in the rabbit video from the old XR I posted above, but not the terrain, and not as clearly as with the new camera. I'll post an example still image showing the tree, fence, & terrain. I'll also upload a couple samples of video from the new camera. In the image & video the lower right corner is the edge of the patio, about 10 feet away and the top is the back fence at 48 feet. The tree is about 35 feet away. The afternoon portion of the squirrel video is during a torrential downpour & that is why the squirrel keeps dashing back up the tree. The skunk appeared to be having a good old time romping around the yard--2 nights in a row, and even on the patio--too close for comfort!Someone should let me know if these zip files or the videos therein are not working for you. I'm using different types of videos here.

author: tonykids
author_rank: Regular Contributor
timestamp: October 21, 2017, 01:07:16 pm
content: what about the stability of the camera in long-term use?

author: IwuzBornanerd
author_rank: Frequent Contributor
timestamp: October 21, 2017, 07:59:56 pm
content: Quote from: tonykids on October 21, 2017, 01:07:16 pmI'm not sure what you are referring to by stability and long term use. I have not run any of these cameras for more than 48 hours continuously, but the non-XR has been outside running most every night for several months now. I'm only concerned with what is out there at night so I only have the camera running 12 hours or so. I bring it in if rain is forecast to hit that side of the house. The only oddities in performance that I notice seem to occur within certain ambient temperature ranges & I intend to post examples of those here "one of these days".