def get_kinect_angles(image):
"""
Gets angle to goal given an opencv image.
Parameters:
:param: `image` - an opencv image
"""
# print(image)
cv2.imwrite("out/thing.png", image)
thresholded_image = threshold_image_for_tape(numpy.copy(image))
cv2.imwrite("out/threshold.png", thresholded_image)
contours, box = get_contours(thresholded_image)
# total_image = cv2.drawContours(image, [contours], -1, (0, 0, 0))
# random_number = str(int(random.random() * 100))
# print("random number:", random_number)
# cv2.imwrite("out/total_image" + random_number + ".png", total_image)
corners = get_corners_from_contours(contours)
return get_angles_to_goal(get_top_center(corners), image)
vision_processing.py 文件源码
python
阅读 35
收藏 0
点赞 0
评论 0
评论列表
文章目录