gpt4 book ai didi

python - opencv2 : bicubic interpolation while resizing image

转载 作者:太空狗 更新时间:2023-10-30 01:01:26 26 4
gpt4 key购买 nike

我想使用应用程序 cv2.resize 调整图像大小。我想要做调整大小时的双三次插值。我该怎么做?

最佳答案

img = cv2.imread('source to image here')
img_resized = cv2.resize(img, fx=scale_x, fy=scale_y, interpolation=cv2.INTER_CUBIC)

我还没有测试过。检查http://docs.opencv.org/modules/imgproc/doc/geometric_transformations.html#resize了解更多详情

关于python - opencv2 : bicubic interpolation while resizing image,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25975990/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com