-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
start =time.time()
while True: ## 반복문 돌입
for item in {"A","B"}:
select_channel(item) ## GPIO 출력 설정
time.sleep(0.02) ## 0.02초 휴식
try:
buf = picam2.capture_array("main",wait=True) ## 이미지 가져오기 (캡쳐)
buf = picam2.capture_array("main",wait=True)
buf = cv2.cvtColor(buf, cv2.COLOR_BGR2RGB)
if item == 'A':
cv2.imshow('A_image', buf)
elif item == 'B':
cv2.imshow('B_image', buf)
endtime = time.time()-start
print("t : ",endtime)
print("FPS = ",1/endtime)
start = time.time()
key = cv2.waitKey(1) & 0xff
if key == 27 :
break
except Exception as e:
print("capture_buffer: "+ str(e))Metadata
Metadata
Assignees
Labels
No labels