Page 23 out of 26 total pages


QBIC-Specific tcl Function Calls


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

get_host_ip

Locates the host computer's IP address. This function call is not available on the Macintosh.

Syntax

get_host_ip

Parameters

None

Example

set ip [get_host_ip]

qbic_add_feature

Adds the specified feature to the qbic descriptor.

Syntax

qbic_add_feature qbicDescriptor FeatureName

Parameters

Example

qbic_add_feature $qb QbColorHistogramFeatureClass

qbic_add_image

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.

Syntax

qbic_add_image qbicDescriptor imageName

Parameters

Example

qbic_add_image $qb flower01.jpg 

qbic_clock

Gets the current clock time, in milliseconds, and can be used for the purpose of timing performance.

Example

set t1 [qbic_clock]

   ....

set t2 [qbic_clock]

puts stdout "time spent: [expr $t2 - $t1] msec"

qbic_delete_feature

Deletes the specified feature from the qbic descriptor.

Syntax

qbic_delete_feature qbicDescriptor FeatureName

Parameters

Example

qbic_delete_feature $qb QbColorHistogramFeatureClass 

qbic_delete_image

Deletes a specified image key from the qbic catalog.

Syntax

qbic_delete_image qbicDescriptor imageKey

Parameters

Example

qbic_delete_image $qb flower01.jpg 

qbic_end

Closes QBIC, and deletes any QBIC objects from memory.

Syntax

qbic_end qbicDescriptor

Parameters

qbicDescriptor-Descriptor returned by qbic_start

Example

qbic_end $qb 

qbic_get_param

Gets the parameter for the named feature class.

Syntax

qbic_get_param featureName ?qbicDescripter?

Parameters

Example

qbic_get_param QbColorHistogramFeatureClass

qbic_image_fdata

Gets the feature data for the input image name.

Syntax

qbic_image_fdata qbicDescriptor imageName

Parameters

Example

qbic_image_fdata $qb flower01.jpg

qbic_key_fdata

Gets the feature data for the input image key.

Syntax

qbic_key_fdata qbicDescriptor keyName

Parameters

Example

qbic_key_fdata $qb flower01.jpg

qbic_list_all_features

Lists all QBIC features.

Syntax

qbic_list_all_features

Parameters

None

Example

set allfeatures [qbic_list_all_features] 

qbic_list_cat_features

Lists all QBIC features for a particular catalog.

Syntax

qbic_list_cat_features qbicDescriptor

Parameters

qbicDescriptor-Descriptor returned by qbic_start

Example

qbic_list_cat_features $qb 

qbic_make_connect

Closes any QBIC catalogs (if opened), and connects to the specified catalog and database using the specified connection mode.

Syntax

qbic_make_connect qbicDescriptor catalogName, databaseName, 
connectionMode

Parameters

Example

qbic_make_connect $qb ibm33 qbic/QbicData r 

qbic_make_thumb

Creates a thumbnail from a specified input image.

Syntax

qbic_make_thumb inImage outImage

Parameter

Example

qbic_make_thumb flower01.jpg flower01.thumb.jpg

qbic_picker_fdata

Gets the feature data for the input picker image key.

Syntax

qbic_key_fdata qbicDescriptor keyName

Parameters

Example

qbic_picker_fdata $qb flower01.jpg

qbic_query_image

Queries the database of the given image for similar ones.

Syntax

qbic_query_image qbicDescriptor imageName

Parameters

Example

qbic_query_image $qb flower01.jpg 

qbic_query_key

Queries a key (image feature data are already in the QBIC database) for similar ones.

Syntax

qbic_query_key qbicDescriptor keyName

Parameters

Example

qbic_query_key $qb flower01.jpg

qbic_set_keys_return

Sets how many query keys will be returned for the query.

Syntax

qbic_set_keys_return qbicDescriptor num

Parameters

Example

qbic_set_keys_return $qb 20

qbic_set_keyword

Sets the keyword for a QBIC keyword search.

Syntax

qbic_set_keyword qbicDescriptor

Parameters

qbicDescriptor-Descriptor returned by qbic_start

Example

qbic_set_keyword $qb "flower"

qbic_set_thumb_24color

Sets QBIC to use 24-bit color (full color) to generate thumbnail images.

Syntax

qbic_set_thumb_24color qbicDescriptor

Parameters

qbicDescriptor-Descriptor returned by qbic_start

Example

qbic_set_thumb_24color $qb

qbic_set_thumb_size

Specifies the thumbnail size generated by QBIC.

Syntax

qbic_set_thumb_size qbicDescriptor width height

Parameters

Example

qbic_set_thumb_size $qb 100 100

qbic_start

Starts QBIC. Will return a qbic descriptor, which should be used in other QBIC function calls, for example, in the qbic_add_feature call.

Syntax

qbic_start ? catName, databaseName, mode? 

Parameters

Example

set qb [qbic_start ibm33 qbic/QbicData r] 

qbic_string_fdata

Gets the feature data for the input image description string.

Syntax

qbic_string_fdata qbicDescriptor stringName

Parameters

Example

qbic_string_fdata $qb "D100,100:R2,0,80,80,200,100,400"

QbDumpDb

Dumps the QBIC dbm files. The full command-line syntax is printed on screen if you invoke the method without any parameters.

Example

QbDumpDb -c ibm -d qbic/QbicData -f QbColorHistogramFeatureClass

or

QbDumpDb -d qbic/QbicData ColorHiF.ibm

QbMkDbs

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.

Example

QbMkDbs -c ibm33 -d qbic/QbicData -f QbColorHistogramFeatureClass -f 
QbDrawFeatureClass flower01.jpg flower02.jpg 

QbMkThmb

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.

Example

QbMkThmb -p -w 100 -h 100 flower01.jpg flower01.jpg.thumb0.gif

QbQBE

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.

Example

QbQbe -c ibm33 -d qbic/QbicData -f QbColorHistogramFeatureClass -i 
flower01.jpg 

SoundPlay

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.

Syntax

SoundPlay waveFileName ?wait?

Parameters

Example

SoundPlay QbicSound.wav

SoundStop

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.

Syntax

SoundStop

Parameters

None

Example

SoundStop

start_browser

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.

Syntax

start_browser ?URL?

Parameters

URL-Specify an URL for the Netscape browser

Example

start_browser "http://wwwqbic.almaden.ibm.com"




Page 23 out of 26 total pages


xzhu@almaden.ibm.com or tedl@almaden.ibm.com
Copyright © 1998, IBM Corporation. All rights reserved.