Using the XML image data format

Matlab code

Actually the Matlab version is the only version at the moment, but it wouldn't be too hard to generate a Java version given the way the Matlab code is written.

The main thing you need to do to get at the data from Matlab is to download JDOM which is a Java system for reading XML and install it. Then you need to put the JDOM classes in Matlab's classpath.txt file (which you achieve by listing the jars individually in the file you get access to by typing 'edit classpath.txt'). I actually upgraded my JVM from 1.1.8 (which comes with Matlab) to 1.3.1_04. Apparently the 1.4 JVM isn't so easy to get to work with Matlab (but this is pure hearsay). The reason I used JDOM is that it's easy, but also it's free, which the Matlab XML code isn't (you have to have the absolute latest version of Matlab to get it).

Once you've done that it's relatively easy to import the data from the XML by using the Java JDOM from Matlab. I'm still writing that code at the moment, but I'll put it up as it becomes available.

Code

  • The Matlab code to read the XML based on JDOM (this is version 0.8 of the Matlab code)
  • The Matlab code to write XML based on JDOM (this is version 0.8 of the Matlab code)
  • The code to allow Phil's S and M package to read XML (an interface to the reading code above) (this is version 0.8)
  • The code to allow Phil's S and M package to write XML (an interface to the reading code above) (this is version 0.8)
  • My version of torr_tool (cunningly called ant_tool) with the necessary mods to incorporate the above (this is version 0.8)
  • A .mat file that contains the cell arrays that the read and write XML functions expect. This may be helpful in getting your data into the right format to pass to the functions.

You just need to put those files is a directory which is in your Matlab path and type ant_tool and the matlab command line. You should then be able to load data into the tool which is stored in the imageDataSet XML format. The links to the data are on the data page, but don't forget that the data and the images need to be in the same directory.

Have a look at the image set data in XML page for more information and for the links to the data in XML format. Please feel free to email me if you have any troubles.