123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #ifndef CVVISUAL_DEBUG_DMATCH_HPP
- #define CVVISUAL_DEBUG_DMATCH_HPP
- #include <string>
- #include "opencv2/core.hpp"
- #include "opencv2/features2d.hpp"
- #include "call_meta_data.hpp"
- #include "debug_mode.hpp"
- #ifdef CV_DOXYGEN
- #define CVVISUAL_DEBUGMODE
- #endif
- namespace cvv
- {
- namespace impl
- {
- CV_EXPORTS void debugDMatch(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
- cv::InputArray img2, std::vector<cv::KeyPoint> keypoints2,
- std::vector<cv::DMatch> matches, const CallMetaData &data,
- const char *description, const char *view,
- bool useTrainDescriptor);
- }
- #ifdef CVVISUAL_DEBUGMODE
- static inline void
- debugDMatch(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
- cv::InputArray img2, std::vector<cv::KeyPoint> keypoints2,
- std::vector<cv::DMatch> matches, const impl::CallMetaData &data,
- const char *description = nullptr, const char *view = nullptr,
- bool useTrainDescriptor = true)
- {
- if (debugMode())
- {
- impl::debugDMatch(img1, std::move(keypoints1), img2,
- std::move(keypoints2), std::move(matches),
- data, description, view, useTrainDescriptor);
- }
- }
- static inline void
- debugDMatch(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
- cv::InputArray img2, std::vector<cv::KeyPoint> keypoints2,
- std::vector<cv::DMatch> matches, const impl::CallMetaData &data,
- const std::string &description, const std::string &view,
- bool useTrainDescriptor = true)
- {
- if (debugMode())
- {
- impl::debugDMatch(img1, std::move(keypoints1), img2,
- std::move(keypoints2), std::move(matches),
- data, description.c_str(), view.c_str(),
- useTrainDescriptor);
- }
- }
- #else
- static inline void debugDMatch(cv::InputArray, std::vector<cv::KeyPoint>,
- cv::InputArray, std::vector<cv::KeyPoint>,
- std::vector<cv::DMatch>,
- const impl::CallMetaData &,
- const char * = nullptr, const char * = nullptr,
- bool = true)
- {
- }
- static inline void debugDMatch(cv::InputArray, std::vector<cv::KeyPoint>,
- cv::InputArray, std::vector<cv::KeyPoint>,
- std::vector<cv::DMatch>,
- const impl::CallMetaData &, const std::string &,
- const std::string &, bool = true)
- {
- }
- #endif
- }
- #endif
|