Universal viewer with Topdon TC002C Duo radiometric support#29
Open
AronNovak wants to merge 3 commits into
Open
Universal viewer with Topdon TC002C Duo radiometric support#29AronNovak wants to merge 3 commits into
AronNovak wants to merge 3 commits into
Conversation
New src/thermalcam.py auto-detects InfiRay/Topdon USB thermal cameras and decodes real temperatures: TC001 (256x384, /64) and TC002C Duo (512x484, /16, which also yields a clean 512x384 image), with a labelled relative fallback otherwise. Adds docs/TC002C-DUO.md (frame layout + reverse-engineered vendor protocol), requirements.txt, and an experimental command module. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- src/thermal_bridge.py: serve the parsed/colormapped thermal image as an MJPEG-over-HTTP stream so any app (OpenCV, ffmpeg, browser) can consume it like a webcam, no dependency. - thermalcam: --rotate / --flip (live 'o' key) and a clean colormap_frame() method (overlay-free) used by the bridge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
These cameras occasionally emit a horizontally-tiled/desynced frame. The frame validity check only looked at the temperature band, so such frames slipped through as garbage. Add an image-band alignment guard (mean-abs-difference vs a shifted copy; gradients and flat scenes are exempt) so the viewer and the MJPEG bridge never emit them. The bridge also reopens the camera after a run of unusable frames to recover from a stuck desync. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
src/thermalcam.py, a camera-agnostic rewrite oftc001v4.2.pythat also works with newer InfiRay/Topdon models (tested on a TC002C Duo).--device).256x384(/64) and TC002C Duo512x484(/16, which also gives a clean 512×384 image). Relative fallback otherwise, clearly labelled.CAP_PROP_BUFFERSIZE=1(OpenCV returns desynced buffers),VIDIOC_ENUM_FRAMESIZES(opening an unsupported mode desyncs the stream), skip desynced frames, telemetry trim, fixed-pattern-noise removal.--selftest.docs/TC002C-DUO.mddocuments the frame layout and the reverse-engineered vendor command protocol;src/thermal_protocol.pyis an experimental (dry-run) module for optional NUC/calibration.The original
tc001v4.2.pyis left untouched.