RGB图像在Python中调整大小

时间:2018-01-21 17:48:18

标签: python image tensorflow resize interpolation

使用Python和TensorFlow操作RGB图像时遇到问题。我想使用双三次插值来插值RGB图像。在Matlab中,我可以使用for循环执行此操作,如下所示:

for i= 1:3
  im1(:,:,i)= imresize(im(:,:,i), [256 256], 'bicubic');
end

但我怎么能用Python做到这一点?我尝试使用以下命令,但它给了我一个错误。

im1 = tf.image.resize_images(im, [256, 256, 3], method=tf.image.ResizeMethod.BICUBIC)

0 个答案:

没有答案
相关问题