From 2bdd8359625e464aae13474dc18b6141a602a82c Mon Sep 17 00:00:00 2001 From: Kwang Moo Yi Date: Wed, 6 Jan 2016 12:48:27 +0100 Subject: [PATCH] mapping change for opencv to oxford abc --- .../OpenCVKeyptDetector/opencvKeypointDetector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/matlab/external/external_codes/OpenCVKeyptDetector/opencvKeypointDetector.cpp b/matlab/external/external_codes/OpenCVKeyptDetector/opencvKeypointDetector.cpp index a4d0484..d5a120d 100755 --- a/matlab/external/external_codes/OpenCVKeyptDetector/opencvKeypointDetector.cpp +++ b/matlab/external/external_codes/OpenCVKeyptDetector/opencvKeypointDetector.cpp @@ -62,9 +62,11 @@ main(int argc, char *argv[]) { for(int i=0; i < keypts.size(); ++i){ ofs_keypoints << std::setprecision(10) << keypts[i].pt.x << " "; ofs_keypoints << std::setprecision(10) << keypts[i].pt.y << " "; - ofs_keypoints << std::setprecision(10) << 1.0 / (keypts[i].size*keypts[i].size) << " "; + ofs_keypoints << std::setprecision(10) << 1.0 / (0.5*keypts[i].size*0.5*keypts[i].size) << " "; // 0.5 since + // opencv uses + // diameter ofs_keypoints << 0 << " "; - ofs_keypoints << std::setprecision(10) << 1.0 / (keypts[i].size*keypts[i].size) ; + ofs_keypoints << std::setprecision(10) << 1.0 / (0.5*keypts[i].size*0.5*keypts[i].size) ; ofs_keypoints << endl; ofs_score << std::setprecision(10) << keypts[i].response << endl; }