From a134e068efc4b1a966337bc34a7e37b022090c70 Mon Sep 17 00:00:00 2001 From: Ievgen Khvedchenia Date: Mon, 28 Apr 2014 22:25:27 +0300 Subject: [PATCH] Fix wrong checking of returned descriptor type --- modules/features2d/src/akaze.cpp | 4 ++-- modules/features2d/src/kaze.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/features2d/src/akaze.cpp b/modules/features2d/src/akaze.cpp index 7b028cca8..c5e2134df 100644 --- a/modules/features2d/src/akaze.cpp +++ b/modules/features2d/src/akaze.cpp @@ -151,7 +151,7 @@ namespace cv impl.Compute_Descriptors(keypoints, desc); CV_Assert((!desc.rows || desc.cols == descriptorSize())); - CV_Assert((!desc.rows || (desc.type() & descriptorType()))); + CV_Assert((!desc.rows || (desc.type() == descriptorType()))); } void AKAZE::detectImpl(InputArray image, std::vector& keypoints, InputArray mask) const @@ -197,6 +197,6 @@ namespace cv impl.Compute_Descriptors(keypoints, desc); CV_Assert((!desc.rows || desc.cols == descriptorSize())); - CV_Assert((!desc.rows || (desc.type() & descriptorType()))); + CV_Assert((!desc.rows || (desc.type() == descriptorType()))); } } \ No newline at end of file diff --git a/modules/features2d/src/kaze.cpp b/modules/features2d/src/kaze.cpp index e5b935437..85835d8a1 100644 --- a/modules/features2d/src/kaze.cpp +++ b/modules/features2d/src/kaze.cpp @@ -120,7 +120,7 @@ namespace cv impl.Feature_Description(keypoints, desc); CV_Assert((!desc.rows || desc.cols == descriptorSize())); - CV_Assert((!desc.rows || (desc.type() & descriptorType()))); + CV_Assert((!desc.rows || (desc.type() == descriptorType()))); } void KAZE::detectImpl(InputArray image, std::vector& keypoints, InputArray mask) const @@ -168,6 +168,6 @@ namespace cv impl.Feature_Description(keypoints, desc); CV_Assert((!desc.rows || desc.cols == descriptorSize())); - CV_Assert((!desc.rows || (desc.type() & descriptorType()))); + CV_Assert((!desc.rows || (desc.type() == descriptorType()))); } } \ No newline at end of file