- 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()
推薦閱讀
- Mastering Proxmox(Third Edition)
- Circos Data Visualization How-to
- 網上生活必備
- 圖解PLC控制系統梯形圖和語句表
- 城市道路交通主動控制技術
- 最簡數據挖掘
- 現代機械運動控制技術
- 永磁同步電動機變頻調速系統及其控制(第2版)
- 塊數據5.0:數據社會學的理論與方法
- 教育機器人的風口:全球發展現狀及趨勢
- 嵌入式GUI開發設計
- Cloudera Hadoop大數據平臺實戰指南
- 軟件測試設計
- Microsoft Office 365:Exchange Online Implementation and Migration(Second Edition)
- 自動化生產線組建與調試(第2版):以亞龍YL-335B為例(三菱PLC版本)