尝试在Wand和ImageMagick 6中使用连接的组件时出错

问题描述

我正在尝试将Image3.8ick 6中的python3.8(64位)脚本使用连接组件功能,但收到错误消息 我需要安装ImageMagick 7.0.8或更高版本。然后,我尝试使用最新的ImageMagick 7.0.10,当尝试导入“ Image”时,出现未找到MagickWand的错误,如下所示。

经过研究,我发现herehere提出了一些安装IM 6 32位的建议,因为“一些消息来源说Image Magick 7.x与magick Wand不兼容”

然后,如果“ connected-components”仅适用于IM 7,但是IM 7的Wand有问题,是否还有另一种替代方法获取图像中区域的坐标,如使用ImageMagick中的connectd-components获得的那样?

我已经在WSL Ubuntu和Cygwin中尝试过。预先感谢。

这是我在IM 6.9.10-23 Q16 x86_64 20190101中尝试使用if (a<0) {ft=ft.reverse();a=-a} 错误

connected-components

尝试使用最新的IM 7导入>>> with Image(filename='input.png') as img: ... objects = img.connected_components() Traceback (most recent call last): File "<stdin>",line 20,in <module> File "/usr/local/lib/python3.8/dist-packages/wand/image.py",line 3891,in connected_components raise WandLibraryVersionError(msg) wand.exceptions.WandLibraryVersionError: Method requires ImageMagick version 7.0.8-41 or greater. 时遇到的错误

Image

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)