how to crop the image using opencv
crop_img = img[y:y+h, x:x+w]
how to crop the image using opencv
crop_img = img[y:y+h, x:x+w]
crop image using opencv with height and width
import cv2
import numpy as np
try:
from PIL import Image
except ImportError:
import Image
img_file = '/home/test_crop.jpg'
im = Image.open(img_file).convert('L')
im = im.crop((55, 563, 1603, 975))
im.save('_0defects.jpg')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us