|
Oracle9i Business Components for Java InterMedia API Reference Oracle9i JDeveloper (9.0.4) B10394-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ord.im.OrdImageSignatureBase | +--oracle.ord.im.OrdImageSignature
The OrdImageSignature class is used to represent an instance of the ORDSYS.ORDImageSignature database type in a Java application. The OrdImageSignature class includes a method to generate an image signature, plus static methods to compare two image signatures.
Users of this class are assumed to be familiar with Oracle interMedia Java Classes User's Guide and Reference and Oracle interMedia User's Guide and Reference.
If your application modifies the OrdImageSignature Java object, you must update the OrdImageSignature SQL object in the database to make those changes permanent.
evaluateScore
and isSimilar
methods operate on two image signatures in the Java application, not on indexes on database tables. Therefore, they cannot take advantage of the increased performance that is possible using image matching with image signature indexes on the underlying tables. To use image signature indexes, use the IMGSimilar and IMGScore SQL operators. See Oracle interMedia User's Guide and Reference for more information.Field Summary |
Fields inherited from class oracle.ord.im.OrdImageSignatureBase |
_SQL_NAME, _SQL_TYPECODE |
Constructor Summary | |
OrdImageSignature() Internal constructor used only by the Oracle CustomDatum interface factory method to create an instance of the class. |
Method Summary | |
oracle.sql.CustomDatum |
create(oracle.sql.Datum d, int sqlType) Internal method used only by the Oracle CustomDatum interface. |
static float |
evaluateScore(OrdImageSignature signature1, OrdImageSignature signature2, java.lang.String attrWeights) Compares two image signatures, returning a score that indicates the degree of difference between the image signatures. |
void |
generateSignature(OrdImage img) Generates an image signature for the specified image. |
static oracle.sql.CustomDatumFactory |
getFactory() Returns the OrdImageSignature CustomDatumFactory for use by the getCustomDatum method. |
static int |
isSimilar(OrdImageSignature signature1, OrdImageSignature signature2, java.lang.String attrWeights, float threshold) Compares two image signatures, returning a status that indicates if the degree of difference between the image signatures is within a specified threshold. |
Methods inherited from class oracle.ord.im.OrdImageSignatureBase |
toDatum |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OrdImageSignature()
Method Detail |
public void generateSignature(OrdImage img) throws java.sql.SQLException
img
- an OrdImage
object from which to generate the signature.java.sql.SQLException
- if an error occurs calling the generateSignature method in the database.public static float evaluateScore(OrdImageSignature signature1, OrdImageSignature signature2, java.lang.String attrWeights) throws java.sql.SQLException
Specify a weight in the range 0.0 to 1.0 for one or more of the following visual attributes:
For example, "color=0.7,shape=0.3"
.
signature1
- an OrdImageSignature
.signature2
- an OrdImageSignature
to be compared to signature1.attrWeights
- a String
that specifies a list of one or more visual attributes and the weight to be applied to each attribute.float
.java.sql.SQLException
- if an error occurs calling the evaluateScore method in the database.public static int isSimilar(OrdImageSignature signature1, OrdImageSignature signature2, java.lang.String attrWeights, float threshold) throws java.sql.SQLException
Specify a weight in the range 0.0 to 1.0 for one or more of the following visual attributes:
For example, "color=0.7,shape=0.3"
.
signature1
- an OrdImageSignature
.signature2
- an OrdImageSignature
to be compared to signature1.attrWeights
- a String
that specifies a list of one or more visual attributes and the weight to be applied to each attribute.threshold
- a float
that specifies the degree of similarity required for the two images to be considered a match.int
value of 1 if the images match; otherwise, 0.java.sql.SQLException
- if an error occurs calling the isSimilar method in the database.public static oracle.sql.CustomDatumFactory getFactory()
OrdImageSignature sig = (OrdImageSignature)rset.getCustomDatum( 1, OrdImageSignature.getFactory() );
public oracle.sql.CustomDatum create(oracle.sql.Datum d, int sqlType) throws java.sql.SQLException
create
in interface oracle.sql.CustomDatumFactory
create
in class oracle.ord.im.OrdImageSignatureBase
java.sql.SQLException
|
Oracle9i Business Components for Java InterMedia API Reference Oracle9i JDeveloper (9.0.4) B10394-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |