0% found this document useful (0 votes)
15 views2 pages

Rupika Record Program

Uploaded by

ukbros27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Rupika Record Program

Uploaded by

ukbros27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

12/2/24, 10:05 PM Untitled13

In [2]: # axis in an image(11)


import matplotlib.pyplot as plt
img=plt.imread('C:/Users/adity/Pictures/kitten.jpg')
plt.imshow(img)
plt.axis('on')
plt.show()

In [5]: #crop an image(13)


import matplotlib.pyplot as plt
img=plt.imread('C:/Users/adity/Pictures/kitten.jpg')
roi=img[50:250,600:723]
plt.imshow(roi)
plt.axis('on')
plt.show()

file:///C:/Users/adity/Downloads/Untitled13.html 1/2
12/2/24, 10:05 PM Untitled13

In [6]: #display an img(10)


import cv2 as c
import matplotlib.pyplot as plt
img=c.imread("C:/Users/adity/Pictures/kitten.jpg")
c.imshow('kitten',img)
c.waitKey(50000)

Out[6]: -1

In [ ]: #resize an img(12)
import cv2 as c
import matplotlib.pyplot as plt
img=c.imread("C:/Users/adity/Pictures/kitten.jpg")
n=(500,600)
r=c.resize(img,n)
c.imshow('pacific rim',r)
c.waitKey(50000)

In [ ]:

file:///C:/Users/adity/Downloads/Untitled13.html 2/2

You might also like