diff --git a/modules/contrib/src/selfsimilarity.cpp b/modules/contrib/src/selfsimilarity.cpp index 0771837084..05326a48e0 100644 --- a/modules/contrib/src/selfsimilarity.cpp +++ b/modules/contrib/src/selfsimilarity.cpp @@ -209,7 +209,7 @@ void SelfSimDescriptor::compute(const Mat& img, vector& descriptors, Size for( x = 0 ; x < ssd.cols; x++ ) { int index = mappingMaskPtr[x]; - feature[index] = std::max(feature[index], ssdPtr[x]); + feature[index] = std::min(feature[index], ssdPtr[x]); } }