不是p*_*phd 5 python image image-processing hdf5 h5py
import h5py
f = h5py.File('the_file.h5', 'r')
one_data = f['key']
print(one_data.shape)
print(one_data.dtype)
print(one_data)
Run Code Online (Sandbox Code Playgroud)
我使用上面的代码打印信息。打印结果为:
(320, 320, 3)
uint8
<HDF5 dataset "1458552843.750": shape (320, 320, 3), type "|u1">
Run Code Online (Sandbox Code Playgroud)
import cv2
import numpy as np
import h5py
f = h5py.File('the_file.h5', 'r')
dset = f['key']
data = np.array(dset[:,:,:])
file = 'test.jpg'
cv2.imwrite(file, data)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9981 次 |
| 最近记录: |