我正在尝试导出来自热像仪的数据,但我收到一条错误消息
error: /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/highgui/src/cap_ffmpeg.cpp:238: error: (-215) image->depth == 8 in function writeFrame
Run Code Online (Sandbox Code Playgroud)
有人可以看看我在做什么,并告诉我我做错了什么?我非常仔细地跟踪和示例,所以我不明白这个错误意味着什么或者它为什么会发生.
o = camera.add_overlay(np.getbuffer(a), size=(320,240), layer=3, alpha=int(alpha), crop=(0,0,80,60), vflip=flip_v)
filename = time.strftime("%Y.%m.%d %H.%M.%S", time.localtime()) + ".avi"
fourcc = cv2.cv.CV_FOURCC('I','4','2','0')
out = cv2.VideoWriter(filename, fourcc, fps, (width, height))
try:
time.sleep(0.2) # give the overlay buffers a chance to initialize
with Lepton(device) as l:
last_nr = 0
while True:
_,nr = l.capture(lepton_buf)
out.write(lepton_buf)
if nr == last_nr:
# no need to redo this frame
continue
last_nr = nr
cv2.normalize(lepton_buf, lepton_buf, 0, 65535, …Run Code Online (Sandbox Code Playgroud)