From 0e243541f976dcd85d82753366a721b598aaa9bb Mon Sep 17 00:00:00 2001 From: Ievgen Khvedchenia Date: Mon, 28 Apr 2014 10:50:46 +0300 Subject: [PATCH] Fix shadowed variable warnings --- modules/features2d/src/akaze/AKAZE.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/features2d/src/akaze/AKAZE.cpp b/modules/features2d/src/akaze/AKAZE.cpp index a31ff87915..87249cf6e0 100644 --- a/modules/features2d/src/akaze/AKAZE.cpp +++ b/modules/features2d/src/akaze/AKAZE.cpp @@ -157,7 +157,8 @@ int AKAZEFeatures::Create_Nonlinear_Scale_Space(const cv::Mat& img) { charbonnier_diffusivity(evolution_[i].Lx, evolution_[i].Ly, evolution_[i].Lflow, options_.kcontrast); break; default: - cerr << "Diffusivity: " << options_.diffusivity << " is not supported" << endl; + cerr << "Diffusivity: " << static_cast(options_.diffusivity) << " is not supported" << endl; + break; } // Perform FED n inner steps @@ -402,14 +403,14 @@ void AKAZEFeatures::Find_Scale_Space_Extrema(std::vector& kpts) { for (size_t i = 0; i < kpts_aux.size(); i++) { is_repeated = false; - const cv::KeyPoint& point = kpts_aux[i]; + const cv::KeyPoint& pt = kpts_aux[i]; for (size_t j = i + 1; j < kpts_aux.size(); j++) { // Compare response with the upper scale - if ((point.class_id + 1) == kpts_aux[j].class_id) { - dist = sqrt(pow(point.pt.x - kpts_aux[j].pt.x, 2) + pow(point.pt.y - kpts_aux[j].pt.y, 2)); - if (dist <= point.size) { - if (point.response < kpts_aux[j].response) { + if ((pt.class_id + 1) == kpts_aux[j].class_id) { + dist = sqrt(pow(pt.pt.x - kpts_aux[j].pt.x, 2) + pow(pt.pt.y - kpts_aux[j].pt.y, 2)); + if (dist <= pt.size) { + if (pt.response < kpts_aux[j].response) { is_repeated = true; break; } @@ -1278,7 +1279,7 @@ void MSURF_Upright_Descriptor_64_Invoker::Get_MSURF_Upright_Descriptor_64(const // convert to unit vector len = sqrt(len); - for (int i = 0; i < dsize; i++) { + for (i = 0; i < dsize; i++) { desc[i] /= len; } } @@ -1403,7 +1404,7 @@ void MSURF_Descriptor_64_Invoker::Get_MSURF_Descriptor_64(const cv::KeyPoint& kp // convert to unit vector len = sqrt(len); - for (int i = 0; i < dsize; i++) { + for (i = 0; i < dsize; i++) { desc[i] /= len; } }