19 lines
482 B
Python
19 lines
482 B
Python
from orbbec_camera.OrbbecCamera import OrbbecCamera
|
|
import cv2
|
|
|
|
camera = OrbbecCamera('HW', True, image_width=640)
|
|
camera.run()
|
|
counter = 0
|
|
while True:
|
|
color_image = camera.get_color_image()
|
|
|
|
if color_image is not None:
|
|
cv2.imwrite('image_' + str(counter) + '.png', color_image)
|
|
counter += 1
|
|
cv2.imshow('img', color_image)
|
|
key = cv2.waitKey(100)
|
|
if key == ord('q'):
|
|
camera.stop()
|
|
# cw.stop()
|
|
break
|