踩坑:cv.resize()
cv.resize() 二维返回的维度是交换的 只能接受二维数组
例:
>>import cv2 as cv
>>import numpy as np
>>img = np.random.rand(128,256)
>>img = cv.resize(img, (128, 256))
>>img.shape
>>(256, 128)
例:
>>import cv2 as cv
>>import numpy as np
>>img = np.random.rand(128,256)
>>img = cv.resize(img, (128, 256))
>>img.shape
>>(256, 128)