Skip Headers

Oracle® interMedia Reference
10g Release 1 (10.1)

Part Number B10829-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
Feedback

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

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

Create an SI_FeatureList object using the SI_FeatureList( ) constructor:

DECLARE
   myimage       SI_StillImage;
   myAvgColor    SI_AverageColor;
   myColorHist   SI_ColorHistogram;
   myPosColor    SI_PositionalColor;
   myTexture     SI_Texture;
   myFeatureList SI_FeatureList;
BEGIN
   SELECT product_photo INTO myimage FROM pm.si_media WHERE product_id=1 FOR
   UPDATE;
   myAvgColor := NEW SI_AverageColor(myimage);
   myColorHist := NEW SI_ColorHistogram(myimage);
   myPosColor := NEW SI_PositionalColor(myimage);
   myTexture := NEW SI_Texture(myimage);
   myFeatureList := new SI_FeatureList(myAvgColor,0.25,myColorHist,0.35,
                                       myPosColor,0.10, myTexture,0.5);
   UPDATE pm.si_media SET feature_list = myFeatureList WHERE product_id=1;
   COMMIT;
END;
/

Create an SI_FeatureList object using the SI_MkFtrList( ) function:

DECLARE
   myimage       SI_StillImage;
   myAvgColor    SI_AverageColor;
   myColorHist   SI_ColorHistogram;
   myPosColor    SI_PositionalColor;
   myTexture     SI_Texture;
   myFeatureList SI_FeatureList;
BEGIN
   SELECT product_photo INTO myimage 
     FROM pm.si_media WHERE product_id=2 FOR
    UPDATE;
   myAvgColor := NEW SI_AverageColor(myimage);
   myColorHist := NEW SI_ColorHistogram(myimage);
   myPosColor := NEW SI_PositionalColor(myimage);
   myTexture := NEW SI_Texture(myimage);
   myFeatureList := SI_MkFtrList(myAvgColor,0.25,myColorHist,0.35,
                    myPosColor,0.10, myTexture,0.5);
   UPDATE pm.si_media SET feature_list = myFeatureList WHERE product_id=2;
  COMMIT;
END;
/

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

Get the value of the AvgClrFtr_SI attribute of an SI_FeatureList object using the
SI_AvgClrFtr( ) method:

DECLARE
   myFeatureList SI_FeatureList;
   AvgColor    SI_AverageColor;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   AvgColor := myFeatureList.SI_AvgClrFtr( );
END;
/

Get the AvgClrFtr_SI attribute of an SI_FeatureList object using the
SI_GetAvgClrFtr( ) function:

DECLARE
   myFeatureList SI_FeatureList;
   AvgColor      SI_AverageColor;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media WHERE product_id=1;
   AvgColor  := SI_GetAvgClrFtr(myFeatureList);
END;
/

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

Get the AvgClrFtrWght_SI attribute value of an SI_FeatureList object using the
SI_AvgClrFtrWght( ) method:

DECLARE
   myFeatureList SI_FeatureList;
   AvgColorWght  DOUBLE PRECISION;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   AvgColorWght := myFeatureList.SI_AvgClrFtrWght( );
   DBMS_OUTPUT.PUT_LINE('Average color feature weight is ' || AvgColorWght);
END;
/

Get the AvgClrFtrWght_SI attribute value of an SI_FeatureList object using the
SI_GetAvgClrFtrW( ) function:

DECLARE
   myFeatureList SI_FeatureList;
   AvgColorWght  DOUBLE PRECISION;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   AvgColorWght := SI_GetAvgClrFtrW(myFeatureList);
   DBMS_OUTPUT.PUT_LINE('Average color feature weight is ' || AvgColorWght);
END;
/

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

Get the value of the ClrHstgrFtr_SI attribute of an SI_FeatureList object using the SI_ClrHstgrFtr( ) method:

DECLARE
   myFeatureList SI_FeatureList;
   ClrHstgrFtr   SI_ColorHistogram;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   ClrHstgrFtr := myFeatureList.SI_ClrHstgrFtr( );
END;
/

Get the value of the ClrHstgrFtr_SI attribute of an SI_FeatureList object using the SI_GetClrHstgrFtr( ) function:

DECLARE
   myFeatureList SI_FeatureList;
   ClrHstgrFtr   SI_ColorHistogram;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   ClrHstgrFtr := SI_GetClrHstgrFtr(myFeatureList);
END;
/

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

Get the value of the ClrHstgrFtrWght_SI attribute of an SI_FeatureList object using the SI_ClrHstgrFtrWght( ) method:

DECLARE
   myFeatureList    SI_FeatureList;
   ClrHstgrFtrWght  DOUBLE PRECISION;
BEGIN
  SELECT feature_list INTO myFeatureList FROM pm.si_media 
    WHERE product_id=1;
  ClrHstgrFtrWght := myFeatureList.SI_ClrHstgrFtrWght( );
  DBMS_OUTPUT.PUT_LINE('Color histogram feature weight is ' || ClrHstgrFtrWght);
END;
/

