我正在使用skimage来旋转、缩放和平移图像。返回的图像使用原始图像的形状,因此裁剪了原始图像。如何返回一个包含整个原始图像的图像?
from skimage import data
from skimage import transform as tf
import numpy as np
import matplotlib.pyplot as plt
import math
image = data.chelsea()
tform = tf.SimilarityTransform(scale=1, rotation=math.pi / 4,
translation=(image.shape[0] / 2, -100))
rotated = tf.warp(image, tform)
plt.imshow(rotated)
transform.rotate(img, angle, resize=True)
。 - Ciprian Tomoiagă