快乐虾
http://blog.csdn.net/lights_joy/(QQ群:Visual EmbedLinux Tools 375515651)
欢迎转载,但请保留作者信息
很久没有摸图像处理的东西了,近期刚好需要有此需求,希望能够有一个比较好用的开发环境。在学校的时候做图像处理一直用的是matlab,不过现在正好在做VELT的开发,尝试用vs2013+python构造一个适合于自己用的开发环境。
Matplotlib是一个Python的图形框架,类似于MATLAB和R语言。我们选择用它进行简单图形的绘制和图像的显示。
直接使用pip安装,pip自动下载所需要的库:
----- Installing ‘matplotlib‘ ----- Collecting matplotlib Downloading matplotlib-1.4.3-cp27-none-win32.whl (3.8MB) Collecting pyparsing>=1.5.6 (from matplotlib) Downloading pyparsing-2.0.3-py2.py3-none-any.whl Requirement already up-to-date: numpy>=1.6 in c:\python27\lib\site-packages (from matplotlib) Collecting pytz (from matplotlib) Downloading pytz-2015.2-py2.py3-none-any.whl (476kB) Collecting python-dateutil (from matplotlib) Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB) Collecting six>=1.4 (from matplotlib) Using cached six-1.9.0-py2.py3-none-any.whl Installing collected packages: pyparsing, pytz, six, python-dateutil, matplotlib Successfully installed matplotlib-1.4.3 pyparsing-2.0.3 python-dateutil-2.4.2 pytz-2015.2 six-1.9.0 ----- Successfully installed ‘matplotlib‘ -----
接下来更新一下IntelliSense就可以了。
简单测试一下:
Python interactive window. Type $help for a list of commands. >>> import numpy as np In [2]: import matplotlib.pyplot as plt In [3]: x=np.linspace(0,10,1000) In [4]: y=np.sin(x) In [5]: plt.plot(x,y) Out[5]: [<matplotlib.lines.Line2D at 0x6cc4fd0>] In [6]: plt.show()
然后就可以看到一个很漂亮的窗口了:
vs2013在图像处理中的应用(3):用matplotlib进行绘图
原文地址:http://blog.csdn.net/lights_joy/article/details/45677295