Make flann headers independent from OpenCV C API

pull/785/head
Andrey Kamaev 12 years ago
parent 69648f0a6f
commit ae4e76395f
  1. 3
      modules/features2d/include/opencv2/features2d.hpp
  2. 5
      modules/flann/include/opencv2/flann.hpp
  3. 4
      modules/flann/include/opencv2/flann/miniflann.hpp
  4. 6
      modules/flann/test/test_lshtable_badarg.cpp

@ -43,10 +43,9 @@
#ifndef __OPENCV_FEATURES_2D_HPP__ #ifndef __OPENCV_FEATURES_2D_HPP__
#define __OPENCV_FEATURES_2D_HPP__ #define __OPENCV_FEATURES_2D_HPP__
#include "opencv2/flann/miniflann.hpp"
#ifdef __cplusplus #ifdef __cplusplus
#include "opencv2/core.hpp" #include "opencv2/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#include <limits> #include <limits>
namespace cv namespace cv

@ -43,9 +43,6 @@
#ifndef _OPENCV_FLANN_HPP_ #ifndef _OPENCV_FLANN_HPP_
#define _OPENCV_FLANN_HPP_ #define _OPENCV_FLANN_HPP_
#ifdef __cplusplus
#include "opencv2/core/types_c.h"
#include "opencv2/core.hpp" #include "opencv2/core.hpp"
#include "opencv2/flann/miniflann.hpp" #include "opencv2/flann/miniflann.hpp"
#include "opencv2/flann/flann_base.hpp" #include "opencv2/flann/flann_base.hpp"
@ -422,6 +419,4 @@ FLANN_DEPRECATED int hierarchicalClustering(const Mat& features, Mat& centers, c
} } // namespace cv::flann } } // namespace cv::flann
#endif // __cplusplus
#endif #endif

@ -43,8 +43,6 @@
#ifndef _OPENCV_MINIFLANN_HPP_ #ifndef _OPENCV_MINIFLANN_HPP_
#define _OPENCV_MINIFLANN_HPP_ #define _OPENCV_MINIFLANN_HPP_
#ifdef __cplusplus
#include "opencv2/core.hpp" #include "opencv2/core.hpp"
#include "opencv2/flann/defines.h" #include "opencv2/flann/defines.h"
@ -157,6 +155,4 @@ protected:
} } // namespace cv::flann } } // namespace cv::flann
#endif // __cplusplus
#endif #endif

@ -74,13 +74,13 @@ void CV_LshTableBadArgTest::run( int /* start_from */ )
int errors = 0; int errors = 0;
caller.key_size = 0; caller.key_size = 0;
errors += run_test_case(CV_StsBadArg, "key_size is zero", caller); errors += run_test_case(Error::StsBadArg, "key_size is zero", caller);
caller.key_size = static_cast<int>(sizeof(size_t) * CHAR_BIT); caller.key_size = static_cast<int>(sizeof(size_t) * CHAR_BIT);
errors += run_test_case(CV_StsBadArg, "key_size is too big", caller); errors += run_test_case(Error::StsBadArg, "key_size is too big", caller);
caller.key_size += cvtest::randInt(rng) % 100; caller.key_size += cvtest::randInt(rng) % 100;
errors += run_test_case(CV_StsBadArg, "key_size is too big", caller); errors += run_test_case(Error::StsBadArg, "key_size is too big", caller);
if (errors != 0) if (errors != 0)
ts->set_failed_test_info(cvtest::TS::FAIL_MISMATCH); ts->set_failed_test_info(cvtest::TS::FAIL_MISMATCH);

Loading…
Cancel
Save