- Practical Computer Vision
- Abhinav Dadhich
- 82字
- 2021-06-30 18:54:44
Matplotlib
This is a popular Python package for plotting and displaying data and images. To use in Python, the scripts is as follows:
import matplotlib.pyplot as plt
If we want to plot inside Jupyter notebook, add the following command:
%matplotlib inline
An example function to display an image is as follows:
def plot_img(input_image):
"""
Takes in image
Plots image using matplotlib
"""
plt.figure(figsize=(12,8))
# change color channels order for matplotlib
plt.imshow(input_image)
# For easier view, turn off axis around image
plt.axis('off')
plt.show()
推薦閱讀
- 繪制進程圖:可視化D++語言(第1冊)
- 精通MATLAB神經網絡
- Mastering Spark for Data Science
- 來吧!帶你玩轉Excel VBA
- 計算機網絡應用基礎
- Data Wrangling with Python
- 我也能做CTO之程序員職業規劃
- Grome Terrain Modeling with Ogre3D,UDK,and Unity3D
- Deep Reinforcement Learning Hands-On
- SAP Business Intelligence Quick Start Guide
- 云計算和大數據的應用
- 從零開始學Java Web開發
- Apache源代碼全景分析(第1卷):體系結構與核心模塊
- MPC5554/5553微處理器揭秘
- 軟測之魂