6 ms·
Hacking the T2S+ Out of Fear: Get Lock-In Thermography for Free
- Abubarked 2y ago[flagged]
- kragen 2y agoThis is fantastic! At a high level all he had to do for basic thermography was to flat-field the raw image with offsets acquired from the camera's shutter, without even having to derive per-pixel gains like you normally would, and mask out some bad pixels (and inpaint them for naïve consumers that can't handle NA data). Then as a bonus he implemented lock-in thermography, which turns out to be just lock-in amplification applied to thermography by modulating a heat source over time. But the technical detail provided seems to be enough to make it easy for someone else to reproduce the whole setup. And provides ample evidence that you should, because the provided drivers are evidently malware. Oh, and apparently you get a free FPGA with your thermographic sensor!
- gsliepen 2y ago> At this point, I realized that I got the "V2" of the camera. This camera is regarded as worse than the "V1" mostly because the manufacturer removed the internal processing FPGA? That's actually better. In-camera processing will just reduce the amount of information you can get out of the sensor. For example, even if it does exactly the same flat-fielding as you do, the in-camera flat-fielded image has to be requantized to 8-bit format before sending to the computer, therefore losing precision. You can get even better accuracy by taking a dark or bias field (might be possible if you can set the exposure time to something very short, but this might not be possible with these thermographic cameras) and taking flatfields at different temperatures, so you can get per-pixel linearity curves. That's a lot of work though, and ideally each camera was indiviually calibrated by the producer, but I am guessing that is not done for these cheap cameras.
- daniel_reetz 2y agoThe article points out that the FPGA was not actually removed. However it is true in some circumstances having access to data earlier in the pipeline is useful. Microbolometer cameras like these have their own quirks.
- sangnoir 2y ago> In-camera processing will just reduce the amount of information you can get out of the sensor More information is not necessarily better. For instance, if the FPGA does calibration and removes sensor noise, removing the preprocessing adds literal noise to the data, which is worse.
- mschuster91 2y ago> In order to practically implement this we first close the shutter. Fun fact, Sony does the same once in a while for dead-pixel detection and remapping on their mirrorless cameras [1]. [1] https://news.ycombinator.com/item?id=38579634 https://news.ycombinator.com/item?id=38579634
- tiagod 2y agoBeen thinking of getting one of these but was worried about the proprietary app. I guess I have no reason now : )
- buran77 2y agoThere are a few open projects to support a lot of these thermal cams like the more popular Topdon or InfiRay models. PyThermalCamera [0] or Thermal-Camera-Redux [1] are good ones, I got my thermal cam working on my Linux laptop just fine. [0] https://github.com/leswright1977/PyThermalCamera https://github.com/leswright1977/PyThermalCamera [1] https://github.com/92es/Thermal-Camera-Redux https://github.com/92es/Thermal-Camera-Redux
- TeMPOraL 2y agoDo you know of anything that can handle UNI-T cams, particularly something like UTi721M, which is a nice thermal cam that attaches to a smartphone via USB-C?
- buran77 2y agoEevblog forum is the original source for most of the Github projects around these thermal cams. So that's a good place to start. https://www.eevblog.com/forum/thermal-imaging/new-software-for-infiray-hti-uni-t-topdon-series-thermal-cameras/25/ https://www.eevblog.com/forum/thermal-imaging/new-software-f... https://github.com/Santi-hr/UNI-T-Thermal-Utilities https://github.com/Santi-hr/UNI-T-Thermal-Utilities
- pavel_lishin 2y agoUnrelated to the article, but I love the "glow" effect on the code snippets. Any chance this exists as a plugin for VSCode, for when I want to re-live my teenager dreams of what working on computers looks like?
- sitkack 2y agoIt is just fuzzy from zooming up screenshots, a by product of the subpixel aliasing. If it doesn't, you could probably add a post processing filter to https://github.com/wez/wezterm https://github.com/wez/wezterm or https://github.com/alacritty/alacritty https://github.com/alacritty/alacritty
- _Microft 2y agoGP is talking about the code sections and the "CRT effect" that was added via CSS. Press "Toggle glow" to make it obvious what effect that is.
- equestria 2y agoYeah, and it's pretty simple. You have essentially three composition layers: original text; a gaussian-blurred zero-offset "shadow" to add glow (CSS text-shadow); and then a pattern of darker horizontal stripes on top, produced with repeating-linear-gradient with an alpha channel. The magic is basically in https://dmytroengineering.com/css/terminal-syntax.css https://dmytroengineering.com/css/terminal-syntax.css, but there's a lot of other ways to do it.
- sitkack 2y agoMy bad, totally wrong.
- a1o 2y agoI haven't like, checked the code, but I have seen this glow in websites that used a JS library called prism (or PrismJS).
- wdfx 2y ago
- vermon 2y agoVery cool! I thought maybe I'll take a crack at building a better iOS application for these things, but then I remembered that for the Lightning connector you needed to get the permission of the manufacturer if you wanted to interface with a device (tried that once with a Lightning Yubikey and luckily they didn't have any objections). Is this not an issue anymore with USBC iPhones?
- seany 2y agoI built an interposer board to do this about 5 years ago (for a product that didn't go anywhere). Ended up using a beagle bone in USB gadget mode to expose an Ethernet adapter to the iPad I was using.
- InvaderFizz 2y agoUSB-C iPhones work with all kinds of USB-C hubs, devices, keyboards, mice, Ethernet adapters, etc out of the box. As far as I have seen, USB-C on iOS devices has no authentication restrictions for anything. The device in the article already has an iOS app, so while there may be a needed app entitlement, I don't think there are any showstoppers for making an iOS app for this particular thermal camera.
- bpye 2y agoI would love to be wrong, but I can't find anything that suggests USB webcams work on USB-C iPhones - I did try in the past for different reasons but couldn't find any way of making it work. Some USB-C thermal imagers do claim to work, for example this one by HIKMICRO - https://www.hikmicrotech.com/en_us/industrial-products/mini2-v2-thermal-camera-phone-attachment/ https://www.hikmicrotech.com/en_us/industrial-products/mini2... - but I'm not sure how...
- fignews 2y agoYou are correct. I have the same camera as OP (v1?) but the usbc version does not work with iOS. Can’t understand why. It’s very infuriating.
- 2y ago
- knowitnone 2y agoFLIR sucks. from personal experience. They sell crap that doesn't even work with your smartphone.
- immibis 2y agoI heard the reason USA-made-and-designed thermal cameras suck is arms export regulations. They are considered military equipment unless they stick to certain limits. I guess China has no such rules, so the USA throws yet another manufacturing sector in the trash once again.
- wbl 2y agoFLIR is owned by Raytheon. They are very much not in the trash and make very good imagers. You just can't buy them.
- stefan_ 2y agoIt’s really just the framerate restriction to 9hz that the Chinese imagers don’t suffer ftom
- dannyw 2y agoBodes well for our semiconductor and AI industry now that we're limiting exports to China...
- heroprotagonist 2y agoLooking at those permissions, I think whatever fear he decompiled this out of was justified. I guess that's one way to implement industrial espionage. Build telemetry and malware, or code that can become malware with a little tweaking or remote checks, into a component that's likely to be used by technologists in whatever sector you're interested in. Make it a bit better and a lot cheaper than all the alternatives. Get on their phone with lots of permissions, and use the telemetry. Once you know who they are you can decide on more targeted actions to turn them into a vector against their employer or whoever, or just watch what you can to collect information.
- daghamm 2y agoAlternative take: maybe the app developer is combining random snippets found online mostly without knowing what he is doing. Remember that not long ago, Facebook was caught having deliberately bad sample code with too broad permissions https://privacyinternational.org/report/2647/how-apps-android-share-data-facebook-report https://privacyinternational.org/report/2647/how-apps-androi...
- heroprotagonist 2y agoAssuming ignorance, would you trust said app developer with remote management of your device if he accidentally asked for it?
- daghamm 2y agoMy point is that this could very well be incompetent instead of malice. Doesn't really change anything and I would not install an app that requests all these permissions and I am also very careful with apps distributed outside the official store. With that said, Android by default disables dangerous permissions and almost everything has to be opted in these days.
- dzdt 2y agoThe horseshoe principle applies on the malice/incompetence dimension. Any sufficiently advanced malice is indistinguishable from incompetence. (Disguising ill intent by as incompetent design is one of the strongest deniability approaches.) But also any sufficiently advanced incompetence is indistinguishable from malice. (A bad actor can fully compromise an incompetently designed system as well as if the vulnerabilities had been intentional.)
- stavros 2y agoThis costs $300, so, while cheaper than FLIR, still not cheap.
- fignews 2y agoMuch higher FPS and resolution than what FLIR even offers consumers.
- stavros 2y agoTrue, I meant "it's not 'impulse purchase' cheap".
- blincoln 2y agoThere are FLIR consumer devices with 320x240 sensors, like the E8, but they're a lot pricier, and low-FPS due to ITAR. Consumers in the US can buy 60FPS FLIR monoculars as well, but they come with ITAR restrictions. The T2S+ seems to be 256x192, 25FPS. Still a bargain, if you ask me, even if it's not as sharp.
- grishka 2y agoI can't access this website without a VPN, I'm getting the dreaded "you're blocked" cloudflare page. Cool stuff though once you get past that.
- meowster 2y agoCan we at least update the ITAR restrictions now, so we can get better resolutions and framerates? Can anyone from FLIR lobby on this?
- giantg2 2y agoIt seems like there's no great option for working with thermal on a budget. The FlIR Lepton has been a bit of a pain to work with on a Pi Zero or ESP. The FS is cheap, but like all Leptons it is slow and the resolution is low. Bosons are too expensive. The Chinese stuff seems to have terrible durability/longevity even if the prices are reasonable.