Bootstrap

opencv 感兴趣区域提取 (ROI)

opencv 感兴趣区域提取 (ROI)

  • 1)使用像素坐标来提取ROI,前提是知道感兴趣区域的具体坐标范围
def img_cut():
     os.chdir(input)
    img_row = 1
     for image_name in os.listdir(os.getcwd()):
        print(image_name)
        img_row=img_row+1
        im = cv2.imread(os.path.join(input, image_name))
        if (im is None):
            print('读取照片失败')
            return -1
        im=im[600:1057,0
;