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 Details

    • ImgHashBase

      protected ImgHashBase(long addr)
  • Method Details

    • __fromPtr__

      public static ImgHashBase __fromPtr__(long addr)
    • compute

      public void compute(Mat inputArr, Mat outputArr)
      Computes hash of the input image
      Parameters:
      inputArr - input image want to compute hash value
      outputArr - hash of the image
    • compare

      public double compare(Mat hashOne, Mat hashTwo)
      Compare the hash value between inOne and inTwo
      Parameters:
      hashOne - Hash value one
      hashTwo - Hash value two
      Returns:
      value indicate similarity between inOne and inTwo, the meaning of the value vary from algorithms to algorithms
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Algorithm
      Throws:
      Throwable