Get the value of the ClrHstgrFtrWght_SI attribute of an SI_FeatureList object using the SI_GetClrHstgrFtrW( ) function:

DECLARE
  myFeatureList    SI_FeatureList;
   ClrHstgrFtrWght  DOUBLE PRECISION;
BEGIN
  SELECT feature_list INTO myFeatureList FROM pm.si_media 
   WHERE product_id=1;
  ClrHstgrFtrWght := SI_GetClrHstgrFtrW(myFeatureList);
  DBMS_OUTPUT.PUT_LINE('Color histogram feature weight is ' || ClrHstgrFtrWght);
END;
/

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

Get the value of the PstnlClrFtr_SI attribute of an SI_FeatureList object using the
SI_PstnlClrFtr( ) method:

DECLARE
   myFeatureList SI_FeatureList;
   PstnlClrFtr   SI_PositionalColor;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   PstnlClrFtr := myFeatureList.SI_PstnlClrFtr( );
END;
/

Get the value of the PstnlClrFtr_SI attribute of an SI_FeatureList object using the
SI_GetPstnlClrFtr( ) function:

DECLARE
   myFeatureList SI_FeatureList;
   PstnlClrFtr   SI_PositionalColor;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media WHERE product_id=1;
   PstnlClrFtr := SI_GetPstnlClrFtr(myFeatureList);
END;
/

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

Get the value of the PstnlClrFtrWght_SI attribute of an SI_FeatureList object using the SI_PstnlClrFtrWght( ) method:

DECLARE
   myFeatureList    SI_FeatureList;
   PstnlClrFtrWght  DOUBLE PRECISION;
BEGIN
 SELECT feature_list INTO myFeatureList FROM pm.si_media 
   WHERE product_id=1;
 PstnlClrFtrWght := myFeatureList.SI_PstnlClrFtrWght( );
 DBMS_OUTPUT.PUT_LINE('Positional color feature weight is ' || PstnlClrFtrWght);
END;
/

Get the value of the PstnlClrFtrWght_SI attribute of an SI_FeatureList object using the SI_GetPstnlClrFtrW( ) function:

DECLARE
   myFeatureList    SI_FeatureList;
   PstnlClrFtrWght  DOUBLE PRECISION;
BEGIN
 SELECT feature_list INTO myFeatureList FROM pm.si_media 
   WHERE product_id=1;
 PstnlClrFtrWght := SI_GetPstnlClrFtrW(myFeatureList);
 DBMS_OUTPUT.PUT_LINE('Positional color feature weight is ' || PstnlClrFtrWght);
END;
/

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

Compare an image to an SI_FeatureList value and return the score using the
SI_Score( ) method:

DECLARE
   myimage       SI_StillImage;
   myFeatureList SI_FeatureList;
   score         DOUBLE PRECISION;
BEGIN
  --Check to see if stored feature list is accurate for the stored image:
  SELECT feature_list INTO myFeatureList FROM pm.si_media 
    WHERE product_id=1;
  SELECT product_photo INTO myimage FROM pm.si_media 
    WHERE product_id=1;
  -- The score will be 0 if the feature list is accurate for the stored image:
  score := myFeatureList.SI_Score(myimage);
  DBMS_OUTPUT.PUT_LINE('Score is ' || score);
END;
/

Compare an image to an SI_FeatureList value and return the score using the SI_ScoreByFtrList( ) function:

DECLARE
    score         DOUBLE PRECISION;
    myimage       SI_StillImage;
    myFeatureList SI_PositionalColor;
BEGIN
  SELECT feature_list INTO myFeatureList FROM pm.si_media 
    WHERE product_id=1;
  SELECT product_photo INTO myimage FROM pm.si_media 
    WHERE product_id=1;
   score := SI_ScoreByFtrList(myFeatureList, myimage);
   DBMS_OUTPUT.PUT_LINE('Score is ' || score);
END;
/

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

Modify the SI_AvgClrFtr and SI_AvgClrFtrWght attributes in an SI_FeatureList value using the SI_SetFeature(averageColorFeature, averageColorFeatureWeight) method:

DECLARE
   myColor       SI_Color;
   myAvgColor    SI_AverageColor;   
   myFeatureLIst SI_FeatureList;
BEGIN
   -- Create a new average color:
   myColor := NEW SI_COLOR(null, null, null);
   myColor.SI_RGBColor(30, 120, 200);
   myAvgColor := NEW SI_AverageColor(myColor);
   -- Get an existing feature list:
   SELECT feature_list INTO myFeatureList FROM pm.si_media WHERE product_id=1;
   -- Modify the average color and weight of the SI_FeatureList value:
   myFeatureList.SI_SetFeature(myAvgColor, 0.5);
END;
/

Modify the SI_AvgClrFtr and SI_AvgClrFtrWght attributes in an SI_FeatureList object using the SI_SetAvgClrFtr ( ) procedure:

DECLARE
   myColor       SI_Color;
   myAvgColor    SI_AverageColor;
   myFeatureLIst SI_FeatureList;
