Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 PythonMagic中直方图的访问_Python 2.7_Imagemagick_Pythonmagick - Fatal编程技术网

Python 2.7 PythonMagic中直方图的访问

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

可以从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 histogram:unique-colors=true -format %c histogram:info:
这很像问题,只是我想在Python中使用结果。我也不想依赖于将柱状图作为文本文件写入,而将其导入Python中似乎有点慢,如果不是多余的话