Answers for "crop image using opencv with height and width"

-1

how to crop the image using opencv

crop_img = img[y:y+h, x:x+w]
Posted by: Guest on March-06-2021
0

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')
Posted by: Guest on October-26-2021

Code answers related to "crop image using opencv with height and width"

Python Answers by Framework

Browse Popular Code Answers by Language