|
Oracle interMedia Java Classes API Reference 10g Release 2 (10.2) Part No. B14301-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, as well as static methods to compare two image signatures.
Users of this class should be familiar with Oracle interMedia Reference.
If your application modifies the OrdImageSignature Java object, you must perform a SQL update operation to make those changes permanent.
Image signature indexes are used to improve the performance of database operations involving image matching. To take advantage of the increased performance that is possible using image matching with image signature indexes on the underlying tables, use the IMGSimilar and IMGScore SQL operators.
See Oracle interMedia Reference for more information about image signature indexes.
In order to run OrdImageSignature methods, you will need to include the following import statements in your Java file:
import oracle.ord.im.OrdMediaUtil; import oracle.ord.im.OrdImageSignature;
You may also need to import classes from the following Java packages:
java.io. java.sql. oracle.jdbc.
Before running OrdImageSignature methods, the following operations must have already been performed:
For examples of making a connection and populating a local object, see Oracle interMedia User's Guide.
Field Summary |
Fields inherited from class oracle.ord.im.OrdImageSignatureBase |
_SQL_NAME, _SQL_TYPECODE |
Constructor Summary | |
OrdImageSignature() Deprecated. |
Method Summary | |
oracle.sql.CustomDatum |
create(oracle.sql.Datum d, int sqlType) Exists as an 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() Deprecated. New applications should use the getORADataFactory method. |
static oracle.sql.ORADataFactory |
getORADataFactory() Returns the OrdImageSignature ORADataFactory interface for use by the getORAData 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 |
create, toDatum, 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: color, shape, texture, location.
You must specify a value greater than 0.0 for at least one of the following attributes: color, shape, or texture. The location attribute indicates the importance of the distribution of the color, shape, or texture features in the images. During processing, the values are normalized such that they total 1.0. For example:
color=0.7,shape=0.3
See Oracle interMedia Reference for more information about image signature indexes.
signature1
- the first 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: color, shape, texture, location.
You must specify a value greater than 0.0 for at least one of the following attributes: color, shape, or texture. The location attribute indicates the importance of the distribution of the color, shape, or texture features in the images. During processing, the values are normalized such that they total 1.0. For example:
color=0.7,shape=0.3
See Oracle interMedia Reference for more information about image signature indexes.
signature1
- the first 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 floating-point value (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, it returns 0.java.sql.SQLException
- if an error occurs calling the isSimilar method in the database.public static oracle.sql.ORADataFactory getORADataFactory()
public static oracle.sql.CustomDatumFactory getFactory()
public oracle.sql.CustomDatum create(oracle.sql.Datum d, int sqlType) throws java.sql.SQLException
java.sql.SQLException
|
Oracle interMedia Java Classes API Reference 10g Release 2 (10.2) Part No. B14301-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |