如何用模式边缘旋转图像



i被使用弹丸软件包旋转具有模式边缘选项的图像

image_rotate = skimage.transform.rotate(image, angle,mode='edge')

模式:{"常数","边缘","对称","反射","包装"},可选 根据给定模式填充输入边界之外的点。模式与numpy.pad的行为匹配。

现在,我正在使用TensorFlow函数

tf.contrib.image.rotate(
    images,
    angles,
    interpolation='NEAREST'
)

如何使用 tf.contrib.image.rotate在削弱包中获得 mode='edge'的结果?谢谢

tf.contrib.image.rotate不实现填充。如果您想在旋转图像之前对图像进行填充,则必须使用TensorFlow操作自己执行此操作。

最新更新