Minimal radiometric temperature extraction from Hikvision thermal cameras
Project description
hiktemp
Minimal radiometric temperature extraction from Hikvision thermal cameras via ISAPI.
No SDK required. Only depends on requests and numpy.
Install
pip install hiktemp
Or from source:
git clone https://github.com/xynogen/hiktemp
cd hiktemp
pip install -e .
Usage
from hiktemp import hiktemp
frame = hiktemp("http://192.168.1.1", "admin", "password")
frame.matrix # np.ndarray (H, W) float32 — per-pixel °C
frame.jpeg # bytes — raw JPEG from camera (AGC, display only)
frame.meta # dict — camera descriptor
frame.min # float — global min °C
frame.max # float — global max °C
frame.mean # float — global mean °C
frame.std # float — global std °C
frame.hotspot() # (row, col) — global hotspot
frame.coldspot() # (row, col) — global coldspot
# band filter — lo/hi passed at call time
frame.hotspot(lo=28, hi=29) # hotspot within band
frame.coldspot(lo=28, hi=29) # coldspot within band
frame.masked(lo=28, hi=29) # matrix with out-of-band pixels = NaN
frame.alpha(lo=28, hi=29) # float32 (H,W) quintic smoothstep mask 0–1
Visualization is left to the caller:
import matplotlib.pyplot as plt
plt.imshow(frame.matrix, cmap="inferno")
plt.colorbar(label="°C")
plt.show()
# with band mask
import numpy as np
import matplotlib.pyplot as plt
rgba = plt.get_cmap("inferno")(frame.alpha(lo=28, hi=29))
plt.imshow(rgba)
plt.show()
Reuse session for continuous polling — once authenticated, no need to pass credentials again:
import requests
from requests.auth import HTTPDigestAuth
session = requests.Session()
session.auth = HTTPDigestAuth("admin", "password")
while True:
frame = hiktemp("http://192.168.1.1", session=session)
print(frame.hotspot())
Requirements
- Python >= 3.10
requests >= 2.28numpy >= 1.23
Tested on
- DS-2TD2138-10/QY (384×288, float32 °C, channel 1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hiktemp-0.1.1.tar.gz.
File metadata
- Download URL: hiktemp-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2d271004a9dd3a588d4d47b892a7b75d4e88455556071218ca8d86dc1ac12cd
|
|
| MD5 |
5502c4e7106b344a3211d61332fbb2b6
|
|
| BLAKE2b-256 |
50e82effab98f9a7edd7bd57b1998fa8328a71e58ee1ceb379105e334232e47a
|
Provenance
The following attestation bundles were made for hiktemp-0.1.1.tar.gz:
Publisher:
publish.yml on xynogen/hiktemp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hiktemp-0.1.1.tar.gz -
Subject digest:
d2d271004a9dd3a588d4d47b892a7b75d4e88455556071218ca8d86dc1ac12cd - Sigstore transparency entry: 1764414354
- Sigstore integration time:
-
Permalink:
xynogen/hiktemp@d9911a9042da12c9b59e99ef80e242dbec232b60 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/xynogen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d9911a9042da12c9b59e99ef80e242dbec232b60 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hiktemp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hiktemp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75bbd8a3d96ab0ae0ea94920e226bbb2c4ae4aa20a1c8295a32f55825bccea58
|
|
| MD5 |
aaf3972a6c47256332f171a3df31d4aa
|
|
| BLAKE2b-256 |
3044b23164e4518fd5ba7c49fa5fa2c7dc37f7d895c60971e9ce7ad2562cd40b
|
Provenance
The following attestation bundles were made for hiktemp-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on xynogen/hiktemp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hiktemp-0.1.1-py3-none-any.whl -
Subject digest:
75bbd8a3d96ab0ae0ea94920e226bbb2c4ae4aa20a1c8295a32f55825bccea58 - Sigstore transparency entry: 1764414597
- Sigstore integration time:
-
Permalink:
xynogen/hiktemp@d9911a9042da12c9b59e99ef80e242dbec232b60 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/xynogen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d9911a9042da12c9b59e99ef80e242dbec232b60 -
Trigger Event:
push
-
Statement type: