IBM Books

Image, Audio, and Video Extenders Administration and Programming

Adding a feature to a QBIC catalog

Use the QbAddFeature API or the ADD QBIC FEATURE command

to add a feature to a QBIC catalog. You must add at least one feature to a QBIC catalog before you can catalog an image in it. The QBIC catalog must be open for update before you add a feature.

When you add a feature to a catalog, specify the name of the feature that you want to add (the feature names are listed in the following table).

Table 7. QBIC Feature Names
Feature name Description
QbColorFeatureClass Average color
QbColorHistogramFeatureClass Histogram color
QbDrawFeatureClass Postional color
QbTextureFeatureClass Texture

You might have to recatalog images: If you add a feature to a QBIC catalog, the Image Extender will not automatically store data about the new feature for already cataloged images, even if automatic cataloging is set on. To include data about a new feature for already cataloged images, you need to recatalog the images (see Recataloging images).

Using the API: When you use the QbAddFeature API, you need to specify the handle of the QBIC catalog in addition to the feature name. Notice the use of the constant qbiMaxFeatureName for the length of the feature name. The constant is defined in the include (header) file for QBIC, dmbqbapi.h, as the value 50.

In the following example, the QbAddFeature API is used to add the histogram color feature to a QBIC catalog:

char  featureName[qbiMaxFeatureName];
 
QbCatalogHandle   CatHdl;
 
strcpy(featureName,"QbColorHistogramFeatureClass");
 
rc=QbAddFeature(
                CatHdl,                              /* catalog handle */
                featureName);                        /* feature name */

Using the command line: The ADD QBIC FEATURE command acts on the currently open catalog. In the following example, the command is used to add the positional color feature to the currently open catalog:

ADD QBIC FEATURE QbDrawFeatureClass


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