Skip to content

Update irpythermal.py dead_pixels_mask to also include hot pixels#4

Open
mdarnold1 wants to merge 1 commit into
diminDDL:masterfrom
mdarnold1:master
Open

Update irpythermal.py dead_pixels_mask to also include hot pixels#4
mdarnold1 wants to merge 1 commit into
diminDDL:masterfrom
mdarnold1:master

Conversation

@mdarnold1
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@diminDDL diminDDL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, but on my end it detects way too many hot pixels for my liking on my camera:

python ./pyplot.py -r -o -12.3
Found a camera 0 with resolution 256x196
Waiting for camera to stabilize...
Min: 0.0, Max: 7528.0, Avg: 6297.91455078125
Min: 0.0, Max: 7551.0, Avg: 6312.3125
Camera is stable with std: 2.8034488371369637
Min: 0.0, Max: 7566.0, Avg: 6325.80419921875
Found 580 dead pixels
At: [[  1 237]
 [  2 117]
 [  3  36]
 ...
 [ 77 201]
 [ 78  99]
 [ 81 120]]

Maybe have separate hot and colt margins? Considering that hot pixels are usually not an issue maybe don't enable it by default and have a command line option to enable it if needed?

tdamsma added a commit to CEAD-group/ht301_t2s_plus_python that referenced this pull request Mar 24, 2026
irpythermal.py changes:
- calibrate_raw() now detects both cold AND hot stuck pixels using
  symmetric 5% threshold (previously only detected cold pixels)
  Source: diminDDL/IR-Py-Thermal PR stawel#4
  diminDDL#4

- Add save_calibration() and load_calibration() methods to persist
  reference frame and dead pixel mask as .npy files across restarts
  Source: MCMH2000/OpenHD_HT301_Driver noise_pattern_calibration.npy approach
  https://github.com/MCMH2000/OpenHD_HT301_Driver

- Fix resource leak in find_device(): release cameras that don't match
  supported resolutions instead of leaving them open

- Replace bare except with except Exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants