Computer_Vision/Chapter03/Inspecting_color_images.ipynb

110 KiB
Raw Permalink Blame History

Open In Colab

!wget https://www.dropbox.com/s/l98leemr7r5stnm/Hemanvi.jpeg
--2020-09-24 05:05:51--  https://www.dropbox.com/s/l98leemr7r5stnm/Hemanvi.jpeg
Resolving www.dropbox.com (www.dropbox.com)... 162.125.5.1, 2620:100:601d:1::a27d:501
Connecting to www.dropbox.com (www.dropbox.com)|162.125.5.1|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: /s/raw/l98leemr7r5stnm/Hemanvi.jpeg [following]
--2020-09-24 05:05:51--  https://www.dropbox.com/s/raw/l98leemr7r5stnm/Hemanvi.jpeg
Reusing existing connection to www.dropbox.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://uc5e32e2c709a61fb3a3974fb3a2.dl.dropboxusercontent.com/cd/0/inline/A_8kYWz6Ib0IHovWnkgWldxl-D9gQmZOoriI0tEfWqwWiIbOG6Kyb0PJpOtKovd3hvBKPJT0Lyy_vvok1iqFWG2GsfC1PklEYGWp237PyuNFxw/file# [following]
--2020-09-24 05:05:51--  https://uc5e32e2c709a61fb3a3974fb3a2.dl.dropboxusercontent.com/cd/0/inline/A_8kYWz6Ib0IHovWnkgWldxl-D9gQmZOoriI0tEfWqwWiIbOG6Kyb0PJpOtKovd3hvBKPJT0Lyy_vvok1iqFWG2GsfC1PklEYGWp237PyuNFxw/file
Resolving uc5e32e2c709a61fb3a3974fb3a2.dl.dropboxusercontent.com (uc5e32e2c709a61fb3a3974fb3a2.dl.dropboxusercontent.com)... 162.125.5.15, 2620:100:601d:15::a27d:50f
Connecting to uc5e32e2c709a61fb3a3974fb3a2.dl.dropboxusercontent.com (uc5e32e2c709a61fb3a3974fb3a2.dl.dropboxusercontent.com)|162.125.5.15|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53839 (53K) [image/jpeg]
Saving to: Hemanvi.jpeg

Hemanvi.jpeg        100%[===================>]  52.58K  --.-KB/s    in 0.03s   

2020-09-24 05:05:52 (1.52 MB/s) - Hemanvi.jpeg saved [53839/53839]

import cv2, matplotlib.pyplot as plt
%matplotlib inline
img = cv2.imread('Hemanvi.jpeg') 
img = img[50:250,40:240,:]
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) 
plt.imshow(img)
print(img.shape)
(200, 200, 3)