BEGIN
   myColor := NEW SI_COLOR(null, null, null);
   myColor.SI_RGBColor(30, 120, 200);
   myAvgColor := NEW SI_AverageColor(myColor);
   SELECT feature_list INTO myFeatureList FROM pm.si_media WHERE product_id=1;
   SI_SetAvgClrFtr(myFeatureList, myAvgColor, 0.5);
END;
/

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

Modify the color histogram feature and feature weight of an SI_FeatureList object using the SI_SetFeature( ) method:

DECLARE
   myColor       SI_Color;
   myClrHist   SI_ColorHistogram;   
   myFeatureList SI_FeatureList;
BEGIN
   myColor := new SI_Color(null, null, null);
   myColor.SI_RGBColor(10, 45, 200);
   myClrHist := new SI_ColorHistogram(myColor, 10.0);
   SELECT feature_list INTO myFeatureList FROM pm.si_media WHERE product_id=1;
   myFeatureList.SI_SetFeature(myClrHist, 10.5);
END;
/

Modify the color histogram feature and feature weight of an SI_FeatureList object using the SI_SetClrHstgrFtr( ) procedure:

DECLARE
   myColor       SI_Color;
   myClrHist   SI_ColorHistogram;   
   myFeatureList SI_FeatureList;
BEGIN
   myColor := new SI_Color(null, null, null);
   myColor.SI_RGBColor(10, 45, 200);
   myClrHist := new SI_ColorHistogram(myColor, 10.0);
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   SI_SetClrHstgrFtr(myFeatureList, myClrHist, 10.5);
END;
/

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

Modify the positional color feature and feature weight of one image by updating it with the positional color feature value from another image using the
SI_SetFeature( ) method and specifying a desired feature weight value:

DECLARE
   PosColor2        SI_PositionalColor;
   myFeatureList    SI_FeatureList;
BEGIN
   SELECT positional_color INTO PosColor2  FROM pm.si_media 
     WHERE product_id=2;
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   myFeatureList.SI_SetFeature(PosColor2, 10.5);
END;
/

Modify the positional color feature and feature weight of one image by updating it with the positional color feature value from another image using the SI_SetPstnlClrFtr( ) procedure and specifying a desired feature weight value:

DECLARE
   PosColor1        SI_PositionalColor;
   myFeatureList2   SI_FeatureList;
   myFeatureListnew SI_FeatureList;
BEGIN
   SELECT positional_color INTO PosColor1  
     FROM pm.si_media WHERE product_id=1;
   SELECT feature_list INTO myFeatureList2 
     FROM pm.si_media WHERE product_id=2;
   SI_SetPstnlClrFtr(myFeatureList2, PosColor1, 10.5);
END;
/

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

Modify the texture feature and feature weight of an SI_FeatureList value using the SI_SetFeature( ) method:

DECLARE
   texture1         SI_Texture;
   myFeatureList1   SI_FeatureList;
   myFeatureList2   SI_FeatureList;
BEGIN
   SELECT texture INTO texture1  FROM pm.si_media 
     WHERE product_id=1;
   SELECT feature_list INTO myFeatureList1 FROM pm.si_media 
     WHERE product_id=2;
   myFeatureList2.SI_SetFeature(texture1, 20);
END;/

Modify the texture feature and feature weight of an SI_FeatureList value using the SI_SetTextureFtr( ) procedure:

DECLARE
   texture1         SI_Texture;
   myFeatureList    SI_FeatureList;
BEGIN
   SELECT texture INTO texture1  FROM pm.si_media 
     WHERE product_id=1;
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=2;
   SI_SetTextureFtr(myFeatureList, texture1, 20);
END;/

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

Get the value of the TextureFtr_SI attribute of an SI_FeatureList object using the
SI_TextureFtr( ) method:

DECLARE
   myFeatureList SI_FeatureList;
   mytexture     SI_Texture;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   mytexture := myFeatureList.SI_TextureFtr( );
END;
/

Get the value of the TextureFtr_SI attribute of an SI_FeatureList object using the
SI_GetTextureFtr ( ) function:

DECLARE
   myFeatureList SI_FeatureList;
   mytexture       SI_Texture;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media WHERE product_id=1;
   mytexture := SI_GetTextureFtr(myFeatureList);
END;
/

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

Get the TextureFtrWght_SI attribute of an SI_FeatureList object using the
SI_TextureFtrWght( ) method:

DECLARE
   myFeatureList SI_FeatureList;
   myTextureWght DOUBLE PRECISION;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   myTextureWght := myFeatureList.SI_TextureFtrWght( );
   DBMS_OUTPUT.PUT_LINE('Texture feature weight is ' || myTextureWght);
END;
/

Get the value of the TextureFtrWght_SI attribute of an SI_FeatureList object using the SI_GetTextureFtrW( ) function:

DECLARE
   myFeatureList SI_FeatureList;
   myTextureWght DOUBLE PRECISION;
BEGIN
   SELECT feature_list INTO myFeatureList FROM pm.si_media 
     WHERE product_id=1;
   myTextureWght := SI_GetTextureFtrW(myFeatureList);
   DBMS_OUTPUT.PUT_LINE('Texture feature weight is ' || myTextureWght);
END;
/