Python 2.7 PythonMagic中直方图的访问
可以从PythonMagick中访问直方图(我认为是元组)吗Python 2.7 PythonMagic中直方图的访问,python-2.7,imagemagick,pythonmagick,Python 2.7,Imagemagick,Pythonmagick,可以从PythonMagick中访问直方图(我认为是元组)吗 #!/usr/bin/env python import PythonMagick img = PythonMagick.Image("c:\\temp\\temp\\sample_image.jpg") h = img.convert().histogram() # pseudo code for the following command line: # convert sample_image.jpg -define his
#!/usr/bin/env python
import PythonMagick
img = PythonMagick.Image("c:\\temp\\temp\\sample_image.jpg")
h = img.convert().histogram() # pseudo code for the following command line:
# convert sample_image.jpg -define histogram:unique-colors=true -format %c histogram:info:
这很像问题,只是我想在Python中使用结果。我也不想依赖于将柱状图作为文本文件写入,而将其导入Python中似乎有点慢,如果不是多余的话