def get_uintimg(image):
if len(image.shape) > 2:
uintimage = color.rgb2gray(copy.deepcopy(image))
else:
uintimage = copy.deepcopy(image)
if uintimage.dtype == "float64":
with warnings.catch_warnings():
# Transform rotate convert the img to float and save convert it back
warnings.simplefilter("ignore")
uintimage = ski.img_as_uint(uintimage, force_copy=True)
return uintimage
评论列表
文章目录