You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
314 B

# import cv2
from cv2 import resize
def largeSmall(img,rate=100):
rate = rate / 100
img_info = img.shape
image_height = img_info[0]
image_weight = img_info[1]
desHeight = int(rate*image_height)
desWeight = int(rate*image_weight)
img = resize(img,(desWeight,desHeight))
return img