1.三维数组的读取
b=a[:,:,i]
2.数据类型转换
uint8_img = uint16_img.astype(np.uint8)
3.找到指定路径的png文件
path = r'F:\0511\object\left\1\*\png\out\*.png'
images_left = glob.glob(path)
4.路径检测
if not os.path.exists(out_path):
os.makedirs(out_path)
5.数据类型转换
if des1.type()!=cv2.CV_32F:
des2.dtype='float32'
6.现在的路径
filePath = os.path.dirname(__file__)
不改变数组元素,返回一个shape形状的数组,原数组不变
.reshape(shape)
与.reshape()功能一致,但修改原数组
.resize(shape)
8.文件路径
for root, dirs, files in os.walk(pathL):
for file in files: