Closed bulentkusva closed 3 years ago
Where do I go wrong, temperatures change very little ?
import cv2
from flirpy.camera.lepton import Lepton import numpy as np
cv2.namedWindow("output", cv2.WINDOW_NORMAL) font = cv2.FONT_HERSHEY_SIMPLEX fontScale = 0.4 fontColor = (255,255,255) lineType = 1
with Lepton() as camera:
scale_percent = 4 # percent of original size while True: img = camera.grab().astype(np.float32) # Rescale to 8 bit img = 255*(img - img.min())/(img.max()-img.min()) img=img.astype(np.uint8) #img=plt.imshow(img, cmap=cm.plasma) img= cv2.applyColorMap(img, cv2.COLORMAP_JET) ffc_temp_c=camera.ffc_temp_k# -273.15 ffc_temp_c=round(ffc_temp_c,2) fpa_temp_c=camera.fpa_temp_k#-273.15 fpa_temp_c=round(fpa_temp_c,2) cv2.putText(img,"temp_k:"+str(ffc_temp_c), (5,10) , font, fontScale, fontColor, lineType) cv2.putText(img,"temp_c:"+str(fpa_temp_c), (5,20), font, fontScale, fontColor, lineType) cv2.imshow('output', img) if cv2.waitKey(1) == 27: break # esc to quit
camera.close() cv2.destroyAllWindows()
The code you posted does not use pylepton, so I'm closing this issue.
Where do I go wrong, temperatures change very little ?
import cv2
from flirpy.camera.lepton import Lepton import numpy as np
cv2.namedWindow("output", cv2.WINDOW_NORMAL) font = cv2.FONT_HERSHEY_SIMPLEX fontScale = 0.4 fontColor = (255,255,255) lineType = 1
with Lepton() as camera:
camera.close()
cv2.destroyAllWindows()