def _applyImageFlips(image, flips):
'''
Apply left-right and up-down flips to an image
Args:
image (numpy array 2D/3D): image to be flipped
flips (tuple):
[0]: Boolean to flip horizontally
[1]: Boolean to flip vertically
Returns:
Flipped image
'''
image = np.fliplr(image) if flips[0] else image
image = np.flipud(image) if flips[1] else image
return image
评论列表
文章目录