Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import cv2
img = cv2.imread("images/test.jpg")
imgCropped = img[50:283,25:190]
shape = imgCropped.shape
print(shape[0])
imgCropped = cv2.resize(imgCropped,(shape[0]*12//10,shape[1]*2))
cv2.imshow("Image cropped",imgCropped)
cv2.imshow("Image",img)
cv2.waitKey(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment