Hacker News new | past | comments | ask | show | jobs | submit login
Building a Thermal Camera (damow.net)
167 points by jjwiseman on Dec 28, 2017 | hide | past | favorite | 39 comments



Based on the title and opening paragraph, I excitedly thought this would cover the manufacture of the sensor or lenses — you know, the things without which you don’t have a camera at all.

Perhaps a more accurate title would be “Salvaging a broken ‘FLIR One’ to make a thermal vision scope!”

Still a very cool project! Too bad it’s not reproducible at this cost though (this was more affordable than commercial products only because the author managed to buy a broken ‘FLIR One’ cheap on eBay, and salvage the sensor).


I have seen projects where people created scanning thermal cameras, repurposing one of those IR thermometers I believe, such as - https://www.youtube.com/watch?v=5v61Kuaxab0

As far as I know the sensors used in thermal cameras don't use silicon due to the long IR wavelengths they're detecting and instead use something like InGaAs iirc, so I assume making your own sensor would be very difficult.

However possibly you could make your own thermopile array instead - https://en.wikipedia.org/wiki/Thermopile ? I'm not sure how they compare to the sensors normally used though.

Edit: Also https://en.wikipedia.org/wiki/Microbolometer seems like you can use silicon + another layer to handle the IR


InGaAs is for near infrared. The long-wave IR used in thermal imaging requires something like vandium oxide.


Ah gotcha cheers. I was looking at an InGaAs sensor for around 2um for alcohol measurements a while ago, I didn't realise body heat etc. would require longer still.


If you want to do the same thing the sensor is ~$250. You can get one on a devboard from sparkfun for $260: https://www.sparkfun.com/products/13233

Adafruit has a low-resolution thermal sensor (8x8 pixel) for $40: https://www.adafruit.com/product/3538


The SparkFun sensor is the Lepton 1 with 1/4 the resolution of the Lepton 3 (80x60 instead of 160x120). He really did get a great deal on the sensor!

A quick google search shots GroupGets [0] has a Lepton 3 sensor, no breakout board for $240.

0 - https://groupgets.com/manufacturers/flir/products/lepton-3-0


This relies on finding an affordable Flir camera on eBay - I checked and you can't find anything under $100. If you want to build your own, it will turn out as more expensive if not more expensive than buying it from FLIR


I was expecting a little more in the actual optics creation portion of this article, but it is sadly predicated on us finding a really value priced FLIR camera sensor, which is not a small order. I've looked at these in the past and the price always pushed me away.


This is an awesome project and I'm very impressed with the skill levels demonstrated, especially the video pipeline.

If you just need a thermal camera though, there's a 120 EUR one on AliExpress.

https://www.aliexpress.com/item/HT-02D-Handheld-Thermal-Imag...


If you ever get the chance, do try playing with a thermal camera! It gives you a whole new appreciation for the great that flows around us that I never was able to grasp from a physics class. You can actually see footprints and even can write on the wall just by dragging your warm fingers against it. It's really incredible!


Would this be a good tool for finding air leaks (i.e. cold air coming in during the winter) in an old house? I might drop the $200-300 for one of these if it will help me find all the leaks.

Even better if the $40 Adafruit one mentioned elsewhere (https://www.adafruit.com/product/3538) worked just as well, once configured/programmed adequately.


I bought one for that purpose. What it does best is show you relative temperature levels, which you can then investigate further to see if they're real or not. In my experience, some are actual air leaks, some lack of air circulation, and some lack of backing insulation.


Yup, definitely agree. I've got one of the Seek Thermal units, and while the absolute temperature measurements aren't always that accurate, the relative temperature measurements are fantastic for finding hot/cold spots.


If you're in the USA, Home Depot also rents them by the hour/day if you don't want to spend the whole amount for something you won't use too often.


Next up is doing your own nuc[1] and upscaling the image using bilinear or biqubic upsampling [2]. Enjoy :-)

[1] http://www.flir.com/cvs/cores/knowledgebase/index.cfm?CFTREE...

[2] https://en.m.wikipedia.org/wiki/Image_scaling


If trying to seriously build a thermal camera and you're in the US, keep in mind US export laws. IANAL, but there's some nasty restrictions if the the thermal cam's resolution or Hz are too high. Then they become like weapons under the law and export becomes heavily restricted. FLIR almost certainly has an entire team dedicated to making sure they don't make US customs angry.


