170 likes | 270 Views
SQL Multimedia and Application Packages — SQL/MM. Fundamentos de Banco de Dados e Modelagem de Dados. Still Image. Introdução. Padrão, baseado no SQL e em tipos estruturados definidos pelo usuário Dividido em partes independentes Definido pela ISO/IEC 13249-5:2003.
E N D
SQL Multimedia and Application Packages — SQL/MM Fundamentos de Banco de Dados e Modelagem de Dados Still Image
Introdução • Padrão, baseado no SQL e em tipos estruturados definidos pelo usuário • Dividido em partes independentes • Definido pela ISO/IEC 13249-5:2003
SQL Multimedia and Application Packages — SQL/MM • Entre 91 e 92, um pequeno grupo de empresas operando pela IEEE definem SFQL • Criticado por outras comunidades pelo 'sequestro' de palavras chaves. ex.: contains • A organização dos padrões SQL nota conflitos nas extensões • Tóquio 92, modelo objeto-relacional, bibliotecas de classe, métodos • SQL/MM, mesma comissão ISO do SQL • Padrão múltiplo, partes independentes, Framework
Still Image objeto SI_StillImage: 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,
Still Image objeto SI_StillImage: --------------------- -- 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,
Still Image objeto SI_StillImage: -- Accessor methods for StillImage attributes MEMBER FUNCTION SI_Height /**/ MEMBER FUNCTION SI_Width /**/ MEMBER FUNCTION SI_Format /**/ MEMBER FUNCTION SI_Content /**/ MEMBER FUNCTION SI_ContentLength /**/ --Accessor method for retainFeatures_SI attribute MEMBER FUNCTION SI_retainFeatures /**/ -- 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;
Still Image objeto SI_AverageColor: 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;
Still Image objeto SI_Color: 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;
Still Image objeto SI_ColorHistogram: 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,
Still Image objeto SI_ColorHistogram: 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;
Still Image objeto SI_PositionalColor: CREATE OR REPLACE TYPE SI_PositionalColor AUTHID CURRENT_USER AS OBJECT ( ------------------- -- TYPE ATTRIBUTES ------------------- SI_ColorPositions colorPositions, --------------------- -- METHOD DECLARATION --------------------- 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;
Still Image objeto SI_Texture: CREATE OR REPLACE TYPE SI_Texture AUTHID CURRENT_USER AS OBJECT ------------------- -- TYPE ATTRIBUTES ------------------- SI_TextureEncoding textureEncoding, --------------------- -- METHOD DECLARATION --------------------- 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;
Still Image objeto SI_FeatureList: CREATE OR REPLACE TYPE SI_FeatureList AUTHID CURRENT_USER AS OBJECT ( ------------------- -- TYPE ATTRIBUTES ------------------- AvgClrFtr_SI SI_AverageColor, AvgClrFtrWght_SI DOUBLE PRECISION, ClrHstgrFtr_SI SI_ColorHistogram, ClrHstgrFtrWght_SI DOUBLE PRECISION, PstnlClrFtr_SI SI_PositionalColor, PstnlClrFtrWght_SI DOUBLE PRECISION, TextureFtr_SI SI_Texture, TextureFtrWght_SI DOUBLE PRECISION,
Still Image objeto SI_FeatureList: 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,
Still Image objeto SI_FeatureList: 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),
Still Image objeto SI_FeatureList: 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),
Still Image objeto SI_FeatureList: 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;