IBM Books

Image, Audio, and Video Extenders Administration and Programming

QbScoreFromStr


Image Audio Video
X    

Returns the score of an image, which is a number that expresses how closely the features of the image match those of a query string. The QBIC catalog that is associated with the column to which the image handle belongs is used to calculate the score of the image. The lower the score, the more closely the features of the image match those of the query string.

Include file

none

Syntax

>>-QbScoreFromStr--(--imgHandle--,--query--)-------------------><
 

Syntax

Depricated version

>>-QbScoreFromStr--(--query--,--imgHandle--)-------------------><
 

Parameters (data type)

imgHandle (DB2Image)
The handle of the image.

query (VARCHAR(1024))
The query string.

Return values (data type)

The score of the image (DOUBLE). The score can range from 0.0 to a very large number approaching infinity. The lower the score, the more closely the feature values of the target image match the feature values specified in the query. A score of 0.0 means an exact match. A score of a null value means that the image has not been cataloged; the depricated version of this UDF returns score of -1 when the image has not been cataloged.

Examples

Find the cataloged images in a table column whose average color is very close to red.:

SELECT name
FROM fabric
WHERE (QbScoreFromStr(Swatch_Img, 
       'QbColorFeatureClass color=<255, 0, 0>'))<0.1 


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]