Skip Headers
Oracle® Multimedia Reference
11g Release 1 (11.1)

Part Number B28414-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

I SQL/MM Still Image

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

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

This chapter also includes the following topics:

See 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 rights. A public synonym with the corresponding function or procedure name is created for all SQL functions and procedures. Therefore, you do not need to 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.


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 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 AverageColor object type is defined as follows:

CREATE OR REPLACE TYPE SI_AverageColor
  AUTHID CURRENT_USER
  AS OBJECT
 (
-------------------
-- TYPE ATTRIBUTES
-------------------
SI_AverageColorSpec SI_Color,
---------------------
-- METHOD DECLARATION
---------------------
-- CONSTRUCTORS
--
CONSTRUCTOR FUNCTION SI_AverageColor
(sourceImage IN SI_StillImage)
RETURN SELF AS RESULT DETERMINISTIC,

CONSTRUCTOR FUNCTION SI_AverageColor
(SI_AverageColorSpec IN SI_Color)
     return SELF AS RESULT DETERMINISTIC,

-- Methods associated with the source attribute
MEMBER FUNCTION SI_Score
(image in SI_StillImage)
 RETURN DOUBLE PRECISION DETERMINISTIC
) INSTANTIABLE
  NOT FINAL;
/

where:


SI_AverageColor Constructors

This section describes the SI_AverageColor object constructors, which are the following:


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 the following conditions are true:

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 the following conditions are true:

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 the following is true:

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 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 SI_Color object is defined as follows:

CREATE OR REPLACE TYPE SI_Color
  AUTHID CURRENT_USER
  AS OBJECT
 (
-------------------
-- TYPE ATTRIBUTES
-------------------
redValue   INTEGER,
greenValue INTEGER,
blueValue  INTEGER,
---------------------
-- METHOD DECLARATION
---------------------
MEMBER PROCEDURE SI_RGBColor
 (redValue   IN INTEGER,
  greenValue IN INTEGER,
 blueValue  IN INTEGER)
) INSTANTIABLE
NOT FINAL;

where:


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

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 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 SI_ColorHistogram object is defined as follows:

CREATE OR REPLACE TYPE SI_ColorHistogram
  AUTHID CURRENT_USER
  AS OBJECT
  (
-------------------
-- TYPE ATTRIBUTES
-------------------
SI_ColorsList       colorsList,
SI_FrequenciesList  colorFrequenciesList,
---------------------
-- METHOD DECLARATION
---------------------
-- CONSTRUCTORS
CONSTRUCTOR FUNCTION SI_ColorHistogram
    (sourceImage IN SI_StillImage)
     RETURN SELF AS RESULT DETERMINISTIC,
CONSTRUCTOR FUNCTION SI_ColorHistogram
    (firstColor IN SI_Color,
     frequency  IN DOUBLE PRECISION)
     RETURN SELF AS RESULT DETERMINISTIC,
CONSTRUCTOR FUNCTION SI_ColorHistogram
    (SI_ColorsList       IN colorsList,
     SI_FrequenciesList  IN colorFrequenciesList)
     RETURN SELF AS RESULT DETERMINISTIC,
MEMBER PROCEDURE SI_Append
    (color     IN SI_Color,
     frequency IN DOUBLE PRECISION),
MEMBER FUNCTION SI_Score
     (image    IN SI_StillImage)
RETURN DOUBLE PRECISION DETERMINISTIC
) INSTANTIABLE
  NOT FINAL;
/

where:


SI_ColorHistogram Constructors

This section describes the SI_ColorHistogram object constructors, which are the following:


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. The following attributes are initialized:

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 any one of the following conditions is true:

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. The following attributes are initialized:

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 the following conditions is true:

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. The following attributes are initialized:

Parameters

sourceImage

The image from which the color histogram is extracted.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of the following conditions is true:

To determine whether or not 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 the SI_ColorHistogram methods used for color histogram construction and image matching, which are the following:


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 any one of the following conditions is true:

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 any one of the following is true:

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 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 SI_FeatureList object type is defined as follows:

CREATE OR REPLACE TYPE SI_FeatureList
  AUTHID CURRENT_USER
  AS OBJECT
  (
   --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,
     --
     --
     --Methods
CONSTRUCTOR FUNCTION 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)
     return SELF AS RESULT DETERMINISTIC,
     --
     --
