【opencv】opencv-Python读(imread)写(imwrite)图像及图像类型转换
读取图像frompathlibimportPathimportcv2importnumpyasnppath_img=Path(r'Morphling.jpg')#原始图像路径img_raw=cv2.imread(str(path_img),flags=-1)print(f'原始图像尺寸:{img_raw.shape},深度:{img_raw.dtype}')cv2.imshow('原始图像',im