Database Reference
In-Depth Information
The Landscapes relation includes attributes of traditional data types (e.g. Id, Place and Photographer)
and one attribute of a multimedia data type: Picture. As Picture stores images and each vendor use a
proprietary data type to this intend, in the example we employ the fictitious type IMAGETYPE to rep-
resent them. After having the table created and the data loaded, the features representing the image are
extracted and stored, so they can be later employed in content-based queries. These tasks require sev-
eral instructions to be accomplished in all the aforementioned modules and are omitted in the example.
Thereafter, suppose a user wants to retrieve the images which differ at most 1.5 similarity units from a
query example (example.jpg), regarding color and texture features. Such range query can be written as
follows, respectively using the DB2 QbScoreFromStr (a) or the Oracle ORDImageSignature.evaluate-
Score (b) 1 similarity functions: (see Algorithm 2)
Although these modules allow querying images by similarity, they have some drawbacks. The first one
is that their source code are not available to make improvements and to include domain-specific knowledge.
The built-in functions provided are of general purpose and usually yield poor results when applied over
specific domains, precluding many applications from using these modules. Other major shortcoming is
that the data definition and manipulation instructions are very verbose and sometimes error-prone, requir-
ing to write sentences to perform intermediary steps which should be transparent to the user.
To circumvent those drawbacks, it would be interesting to provide architectures allowing the develop-
ment of multimedia systems capable of adapting themselves to the particular needs of each application
domain. Moreover, to address the latter drawback, it would be interesting to develop a simple language
with a syntax close to the widely adopted standard SQL. The next subsection presents a seamless way
to extend SQL to include similarity-related handling constructions.
A SQL Extension for Similarity Data Management
In order to meet the requirement of introducing similarity queries into SQL, there are several issues
that must be addressed. The first one is how to represent similarity queries over multimedia domains -
such as images and video. It can be done defining the domains where the similarity will be measured as
new data types. In this chapter we restrict the examples to images, defining a new SQL data type called
Algorithm 2.
(a) SELECT * FROM Landscapes
WHERE QbScoreFromStr (
Picture,
'QbTextureFeatureClass file=<example.jpg> weight=1.0
and QbColorFeatureClass file=<example.jpg> weight=2.0'
) <= 1.5
(b) SELECT * FROM Landscapes
WHERE ORDImageSignature.evaluateScore(
Picture_Features,
ORDImageSignature.generateSignature('example.jpg'),
'color=”2.0” texture=”1.0”'
) <= 1.5
 
Search WWH ::




Custom Search