Using a purethermal 2, lepton 2.5 and opencv to read temperature

424 views
Skip to first unread message

אורן דניאל

unread,
Mar 26, 2021, 6:54:27 AM3/26/21
to Flir Lepton

Hello everyone

I need for my graduation project to design a system that reads temperature using a thermal camera.
I have a purethermal 2 and a lepton 2.5, and I am using opencv.
Is there an example on how I can:
1) read the image properly from the camera?
2) a curve that will convert readings to temperature?

I notice that the camera captures 80x63 image (and not 80x60), and the last 3 lines of pixels seem to be broken so I trimmed them from the image using
thm_img = thm_img[0:60, 0:80]

Also I receive an unsigned 8 bit image, so Max Ritter's curve does actually work, because he subtracts 8192, sense he expects an 14 bit image.

https://groups.google.com/g/flir-lepton/c/MhCsyeY4HY0


So far I have:
import cv2
import numpy as np

cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)


while True:
  ret, thm_img = cap.read()
  thm_img = thm_img[0:60, 0:80]

  cv2.imshow('img', thm_img)

 
  k = cv2.waitKey(30) & 0xff
  if k == 27 or not ret:
    break
 
cap.release()
cv2.destroyAllWindows()

Reply all
Reply to author
Forward
0 new messages