images.py 文件源码

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

项目:car-detection 作者: mmetcalfe 项目源码 文件源码
def crop_rectangle(img, pixel_rect):
    # Note: Need to add 1 to end coordinates because pixel rectangle corners are
    # inclusive.
    cropped = img[pixel_rect.y1:pixel_rect.y2+1, pixel_rect.x1:pixel_rect.x2+1, :]
    # cropped = img[pixel_rect.y1:pixel_rect.y2, pixel_rect.x1:pixel_rect.x2, :]
    return cropped

# save_opencv_bounding_box_info :: String -> Map String gm.PixelRectangle
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号