Skip to content

Commit fc910f7

Browse files
authored
Create crop.py
1 parent 2a68a5a commit fc910f7

File tree

1 file changed

+5
-0
lines changed
  • Image_Processing/src/cropping

1 file changed

+5
-0
lines changed

Image_Processing/src/cropping/crop.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import cv2
2+
img = cv2.imread("lenna.png")
3+
crop_img = img[y:y+h, x:x+w]
4+
cv2.imshow("cropped", crop_img)
5+
cv2.waitKey(0)

0 commit comments

Comments
 (0)