def imwrite(path, img):
"""Wrapper around cv2.imwrite. Switches it to RGB input convention.
:param path:
String indicating path to save image to.
:param img:
3D RGB numpy array of image.
"""
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
cv2.imwrite(path, img)
评论列表
文章目录