Resizing the Image in Python using OpenCV¶
In [2]:
import cv2
img = cv2.imread('machinelearning.png',cv2.IMREAD_COLOR)
cv2.imshow('Machine Learning',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
Resize image to 200px 180px ( Width Height )¶
In [3]:
import cv2
img = cv2.imread('machinelearning.png',cv2.IMREAD_COLOR)
resize = cv2.resize(img, (200, 180))
cv2.imshow('Machine Learning',resize)
cv2.waitKey(0)
cv2.destroyAllWindows()