How to Crop an Image in OpenCV
Machine Learning courses with 100+ Real-time projects Start Now!!
Program 1
import cv2
img=cv2.imread("D://opencvapp//library-img.jpg")
#print(img)
# img3=img[100:200,100:1000]
# cv2.imwrite("D://opencvapp//crop.jpg",img3)
cv2.imshow('Image Window',img3)
cv2.waitKey(0)
cv2.destroyAllWindows()
Did we exceed your expectations?
If Yes, share your valuable feedback on Google

