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 — color from temperature, transparency from mask
import numpy as np
import matplotlib.pyplot as plt
norm = (frame.matrix - frame.matrix.min()) / (frame.matrix.max() - frame.matrix.min())
rgba = plt.get_cmap("inferno")(norm) # color mapped from temperature
rgba[:, :, 3] = frame.alpha(lo=28, hi=29) # alpha from band mask
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)
Metadata
Release files for hiktemp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hiktemp-0.2.0.tar.gz | 10.2 kB | With provenance | Details for hiktemp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hiktemp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for hiktemp-0.2.0-py3-none-any.whl |
Total release size: 18.1 kB
Release files / hiktemp-0.2.0.tar.gz
| Download URL | hiktemp-0.2.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cfb755a46822aaf9d1e155eb981f9c1de5d67db306111112d90e33142e2c526
|
|
BLAKE2b-256 checksum How to use checksums |
19ec1f39e2285461151c863817be09197864c7252c596822c8a016cd89a469b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.
Transparency logRelease files / hiktemp-0.2.0-py3-none-any.whl
| Download URL | hiktemp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bab07b0318e241baf9ecc9d8fdf6224b076612e5b2bd5d9b25b97e5cd386949d
|
|
BLAKE2b-256 checksum How to use checksums |
eb96fb18fc46f988f7f28690416de2905c0d93fea1e9982a015fbcbd52f1dbbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.
Transparency logSecurity for hiktemp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hiktemp-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.