IBM Books

Image, Audio, and Video Extenders Administration and Programming

QbScoreFromName


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 object. The QBIC catalog 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 specified query object. (QbScoreFromName replaces QbScore, but QbScore is still accepted.)

Notes:

  1. EEE Only: QbScoreFromName is not supported in a partitioned database environment. Use the the QbScoreFromStr UDF instead, after using the QbQueryGetString API to get the query string.

  2. QbScoreFromName will be deprecated in future releases for non-partitioned database environments. To reuse a query, you should use the QbQueryGetString API to get the query string and save that string for later use in your application.

Include file

none

Syntax

>>-QbScoreFromName--(--imgHandle--,--queryName--)--------------><
 

Syntax

Depricated version

>>-QbScoreFromName--(--queryName--,--imgHandle--)--------------><
 

Parameters (data type)

imgHandle (DB2Image)
The handle of the image.

queryName (varchar(18))
The name of the query object.

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 closer 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:

EXEC SQL BEGIN DECLARE SECTION;
char Img_fnd[100];
EXEC SQL END DECLARE SECTION;
 
EXEC SQL SELECT NAME
  INTO :Img_fnd
  FROM FABRIC
  WHERE (QBSCOREFROMNAME(SWATCH_IMG,
         'fshavgcol'))<0.1;


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