使用numpy rot90操作image后,opencv cv2.rectangle 报错

参考

http://www.voidcn.com/article/p-hamaapsy-bvd.html

 https://stackoverflow.com/questions/20843544/np-rot90-corrupts-an-opencv-image

 

        # 旋转
        img_rgb_shift=np.rot90(img_rgb_shift, k=-1)
        #内存中复制,或读写到硬盘1次
        img_rgb_shift = img_rgb_shift.copy()
        #cv2.imwrite('./mock_shift1.jpg',img_rgb_shift)
        #img_rgb_shift = cv2.imread('./mock_shift1.jpg')

 

posted @ 2020-10-21 10:18  永远的幻想  阅读(321)  评论(0编辑  收藏  举报