In [1]:
import matplotlib.pyplot as plt
import cv2
% matplotlib inline
In [2]:
# load the image and show it
image = cv2.imread("jurassic-park-tour-jeep.jpg")
#plt.imshow(image[:,:,])
cv2.imshow("original", image)
#cv2.waitKey(0)
print (image.shape)
In [3]:
# crop the image using array slices -- it's a NumPy array
# after all!
cropped = image[70:170, 440:540]
cv2.imshow("cropped", cropped)
#cv2.waitKey(0)
In [ ]: