cbr
Interface FeatureExtractor

All Known Implementing Classes:
CCVExtractor

public interface FeatureExtractor

This interface represents a generic feature extractor as used for Content-Based Retrieval (CBR). It defines methods for extracting significant features of an image. Image can be passed either as an java.awt.Image, an array of RGB888 pixels, or an array of RGB222 pixels. Instances that do not support extraction of features from RGB222 pictures shall throw an UnsupportedOperationException.

Version:
"$Id: FeatureExtractor.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth
See Also:
FeatureVector

Method Summary
 FeatureVector extract(byte[] px, int w, int h)
          This method extracts the feature vector from a byte array of RGB222 pixels.
 FeatureVector extract(Image im)
          Extracts the feature vector from the given image.
 FeatureVector extract(int[] px, int width, int height)
          Extracts the feature vector from the given array of RGB888 pixels.
 

Method Detail

extract

public FeatureVector extract(Image im)
                      throws InterruptedException,
                             ImageException
Extracts the feature vector from the given image.

Parameters:
im - The image from which the feature vector is extacted.
Returns:
The feature vector of the given image.
Throws:
InterruptedException - if an interrupt occurs while the image's pixel data is loaded.
ImageException - if for instance the dimensions of the given image cannot be determined.

extract

public FeatureVector extract(int[] px,
                             int width,
                             int height)
Extracts the feature vector from the given array of RGB888 pixels.

Parameters:
px - The byte array of RGB222 pixel values of the image from which the feature vector is extracted.
Returns:
The feature vector of the given image.

extract

public FeatureVector extract(byte[] px,
                             int w,
                             int h)
This method extracts the feature vector from a byte array of RGB222 pixels.

The caller has to make sure that the pixel values are in the range [0,63]. The easiest way to assure this range is to use the Quantizer.

Parameters:
px - The byte array of RGB222 pixel values of the image from which the feature vector is extracted.
w - The width of the image in pixels.
h - The height of the image in pixels.
Returns:
The feature vector of the given image.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.