img_hash_base.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. #ifndef OPENCV_IMG_HASH_BASE_HPP
  5. #define OPENCV_IMG_HASH_BASE_HPP
  6. #include "opencv2/core.hpp"
  7. namespace cv {
  8. namespace img_hash {
  9. //! @addtogroup img_hash
  10. //! @{
  11. /** @brief The base class for image hash algorithms
  12. */
  13. class CV_EXPORTS_W ImgHashBase : public Algorithm
  14. {
  15. public:
  16. class ImgHashImpl;
  17. ~ImgHashBase();
  18. /** @brief Computes hash of the input image
  19. @param inputArr input image want to compute hash value
  20. @param outputArr hash of the image
  21. */
  22. CV_WRAP void compute(cv::InputArray inputArr, cv::OutputArray outputArr);
  23. /** @brief Compare the hash value between inOne and inTwo
  24. @param hashOne Hash value one
  25. @param hashTwo Hash value two
  26. @return value indicate similarity between inOne and inTwo, the meaning
  27. of the value vary from algorithms to algorithms
  28. */
  29. CV_WRAP double compare(cv::InputArray hashOne, cv::InputArray hashTwo) const;
  30. protected:
  31. ImgHashBase();
  32. protected:
  33. Ptr<ImgHashImpl> pImpl;
  34. };
  35. //! @}
  36. } } // cv::img_hash::
  37. #endif // OPENCV_IMG_HASH_BASE_HPP