gpt4 book ai didi

image - 在 PyCharm 中调试时将 numpy 数组视为图像?

转载 作者:行者123 更新时间:2023-12-03 05:47:15 28 4
gpt4 key购买 nike

在 PyCharm 中调试时是否可以将 numpy 数组视为图像?

我尝试输入

PIL.Image.fromarray(my_data, 'RGB').show()

喜欢 watch ,但得到了

PIL is not defined

错误。这可能是因为当前模块中没有导入PIL。

任何其他方式表示赞赏。也许可以编写我自己的查看器或其他东西?

最佳答案

我刚刚创建了 OpenCV 图像查看器插件,只需单击即可在调试时显示图像。您可以将其安装到任何支持 Python 的 JetBrains IDE(直接或通过插件)。

https://plugins.jetbrains.com/plugin/14371-opencv-image-viewer

enter image description here

关于image - 在 PyCharm 中调试时将 numpy 数组视为图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45715751/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com