navigation.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:srcsim2017 作者: ZarjRobotics 项目源码 文件源码
def side_intersect(self, image, contours, row, markup=True):
        """ Find intersections to both sides along a row """
        if markup:
            cv2.line(image, (0, row), (image.shape[1], row), (0, 0, 255), 1)

        cnt_l, col_l = self.find_intersect(image, contours, row, -1)
        if markup and cnt_l is not None:
            cv2.drawContours(image, [contours[cnt_l]], -1, (0, 255, 255), -1)
            cv2.circle(image, (col_l, row), 4, (0, 255, 0), 2)

        cnt_r, col_r = self.find_intersect(image, contours, row, 1)
        if markup and cnt_r is not None:
            cv2.drawContours(image, [contours[cnt_r]], -1, (255, 255, 0), -1)
            cv2.circle(image, (col_r, row), 4, (0, 255, 0), 2)

        return (cnt_l, col_l), (cnt_r, col_r)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号