How to Resize an Image in OpenCV
Machine Learning courses with 100+ Real-time projects Start Now!!
Program 1
import cv2
img=cv2.imread("D://opencvapp//vivek1.jpg")
img=cv2.resize(img,(300,300))
#img=cv2.resize(img,(0,0),fx=0.3,fy=0.3)
cv2.imwrite("viveknew.jpg",img)
cv2.imshow('Image Window',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
Did we exceed your expectations?
If Yes, share your valuable feedback on Google

