OpenCV  3.4.18-dev
Open Source Computer Vision
The Hierarchical Data Format (hdf) I/O

Here you will know how to read and write a HDF5 file using OpenCV. Specifically, it shows you how to read/write groups, datasets and attributes.

The HDF5 library has to be installed in your system to use this module.