python - Scikit 图片 : resize() got an unexpected keyword argument 'anti_aliasing'

标签 python image-processing scikit-image

我正在尝试使用完全按照文档中所述的别名调整大小功能:http://scikit-image.org/docs/dev/auto_examples/transform/plot_rescale.html

from skimage.transform import resize
im_test = resize(im_test, (im_test.shape[0] / 3, im_test.shape[1] / 3),anti_aliasing=True)

但是这会返回:

Scikit image: resize() got an unexpected keyword argument 'anti_aliasing'

这是什么原因?默认情况下是否启用抗锯齿?如果不能使用此功能,使用抗锯齿调整图像大小的最佳方法是什么?

最佳答案

检查代码 here加上 git blame,它似乎是在 19.09.2017 上引入的。

目前唯一支持这个的发行版本应该是:v0.13.1 , 那时你将需要它!

为了检查您当前使用的是哪种版本,我建议打开您的解释器(您使用的 python 发行版)并执行以下操作:

import skimage as sk
sk.__version__
# '0.13.0' i would not be able to use it, it seems

关于python - Scikit 图片 : resize() got an unexpected keyword argument 'anti_aliasing' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47369598/

相关文章:

python - Pandas:如何检查列是否包含值 0 然后根据某种规则对所选行数据进行排序?

python - 在 Pandas 中按组创建递增的整数系列

python - keras > 加载保存的模型后总是相同的预测值

python - 填充靠近图像区域的元素

python - 如何使用 numpy 正确屏蔽 3D 数组

python - Python REST API 的最佳 gunicorn-worker 配置(数量和类)

image-processing - 在图像中寻找能量最少的路径

javascript - 在 HTML 页面的网络摄像头视频源中使用背景扣除

javascript - 在处理 js 时无法从 PImage 获取像素 []

python - 过滤掉微弱的 sobel 过滤线?