thermalcam_decoder/test_rust.py

13 lines
284 B
Python
Executable File

#!/usr/bin/env python3
from pathlib import Path
from thermaldecoder import decode
import numpy as np
import matplotlib.pyplot as plt
root = Path('frames')
root.mkdir(exist_ok=True)
frames = list(decode('in.pcap'))
f = np.array(frames[0])
f.shape = (384, 288)
plt.imshow(f)
plt.show()