MEMBER PROCEDURE SI_SetFeature
     (averageColorFeature         IN  SI_AverageColor,
     averageColorFeatureWeight    IN  DOUBLE PRECISION),
     --
MEMBER PROCEDURE SI_SetFeature
    (colorHistogramFeature        IN  SI_ColorHistogram,
     colorHistogramFeatureWeight  IN  DOUBLE PRECISION),
    --
MEMBER PROCEDURE SI_SetFeature
    (positionalColorFeature       IN  SI_PositionalColor,
     positionalColorFeatureWeight IN  DOUBLE PRECISION),
    --
MEMBER PROCEDURE SI_SetFeature
    (textureFeature               IN  SI_Texture,
     textureFeatureWeight         IN  DOUBLE PRECISION),
     --
MEMBER FUNCTION SI_Score
     (image IN SI_StillImage)
      RETURN DOUBLE PRECISION DETERMINISTIC,
      --
MEMBER FUNCTION SI_AvgClrFtr( )
     RETURN SI_AverageColor DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_AvgClrFtr, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_AvgClrFtrWght( )
     RETURN DOUBLE PRECISION DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_AvgClrFtrWght, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_ClrHstgrFtr( )
     RETURN SI_ColorHistogram DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_ClrHstgrFtr, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_ClrHstgrFtrWght( )
     RETURN DOUBLE PRECISION DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_ClrHstgrFtrWght, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_PstnlClrFtr( )
     RETURN SI_PositionalColor DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_PstnlClrFtr, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_PstnlClrFtrWght( )
     RETURN DOUBLE PRECISION DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_PstnlClrFtrWght, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_TextureFtr( )
     RETURN SI_Texture DETERMINISTIC,
     PRAGMA RESTRICT_REFERENCES(SI_TextureFtr, WNDS, WNPS, RNDS, RNPS),
     --
MEMBER FUNCTION SI_TextureFtrWght( )
   RETURN DOUBLE PRECISION DETERMINISTIC,
   PRAGMA RESTRICT_REFERENCES(SI_TextureFtrWght, WNDS, WNPS, RNDS, RNPS)
   --  
)
INSTANTIABLE
NOT FINAL;
/

where:


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 should not 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 should not 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 should not 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 should not be considered during image matching.

Pragmas

None.

Exceptions

None.

Usage Notes

An error is returned if any of the following conditions is true:

Examples

None.


SI_FeatureList Methods

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


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 will be 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 the following conditions is true:

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

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

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

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

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 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 SI_PositionalColor object is defined as follows:

CREATE OR REPLACE TYPE SI_PositionalColor
  AUTHID CURRENT_USER
  AS OBJECT
  (
     --attributes
     SI_ColorPositions  colorPositions,
     --
     --Methods
     CONSTRUCTOR FUNCTION SI_PositionalColor
     (sourceImage IN SI_StillImage)
     RETURN SELF AS RESULT DETERMINISTIC,
     --
     MEMBER FUNCTION SI_Score
      (image IN SI_StillImage),
     RETURN DOUBLE PRECISION DETERMINISTIC
) INSTANTIABLE
  NOT FINAL;
/

where:


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 is equal to 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 the following conditions is true:

You can determine whether or not 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) is equal to 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 any one of the following is true, in which case a NULL value is returned:

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 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.

This object type is defined as follows:

