diff --git a/apps/traincascade/imagestorage.cpp b/apps/traincascade/imagestorage.cpp index 394481b73..a7cc6cecf 100644 --- a/apps/traincascade/imagestorage.cpp +++ b/apps/traincascade/imagestorage.cpp @@ -70,7 +70,7 @@ bool CvCascadeImageReader::NegReader::nextImg() _offset.x = std::min( (int)round % winSize.width, src.cols - winSize.width ); _offset.y = std::min( (int)round / winSize.width, src.rows - winSize.height ); if( !src.empty() && src.type() == CV_8UC1 - && offset.x >= 0 && offset.y >= 0 ) + && _offset.x >= 0 && _offset.y >= 0 ) break; }