Hierarchical Data Format version 5#

Detailed Description#

Hierarchical Data Format version 5#

In order to use it, the hdf5 library has to be installed, which means cmake should find it using find_package(HDF5).

Classes#

Name

Description

class cv::hdf::HDF5

Hierarchical Data Format version 5 interface. View details

Function Documentation#

open()#

Ptr< HDF5 > cv::hdf::open(const String & HDF5Filename)

#include <opencv2/hdf/hdf5.hpp>

Python:

cv.hdf.open(HDF5Filename) -> retval

Open or create hdf5 file.

Returns a pointer to the hdf5 object class

Note

If the specified file does not exist, it will be created using default properties. Otherwise, it is opened in read and write mode with default access properties. Any operations except dscreate() functions on object will be thread safe. Multiple datasets can be created inside a single hdf5 file, and can be accessed from the same hdf5 object from multiple instances as long read or write operations are done over non-overlapping regions of dataset. Single hdf5 file also can be opened by multiple instances, reads and writes can be instantiated at the same time as long as non-overlapping regions are involved. Object is released using close().

  • Example below opens and then releases the file.

Visualization of 10x10 CV_64FC2 (Hilbert matrix) using HDFView tool

  • Text dump (3x3 Hilbert matrix) of hdf5 dataset using h5dump tool:

Parameters

  • HDF5Filename — specify the HDF5 filename.