CREATE OR REPLACE TYPE SI_StillImage
AUTHID CURRENT_USER
AS OBJECT
(
-------------------
-- 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,
-- METHOD DECLARATION
---------------------
-- CONSTRUCTORS
--
CONSTRUCTOR FUNCTION
SI_StillImage(content IN BLOB) RETURN SELF as RESULT DETERMINISTIC,
CONSTRUCTOR FUNCTION
SI_StillImage(content IN BLOB, 
              explicitFormat IN VARCHAR2  
              ) RETURN SELF AS RESULT DETERMINISTIC,
CONSTRUCTOR FUNCTION
SI_StillImage(content IN BLOB, 
              explicitFormat IN VARCHAR2, 
              height IN INTEGER, 
              width IN INTEGER)  RETURN SELF as RESULT DETERMINISTIC,
              
-- Accessor methods for StillImage attributes 
MEMBER FUNCTION SI_Height RETURN INTEGER DETERMINISTIC,
PRAGMA RESTRICT_REFERENCES(SI_Height, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION SI_Width RETURN INTEGER DETERMINISTIC,
PRAGMA RESTRICT_REFERENCES(SI_Width, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION SI_Format RETURN VARCHAR2 DETERMINISTIC,
PRAGMA RESTRICT_REFERENCES(SI_Format, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION SI_Content RETURN BLOB DETERMINISTIC,
PRAGMA RESTRICT_REFERENCES(SI_Content, WNDS, WNPS, RNDS, RNPS),

MEMBER FUNCTION SI_ContentLength RETURN INTEGER DETERMINISTIC,
PRAGMA RESTRICT_REFERENCES(SI_ContentLength, WNDS, WNPS, RNDS, RNPS),

--Accessor method for retainFeatures_SI attribute
MEMBER FUNCTION SI_retainFeatures return BOOLEAN DETERMINISTIC,
PRAGMA RESTRICT_REFERENCES(SI_retainFeatures, WNDS, WNPS, RNDS, RNPS),
-- Methods associated with image processing
MEMBER PROCEDURE SI_SetContent(content IN BLOB),
MEMBER PROCEDURE SI_ChangeFormat(targetFormat IN VARCHAR2),
MEMBER FUNCTION SI_Thumbnail( )
                     return SI_StillImage DETERMINISTIC,
MEMBER FUNCTION SI_Thumbnail(height IN INTEGER, 
                              width IN INTEGER)
                     return SI_StillImage DETERMINISTIC,
-- Methods associated with the Oracle extension for image feature caching
MEMBER PROCEDURE   SI_InitFeatures,
MEMBER PROCEDURE   SI_ClearFeatures
) INSTANTIABLE
NOT FINAL;
/

where:


SI_StillImage Constructors

This section describes the SI_StillImage object constructors, which are the following:

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:

Parameters

content

The image data.

Pragmas

None.

Exceptions

ORDImageSIExceptions.NULL_CONTENT

This exception is raised if the content parameter is NULL.

See Appendix H 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:

Parameters

content

The image data.

explicitFormat

The format that you want 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 H for more information about this exception.

Usage Notes

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

The following table presents values for the explicitFormat parameter and the actual image format, and whether or not that combination of values will result 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:

Parameters

content

The image data.

explicitFormat

The format that you want Oracle Multimedia to use if the image is in an unsupported format.

height

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

width

The value for the width_SI attribute that you want 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 H 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 the following statements is true:

The following table presents values for the explicitFormat parameter and the actual image format, and whether or not that combination of values will result 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 the SI_StillImage methods used for image data manipulation, which are the following:


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 needs to be called once, after which SI_StillImage will manage the image features such that every time the image is processed, new image features will automatically be 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

Pragmas

None.

Exceptions

ORDImageSIExceptions.UNSUPPORTED_IMAGE_FORMAT

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

See Appendix H 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:

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 the following is true:

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 or not image features will be extracted and cached.

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 the following attributes:

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 H 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 will be 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 that you want Oracle Multimedia to use for the thumbnail image.

image

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

width

The width that you want 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 needs to be one fourth of the original image, then the height argument should be 100 divided by 2 and the width argument should 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 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 SI_Texture object is described as follows:

CREATE OR REPLACE TYPE SI_Texture
  AUTHID CURRENT_USER
  AS OBJECT
  (
     --attributes
     SI_TextureEncoding  textureEncoding,
     --Methods
     CONSTRUCTOR FUNCTION SI_Texture
     (sourceImage IN SI_StillImage)
     RETURN SELF AS RESULT DETERMINISTIC,
     --
     MEMBER FUNCTION SI_Score
      (SELF  IN SI_Texture,
       image IN SI_StillImage)
     RETURN DOUBLE PRECISION DETERMINISTIC
) INSTANTIABLE
  NOT FINAL;
/

where:


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 the following conditions is true:

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 any one of the following is true, in which case a NULL value is returned:

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 privilege set on these views is PUBLIC WITH GRANT OPTION. The views are:

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 the following:

  • 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 the following 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 the following 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.



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 the following: