- 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()
推薦閱讀
- 數(shù)據(jù)展現(xiàn)的藝術(shù)
- Introduction to DevOps with Kubernetes
- Python Algorithmic Trading Cookbook
- 自動生產(chǎn)線的拆裝與調(diào)試
- 永磁同步電動機變頻調(diào)速系統(tǒng)及其控制(第2版)
- Windows 7寶典
- AutoCAD 2012中文版繪圖設計高手速成
- 樂高機器人—槍械武器庫
- 影視后期編輯與合成
- 計算機組網(wǎng)技術(shù)
- Visual FoxPro程序設計
- Learn QGIS
- 寒江獨釣:Windows內(nèi)核安全編程
- Unreal Development Kit Game Design Cookbook
- 筆記本電腦使用與維護