org.aisb.bio.tools.images
Class WaveletFeatureExtractor

java.lang.Object
  extended byorg.aisb.bio.tools.images.WaveletFeatureExtractor

public class WaveletFeatureExtractor
extends java.lang.Object

Use wavelet transforms to generate an array of features for an image.

We use the command bean design pattern. Put in the (raster from the) image and desired level of decomposition. Then call the "execute" method. Then fetch an array of features the length of which is equal to the decomposition level you specified.

Note that the wavelet transform I'm using can produce negative values at a given "pixel". This may produce odd results.

Here are the nitty-gritty details. First, we're going to take the image along one direction and take all the rows or columns, treat them as a vector, and feed them into a one-dimensional transform.

The result is going to be a matrix with the same "area" as the original matrix. For convenience of calculation, we'll transpose its two dimensions.

Then, we're going to take the output from that step and process them along the opposite direction (columns or rows) and feed them into a one-dimensional transform.

I can't see how this can produce anything but the correct transformation with regard to the low-pass filtered data, and the other methods I've thought of don't have that property. I'm just going to hope the same is also true of the high-pass filtered data...

One assertion was that it's easy to take 1D wavelet transforms and apply them to 2D data. Another assertion was also that the process is completely reversable. And another assertion was that the result would have a little "mini-image" consisting of the original image basically at half resolution in one corner of the result. This method should have all three of these properties, and no other simple method I've come up with does, so I think my hope is at least somewhat founded.

Author:
Doug DeJulio

Constructor Summary
WaveletFeatureExtractor()
           
 
Method Summary
 void execute()
           
 double[] getFeatures()
           
 java.awt.image.Raster getImage()
           
 int getLevel()
           
 void setImage(java.awt.image.Raster image)
           
 void setLevel(int level)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaveletFeatureExtractor

public WaveletFeatureExtractor()
Method Detail

getImage

public java.awt.image.Raster getImage()
Returns:
Returns the image.

setImage

public void setImage(java.awt.image.Raster image)
Parameters:
image - The image to set.

getLevel

public int getLevel()
Returns:
Returns the level.

setLevel

public void setLevel(int level)
Parameters:
level - The level to set.

getFeatures

public double[] getFeatures()
Returns:
Returns the features.

execute

public void execute()