Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read hdf data in Octave

I am doing project in remote sensing. Working with HDF on matlab is very easy. But i want to implement this with grid computing (Ubuntu). So i am trying with octave. I have HDF4 files of chlorophyll. Normal Image processing will be done by octave easily. But i want to know about hdfread, hdftool in Octave. I am added a image packages within octave image. Can anyone tell me how to read and how to work with hdf data's. Is there any package to add. Please let me know about this.

  • How to read hdf data
  • How to load hdf data
  • How to retrieve image from hdf data
like image 643
prabu Avatar asked Jul 29 '13 09:07

prabu


2 Answers

For HDF5, Octave can load it without additional package.

For HDF4, you can convert it to NetCDF file using h4tonccf or OPeNDDAP hdf4_handler, and then load it via NetCDF call through the Octave's octcdf package. We provide a complete example with full Octave source codes here:

http://hdfeos.org/software/octave.php

The below is a sample NASA HDF4 plot created by Octave via OPeNDAP.

Octave's plot of NASA AIRS HDF4 product

like image 57
HDFEOS.org Avatar answered Nov 15 '22 07:11

HDFEOS.org


The hdf specific functions haven't been implemented in Octave yet. However, Octave can handle that format with the more standard load command. Just do load path-to-hdf-file and you'll load a struct in memory.

See these posts on the help mailing archive: How to read HDF data, and read data subsets from HDF5.

like image 37
carandraug Avatar answered Nov 15 '22 06:11

carandraug