diff --git a/modules/features2d/src/descriptors.cpp b/modules/features2d/src/descriptors.cpp index 4ff71662a..9e1bd51f0 100644 --- a/modules/features2d/src/descriptors.cpp +++ b/modules/features2d/src/descriptors.cpp @@ -395,9 +395,9 @@ void OpponentColorDescriptorExtractor::computeImpl( const Mat& bgrImage, vector< int mergedCount = 0; // cp - current channel position size_t cp[] = {0, 0, 0}; - while( cp[0] < channelKeypoints[0].size() && - cp[1] < channelKeypoints[1].size() && - cp[2] < channelKeypoints[2].size() ) + while( cp[0] < channelKeypoints[0].size() && + cp[1] < channelKeypoints[1].size() && + cp[2] < channelKeypoints[2].size() ) { const int maxInitIdx = std::max( channelKeypoints[0][idxs[0][cp[0]]].class_id, std::max( channelKeypoints[1][idxs[1][cp[1]]].class_id,