Package viper.descriptors.attributes

Provides the classes necessary to read Attributes in from a file and compare them.

See:
          Description

Interface Summary
AttributeValue All Attributes operate on Attribute values.
Composable  
ExtendedAttributeValue Some attributes have extra config information.
Measurable An interface for a data type that knows its own metric objects.
Measurable.Difference For attributes that have several different distance metrics, it is often convenient to save some calculations; this interface is for keeping the computed data around for a bit.
 

Class Summary
AbstractAttribute This class exists to give a shared base class to Attribute and AttributePrototype.
Attribute This class is used to hold an attribute for a Descriptor.
Attribute_bbox This attribute represents a rectangle or Bounding Box.
Attribute_bbox.Bbox  
Attribute_bbox.Crops Crops all rectangles to be within the given rectangle Returns false when the rectangle is without the window.
Attribute_bbox.ProportionalResizer Modifies the boxes widths and heights about the center.
Attribute_bbox.Resizer Adds to the boxes size by some fixed number of pixels.
Attribute_bvalue This attribute represents a boolean value.
Attribute_circle This attribute represents a circle.
Attribute_circle.CircleValue  
Attribute_dvalue This attribute represents an integral value.
Attribute_ellipse This attribute represents a Ellipse.
Attribute_ellipse.EllipseValue  
Attribute_fvalue This attribute represents a doubleing point value.
Attribute_lvalue This attribute represents an Enumerated list element.
Attribute_number This attribute represents a number type, so that integers and doubles can be compared.
Attribute_number.NumberValue  
Attribute_obox This attribute represents a rotated recatangle or Oriented Box.
Attribute_obox.Obox  
Attribute_obox.Resizer Adds to the boxes size.
Attribute_point This attribute represents a point in the video.
Attribute_polygon This attribute represents a polygon
Attribute_polygon.Sizer Checks that the current value's size.
Attribute_svalue This Attribute describes a String of characters.
AttributePrototype This class is used as a factory for Attribute data.
Attributes Some static methods for dealing with Viper Attributes.
AttributeTest Unit tests for the attribute package.
FrameSpan This class represents the numeric span of frames in a video, consisting of the beginning and end frame and a bitmask on all frames in between, as well as several actions upon them, such as intersection, union, and size.
ValueSpan Encodes a dynamic attribute value.
 

Exception Summary
ImproperMetricException This is thrown when an Attribute or Descriptor tries to use an unspecified distance metric.
UncomposableException Thrown when trying to compose two composable attributes, but, for whatever reason, they don't like it.
 

Package viper.descriptors.attributes Description

Provides the classes necessary to read Attributes in from a file and compare them.

How to Create Your Own Attributes

In order to create a new attribute class, subclass the Attribute class or one of its subclasses. As you can see, they all follow the naming convention Attribute_typename. Make certain that your subclasses follow this rule as well, or the Attribute reader will not be able to find them.

There are certain methods and fields that you must change in your subclasses that are abstract in the superclass, some that could be changed and throw MethodNotSupportedException in the superclass, and still others that implement defaults that may or may not need to be changed, depending on your data types. The Rule methods -- the ones that help filter by rules -- namely, public Vector convertRule (String unparsed_rule, ErrorWriter err) and public boolean passRule (String rule, String valueToCompareAgainst), do not throw anything, as they are often called from outside and need to be more nice to errors in the data.

See Also:
the package defining Descriptors