Notice
Recent Posts
Recent Comments
Link
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

Trikang

DJI Thermal jpeg file에서 보정되지 않은 섭씨 온도 얻기 본문

개발 Tip

DJI Thermal jpeg file에서 보정되지 않은 섭씨 온도 얻기

Trikang 2024. 10. 16. 00:28

DJI H20T thermal radiometric jpeg file

 

보정되지 않은 섭씨 온도를 얻으려면

celsius = ((raw_int16 >> 2) * 0.0625) - 273.15
from PIL import Image
import numpy as np

im = Image.open("/datasets/dji_thermal/images/DJI_20240520212354_0001_T.JPG")

# concatenate APP3 chunks
a = im.applist[3][1]
for i in range(4, 14):
    a += im.applist[i][1]

raw = np.array(Image.frombytes('I;16L', (640, 512), a), np.int16)
celsius = np.right_shift(raw, 2).astype(np.float32)
celsius *= 0.0625
celsius -= 273.15

Image.fromarray(celsius).save('/datasets/dji_thermal/celsius.tiff')

 

출처

https://exiftool.org/forum/index.php?topic=11401.msg88520#msg88520

Comments