Working With Images {working-with-images}
Images are a valueable potential source of information, and image
processing, including image recognition, is
also an important application of machine learning.
We assume you have loaded the following packages:
import numpy as np
import pandas as pd
## ModuleNotFoundError: No module named 'pandas'
import matplotlib.pyplot as plt
## ModuleNotFoundError: No module named 'matplotlib'
Loading images
flag = plt.imread("../img/flag-of-scotland-8x8.png")
## NameError: name 'plt' is not defined
## NameError: name 'flag' is not defined
np.set_printoptions(precision=2)
flag[:,:,0] # R
## NameError: name 'flag' is not defined
## NameError: name 'flag' is not defined
## NameError: name 'flag' is not defined
## NameError: name 'plt' is not defined