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.
28 lines
410 B
28 lines
410 B
# -*- coding: utf-8 -*-
|
|
"""
|
|
@File : flipService.py
|
|
@Author: csc
|
|
@Date : 2022/7/17
|
|
图像翻转
|
|
"""
|
|
import cv2
|
|
|
|
HORIZONTAL = 1
|
|
VERTICAL = 0
|
|
|
|
|
|
def horizontalFlip(imgs, args=None):
|
|
"""
|
|
水平翻转图像
|
|
:return: img
|
|
"""
|
|
return cv2.flip(imgs[0], HORIZONTAL)
|
|
|
|
|
|
def verticalFlip(imgs, args=None):
|
|
"""
|
|
垂直翻转图像
|
|
:return: img
|
|
"""
|
|
return cv2.flip(imgs[0], VERTICAL)
|