官术网_书友最值得收藏!

  • 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()
主站蜘蛛池模板: 仁布县| 黄梅县| 彰武县| 湟源县| 周口市| 乌什县| 林口县| 安顺市| 太仆寺旗| 襄樊市| 岢岚县| 怀安县| 蓝山县| 潢川县| 唐海县| 漾濞| 丰城市| 红原县| 乌恰县| 安陆市| 兴隆县| 彭州市| 康平县| 鄂温| 囊谦县| 沂南县| 眉山市| 鱼台县| 监利县| 满洲里市| 江孜县| 宁河县| 仲巴县| 乌海市| 兴宁市| 昌平区| 丁青县| 祁连县| 加查县| 平乡县| 肃北|