def handle_image(img):
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
new_data_condition.acquire()
state['img'] = hsv
args = config['target'].copy()
args['img'] = hsv
args['draw_output'] = state['draw_output']
args['output_images'] = {}
targets = vision.find(**args)
state['targets'] = targets
state['output_images'] = args['output_images']
new_data_condition.notify_all()
new_data_condition.release()
fps, processing_time = update_fps()
state['fps'] = round(fps, 1)
print 'Processed in', processing_time, 'ms, max fps =', round(fps_smoothed, 1)
评论列表
文章目录