Database Reference
In-Depth Information
Algorithm 3.
CREATE METRIC <metric_name>
USING <distance_function> FOR <complex_data_type>
(<extractor_name> (
<parameter_name> AS <parameter_alias> [weight],...)
[, <extractor_name> (
<parameter_name> AS <parameter_alias> [weight],...),
...]
);
jectEXT, which returns the features Area (in number of pixels) and the center pixel XYCenter of the
largest continuous area of the same color in the image. If one wants to define a metric that evaluates the
similarity of two images, considering their histogram and the position of the largest continuous area (but
not its area), with the histogram weighting twice the center, the following command can be used: (see
Algorithm 4)where the Area parameter of the LargestObjectEXT was not provided, indicating that this
feature should not be treated by the extractor.
Once a metric was created, it can be associated with one or several image attributes defined in any
relation. The METRICs are associated with complex attributes as constraints following any of the two
usual ways to define constraints in the table definition commands: column constraint or table constraint.
In the example following, the metric Histo&Center is associated to the Picture attribute of the table
Landscape: (see Algorithm 5)
When defining a METRIC constraint using a column constraint syntax, it is only necessary to provide
the USING <metric_name> clause in the attribute definition.
Note that we do no intend that comparing two landscapes using the Histo&Center metric guaran-
tee obtaining the most similar images by human standards - a much better comparison metric should
be developed - it is used here only as an example of the proposed syntax. With regard to multimedia
Algorithm 4.
CREATE METRIC Histo&Center USING LP1
FOR STILLIMAGE (
HistogramEXT (Histogram AS Histo 2),
LargestObjectEXT (XYCenter AS XYLargestObj)
);
Algorithm 5.
ALTER TABLE Landscapes ADD METRIC (Picture) USING (Histo&Center);
Search WWH ::




Custom Search