【问题标题】:3D rotation of image does not work as expected图像的 3D 旋转无法按预期工作
【发布时间】:2021-06-01 19:32:58
【问题描述】:

我正在尝试使用 scipy.ndimage.interpolation.rotate 对图像进行 3D 旋转,但没有得到预期的结果:

import numpy
import scipy.ndimage
import cv2

image = cv2.imread('./input.jpg')
output_image = scipy.ndimage.interpolation.rotate(image, angle=20, mode='nearest', axes=(1, 2), reshape=False)
cv2.imwrite("./output.png", output_image)

输入图像:

输出图像明显损坏:

【问题讨论】:

    标签: python numpy image-processing scipy


    【解决方案1】:

    最终改用cv2.warpPerspective,这成功了

    【讨论】:

      猜你喜欢
      • 2013-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-13
      • 1970-01-01
      • 2015-01-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多