average_hash.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_AVERAGE_HASH_HPP
  5. #define OPENCV_AVERAGE_HASH_HPP
  6. #include "img_hash_base.hpp"
  7. namespace cv {
  8. namespace img_hash {
  9. //! @addtogroup img_hash
  10. //! @{
  11. /** @brief Computes average hash value of the input image
  12. This is a fast image hashing algorithm, but only work on simple case. For more details, please
  13. refer to @cite lookslikeit
  14. */
  15. class CV_EXPORTS_W AverageHash : public ImgHashBase
  16. {
  17. public:
  18. CV_WRAP static Ptr<AverageHash> create();
  19. protected:
  20. AverageHash() {}
  21. };
  22. /** @brief Calculates img_hash::AverageHash in one call
  23. @param inputArr input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.
  24. @param outputArr Hash value of input, it will contain 16 hex decimal number, return type is CV_8U
  25. */
  26. CV_EXPORTS_W void averageHash(cv::InputArray inputArr, cv::OutputArray outputArr);
  27. //! @}
  28. }} // cv::img_hash::
  29. #endif // OPENCV_AVERAGE_HASH_HPP