phash.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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_PHASH_HPP
  5. #define OPENCV_PHASH_HPP
  6. #include "img_hash_base.hpp"
  7. namespace cv {
  8. namespace img_hash {
  9. //! @addtogroup img_hash
  10. //! @{
  11. /** @brief pHash
  12. Slower than average_hash, but tolerant of minor modifications
  13. This algorithm can combat more variation than averageHash, for more details please refer to @cite lookslikeit
  14. */
  15. class CV_EXPORTS_W PHash : public ImgHashBase
  16. {
  17. public:
  18. CV_WRAP static Ptr<PHash> create();
  19. protected:
  20. PHash() {}
  21. };
  22. /** @brief Computes pHash value of the input image
  23. @param inputArr input image want to compute hash value,
  24. type should be CV_8UC4, CV_8UC3, CV_8UC1.
  25. @param outputArr Hash value of input, it will contain 8 uchar value
  26. */
  27. CV_EXPORTS_W void pHash(cv::InputArray inputArr, cv::OutputArray outputArr);
  28. //! @}
  29. } } // cv::img_hash::
  30. #endif // OPENCV_PHASH_HPP