
fx = 1.5 fy = 1.5 enlarge = cv2.resize(crop, (0, 0), fx=fx, fy=fy, interpolation=cv2.INTER_CUBIC) cv2.imshow("放大", enlarge) cv2.waitKey(0) cv2.imwrite(res filename "crop.png", crop) draw_0 = cv2.rectangle(image, (y, x), (y h, x w), (0, 255, 0), 2) cv2.imshow('German', draw_0) cv2.waitKey(0)
下载python实现裁剪图像的随机区域用户还喜欢


评论