import cv2 as cv
import numpy as np
dog = cv.imread('imgs/dog.jpeg')
# 缩小指定大小
new = cv.resize(dog,(600,400))
# 缩小一半
new = cv.resize(dog,None,fx=0.5,fy=0.5,interpolation=cv.INTER_AREA)
# 上下翻转
new2 = cv.flip(new,0)
# 水平翻转
new2 = cv.flip(new,1)
# 上下翻转 水平翻转
new2 = cv.flip(new,-1)
new180 = cv.rotate(new,cv.ROTATE_180)
new90 = cv.rotate(new,cv.ROTATE_90_CLOCKWISE)
new270 = cv.rotate(new,cv.ROTATE_90_COUNTERCLOCKWISE)