- 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()
推薦閱讀
- ArchiCAD 19:The Definitive Guide
- 3D Printing with RepRap Cookbook
- Python Algorithmic Trading Cookbook
- Visual C++編程全能詞典
- 塊數(shù)據(jù)5.0:數(shù)據(jù)社會(huì)學(xué)的理論與方法
- Blender 3D Printing by Example
- TensorFlow Reinforcement Learning Quick Start Guide
- INSTANT Heat Maps in R:How-to
- Extending Ansible
- 強(qiáng)化學(xué)習(xí)
- 貫通Java Web輕量級(jí)應(yīng)用開發(fā)
- 7天精通Photoshop CS5平面視覺(jué)設(shè)計(jì)
- 三維動(dòng)畫制作(3ds max7.0)
- 智能機(jī)器人創(chuàng)新熱點(diǎn)與趨勢(shì)
- 樂(lè)高機(jī)器人:Scratch與WeDo編程基礎(chǔ)實(shí)戰(zhàn)應(yīng)用