qbictcl extends the tcl script with QBIC functionality. The following QBIC-specific function calls are available in qbictcl (in addition to standard tcl function calls):
Locates the host computer's IP address. This function call is not available on the Macintosh.
get_host_ip
set ip [get_host_ip]
Adds the specified feature to the qbic descriptor.
qbic_add_feature qbicDescriptor FeatureName
qbic_add_feature $qb QbColorHistogramFeatureClass
Computes and stores feature data for the input image. Function calls to qbic_add_feature function must have been called, and only those features that were described in the qbic_add_feature call will be computed. The image name is used as the key.
qbic_add_image qbicDescriptor imageName
qbic_add_image $qb flower01.jpg
Gets the current clock time, in milliseconds, and can be used for the purpose of timing performance.
set t1 [qbic_clock] .... set t2 [qbic_clock] puts stdout "time spent: [expr $t2 - $t1] msec"
Deletes the specified feature from the qbic descriptor.
qbic_delete_feature qbicDescriptor FeatureName
qbic_delete_feature $qb QbColorHistogramFeatureClass
Deletes a specified image key from the qbic catalog.
qbic_delete_image qbicDescriptor imageKey
qbic_delete_image $qb flower01.jpg
Closes QBIC, and deletes any QBIC objects from memory.
qbic_end qbicDescriptor
qbicDescriptor-Descriptor returned by qbic_start
qbic_end $qb
Gets the parameter for the named feature class.
qbic_get_param featureName ?qbicDescripter?
qbic_get_param QbColorHistogramFeatureClass
Gets the feature data for the input image name.
qbic_image_fdata qbicDescriptor imageName
qbic_image_fdata $qb flower01.jpg
Gets the feature data for the input image key.
qbic_key_fdata qbicDescriptor keyName
qbic_key_fdata $qb flower01.jpg
qbic_list_all_features
set allfeatures [qbic_list_all_features]
Lists all QBIC features for a particular catalog.
qbic_list_cat_features qbicDescriptor
qbicDescriptor-Descriptor returned by qbic_start
qbic_list_cat_features $qb
Closes any QBIC catalogs (if opened), and connects to the specified catalog and database using the specified connection mode.
qbic_make_connect qbicDescriptor catalogName, databaseName, connectionMode
qbic_make_connect $qb ibm33 qbic/QbicData r
Creates a thumbnail from a specified input image.
qbic_make_thumb inImage outImage
qbic_make_thumb flower01.jpg flower01.thumb.jpg
Gets the feature data for the input picker image key.
qbic_key_fdata qbicDescriptor keyName
qbic_picker_fdata $qb flower01.jpg
Queries the database of the given image for similar ones.
qbic_query_image qbicDescriptor imageName
qbic_query_image $qb flower01.jpg
Queries a key (image feature data are already in the QBIC database) for similar ones.
qbic_query_key qbicDescriptor keyName
qbic_query_key $qb flower01.jpg
Sets how many query keys will be returned for the query.
qbic_set_keys_return qbicDescriptor num
qbic_set_keys_return $qb 20
Sets the keyword for a QBIC keyword search.
qbic_set_keyword qbicDescriptor
qbicDescriptor-Descriptor returned by qbic_start
qbic_set_keyword $qb "flower"
Sets QBIC to use 24-bit color (full color) to generate thumbnail images.
qbic_set_thumb_24color qbicDescriptor
qbicDescriptor-Descriptor returned by qbic_start
qbic_set_thumb_24color $qb
Specifies the thumbnail size generated by QBIC.
qbic_set_thumb_size qbicDescriptor width height
qbic_set_thumb_size $qb 100 100
Starts QBIC. Will return a qbic descriptor, which should be used in other QBIC function calls, for example, in the qbic_add_feature call.
qbic_start ? catName, databaseName, mode?
set qb [qbic_start ibm33 qbic/QbicData r]
Gets the feature data for the input image description string.
qbic_string_fdata qbicDescriptor stringName
qbic_string_fdata $qb "D100,100:R2,0,80,80,200,100,400"
Dumps the QBIC dbm files. The full command-line syntax is printed on screen if you invoke the method without any parameters.
QbDumpDb -c ibm -d qbic/QbicData -f QbColorHistogramFeatureClass QbDumpDb -d qbic/QbicData ColorHiF.ibm
Creates a QBIC catalog. See page 22 for more information. The full command-line syntax is printed on screen if you invoke the method without any parameters.
QbMkDbs -c ibm33 -d qbic/QbicData -f QbColorHistogramFeatureClass -f QbDrawFeatureClass flower01.jpg flower02.jpg
Makes thumbnails for QBIC to display the search results. The full command-line syntax is printed on screen if you invoke the method without any parameters.
QbMkThmb -p -w 100 -h 100 flower01.jpg flower01.jpg.thumb0.gif
Creates a QBIC query. See page 24 for more information. The full command-line syntax is printed on screen if you invoke the method without any parameters.
QbQbe -c ibm33 -d qbic/QbicData -f QbColorHistogramFeatureClass -i flower01.jpg
This function is available only on Windows NT/95/98. It plays a short wav sound file if the host machine has a sound device.
SoundPlay waveFileName ?wait?
SoundPlay QbicSound.wav
This function is available only on Windows NT/95/98. It stops playing the wav file initiated by the SoundPlay call. If the sound file has already stopped playing, this call is ignored.
SoundStop
SoundStop
Starts a browser. On a UNIX platform, the browser should be Netscape and the Netscape program must be in the search path for the user who invokes qbictcl. On NT/95 platforms, the browser will default to Netscape. If Netscape is not installed, it will try Internet Explorer. This function call is not available on Macintosh.
start_browser ?URL?
URL-Specify an URL for the Netscape browser
start_browser "http://wwwqbic.almaden.ibm.com"