python在图片上画矩形 image_path = '' image = cv2.imread(image_path) first_point = (100, 100) last_point = (100, 100) cv2.rectangle(image, first_point, last_point, (0, 255, 0), 2) cv2.imwrite(image_path, image) first_point和last_point都是矩形在图片的像素坐标位置,且坐标位置为int整