fox_pyrup = cv2.pyrUp(fox)#将图片金字塔向上采样
fox_pyrup = cv2.pyrUp(fox)
x, y = fox.shape[0:2]
fox_pyrup1 = cv2.resize(fox_pyrup, (y,x))
res = np.hstack((fox,fox_pyrup1))
cv_show("res",res)
用cv2.resize按照某一尺寸缩放图片效果如下
fox_pyrup = cv2.pyrUp(fox)
x, y = fox.shape[0:2]
fox_pyrup.resize(x,y)
res = np.hstack((fox,fox_pyrup))
cv_show("res",res)
用resize效果如下