diff --git a/src/examples/fundamental_matrix.cpp b/src/examples/fundamental_matrix.cpp index 72c04a4ad390f4a8d570345e9670abed0858fb6f..5a69c4a205b04ea2f87e779dc3fae7c1a092de2d 100644 --- a/src/examples/fundamental_matrix.cpp +++ b/src/examples/fundamental_matrix.cpp @@ -97,8 +97,8 @@ int main(int argc, char** argv) vision_utils::MatcherBasePtr mat_ptr = vision_utils::setupMatcher(mat_name, mat_name + " matcher", yaml_file_params_vision_utils); // set and print image properties - unsigned int img_width = (unsigned int)capture.get(CV_CAP_PROP_FRAME_WIDTH); - unsigned int img_height = (unsigned int)capture.get(CV_CAP_PROP_FRAME_HEIGHT); + unsigned int img_width = (unsigned int)capture.get(cv::CAP_PROP_FRAME_WIDTH); + unsigned int img_height = (unsigned int)capture.get(cv::CAP_PROP_FRAME_HEIGHT); std::cout << "Image size: " << img_width << "x" << img_height << std::endl; // set the image buffer diff --git a/src/matchers/matcher_base.cpp b/src/matchers/matcher_base.cpp index 74acb6dd2514a40ba52c0f12bbd45ae50b30aac4..ec40e1e0ee978e7423225fa73aba4cfaa0b93032 100644 --- a/src/matchers/matcher_base.cpp +++ b/src/matchers/matcher_base.cpp @@ -354,7 +354,7 @@ void MatcherBase::ransacTest(const KeyPointVector& _raw_kps1, cv::Mat fundemental= cv::findFundamentalMat(raw_pts1, raw_pts2, // matching points inliers, // match status (inlier ou outlier) - CV_FM_RANSAC, // RANSAC / LMEDS method + cv::FM_RANSAC, // RANSAC / LMEDS method params_base_ptr_->ransac_epipolar_distance, // distance to epipolar line params_base_ptr_->ransac_confidence_prob); // confidence probability diff --git a/src/vision_utils.cpp b/src/vision_utils.cpp index 4829970925882c401a708885db3fa4101c86bada..c109e14f15dbaa6e4892a26a9c667212a54b0937 100644 --- a/src/vision_utils.cpp +++ b/src/vision_utils.cpp @@ -52,9 +52,9 @@ void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, con std::vector<int> Indx = sortByResponse(_kps_in, _type); for (unsigned int ii = 0; ii < _kps_in.size(); ii++) { - if (_type == CV_SORT_DESCENDING && _kps_in[Indx[ii]].response < _response_threshold) + if (_type == cv::SORT_DESCENDING && _kps_in[Indx[ii]].response < _response_threshold) break; - else if (_type == CV_SORT_ASCENDING && _kps_in[Indx[ii]].response > _response_threshold) + else if (_type == cv::SORT_ASCENDING && _kps_in[Indx[ii]].response > _response_threshold) break; _kps_out.push_back(_kps_in[Indx[ii]]); } @@ -73,9 +73,9 @@ void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, con for (unsigned int ii = 0; ii < _kps_in.size(); ii++) { - if (_type == CV_SORT_DESCENDING && _kps_in[Indx[ii]].response < _response_threshold) + if (_type == cv::SORT_DESCENDING && _kps_in[Indx[ii]].response < _response_threshold) break; - else if (_type == CV_SORT_ASCENDING && _kps_in[Indx[ii]].response > _response_threshold) + else if (_type == cv::SORT_ASCENDING && _kps_in[Indx[ii]].response > _response_threshold) break; _kps_out.push_back(_kps_in[Indx[ii]]); _des_out.push_back(_des_in.row(Indx[ii])); diff --git a/src/vision_utils.h b/src/vision_utils.h index 2ac9f79e3312b03b3be686f89eb540871e183fdd..f0c28c8d348cff7a9dbff8744f197f46c0e341b0 100644 --- a/src/vision_utils.h +++ b/src/vision_utils.h @@ -434,9 +434,9 @@ private: static const cv::Mat const_mat = cv::Mat(); -std::vector<int> sortByResponse(const KeyPointVector& _kps_in, const int& _type = CV_SORT_DESCENDING); -void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, const int& _response_threshold = 0, const int& _type = CV_SORT_DESCENDING); -void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, const cv::Mat& _des_in, cv::Mat& _des_out, const int& _response_threshold = 0, const int& _type = CV_SORT_DESCENDING); +std::vector<int> sortByResponse(const KeyPointVector& _kps_in, const int& _type = cv::SORT_DESCENDING); +void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, const int& _response_threshold = 0, const int& _type = cv::SORT_DESCENDING); +void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, const cv::Mat& _des_in, cv::Mat& _des_out, const int& _response_threshold = 0, const int& _type = cv::SORT_DESCENDING); bool LessPoints(const cv::Point2f& lhs, const cv::Point2f& rhs); bool LessKPoints(const cv::KeyPoint& lhs, const cv::KeyPoint& rhs);