Image | Audio | Video |
---|---|---|
X |
Returns a table of scores from an image column. Each score is a number that expresses how closely the features of the image are to those specified in a query string. The QBIC catalog that is associated with the table and column to which the image handle belongs is used to calculate the score of each image. The lower the score for an image, the more closely the features of that image match those of the query string.
Include file
none
Syntax
Return scores for all cataloged images in a column
>>-QbScoreTBFromStr--(--query--,--table--,--column--)----------><
Syntax
Return scores for a specific number of cataloged images in a column
>>-QbScoreTBFromStr--(--query--,--table--,--column--,-----------> >----maxReturns--)---------------------------------------------><
Parameters (data type)
Return values (data type)
Table of image handles and scores for the images in the column. The result table has two columns: IMAGE_ID (DB2Image) which contains the image handles, and SCORE (DOUBLE) which contains the scores. The result table is arranged in ascending order by score. 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 -1 means that the image has not been cataloged.
Examples
Find the ten cataloged images in a table column whose texture is closest to that of an image in a server file:
SELECT name, description FROM fabric WHERE CAST (swatch_img as varchar(250)) IN (SELECT CAST (image_id as varchar(250)) FROM TABLE (QbScoreTBFromStr (QbTextureFeatureClass file=<server,"patterns/ptrn07.gif">' 'clothes.fabric', 'swatch_img', 10)) AS T1));