diff --git a/modules/features2d/src/descriptors.cpp b/modules/features2d/src/descriptors.cpp index c83e67b30..29d185de3 100644 --- a/modules/features2d/src/descriptors.cpp +++ b/modules/features2d/src/descriptors.cpp @@ -300,8 +300,7 @@ void BruteForceMatcher >::matchImpl( const Mat& query, const Mat& /*ma { matches.clear(); matches.reserve( query.rows ); -//TODO: remove _DEBUG if bag 416 fixed -#if (defined _DEBUG || !defined HAVE_EIGEN2) +#if (!defined HAVE_EIGEN2) Mat norms; cv::reduce( train.mul( train ), norms, 1, 0); norms = norms.t(); @@ -318,12 +317,12 @@ void BruteForceMatcher >::matchImpl( const Mat& query, const Mat& /*ma #else Eigen::Matrix desc1t; Eigen::Matrix desc2; - cv2eigen( descriptors_1.t(), desc1t); - cv2eigen( descriptors_2, desc2 ); + cv2eigen( query.t(), desc1t); + cv2eigen( train, desc2 ); //Eigen::Matrix norms = desc2.rowwise().squaredNorm(); Eigen::Matrix norms = desc2.rowwise().squaredNorm() / 2; - for( int i=0;i distances = (-2) * (desc2*desc1t.col(i)); Eigen::Matrix distances = desc2*desc1t.col(i);