From ffe49bdebe6978a832026ef675bc2ec8f73c8ced Mon Sep 17 00:00:00 2001 From: Shresth Verma Date: Mon, 4 Dec 2017 03:16:22 +0530 Subject: [PATCH] fixed createsamples info message --- apps/createsamples/utility.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/createsamples/utility.cpp b/apps/createsamples/utility.cpp index 2226cd8..c1e5273 100644 --- a/apps/createsamples/utility.cpp +++ b/apps/createsamples/utility.cpp @@ -995,12 +995,12 @@ void icvGetNextFromBackgroundData( CvBackgroundData* data, { round = data->round; + data->last = rand() % data->count; + #ifdef CV_VERBOSE printf( "Open background image: %s\n", data->filename[data->last] ); #endif /* CV_VERBOSE */ - data->last = rand() % data->count; - data->last %= data->count; img = cvLoadImage( data->filename[data->last], 0 ); if( !img ) continue; -- 2.7.4