resize

skimage

输入可以为二维也可以为三维

INPUT_WIDTH = 200
INPUT_HEIGHT = 200
INPUT_DEPTH = 50

image_vo = xxx

zoom = [INPUT_DEPTH/image_vo.shape[0],INPUT_HEIGHT/image_vo.shape[1],INPUT_WIDTH/image_vo.shape[2]]
image_resize_vo = scimg.interpolation.zoom(image_vo, zoom, order=3) 

opencv

输入为二维(一定要注意缩放后大小先y后x)
cv2.resize(InputArray src, OutputArray dst, Size, fx, fy, interpolation)

img_test1 = cv.resize(img, (int(y / 2), int(x / 2)))
img_test2 = cv.resize(img, (0, 0), fx=0.25, fy=0.25, interpolation=cv.INTER_NEAREST)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。