For a low resolution (8x8) option, there's Panasonic's GridEYE. It's good enough for basic area thermal imaging, though not nearly as useful as a high res sensor. It is only £30 or so though.

Depending on the object temperature, you can also use Silicon or Calcium Fluoride which will work up to around 8um. Humans emit at around 12um though. CaF2 has the advantage that it'll also pass NIR/visible/UV light down to 180 nm.


Being a programmer, but not an engineer, I always wanted to try to create a camera with the ability to micro-shift the sensor in both directions, increasing the resolution. If you shift 3 times by 1/3 of the pixel on each axis, you can theoretically 9X the resolution (well, megapixels). Of course, it won't work for dynamic scenes, but could be quite useful for industrial scanning or looking for house insulation problems.


I'm not sure this would work. The pixels of the sensor are capturing a whole square of incoming light, not just at a single point. Moving the camera 1/3 of a pixel over would just cause 1/3 of the light to bleed over to the next pixel, but it wouldn't increase the achieved resolution.

Oh, wait, maybe this could work. There might be a neat way to take the old and new values of new values and calculate what the in-between area's color must have been, based on how much the bigger blocks changed with a small movement? Either way, you'd need to be pretty far from the subject, but it might work for a landscape?


It works in commercial cameras like Hasselblad H4D-200MS.


The pixel-shift of the Sony A7RIII and Hasselblad only works to remove the effect of different pixels having different color filters in a Bayer array, with the result being an image with 4x resolution and each pixel containing full color information.

To perform supperresolution imaging, you need some statistical information, some sort of prior, on the scene being imaged and the processing requirements are not insignificant. Can potentially be done, but not in the simplistic pixel-shift sense that recent cameras advertise.


As I understand it, a lot of the pixel-shifting is to avoid de-bayering effects, not to provide superresolution. I'm more familiar with the A7RIII, so perhaps the Hasselblad does superresolution?

Unwinding sub-pixel structure requires, in general, careful deconvolution algorithms.


Do they use a COTS sensor with clever DSP or do they build a sensor that's actually capable of sampling?


It's called microscanning [1], is temporally sensitive so with a moving scene it can be difficult to stitch a good image together and it lowers your framerate.

[1] https://en.m.wikipedia.org/wiki/Microscanning


Flir app on Android has this feature built-in.

https://play.google.com/store/apps/details?id=georg.com.ther...


That sounds a lot like a mechanical emulation of a light field camera.


Instead of microshifting the sensor, why not offset the input light on the sensor with mirrors?


Nope won’t work, the image is not an orthographic projection.


This absolutely works, but not quite the way GP described. Instead, unit motions on the bayer pattern are used, to the effect that every logical subpixel is sampled by every colour channel (therefore giving you a full pixel). Hence, no demosaicing is required. Hence, higher spatial frequencies can be maintained without incurring aliasing.


It is also possible to actually increase resolution. https://arxiv.org/abs/1706.06266


Got an example of an image made this way? I’d wager it probably looks like crap.


Can you elaborate?


Camera lenses curve light, offsetting on a micro scale produces a slightly different perspective. You would end up with a blurrier image, not a high resolution one.


If you don't mind the bitbanging, Software SPI could totally be an option for your resistive touchscreen if the screen itself isn't a super active device.

Also, for the camera itself, way, way cool. I love the idea of stumbling on hidden gems in the rough and polishing them into a nice ring.


Face ID makes use of a front-facing IR sensor and dot projector. I hope those sensors make their way to the back of smartphones too. Could enable some very neat apps.


I predicted 3D sensors coming to phones a few years ago, but what I got wrong was that they ended up on the front, not the back. I do hope they make their way to the back as well. If they can do it with a big enough distance cutoff to work in any average sized home room, ARKit will look like a stupid toy in comparison.


This is super cool!

However, I do note that once FLIR devices become commonly available in the US, it will be constitutional for the police to use them to spy on your in your home and then use the resulting evidence against you in court.

http://lawcomic.net/guide/?p=2201

https://en.wikipedia.org/wiki/Kyllo_v._United_States#Opinion...


Well, yeah, you're breaking the law and these devices provided and advanced way to prove it.


a nice video about bolometer arrays https://www.youtube.com/watch?v=LFIUpvcmQLU




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: