def run(self):
cv2.namedWindow("display", cv2.WINDOW_NORMAL)
cv2.setMouseCallback("display", self.opencv_calibration_node.on_mouse)
cv2.createTrackbar("scale", "display", 0, 100, self.opencv_calibration_node.on_scale)
if self.extra_queue:
cv2.namedWindow("extra", cv2.WINDOW_NORMAL)
while True:
# wait for an image (could happen at the very beginning when the queue is still empty)
while len(self.queue) == 0:
time.sleep(0.1)
im = self.queue[0]
cv2.imshow("display", im)
k = cv2.waitKey(6) & 0xFF
if k in [27, ord('q')]:
rospy.signal_shutdown('Quit')
elif k == ord('s'):
self.opencv_calibration_node.screendump(im)
if self.extra_queue:
if len(self.extra_queue):
extra_img = self.extra_queue[0]
cv2.imshow("extra", extra_img)
cameracalibrator.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录