Oracle® interMedia Java Classes Reference 10g Release 1 (10.1) Part Number B10830-01 |
|
|
View PDF |
Format
public static int isSimilar(OrdImageSignature signature1, OrdImageSignature signature2,
String attrWeights, float threshold)
Description
Compares two image signatures, returning a status that indicates if the degree of difference between the image signatures is within a specified threshold. This method compares the image signatures in signature1 and signature2 using weights specified for one or more visual attributes. The result of the comparison is a score between 0.0 and 100.0, where a lower value indicates a closer match. If the score is less than or equal to the specified threshold, the images are considered a match and the method returns 1; otherwise, the method returns 0.
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
Note: The ORDImageSignature isSimilar( ) method operates on two image signatures, not on indexes on database tables. Therefore, this method 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 Reference for more information about image signature indexes. |
Parameters
The first OrdImageSignature.
An OrdImageSignature to be compared to signature1.
A String that specifies a list of one or more visual attributes and the weight to be applied to each attribute.
A floating-point value that specifies the degree of similarity required for the two images to be considered a match.
Return Value
This method returns an integer value of 1 if the images match; otherwise, it returns 0.
Exceptions
java.sql.SQLException
This exception is thrown if an error occurs calling the isSimilar( ) method in the database.
Examples
None.