FeatureExtractor
Class FeatureExtractor

java.lang.Object
  extended by FeatureExtractor.FeatureExtractor
Direct Known Subclasses:
WindsurfFeatureExtractor

public abstract class FeatureExtractor
extends java.lang.Object

Class in charge of extracting the features from a given image (URL/image file).


Field Summary
protected  GenericClustering imgClu
          the clustering algorithm to be used
protected  GenericFilter imgFil
          the filter to be used
protected  int result
          error code for the result of the feature extraction process: (0 if everything was OK, -2 if URL is malformed, -3 if file does not exist or is damaged, -5 if extraction fails, -7 if there are problems in the read stream of the image file).
 
Constructor Summary
FeatureExtractor()
          Basic constructor.
 
Method Summary
protected abstract  Image createImage(ImageID id, GenericFilterOutput filOut, ClusteringOutput clustOut)
          Creates an image with a particular ID from the output of the filter and the clustering algorithm.
 Image extract(javax.media.jai.PlanarImage image, ImageID id)
          Creates an image with a particular ID extracting features from a given image.
 Image extract(java.lang.String imgURL, ImageID id)
          Creates an image with a particular ID extracting features from a given image.
 int getLastResult()
          Returns the result of the last extraction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imgFil

protected GenericFilter imgFil
the filter to be used


imgClu

protected GenericClustering imgClu
the clustering algorithm to be used


result

protected int result
error code for the result of the feature extraction process: (0 if everything was OK, -2 if URL is malformed, -3 if file does not exist or is damaged, -5 if extraction fails, -7 if there are problems in the read stream of the image file).

Constructor Detail

FeatureExtractor

public FeatureExtractor()
Basic constructor.

Method Detail

getLastResult

public int getLastResult()
Returns the result of the last extraction.

Returns:
The result of the last extraction.

createImage

protected abstract Image createImage(ImageID id,
                                     GenericFilterOutput filOut,
                                     ClusteringOutput clustOut)
Creates an image with a particular ID from the output of the filter and the clustering algorithm.

Parameters:
id - ID of the image.
filOut - output of the filter.
clustOut - output of the clustering algorithm.
Returns:
The new image.

extract

public Image extract(javax.media.jai.PlanarImage image,
                     ImageID id)
Creates an image with a particular ID extracting features from a given image.

Parameters:
image - JAI image where features are to be extracted.
id - Image ID.
Returns:
The new image.

extract

public Image extract(java.lang.String imgURL,
                     ImageID id)
Creates an image with a particular ID extracting features from a given image.

Parameters:
imgURL - the URL of the image where features are to be extracted.
id - Image ID.
Returns:
The new image.