Falafel Vision Processing.py 文件源码

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

项目:Millennium-Eye 作者: Elysium1937 项目源码 文件源码
def findCorners(contour):
    rect = cv2.minAreaRect(contour)
    box = cv2.boxPoints(rect)
    box = numpy.int0(box)
    height_px_1 = box[0][1] - box[3][1]
    height_px_2 = box[1][1] - box[2][1]
    print height_px_1, height_px_2
    if height_px_1 < height_px_2:
        close_height_px = height_px_2
        far_height_px = height_px_1
    else:
        close_height_px = height_px_1
        far_height_px = height_px_2

    return close_height_px, far_height_px
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号