LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i get/open the image from an HDF5 file in LabVIEW

The link for the HDF5 file is provided below: https://drive.google.com/file/d/1tKgM60_6qObpDNwpJNxGxlMi6cIWg0dX/view?usp=sharing . How can I obtain the image from it in LabVIEW? If you need any additional information, please let me know. I am new to LabVIEW, so I am finding it challenging to use. While there may be other methods, I specifically want to accomplish this in LabVIEW as it is part of my course. Thank you!

0 Kudos
Message 1 of 6
(1,184 Views)

there's this toolkit https://www.vipm.io/package/lvhdf5/

 

you still need a description of your .h5 file to obtain certain parts of that .h5 file

 

e.g. google's keras-tensorflow neural-nets are saved in a .h5 file, if you want to retriev certain layers, you need the proper index or name of that layer.

0 Kudos
Message 2 of 6
(1,179 Views)

you can check the data inside the .H5 using link i provide
else from what i have viewed from the HDFview i can say
the file contains these three things

meta -> its type : HDF5 Group, there 4 groups inside it 1) additional info 2) Digitizer 3) Generator 4)Stage
data -> its type : HDF5 dataset
hardware -> its type : HDF5 Group
 
 
0 Kudos
Message 3 of 6
(1,174 Views)

@Bogi17 wrote:

you can check the data inside the .H5 using link i provide

 

so, go ahead install the toolkit and try to read your .h5 from disk to labview.

as far as I remember there are some examples included in the toolkit.

Message 4 of 6
(1,151 Views)

Yes sir, I totally accept what you said but
the problem is i don't find any such kind of example for extracting an image from the HDF5 file using LabVIEW
Moreover i am new to lab view, i don't know much about the functions in the lab view and how to do connections ..etc. 
so if its possible please guide me for extracting the image from the HDF5 file present in the below link using LabVIEW 
https://drive.google.com/file/d/1tKgM60_6qObpDNwpJNxGxlMi6cIWg0dX/view?usp=sharing 

Thank you.

 

0 Kudos
Message 5 of 6
(1,136 Views)

There are two parts to this problem. The first is understanding the HDF5 file format. The second is understanding how to use the LabVIEW API to access the parts of the file. If you have not read the introduction to HDF5 on the HDF5 website, I would urge you to do so before you do anything else. HDF5 is a complex file format with a lot of subtleties in its use. For example, despite the name, it is NOT a hierarchical file format, it is a directed graph, so any particular object in the file does not have a parent, it only has links. Most people use HDF5 in a hierarchical fashion, but that is not what the format is.

 

HDF5 is a self-describing file format, so you can open an HDF5 file without knowing what is in it and determine what the format is. This sounds like the task you are being given.

 

HDF5 has three main objects - folders, datasets, and attributes. Folders and datasets are classed as links and can have links to and from them. Attributes are nominally small datasets attached to a link (group or dataset). So to traverse an HDF5 file, start at the root folder and query for all its links (datasets and folders) and attributes. For each dataset and attribute, query for data type and dimensionality. Repeat this process for each link you find. This is a recursive walk similar to walking a file tree (many examples of that in these forums), with the added twist that you can get into an infinite loop due to circular references. Your instructor would probably not do that to you.

 

I have not used the API mentioned above, but wrote one myself about 2001, and have used HDF5 extensively in the past. It is complex. Give yourself time to learn it.

Message 6 of 6
(1,100 Views)