Jovian
⭐️
Sign In
In [1]:
import cv2
import numpy as np
import matplotlib.pyplot as plt
In [2]:
import jovian
In [3]:
img = cv2.imread('C:\\Users\\vsneh\\OneDrive\\Desktop\\cap2.jpg')
In [4]:
img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
img = cv2.resize(img,(490,800))
In [5]:
img.shape
Out[5]:
(800, 490)
In [6]:
plt.imshow(img,'gray')
Out[6]:
<matplotlib.image.AxesImage at 0x11f9d2ede48>
Notebook Image
In [7]:
roi = img[700:730,210:295]
In [8]:
plt.imshow(roi)
Out[8]:
<matplotlib.image.AxesImage at 0x11f9f3d0508>
Notebook Image
In [9]:
roi.shape
Out[9]:
(30, 85)
In [10]:
img2 = np.zeros((30,85),np.uint8)
In [11]:
plt.imshow(img2)
Out[11]:
<matplotlib.image.AxesImage at 0x11f9f43e148>
Notebook Image
In [12]:
img[700:730,210:295] = img2
In [13]:
plt.imshow(img,'gray')
Out[13]:
<matplotlib.image.AxesImage at 0x11f9f4ac5c8>
Notebook Image
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: