I Oracle Multimedia SQL/MM Still Image Object Types

Oracle Multimedia contains the following information about object types that comply with the first edition of the ISO/IEC 13249-5:2001 SQL MM Part5:StillImage standard (commonly referred to as the SQL/MM Still Image standard):

  • SI_AverageColor Object Type

    Describes the average color feature of an image.

  • SI_Color Object Type

    Encapsulates color values of a digitized image.

  • SI_ColorHistogram Object Type

    Describes the relative frequencies of the colors exhibited by samples of an image.

  • SI_FeatureList Object Type

    Describes an image that is represented by a composite feature. The composite feature is based on up to four basic image features (SI_AverageColor, SI_ColorHistogram, SI_PositionalColor, and SI_Texture) and their associated feature weights.

  • SI_PositionalColor Object Type

    Describes the positional color feature of an image. Assuming that an image is divided into n by m rectangles, the positional color feature characterizes an image by the n by m most significant colors of the rectangles.

  • SI_StillImage Object Type

    Represents digital images with inherent image characteristics such as height, width, format, and so on.

  • SI_Texture Object Type

    Describes the texture feature of the image characterized by the size of repeating items (coarseness), brightness variations (contrast), and predominant direction (directionality).

The StillImage object types are defined in the ordisits.sql file. After installation, this file is available in the Oracle home directory at:

<ORACLE_HOME>/ord/im/admin (on Linux and UNIX)

<ORACLE_HOME>\ord\im\admin (on Windows)

A public synonym with the corresponding object type name is created for each of these StillImage object types. Therefore, you need not specify the ORDSYS schema name when specifying a StillImage object type.

This appendix also includes these topics:

  • SQL Functions and Procedures

    Provides an overview of how the SQL functions and procedures are presented in this guide, and how they are created.

  • Internal Helper Types

    Provides syntax for attributes that are VARRAY types.

  • Views

    Describes the views in the SI_INFORMTN_SCHEMA that you can query for information about the supported image formats and implementation-defined values.

See Also:

Oracle Multimedia User's Guide for a list of ORDImage features that are not available for StillImage objects because the SQL/MM Still Image standard does not specify them

SQL Functions and Procedures

For each Still Image constructor or method, there is an equivalent SQL function or procedure. Each function or procedure is presented with its equivalent constructor or method. Although the description, parameters, usage notes, and exceptions subsections frequently refer to the method, these subsections are also applicable to the equivalent SQL function or procedure.

All SQL functions and procedures are created as standalone functions in the ORDSYS schema with invoker's rights. A public synonym with the corresponding function or procedure name is created for all SQL functions and procedures. Therefore, you need not specify the schema name when a function or procedure is called. For example:Use ORDSYS.SI_MkAvgClr(averageColor) to make the call without the synonym.Use SI_MkAvgClr(averageColor) to make the call with the synonym.All database users can call these functions and procedures.

Internal Helper Types

An attribute that consists of an array is specified as an internal helper type. Internal helper types are created in the ORDSYS schema and do not have public synonyms.

The internal helper types are as follows:

  • colorsList

    The syntax for this internal helper type is:

    CREATE OR REPLACE TYPE colorsList AS VARRAY(100) OF SI_Color;
    

    This internal helper type is used to specify the SI_ColorsList attribute of the SI_ColorHistogram Object Type as described.

  • colorFrequenciesList

    The syntax for this internal helper type is:

    CREATE OR REPLACE TYPE colorFrequenciesList AS VARRAY(100) OF DOUBLE PRECISION;
    

    This internal helper type is used to specify the SI_FrequenciesList attribute of the SI_ColorHistogram Object Type as described.

  • colorPositions

    The syntax for this internal helper type is:

    CREATE OR REPLACE TYPE colorPositions AS VARRAY(9) OF SI_Color;
    

    This internal helper type is used to specify the SI_ColorPositions attribute of the SI_PositionalColor Object Type as described.

  • textureEncoding

    The syntax for this internal helper type is:

    CREATE OR REPLACE TYPE textureEncoding AS VARRAY(5) of DOUBLE PRECISION;
    

    This internal helper type is used to specify the SI_TextureEncoding attribute of the SI_Texture Object Type as described.

SI_AverageColor Object Type

The SI_AverageColor object type describes the average color feature of an image. It is created in the ORDSYS schema with invoker's rights. It is declared as an INSTANTIABLE and NOT FINAL type.

Note:

Use the SI_AverageColor object type constructors and method rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_AverageColor object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
SI_AverageColorSpec SI_Color,

where:

  • SI_AverageColorSpec: the average color of the object.

SI_AverageColor Constructors

This section describes these SI_AverageColor object constructors:

SI_AverageColor(averageColorSpec)

Format

SI_AverageColor(averageColorSpec IN SI_Color)

RETURN SELF AS RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_MkAvgClr(avgClr IN SI_Color) RETURN SI_AverageColor DETERMINISTIC;

Description

Constructs an SI_AverageColor object. The SI_AverageColorSpec attribute is initialized with the value of the specified color.

Parameters

averageColorSpec
avgClr

The color used to construct an SI_AverageColor object.

Pragmas

None.

Exceptions

None.

Usage Notes

An error message is returned if one or more of these conditions is true:

  • The value of the specified averageColorSpec is NULL.

  • The value of the specified averageColorSpec is not a valid SI_Color value.

Examples

None.

SI_AverageColor(sourceImage)

Format

SI_AverageColor(sourceImage IN SI_StillImage)

RETURN SELF AS RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_FindAvgClr(sourceImage IN SI_StillImage) RETURN SI_AverageColor DETERMINISTIC;

Description

Derives an SI_AverageColor value from the specified image. The image is divided into n samples. Then, each component (red, green, blue) of all the samples is added separately and divided by the number of samples. This gives the values of the components of the specified image. The process by which SI_AverageColor is determined can also be described by the following expression, where n is the number of samples:

Description of si_averagecolor.gif follows
Description of the illustration si_averagecolor.gif

Parameters

sourceImage

The image from which the average color feature is extracted.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if one or more of these conditions is true:

  • The value of the specified image is NULL.

  • The value of sourceImage.SI_Content is NULL.

  • The average color feature is not supported for the format of the specified image. This is determined by looking up the SI_IMAGE_FORMAT_FEATURES view or SI_IMAGE_FRMT_FTRS view.

Examples

None.

SI_AverageColor Method

This section presents reference information on the SI_AverageColor method used for image matching:

SI_Score( ) for SI_AverageColor

Formats

SI_Score(image in SI_StillImage)

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_ScoreByAvgClr(feature IN SI_AverageColor, image IN SI_StillImage)

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Determines and returns the score of the specified image as compared to the SI_AverageColor object instance to which you apply the method. This method returns a DOUBLE PRECISION value between 0 and 100. A value of 0 indicates that the average color of the specified image and the SI_AverageColor object instance are identical. A value of 100 indicates that average color of the specified image and the SI_AverageColor object instance are completely different.

Parameters

image

The image whose average color feature is compared with the SI_AverageColor object instance to which you apply this method.

feature

An SI_AverageColor value.

Usage Notes

This method returns a NULL value if any of these conditions are true:

  • The value of the SI_AverageColor to which the method is applied is NULL.

  • The value of the specified image is NULL.

  • The value of image.content_SI is NULL.

  • The SI_AverageColor feature is not supported for the specified image format.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_Color Object Type

The SI_Color object type represents color values of a digitized image as an RGB color value. It is created in the ORDSYS schema with invoker's rights. It is declared as an INSTANTIABLE and NOT FINAL type.

Note:

Use the SI_Color method rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_Color object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
redValue   INTEGER,
greenValue INTEGER,
blueValue  INTEGER,

where:

  • redValue: the integer value of the red component of the RGB color value.

  • greenValue: the integer value of the green component of the RGB color value.

  • blueValue: the integer value of the blue component of the RGB color value.

SI_Color Constructor

Only a system-default constructor is provided for the SI_Color object.

SI_Color Method

This section presents reference information on the SI_Color method used for constructing an SI_Color object using RGB color values:

SI_RGBColor( )

Format

SI_RGBColor(redValue IN INTEGER,

greenValue IN INTEGER,

blueValue IN INTEGER);

Format of Equivalent SQL Function

SI_MkRGBClr(redValue IN INTEGER,

greenValue IN INTEGER,

blueValue IN INTEGER)

RETURN SI_Color;

Description

Constructs an SI_Color object in the RGB color space using the specified red, blue, and green values.

Parameters

redValue

An integer value between 0 and 255.

greenValue

An integer value between 0 and 255.

blueValue

An integer value between 0 and 255.

Usage Notes

  • You must call the system default constructor and specify NULL values, then call the SI_RGBColor method to set the RGB values. This two-step process is required because:

    • The SQL/MM standard does not specify an object constructor for this type, therefore, you must use the system default constructor.

    • The default constructor does not perform any argument validation. By calling the SI_RGBColor method, specified values are validated before assigning them to the color attributes.

  • An error is returned if any of the specified values is NULL or if any of the specified values is not between 0 and 255.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_ColorHistogram Object Type

The SI_ColorHistogram object represents the color histogram image feature. It describes the relative frequencies of the colors exhibited by samples of an image. It is created in the ORDSYS schema with invoker's rights. It is declared as an INSTANTIABLE and NOT FINAL type. This object type is defined as follows. (See Internal Helper Types for the colorsList and colorFrequenciesList attribute syntax.)

Note:

Use the SI_ColorHistogram constructors and methods rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_ColorHistogram object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
SI_ColorsList       colorsList,
SI_FrequenciesList  colorFrequenciesList,

where:

  • SI_ColorsList: array of the SI_Color object type that represents the color values of the image.

  • SI_FrequenciesList: array of the colorFrequencies attribute that represents the color frequencies of the image. Its values range from 0 to 100. Each array element represents the frequency of the corresponding color in the SI_ColorsList array.

SI_ColorHistogram Constructors

This section describes these SI_ColorHistogram object constructors:

SI_ColorHistogram(colors, frequencies)

Format

SI_ColorHistogram(SI_ColorsList IN colorsList,

SI_FrequenciesList IN colorFrequenciesList)

RETURN SELF AS RESULT DETERMINISTIC;

Description

Constructs an SI_ColorHistogram object. These attributes are initialized:

  • The SI_ColorsList array attribute is initialized with the value of the specified colors.

  • The SI_FrequenciesList array attribute is initialized with the value of the specified frequencies.

See Internal Helper Types for the SI_ColorsList and colorFrequenciesList attribute syntax.

Pragmas

None.

Format of Equivalent SQL Function

SI_ArrayClrHstgr(colors IN SI_ColorsList,

frequencies IN colorFrequenciesList),

RETURN SI_ColorHistogram DETERMINISTIC;

Parameters

SI_ColorsList
colors

An array of colors with a maximum size of SI_MaxHistogramLength. Query the
SI_VALUES view in SI_INFORMTN_SCHEMA for the value of SI_MaxHistogramLength.

SI_FrequenciesList
frequencies

An array of color frequencies with a maximum size of SI_MaxHistogramLength.

Exceptions

None.

Usage Notes

An error is returned if one of these conditions is true:

  • One of the specified values is NULL.

  • One of the specified frequency values is less than 0 or greater than 100.

Examples

None.

SI_ColorHistogram(firstColor, frequency)

Format

SI_ColorHistogram(firstColor IN SI_Color,

frequency IN DOUBLE PRECISION)

RETURN SELF AS RESULT DETERMINISTIC;

Format of the Equivalent SQL Function

SI_MkClrHstgr(firstColor IN SI_Color, frequency IN DOUBLE PRECISION)

RETURN SI_ColorHistogram DETERMINISTIC;

Description

Creates a single color/frequency pair in an SI_ColorHistogram object. These attributes are initialized:

  • The SI_ColorsList array attribute is initialized with the value of the specified firstColor.

  • The SI_FrequenciesList array attribute is initialized with the value of the specified frequency.

Parameters

firstColor

A color value of SI_ColorHistogram.

frequency

The frequency value of SI_ColorHistogram for the firstColor parameter.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of these conditions are true:

  • One of the specified values is NULL.

  • The frequency specified is less than 0 or greater than 100.

Examples

None.

SI_ColorHistogram(sourceImage)

Format

SI_ColorHistogram(sourceImage IN SI_StillImage)

RETURN SELF AS RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_FindClrHstgr (sourceImage IN SI_StillImage)

RETURN SI_ColorHistogram DETERMINISTIC;

Description

Extracts a color histogram from the specified image. These attributes are initialized:

  • The SI_ColorsList attribute is initialized with the color values derived from the specified image.

  • The SI_FrequenciesList attribute is initialized with the frequencies derived from the specified image.

Parameters

sourceImage

The image from which the color histogram is extracted.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of these conditions are true:

  • The value of the specified image is NULL.

  • The value of sourceImage.SI_Content is NULL.

  • The color histogram feature is not supported for this image format.

To determine whether the color histogram feature is supported for a given image format, query the SI_IMAGE_FORMAT_FEATURES view or SI_IMAGE_FRMT_FTRS view.

Examples

None.

SI_ColorHistogram Methods

This section presents reference information on these SI_ColorHistogram methods, which are used for color histogram construction and image matching:

SI_Append( )

Format

SI_Append(color IN SI_Color,

frequency IN DOUBLE PRECISION);

Format of Equivalent SQL Procedure

SI_AppendClrHstgr(feature IN OUT NOCOPY SI_ColorHistogram,

color IN SI_Color,

frequency IN DOUBLE PRECISION);

Description

Extends a specified SI_ColorHistogram value by a color/frequency pair.

Parameters

color

The color value to be added to the histogram.

frequency

The corresponding frequency value of the specified color that is to be added to the histogram.

feature

The color histogram to which the color and frequency values are appended.

Usage Notes

An error is returned if one of these conditions is true:

  • Any of the specified values is NULL.

  • The frequency is less than 0 or greater than 100.

  • The attribute SI_ColorsList has SI_MaxHistogramLength elements.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_Score( ) for SI_ColorHistogram

Format

SI_Score(image IN SI_StillImage)

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_ScoreByClrHstgr(feature IN SI_ColorHistogram,

image IN SI_StillImage) RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Determines and returns the score of the color histogram of the specified image as compared to the SI_ColorHistogram object instance to which you apply this method. This method returns a DOUBLE PRECISION value between 0 and 100. A value of 0 means that the color histogram of the specified image and the SI_ColorHistogram object instance are identical. A value of 100 indicates that the color histogram of the specified image and the SI_ColorHistogram object instance are completely different. A NULL value is returned if one of these conditions is true:

  • The value of the SI_ColorHistogram object instance is NULL.

  • The value of the specified image is NULL.

  • The value of image.SI_Content is NULL.

  • The value of the color histogram feature is not supported for the format of the specified image.

Parameters

image

The image whose color histogram feature is extracted and used for comparison.

feature

The histogram to be compared with the color histogram of the specified image.

Usage Notes

None.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_FeatureList Object Type

A composite feature that contains up to four different basic features and their associated feature weights. A weight value specifies the importance given to a particular feature during image matching. Each weight value can have a value from 0.0 and 1.0. A feature weight value of 0.0 indicates that the feature is not considered for image matching. This object type is created in the ORDSYS schema with invoker's rights. It is declared as an INSTANTIABLE and NOT FINAL type.

Note:

Use the SI_FeatureList constructor and methods rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_FeatureList object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
AvgClrFtr_SI         SI_AverageColor,
AvgClrFtrWght_SI     DOUBLE PRECISION,
ClrHstgrFtr_SI       SI_ColorHistogram,
ClrHstgrFtrWght_SI   DOUBLE PRECISION,
PstnlClrFtr_SI       SI_PositionalColor,
PstnlClrFtrWght_SI   DOUBLE PRECISION,
TextureFtr_SI        SI_Texture,
TextureFtrWght_SI    DOUBLE PRECISION,

where:

  • AvgClrFtr_SI: average color.

  • AvgClrFtrWght_SI: average color feature weight with a default value of 0.0.

  • ClrHstgrFtr_SI: color histogram.

  • ClrHstgrFtrWght_SI: color histogram weight with a default value of 0.0.

  • PstnlClrFtr_SI: positional color.

  • PstnlClrFtrWght_SI: positional color weight with a default value of 0.0.

  • TextureFtr_SI: texture.

  • TextureFtrWght_SI: texture weight with a default value of 0.0.

SI_FeatureList Constructor

This section describes the SI_FeatureList constructor.

The SI_FeatureList constructor is as follows:

SI_FeatureList( )

Format

SI_FeatureList((AvgClrFtr_SI IN SI_AverageColor,

AvgClrFtrWght_SI IN DOUBLE PRECISION,

ClrHstgrFtr_SI IN SI_ColorHistogram,

ClrHstgrFtrWght_SI IN DOUBLE PRECISION,

PstnlClrFtr_SI IN SI_PositionalColor,

PstnlClrFtrWght_SI IN DOUBLE PRECISION,

TextureFtr_SI IN SI_Texture,

TextureFtrWght_SI IN DOUBLE PRECISION)

Format of Equivalent SQL Function

SI_MkFtrList(averageColorFeature IN SI_AverageColor,

averageColorFeatureWeight IN DOUBLE PRECISION,

colorHistogramFeature IN SI_ColorHistogram,

colorHistogramFeatureWeight IN DOUBLE PRECISION,

positionalColorFeature IN SI_PositionalColor,

positionalColorFeatureWeight IN DOUBLE PRECISION,

textureFeature IN SI_Texture,

textureFeatureWeight IN DOUBLE PRECISION)

RETURN SI_FeatureList;

Description

Constructs an SI_FeatureList object. All the feature and feature weight attributes are set to the corresponding values of the input parameters.

Parameters

AvgClrFtr_SI
averageColorFeature

The average color of SI_FeatureList.

AvgClrFtrWght_SI
averageColorFeatureWeight

The average color weight of SI_FeatureList. The default value is 0.0. The weight value can range from 0.0 to 1.0. A value of 0.0 indicates that the feature is not to be considered during image matching.

ClrHstgrFtr_SI
colorHistogramFeature

The color histogram of SI_FeatureList.

ClrHstgrFtrWght_SI
colorHistogramFeatureWeight

The color histogram weight of SI_FeatureList. The default value is 0.0. The weight value can range from 0.0 to 1.0. A value of 0.0 indicates that the feature is not to be considered during image matching.

PstnlClrFtr_SI
positionalColorFeature

The positional color of SI_FeatureList.

PstnlClrFtrWght_SI
positionalColorFeatureWeight

The positional color weight of SI_FeatureList. The default value is 0.0. The weight value can range from 0.0 to 1.0. A value of 0.0 indicates that the feature is not to be considered during image matching.

TextureFtr_SI
textureFeature

The texture of SI_FeatureList.

TextureFtrWght_SI
textureFeatureWeight

The texture weight of SI_FeatureList. The default value is 0.0. The weight value can range from 0.0 to 1.0. A value of 0.0 indicates that the feature is not to be considered during image matching.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of these conditions are true:

  • The AvgClrFtr_SI attribute is not a NULL value and the AvgClrFtrWght_SI attribute value is NULL or less than zero.

  • The ClrHstgrFtr_SI attribute is not a NULL value and the ClrHstgrFtrWght_SI attribute value is NULL or less than zero.

  • The PstnlClrFtr_SI attribute is not a NULL value and the PstnlClrFtrWght_SI attribute value is NULL or less than zero.

  • The TextureFtr_SI attribute is not a NULL value and the TextureFtrWght_SI attribute value is NULL or less than zero.

Examples

None.

SI_FeatureList Methods

This section presents reference information on these SI_FeatureList methods, which are used for image matching:

SI_AvgClrFtr( )

Format

SI_AvgClrFtr( )

RETURN SI_AverageColor DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetAvgClrFtr(featureList IN SI_FeatureList)

RETURN SI_AverageColor DETERMINISTIC;

Description

Returns the value of the AvgClrFtr_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the AvgClrFtr_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_AvgClrFtr, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetAvgClrFtr, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_AvgClrFtrWght( )

Format

SI_AvgClrFtrWght( )

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetAvgClrFtrW(featureList IN SI_FeatureList)

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Returns the value of the AvgClrFtrWght_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the AvgClrFtrWght_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_AvgClrFtrWght, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetAvgClrFtrW, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_ClrHstgrFtr( )

Format

SI_ClrHstgrFtr( )

RETURN SI_ColorHistogram DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetClrHstgrFtr(featureList IN SI_FeatureList)

RETURN SI_ColorHistogram DETERMINISTIC;

Description

Returns the value of the ClrHstgrFtr_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the ColorHistogram_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_ClrHstgrFtr, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetClrHstgrFtr, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_ClrHstgrFtrWght( )

Format

SI_ClrHstgrFtrWght( )

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetClrHstgrFtrW(featureList IN SI_FeatureList)

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Returns the value of the ClrHstgrFtrWght_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the ClrHstgrFtrWght_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_ClrHstgrFtrWght, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetClrHstgrFtrW, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_PstnlClrFtr( )

Format

SI_PstnlClrFtr( )

RETURN SI_PositionalColor DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetPstnlClrFtr(featureList IN SI_FeatureList)

RETURN SI_PositionalColor DETERMINISTIC;

Description

Returns the value of the PstnlClrFtr_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the PstnlClrFtr_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_PstnlClrFtr, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetPstnlClrFtr, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_PstnlClrFtrWght( )

Format

SI_PstnlClrFtrWght( )

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetPstnlClrFtrW(featureList IN SI_FeatureList)

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Returns the value of the PstnlClrFtrWght_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the PstnlClrFtrWght_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_PstnlClrFtrWght, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetPstnlClrFtrW, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_Score( ) for SI_FeatureList

Format

SI_Score(image IN SI_StillImage)

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_ScoreByFtrList(featureList IN SI_FeatureList,

image IN SI_StillImage)

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Determines and returns the score of a specified image to a given SI_FeatureList value. The lower the returned score value, the better the image is characterized by the SI_FeatureList object used for scoring the image. The return score value is computed as follows:

Let n be the number of non-NULL feature attributes of the FeatureList object to which you are applying the method. For i ranging from 1 to n, let fi be the feature attribute and Wi be the value of the corresponding feature weight. The result is the sum of fi.SI_Score(image) * Wi divided by the sum of Wi. The process by which the score value is determined can also be described by the following expression:

Description of si_score_featurelist.gif follows
Description of the illustration si_score_featurelist.gif

A DOUBLE PRECISION value between 0 and 100 is returned. A value of 0 means that the image is identical to the feature list object. A value of 100 means that the image is completely different from the feature list object.

Parameters

featureList

The SI_FeatureList object to which the image is compared.

image

The image whose features are extracted and compared with the specified
SI_FeatureList object to get a score value.

Usage Notes

This method returns a NULL value if any of these conditions are true:

  • The feature list to which this method is applied is a NULL value.

  • The value of the specified image is NULL.

  • The values of AvgClrFtr_SI, ClrHstgrFtr_SI, PstnlClrFtr_SI, and TextureFtr_SI are all NULL.

  • The sum of all the feature weights, AvgClrFtrWght_SI, ClrHstgrFtrWght_SI, PstnlClrFtrWght_SI, and TextureFtrWght_SI is 0.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_SetFeature(averageColorFeature, averageColorFeatureWeight)

Format

SI_SetFeature(averageColorFeature IN SI_AverageColor,

averageColorFeatureWeight IN DOUBLE PRECISION);

Format of Equivalent SQL Procedure

SI_SetAvgClrFtr (featureList IN OUT NOCOPY SI_FeatureList,

averageColorFeature IN SI_AverageColor,

averageColorFeatureWeight IN DOUBLE PRECISION);

Description

Modifies the SI_AvgClrFtr and SI_AvgClrFtrWght attributes in the specified
SI_FeatureList object.

Parameters

averageColorFeature

The new average color value.

averageColorFeatureWeight

The new average color weight.

featureList

The SI_FeatureList object for which you want to update the averageColorFeature and averageColorFeatureWeight values.

Usage Notes

  • If the value of the averageColorFeature parameter is NULL, then the attribute AvgClrFtrWght_SI is set to zero and the value of the averageColorFeatureWeight parameter is disregarded.

  • An error is returned if the value of the averageColorFeature parameter is not a NULL value and the corresponding averageColorFeatureWeight parameter value is NULL or less than zero.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_SetFeature(colorHistogramFeature, colorHistogramFeatureWeight)

Format

SI_SetFeature(colorHistogramFeature IN SI_ColorHistogram,

colorHistogramFeatureWeight IN DOUBLE PRECISION);

Format of Equivalent SQL Procedure

SI_SetClrHstgrFtr (featureList IN OUT NOCOPY SI_FeatureList,

colorHistogramFeature IN SI_ColorHistogram,

colorHistogramFeatureWeight IN DOUBLE PRECISION);

Description

Modifies the ClrHstgrFtr_SI attribute and ClrHstgrFtrWght_SI attribute in the specified SI_FeatureList object.

Parameters

colorHistogramFeature

The new color histogram value.

colorHistogramFeatureWeight

The new color histogram weight value.

featureList

The SI_FeatureList object for which you want to update the colorHistogram and colorHistogramFeatureWeight attribute values.

Usage Notes

  • If the value of the colorHistogramFeature parameter is NULL, then the attribute ClrHstgrFtrWght_SI is set to zero and the value of the colorHistogramFeatureWeight parameter is disregarded.

  • An error is returned if the value of the colorHistogramFeature parameter is not a NULL value and the corresponding colorHistogramFeatureWeight parameter value is NULL or less than zero.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_SetFeature(positionalColorFeature, positionalColorFeatureWeight)

Format

SI_SetFeature(positionalColorFeature IN SI_PositionalColor,

positionalColorFeatureWeight IN DOUBLE PRECISION);

Format of Equivalent SQL Procedure

SI_SetPstnlClrFtr(featureList IN OUT NOCOPY SI_FeatureList,

positionalColorFeature IN SI_PositionalColor,

positionalColorFeatureWeight IN DOUBLE PRECISION);

Description

Modifies the PstnlClrFtr_SI and the PstnlClrFtrWght_SI attributes in the specified SI_FeatureList object.

Parameters

positionalColorFeature

The new positional color value.

positionalColorFeatureWeight

The new positional color weight value.

featureList

The SI_FeatureList object for which you want to update the positionalColor and positionalColorFeatureWeight attributes.

Usage Notes

  • If the value of the positionalColorFeature parameter is NULL, the attribute PstnlClrFtrWght_SI is set to zero and the value of the positionalColorFeatureWeight parameter is disregarded.

  • An error is returned if the value of the positionalColorFeature parameter is not NULL and the positionalColorFeatureWeight parameter value is NULL or less than zero.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_SetFeature(textureFeature, textureFeatureWeight)

Format

SI_SetFeature(textureFeature IN SI_Texture,

textureFeatureWeight IN DOUBLE PRECISION);

Format of Equivalent SQL Procedure

SI_SetTextureFtr(featureList IN OUT NOCOPY SI_FeatureList,

textureFeature IN SI_Texture,

textureFeatureWeight IN DOUBLE PRECISION);

Description

Modifies the TextureFtr_SI attribute and TextureFtrWght_SI attribute in the specified SI_FeatureList object.

Parameters

textureFeature

The new texture value.

textureFeatureWeight

The new texture weight value.

featureList

The SI_FeatureList object for which you want to update the textureFeature and textureFeatureWeight attributes.

Usage Notes

  • If the value of the textureFeature parameter is a NULL value and the attribute TextureFtrWght_SI is set to zero, then the value of the textureFeatureWeight parameter is disregarded.

  • An error is returned if the value of the textureFeature parameter is NULL and the textureFeatureWeight parameter value is NULL or less than zero.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_TextureFtr( )

Format

SI_TextureFtr( )

RETURN SI_Texture DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetTextureFtr (featureList IN SI_FeatureList)

RETURN SI_Texture DETERMINISTIC;

Description

Returns the value of the TextureFtr_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the TextureFtr_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_TextureFtr, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetTextureFtr, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_TextureFtrWght( )

Format

SI_TextureFtrWght( )

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetTextureFtrW(featureList in SI_FeatureList)

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Returns the value of the TextureFtrWght_SI attribute of the specified SI_FeatureList object.

Parameters

featureList

The SI_FeatureList object for which you want the TextureFtrWght_SI attribute returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_TextureFtrWght, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetTextureFtrW, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_PositionalColor Object Type

The SI_PositionalColor object represents the most significant color positions of an image. If an image is divided into n by m rectangles, positional color is a feature that characterizes the image by the n by m most significant colors of the rectangles. This object type is created in the ORDSYS schema with invoker's rights. It is declared as an INSTANTIABLE and NOT FINAL type. (See Internal Helper Types for the colorPositions attribute syntax.)

Note:

Use the SI_PositionalColor object constructor and method rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_PositionalColor object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
SI_ColorPositions  colorPositions,

where:

  • SI_ColorPositions: an array of SI_Color that represents the most significant color positions of an image.

SI_PositionalColor Constructor

This section describes the SI_PositionalColor object constructor, which is as follows:

SI_PositionalColor( )

Format

SI_PositionalColor(sourceImage IN SI_StillImage)

RETURN SELF AS RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_FindPstnlClr(sourceImage IN SI_StillImage)

RETURN SI_PositionalColor DETERMINISTIC;

Description

Constructs an SI_PositionalColor object from a specified image. The SI_ColorPositions array attribute is initialized with the most significant color values derived from the specified image.

To derive the SI_PositionalColor object, the image is assumed to be divided into n by m rectangles such that the product of n by m equals the value of SI_NumberSections. (Query the SI_VALUES view in SI_INFORMTN_SCHEMA for the value of SI_NumberSections.) The most significant color of each rectangle is determined. The array thus computed is the value of the SI_ColorPositions array attribute.

Parameters

sourceImage

Image whose positional color feature is extracted.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of these conditions are true:

  • The value of the sourceImage parameter is NULL.

  • The value of sourceImage.SI_Content is NULL.

  • The positional color feature is not supported for this image format.

You can determine whether the positional color feature is supported for an image format by querying the SI_IMAGE_FORMAT_FEATURES view or the SI_IMAGE_FRMT_FTRS view.

Examples

None.

SI_PositionalColor Method

This section presents reference information on the SI_PositionalColor method used for image matching, which is as follows:

SI_Score( ) for SI_PositionalColor

Format

SI_Score(image IN SI_StillImage)

RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_ScoreByPstnlClr(feature IN SI_PositionalColor,

image IN SI_StillImage),

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Determines and returns the score of the specified image when compared to the SI_PositionalColor object to which this method is applied. For scoring an image, that image is divided into n by m rectangles such that the product (m * n) equals SI_NumberSections. (Query the SI_VALUES view in SI_INFORMTN_SCHEMA for the value of SI_NumberSections.) The lower the returned value, the better the n by m most significant colors of the image are characterized by the most significant colors in SI_PositionalColor to which you apply this method.

This method returns a DOUBLE PRECISION value between 0 and 100, unless one of these conditions is true, in which case a NULL value is returned:

  • The value of the SI_PositionalColor object to which you apply this method is NULL.

  • The value of the image parameter is NULL.

  • The value of image.content_SI attribute is NULL.

  • The positional color feature is not supported for the specified image.

Parameters

feature

The positional color to be compared with the positional color of the specified image.

image

The image whose positional color feature is extracted and used for comparison.

Usage Notes

None.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_StillImage Object Type

The SI_StillImage object type represents digital images with inherent image characteristics such as height, width, format, and so on. It is created in the ORDSYS schema with invoker's rights and it is declared as INSTANTIABLE and NOT FINAL.

Note:

Use the SI_StillImage constructors and methods rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_StillImage object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
content_SI           ORDSYS.ORDSOURCE,
contentLength_SI     INTEGER,
format_SI            VARCHAR2(4000),
height_SI            INTEGER,
width_SI             INTEGER,

-- Oracle attribute extensions

mimeType_ora          VARCHAR2(4000),
contentFormat_ora     VARCHAR2(4000),
compressionFormat_ora VARCHAR2(4000),
-- Flag to
retainFeatures_SI     INTEGER,

-- Oracle extension attributes to cache image features

averageColorSpec_ora SI_Color,
colorsList_ora       colorsList,
frequenciesList_ora  colorFrequenciesList,
colorPositions_ora   colorPositions,
textureEncoding_ora  textureEncoding,

where:

  • content_SI: an ORDSource object that contains the binary image or BLOB. (SQL/MM specifies the SI_Content attribute as a BLOB.)

  • contentLength_SI: the content length of the image, in bytes.

  • format_SI: the image format.

  • height_SI: the number of lines of the image.

  • width_SI: the number of columns of the image.

  • mimeType_ora: the MIME type information. (This is an Oracle extension to the SQL/MM Still Image standard.)

  • contentFormat_ora: the type of image (monochrome and so on). (This is an Oracle extension to the SQL/MM Still Image standard.)

  • compressionFormat_ora: the compression algorithm used on the image data. (This is an Oracle extension to the SQL/MM Still Image standard.)

  • retainFeatures_SI: a flag that indicates whether to extract and cache image features.

  • averageColorSpec_ora: the cached SI_Color object.

  • colorsList_ora: the cached array of colors.

  • frequenciesList_ora: the cached array of color frequencies.

  • colorPositions_ora: the cached array of color positions.

  • textureEncoding_ora: the cached array of textures.

SI_StillImage Constructors

This section describes these SI_StillImage object constructors:

Note:

To construct SI_StillImage objects, Oracle strongly recommends that you use one of the constructors in the previous list, not the default SI_StillImage object constructor.

SI_StillImage(content)

Format

SI_StillImage(content IN BLOB)

RETURN SELF as RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_MkStillImage1(content in BLOB)

RETURN SI_StillImage DETERMINISTIC;

Description

Returns a new SI_StillImage object. This constructor initializes the SI_StillImage attributes as follows:

  • content_SI.localData is initialized with the specified image.

  • contentLength_SI is initialized with the length of the image extracted from the specified image.

  • format_SI is initialized with the format of image extracted from the specified image.

  • height_SI is initialized with the height of image extracted from the specified image.

  • width_SI is initialized with the width of image extracted from the specified image.

Parameters

content

The image data.

Pragmas

None.

Exceptions

ORDImageSIExceptions.NULL_CONTENT

This exception is raised if the content parameter is NULL.

See Appendix G for more information about this exception.

Usage Notes

None.

Examples

None.

SI_StillImage(content, explicitFormat)

Format

SI_StillImage(content IN BLOB,

explicitFormat IN VARCHAR2)

RETURN SELF as RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_MkStillImage2(content in BLOB, explicitFormat in VARCHAR2)

RETURN SI_StillImage DETERMINISTIC;

Description

Constructs an SI_StillImage object from a specified image and a format. This constructor lets you specify the image format when the specified image is in an unsupported image format. Query the SI_IMAGE_FORMATS view in SI_INFORMTN_SCHEMA for a list of the supported image formats.

This constructor initializes the SI_StillImage attributes as follows:

  • content_SI.localData is initialized with the specified image.

  • contentLength_SI is initialized with the length of the image extracted from the specified image.

  • format_SI is initialized with the specified image format.

  • height_SI is initialized with the height of the image extracted from the specified image. If the constructor function is not able to extract the height value from the specified image, then you can assign a height value to the height_SI attribute -- for example: myImage.height_SI := height.

  • width_SI is initialized with the width of the image extracted from the specified image. If the constructor function is not able to extract the width value from the specified image, then you can assign a width value to the width_SI attribute -- for example: myImage.width_SI := width.

Parameters

content

The image data.

explicitFormat

The format Oracle Multimedia to use if the specified image is in an unsupported image format.

Pragmas

None.

Exceptions

ORDImageSIExceptions.NULL_CONTENT

This exception is raised if the content parameter is NULL.

See Appendix G for more information about this exception.

Usage Notes

An error is returned if the explicitFormat parameter is a NULL value, or if either of these statements is true:

  • The explicitFormat parameter value is a supported format, but it is not equivalent to the format extracted from the specified image.

  • The explicitFormat parameter value is an unsupported format, but the format extracted from the specified image is not a NULL value.

The following table presents values for the explicitFormat parameter and the actual image format, and whether that combination of values results in an error. A image format of NULL indicates that the format cannot be extracted from the image.

explicitFormat Image Format Error Returned?
GIF (a supported format) GIF No
GIF (a supported format) JPEG Yes
xyz (an unsupported format) GIF Yes
xyz (an unsupported format) Null No

Examples

None.

SI_StillImage(content, explicitFormat, height, width)

Format

SI_StillImage(content IN BLOB,

explicitFormat IN VARCHAR2,

height IN INTEGER,

width IN INTEGER)

RETURN SI_STILLIMAGE as RESULT DETERMINISTIC;

Format of Equivalent SQL Function

ora_SI_MkStillImage(content IN BLOB)

explicitFormat IN VARCHAR2,

height IN INTEGER,

width IN INTEGER)

RETURN SI_StillImage DETERMINISTIC;

Description

Constructs an SI_StillImage value from a specified image. This constructor lets you specify the image format, height, and width when the specified image is an unsupported image format. Query the SI_IMAGE_FORMATS view in SI_INFORMTN_SCHEMA for a list of the supported image formats.

This constructor and its equivalent SQL function are Oracle extensions to the SQL/MM Still Image standard.

This constructor initializes the SI_StillImage attributes as follows:

  • content_SI.localData is initialized with the specified image.

  • contentLength_SI is initialized with the length of the image extracted from the specified image.

  • format_SI is initialized with the specified format.

  • height_SI is initialized with the specified height if the height cannot be extracted from the specified image.

  • width_SI is initialized with the specified width if the width cannot be extracted from the specified image.

Parameters

content

The image data.

explicitFormat

The format for Oracle Multimedia to use if the image is in an unsupported format.

height

The value for the height_SI attribute for Oracle Multimedia to use if the image is in an unsupported format.

width

The value for the width_SI attribute for Oracle Multimedia to use if the image is in an unsupported format.

Pragmas

None.

Exceptions

ORDImageSIExceptions.ILLEGAL_HEIGHT_WIDTH_SPEC

This exception is raised if the value of the height or width parameter is NULL or is a negative value.

ORDImageSIExceptions.NULL_CONTENT

This exception is raised if the content parameter is NULL.

See Appendix G for more information about these exceptions.

Usage Notes

An error message is returned if the explicitFormat parameter value is a NULL value, or if either of these statements is true:

  • The explicitFormat parameter value is a supported format, but it is not equivalent to the format extracted from the image.

  • The explicitFormat parameter value is an unsupported format, but the format extracted from the image is not a NULL value.

The following table presents values for the explicitFormat parameter and the actual image format, and whether that combination of values results in an error. An image format of NULL indicates that the format cannot be extracted from the image.

explicitFormat Image Format Error Returned?
GIF (a supported format) GIF No
GIF (a supported format) JPEG Yes
xyz (an unsupported format) GIF Yes
xyz (an unsupported format) Null No

Examples

None.

SI_StillImage Methods

This section presents reference information on these SI_StillImage methods, which are used for image data manipulation:

SI_ClearFeatures( )

Format

SI_ClearFeatures( );

Description

Disables image feature caching and sets the value of all internal image feature attributes to NULL. You can call this method to remove the processing overhead associated with feature synchronization if you are not performing image matching. This method does nothing for unsupported image formats.

This method is not in the first edition of the SQL/MM Still Image standard, but has been accepted for inclusion in the next version.

Parameters

None.

Usage Notes

None.

Pragmas

None

Exceptions

None.

Examples

None.

SI_InitFeatures( )

Format

SI_InitFeatures( );

Description

Extracts the image features and caches them in the SI_StillImage object. This method must be called once, after which SI_StillImage manages the image features such that every time the image is processed, new image features are automatically extracted. This method is recommended for image-matching users.

This method is not in the first edition of the SQL/MM Still Image standard, but has been accepted for inclusion in the next version.

Parameters

None.

Usage Notes

  • The performance impacts associated with image feature caching are:

    • Image processing methods such as SI_SetContent and SI_ChangeFormat are slower.

    • Image matching methods such as SI_Score are faster.

  • Image feature extraction and caching are not available for unsupported image formats.

Pragmas

None.

Exceptions

ORDImageSIExceptions.UNSUPPORTED_IMAGE_FORMAT

This exception is raised if this method is invoked on an unsupported image format.

See Appendix G for more information about this exception.

Examples

None.

SI_ChangeFormat( )

Format

SI_ChangeFormat(targetFormat IN VARCHAR2);

Format of Equivalent SQL Procedure

SI_ConvertFormat(image IN OUT NOCOPY SI_StillImage,

targetFormat IN VARCHAR2);

Description

Converts the format of an SI_StillImage object and adjusts the affected attributes as follows:

  • content_SI is converted to the value specified with the targetFormat parameter.

  • contentLength_SI is updated with the new image length extracted from the content_SI attribute.

  • format_SI is set equal to the targetFormat parameter value.

  • height_SI is updated with the new height extracted from the content_SI attribute.

  • width_SI is updated with the new width extracted from the content_SI attribute.

Parameters

image

The image whose content you want to convert.

targetFormat

The format to which you want the image to be converted.

Usage Notes

An error message is returned if any of these conditions are true:

  • The value of the format_SI attribute is NULL.

  • The value of the targetFormat parameter is NULL.

  • The conversion from format_SI to targetFormat is not supported. (Oracle Multimedia determines this by looking up the values in the SI_IMAGE_FORMAT_CONVERSIONS view or the SI_FORMAT_CONVRSNS view in SI_INFORMTN_SCHEMA.)

Pragmas

None.

Exceptions

None.

Examples

None.

SI_Content( )

Format

SI_Content ( )

RETURN BLOB DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetContent(image IN SI_StillImage)

RETURN BLOB DETERMINISTIC;

Description

Returns the BLOB stored in the content_SI attribute of the SI_StillImage object to which this method is applied.

Parameters

None.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_Content, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetContent, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_ContentLength( )

Format

SI_ContentLength ( )

RETURN INTEGER DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetContentLngth(image IN SI_StillImage)

RETURN INTEGER DETERMINISTIC;

Description

Returns the value (in bytes) of the contentLength_SI attribute of the specified
SI_StillImage object.

Parameters

image

The image for which the content length is returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_ContentLength, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetContentLngth, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_Format( )

Format

SI_Format ( )

RETURN VARCHAR2 DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetFormat(image IN SI_StillImage)

RETURN VARCHAR2 DETERMINISTIC;

Description

Returns the value of the format_SI attribute (such as TIFF or JFIF) of the
SI_StillImage object to which this method is applied.

Parameters

None.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_Format, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetFormat, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_Height( )

Format

SI_Height ( )

RETURN INTEGER DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetHeight(image IN SI_StillImage)

RETURN INTEGER DETERMINISTIC;

Description

Returns the value of the height_SI attribute (in pixels) of the SI_StillImage object to which this method is applied.

Parameters

image

The image for which the height is returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_Height, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetHeight, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_RetainFeatures( )

Format

SI_RetainFeatures( );

RETURN BOOLEAN DETERMINISTIC;

Description

Returns a Boolean value (TRUE or FALSE) to indicate whether to extract and cache image features.

This method is not in the first edition of the SQL/MM Still Image standard, but has been accepted for inclusion in the next version.

Parameters

None.

Usage Notes

None.

Method Pragma

PRAGMA RESTRICT_REFERENCES(WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_SetContent( )

Format

SI_SetContent(content IN BLOB);

Format of Equivalent SQL Procedure

SI_ChgContent(image IN OUT NOCOPY SI_StillImage,

content IN BLOB);

Description

Updates the content of an SI_StillImage object. It sets the values of these attributes:

  • content_SI is updated with the value specified with the specified image.

  • contentLength_SI is updated with the new content length extracted from the specified image.

  • height_SI is updated with the new height extracted from the specified image.

  • width_SI is updated with the new width extracted from the specified image.

Parameters

content

The image data. The format of this image data must be the same as the format of the current image.

image

The image whose content you want to update.

Usage Notes

None.

Pragmas

None.

Exceptions

ORDImageSIExceptions.NULL_CONTENT

This exception is raised if the content parameter is NULL.

See Appendix G for more information about this exception.

Examples

None.

SI_Thumbnail( )

Format

SI_Thumbnail ( )

RETURN SI_StillImage;

Format of Equivalent SQL Function

SI_GetThmbnl (image IN SI_StillImage)

RETURN SI_StillImage;

Description

Derives a thumbnail image from the specified SI_StillImage object. The default thumbnail size is 80 by 80 pixels. Because this method preserves the image aspect ratio, the resulting thumbnail size is as close to 80 by 80 pixels as possible.

Parameters

image

The image for which you want to generate a thumbnail image.

Usage Notes

None.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_Thumbnail(height,width)

Format

SI_Thumbnail(height IN INTEGER, width IN INTEGER)

RETURN SI_StillImage DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetSizedThmbnl(image IN SI_StillImage,

height IN INTEGER,

width IN INTEGER)

RETURN SI_StillImage DETERMINISTIC;

Description

Derives a new thumbnail image from the specified SI_StillImage object using the height and width that you specify. This method does not preserve the aspect ratio.

Parameters

height

The height for Oracle Multimedia to use for the thumbnail image.

image

The image for which you want to generate a thumbnail image.

width

The width for Oracle Multimedia to use for the thumbnail image.

Usage Notes

To preserve the aspect ratio, supply the appropriate height and width values. To obtain the appropriate height and width values, multiply the image height and width values by the required scaling factor. For example, if an image size is 100 by 100 pixels and the resulting thumbnail image must be one fourth of the original image, then the height argument must be 100 divided by 2 and the width argument must be 100 divided by 2. The resulting thumbnail image would be 50 by 50 pixels, and the aspect ratio would be preserved.

Pragmas

None.

Exceptions

None.

Examples

None.

SI_Width( )

Format

SI_Width ( )

RETURN INTEGER DETERMINISTIC;

Format of Equivalent SQL Function

SI_GetWidth(image IN SI_StillImage)

RETURN INTEGER DETERMINISTIC;

Description

Returns the value of the width_SI attribute (in pixels) of the SI_StillImage object to which this method is applied.

Parameters

image

The image for which the width is returned.

Usage Notes

None.

Method Pragmas

PRAGMA RESTRICT_REFERENCES(SI_Width, WNDS, WNPS, RNDS, RNPS)

Function Pragmas

PRAGMA RESTRICT_REFERENCES(SI_GetWidth, WNDS, WNPS, RNDS, RNPS)

Exceptions

None.

Examples

None.

SI_Texture Object Type

Describes the image texture characteristics by the size of repeating items (coarseness), brightness variations (contrast), and predominant direction (directionality). This object type is created in the ORDSYS schema with invoker's rights. It is declared as an INSTANTIABLE and NOT FINAL type. (See Internal Helper Types for the textureEncoding attribute syntax.)

Note:

Use the SI_Texture constructor and method rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_Texture object.

The attributes for this object type are defined as follows in the ordisits.sql file:

-------------------
-- TYPE ATTRIBUTES
-------------------
SI_TextureEncoding  textureEncoding,

where:

  • SI_TextureEncoding: a varray that represents the image texture characteristics such as coarseness, contrast, and directionality.

SI_Texture Constructor

This section describes the SI_Texture object constructor, which is as follows:

SI_Texture( )

Format

SI_Texture(sourceImage IN SI_StillImage)

RETURN SELF AS RESULT DETERMINISTIC;

Format of Equivalent SQL Function

SI_FindTexture(sourceImage IN SI_StillImage)

RETURN SI_Texture DETERMINISTIC;

Description

Constructs an SI_Texture object from the specified image.

Parameters

sourceImage

The image whose texture feature is being extracted.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of these conditions are true:

  • The value of specified image is NULL.

  • The value of sourceImage.SI_Content is NULL.

  • The texture feature is not supported for the format of the specified image. This is determined by looking up the SI_IMAGE_FORMAT_FEATURES view or SI_IMAGE_FRMT_FTRS view.

Examples

None.

SI_Texture Method

This section presents reference information on the SI_Texture method used for image matching, which is as follows:

SI_Score( ) for SI_Texture

Format

SI_Score(image IN SI_StillImage)RETURN DOUBLE PRECISION DETERMINISTIC;

Format of Equivalent SQL Function

SI_ScoreByTexture(feature IN SI_Texture,

image IN SI_StillImage),

RETURN DOUBLE PRECISION DETERMINISTIC;

Description

Determines and returns the score of the specified image as compared to the SI_Texture object to which you are applying the method. The lower the returned value, the better the texture of the image is characterized by the SI_Texture value used for scoring the image. This method returns a DOUBLE PRECISION value between 0 and 100, unless one of these conditions is true, in which case a NULL value is returned:

  • The value of the SI_Texture object to which you apply this method is NULL.

  • The value of the specified image is NULL.

  • The value of image.SI_Contents is NULL.

  • The texture feature is not supported for the specified image.

Parameters

feature

The feature value to be compared with the texture of the specified image.

image

The image whose texture feature is extracted and used for score comparison.

Usage Notes

None.

Pragmas

None.

Exceptions

None.

Examples

None.

Views

The schema, SI_INFORMTN_SCHEMA, contains several views that identify the supported image formats and implementation-defined values. The SELECT privilege is granted to PUBLIC for these views. The views are:

  • SI_IMAGE_FORMATS

  • SI_IMAGE_FORMAT_CONVERSIONS

  • SI_IMAGE_FORMAT_FEATURES

  • SI_THUMBNAIL_FORMATS

  • SI_VALUES

The column names, data types, and a description is provided for each of these views in the tables that follow.

Table I-1 describes the SI_IMAGE_FORMATS view. This view identifies the supported image formats.

Table I-1 SI_IMAGE_FORMATS View

Column Name Data Type Description

SI_FORMAT

VARCHAR2(SI_MaxFormatLength)

A list of the supported image formats.


Table I-2 describes the SI_IMAGE_FORMAT_CONVERSIONS view. This view identifies the source and target image formats for which an image format conversion is supported. The short name for this view is SI_IMAGE_FORMAT_CONVRSNS.

Table I-2 SI_IMAGE_FORMAT_CONVERSIONS View

Column Name Data Type Description

SI_SOURCE_FORMAT

VARCHAR2(SI_MaxFormatLength)

The format of the source image.

SI_TARGET_FORMAT

VARCHAR2(SI_MaxFormatLength)

The format of the target image.


Table I-3 describes the SI_IMAGE_FORMAT_FEATURES view. This view identifies the image formats for which a basic feature is supported. The short name for this view is SI_IMAGE_FRMT_FTRS.

Table I-3 SI_IMAGE_FORMAT_FEATURES View

Column Name Data Type Description

SI_FORMAT

VARCHAR2(SI_MaxFormatLength)

The format name.

SI_FEATURE_NAME

VARCHAR2(100)

The basic feature name that is supported by the named format. Value can be any of these:

  • SI_AverageColor

  • SI_Texture

  • SI_PositionalColor

  • SI_ColorHistogram


Table I-4 describes the SI_THUMBNAIL_FORMATS view. This view identifies the image formats from which thumbnail images can be derived. The short name for this view is SI_THUMBNAIL_FRMTS.

Table I-4 SI_THUMBNAIL_FORMATS View

Column Name Data Type Description

SI_FORMAT

VARCHAR2(SI_MaxFormatLength)

The formats from which a thumbnail image can be derived.


Table I-5 describes the SI_VALUES view. This view identifies the implementation-defined values.

Table I-5 SI_VALUES View

Column Name Data Type Description

SI_VALUE

VARCHAR2(
SI_MaxFormatLength)

The implementation-defined meta-variables. The SI_VALUES view has 8 rows where each row has one of these SI_VALUE column values:

  • SI_MaxContentLength is the maximum length for the binary representation of the SI_StillImage attribute.

  • SI_MaxFeatureNameLength is the maximum length for the character representation of a basic image feature name.

  • SI_MaxFormatLength is the maximum length for the character representation of an image format indication.

  • SI_MaxHistogramLength is the maximum number of color/frequency pairs that are admissible in an SI_ColorHistogram feature value.

  • SI_MaxRGBColor is the maximum value for each component of a color value that is represented by the RGB color space.

  • SI_MaxTextureLength is the number of bytes needed for the encoded representation of an SI_Texture object.

  • SI_MaxValueLength is the maximum length for the character representation (name) of the meta-variables in the SI_VALUES view.

  • SI_NumberSections is the number of most significant color values that are represented by the SI_PositionalColor value.

SI_SUPPORTED_VALUE

NUMBER(38)

A column with these values:

  • 0

    If the implementation places no limit on the meta-variable defined by SI_VALUE column or cannot determine the limit.

  • NULL

    If the implementation does not support any features for which the meta-variable is applicable.

  • Any non-NULL, nonzero value

    The maximum size supported by the implementation for this meta-variable.