Oracle® Multimedia Reference 11g Release 1 (11.1) Part Number B28414-01 |
|
|
View PDF |
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):
Describes the average color feature of an image.
Encapsulates color values of a digitized image.
Describes the relative frequencies of the colors exhibited by samples of an image.
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.
Represents digital images with inherent image characteristics such as height, width, format, and so on.
Describes the texture feature of the image characterized by the size of repeating items (coarseness), brightness variations (contrast), and predominant direction (directionality).
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:
Provides an overview of how the SQL functions and procedures are presented in this guide, as well as how they are created.
Describes the views in the SI_INFORMTN_SCHEMA that you can query for information about the supported image formats and implementation-defined values.
Provides syntax for attributes that are VARRAY types.
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.
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.
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_AverageColorSpec: the average color of the object.
This section describes the SI_AverageColor object constructors, which are the following:
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
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:
The value of the specified averageColorSpec is NULL.
The value of the specified averageColorSpec is not a valid SI_Color value.
Examples
None.
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 the illustration si_averagecolor.gif
Parameters
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:
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.
This section presents reference information on the SI_AverageColor method used for image matching:
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
The image whose average color feature is compared with the SI_AverageColor object instance to which you apply this method.
An SI_AverageColor value.
Usage Notes
This method returns a NULL value if any of the following is 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.
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:
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.
This section presents reference information on the SI_Color method used for constructing an SI_Color object using RGB color values:
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
An integer value between 0 and 255.
An integer value between 0 and 255.
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, the need to use the system default constructor.
The default constructor does not perform any argument validation. By calling the SI_RGBColor method, specified values will be 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.
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_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.
This section describes the SI_ColorHistogram object constructors, which are the following:
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:
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
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.
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:
Any one of the specified values is NULL.
Any one of the specified frequency values is less than 0 or greater than 100.
Examples
None.
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:
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
A color value of SI_ColorHistogram.
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:
Any one of the specified values is NULL.
The frequency specified is less than 0 or greater than 100.
Examples
None.
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:
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
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:
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 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.
This section presents reference information on the SI_ColorHistogram methods used for color histogram construction and image matching, which are the following:
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
The color value to be added to the histogram.
The corresponding frequency value of the specified color that is to be added to the histogram.
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:
Any of the specified values is NULL.
The frequency is less than 0 or greater than 100.
The attribute SI_ColorsList already has SI_MaxHistogramLength elements.
Pragmas
None.
Exceptions
None.
Examples
None.
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:
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
The image whose color histogram feature is extracted and used for comparison.
The histogram to be compared with the color histogram of the specified image.
Usage Notes
None.
Pragmas
None.
Exceptions
None.
Examples
None.
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:
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.
This section describes the SI_FeatureList constructor.
The SI_FeatureList constructor is as follows:
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
The average color of SI_FeatureList.
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.
The color histogram of SI_FeatureList.
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.
The positional color of SI_FeatureList.
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.
The texture of SI_FeatureList.
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:
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.
This section presents reference information on the SI_FeatureList methods used for image matching, which are the following:
SI_SetFeature(averageColorFeature, averageColorFeatureWeight)
SI_SetFeature(colorHistogramFeature, colorHistogramFeatureWeight)
SI_SetFeature(positionalColorFeature, positionalColorFeatureWeight)
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
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.
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
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.
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
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.
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
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.
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
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.
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
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.
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 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
The SI_FeatureList object to which the image will be compared.
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:
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.
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
The new average color value.
The new average color weight.
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.
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
The new color histogram value.
The new color histogram weight value.
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.
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
The new positional color value.
The new positional color weight value.
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.
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
The new texture value.
The new texture weight value.
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.
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
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.
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
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.
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_ColorPositions: an array of SI_Color that represents the most significant color positions of an image.
This section describes the SI_PositionalColor object constructor, which is as follows:
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
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:
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 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.
This section presents reference information on the SI_PositionalColor method used for image matching, which is as follows:
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:
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
The positional color to be compared with the positional color of the specified image.
The image whose positional color feature is extracted and used for comparison.
Usage Notes
None.
Pragmas
None.
Exceptions
None.
Examples
None.
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:
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 or not image features will be extracted and cached.
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.
This section describes the SI_StillImage object constructors, which are the following:
SI_StillImage(content, explicitFormat, height, width)
This is an Oracle extension to the SQL/MM Still Image standard.
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.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
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.
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
The image data.
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 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 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.
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
The image data.
The format that you want Oracle Multimedia to use if the image is in an unsupported format.
The value for the height_SI attribute that you want Oracle Multimedia to use if the image is in an unsupported format.
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 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 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.
This section presents reference information on the SI_StillImage methods used for image data manipulation, which are the following:
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.
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
The performance impacts associated with image feature caching are:
Image processing methods such as SI_SetContent and SI_ChangeFormat will be slower.
Image matching methods such as SI_Score will be 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 H for more information about this exception.
Examples
None.
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
The image whose content you want to convert.
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:
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.
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.
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
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.
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.
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
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.
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.
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:
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
The image data. The format of this image data must be the same as the format of the current 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.
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
The image for which you want to generate a thumbnail image.
Usage Notes
None.
Pragmas
None.
Exceptions
None.
Examples
None.
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
The height that you want Oracle Multimedia to use for the thumbnail image.
The image for which you want to generate a thumbnail image.
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.
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
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.
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_TextureEncoding: a varray that represents the image texture characteristics such as coarseness, contrast, and directionality.
This section describes the SI_Texture object constructor, which is as follows:
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
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:
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.
This section presents reference information on the SI_Texture method used for image matching, which is as follows:
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:
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
The feature value to be compared with the texture of the specified image.
The image whose texture feature is extracted and used for score comparison.
Usage Notes
None.
Pragmas
None.
Exceptions
None.
Examples
None.
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:
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 the following:
|
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_SUPPORTED_VALUE |
NUMBER(38) |
A column with the following values:
|
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:
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.
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.
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.
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.