import cv2 import os def crop_image(image, crop_size, start_point): height, width = image.shape[:2] if width > start_point[0] + crop_size[0] and height > start_point[1] + crop_size[1]: cropped_image = image[start_point[1]:start_point[1]+crop_size[1], start_point[0]:start_point[0]+crop_size[0]] return cropped_image else: print(f"Image is too small to be cropped with the current settings.") return False