Commit c4188581 authored by Kirill Kornyakov's avatar Kirill Kornyakov

bug #762 fixed

parent e7f491ae
......@@ -49,6 +49,7 @@
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
using namespace std;
......@@ -76,6 +77,8 @@ int main( int argc, char* argv[] )
int width = 24;
int height = 24;
srand(time(0));
if( argc == 1 )
{
printf( "Usage: %s\n [-info <collection_file_name>]\n"
......
......@@ -1354,8 +1354,9 @@ void icvGetNextFromBackgroundData( CvBackgroundData* data,
// printf( "Open background image: %s\n", data->filename[data->last] );
//#endif /* CV_VERBOSE */
img = cvLoadImage( data->filename[data->last++], 0 );
data->last = rand() % data->count;
data->last %= data->count;
img = cvLoadImage( data->filename[data->last], 0 );
if( !img )
continue;
data->round += data->last / data->count;
......
......@@ -311,11 +311,10 @@ public:
Size minSize=Size(),
Size maxSize=Size() );
bool isOldFormatCascade() const;
virtual Size getOriginalWindowSize() const;
int getFeatureType() const;
bool setImage(const Mat&);
bool setImage( const Mat& );
protected:
virtual bool detectSingleScale( const Mat& image, int stripCount, Size processingRectSize,
......
......@@ -872,7 +872,7 @@ Size CascadeClassifier::getOriginalWindowSize() const
bool CascadeClassifier::setImage(const Mat& image)
{
featureEvaluator->setImage(image, data.origWinSize);
return featureEvaluator->setImage(image, data.origWinSize);
}
void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& objects,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment