ich habe einen FLIR DEV KIT an meinem Raspberry Pi verbunden und versuche nun die Funktion Bildaufnahme zu starten und ein Bild zu generieren.
Bei meiner Internetrecherche bin ich auf folgendes Code-Beispiel gestoßen.
Code: Alles auswählen
import numpy as np
import cv2
from pylepton import Lepton
with Lepton() as 1:
frame_ushort,frame_id = 1.capture()
frame_byte = np.empty(frame_ushort.shape, np.uint8)
cv2.normalize(frame_ushort, frame_byte, 0, 255, cv2.NORM_MINMAX,dtype=cv2.CV_8UC1)
cv2.imwrite("Bildname.png",frame_byte)
Code: Alles auswählen
import numpy as np
import cv2
from pylepton import Lepton
test = Lepton()
frame_ushort,frame_id = test.capture()
frame_byte = np.empty(frame_ushort.shape, np.uint8)
cv2.normalize(frame_ushort, frame_byte, 0, 255, cv2.NORM_MINMAX,dtype=cv2.CV_8UC1)
cv2.imwrite("Bildname.png",frame_byte)
File "/usr/local/lib/python2.7/dist-packages/pylepton/Lepton.py", line 153, in capture
Lepton.capture_segment(self.__handle, self.__xmit_buf, self.__msg_size, self.__capture_buf[0])
AttributeError: 'Lepton' object has no Attribute '_Lepton__handle'
kennt jemand des Problems Lösung?
Gibt es eine bessere Lösung?
Gruß Dudu