diff --git a/src/examples/fundamental_matrix.cpp b/src/examples/fundamental_matrix.cpp
index 3f44500476a9d25e5586b175be7ef6a14f01a137..d4ddf3dba87c7cd499521a42af17cb1cc38de6ae 100644
--- a/src/examples/fundamental_matrix.cpp
+++ b/src/examples/fundamental_matrix.cpp
@@ -76,8 +76,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 0f17eb1c5c2126e74b63789d59faf6b32a6244d4..22f88cb90be7c6c9c238b5d4b0ccb77298711ae5 100644
--- a/src/matchers/matcher_base.cpp
+++ b/src/matchers/matcher_base.cpp
@@ -333,7 +333,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 37f9ca78ab1b70bb14c83b6d33a77ef7a321d771..166b5b5d00b9a8c9781d401d5d694b49162c1281 100644
--- a/src/vision_utils.cpp
+++ b/src/vision_utils.cpp
@@ -31,9 +31,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]]);
     }
@@ -52,9 +52,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 23c13e271b2b74c4229226652d6e0653c0deb2be..71bd82460d2f80abd69cc32661f9db832b8f7f92 100644
--- a/src/vision_utils.h
+++ b/src/vision_utils.h
@@ -413,9 +413,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);