Package org.opencv.img_hash
Class ImgHashBase
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.img_hash.ImgHashBase
-
- Direct Known Subclasses:
AverageHash
,BlockMeanHash
,ColorMomentHash
,MarrHildrethHash
,PHash
,RadialVarianceHash
public class ImgHashBase extends Algorithm
The base class for image hash algorithms
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImgHashBase(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImgHashBase
__fromPtr__(long addr)
double
compare(Mat hashOne, Mat hashTwo)
Compare the hash value between inOne and inTwovoid
compute(Mat inputArr, Mat outputArr)
Computes hash of the input imageprotected void
finalize()
-
Methods inherited from class org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
Method Detail
-
__fromPtr__
public static ImgHashBase __fromPtr__(long addr)
-
compare
public double compare(Mat hashOne, Mat hashTwo)
Compare the hash value between inOne and inTwo- Parameters:
hashOne
- Hash value onehashTwo
- Hash value two- Returns:
- value indicate similarity between inOne and inTwo, the meaning of the value vary from algorithms to algorithms
-
compute
public void compute(Mat inputArr, Mat outputArr)
Computes hash of the input image- Parameters:
inputArr
- input image want to compute hash valueoutputArr
- hash of the image
-
-