From: marina.kolpakova Date: Thu, 10 Jan 2013 12:30:18 +0000 (+0400) Subject: fix wartings for 32bit build X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~4025^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e903ce10ce3dc41992a317c02d75dfca6996f179;p=platform%2Fupstream%2Fopencv.git fix wartings for 32bit build --- diff --git a/apps/sft/fpool.cpp b/apps/sft/fpool.cpp index c9493a6..2aa55c0 100644 --- a/apps/sft/fpool.cpp +++ b/apps/sft/fpool.cpp @@ -76,6 +76,15 @@ void sft::write(cv::FileStorage& fs, const string&, const ICF& f) sft::ICFFeaturePool::~ICFFeaturePool(){} +// #define USE_LONG_SEEDS +#if defined USE_LONG_SEEDS +# define FEATURE_RECT_SEED 8854342234LU +#else +# define FEATURE_RECT_SEED 88543422LU +#endif +# define DCHANNELS_SEED 314152314LU +#undef USE_LONG_SEEDS + void sft::ICFFeaturePool::fill(int desired) { int mw = model.width; @@ -88,8 +97,8 @@ void sft::ICFFeaturePool::fill(int desired) pool.reserve(nfeatures); - sft::Random::engine eng(8854342234LU); - sft::Random::engine eng_ch(314152314LU); + sft::Random::engine eng(FEATURE_RECT_SEED); + sft::Random::engine eng_ch(DCHANNELS_SEED); sft::Random::uniform chRand(0, N_CHANNELS - 1); diff --git a/modules/ml/src/octave.cpp b/modules/ml/src/octave.cpp index 9b36b22..bb01088 100644 --- a/modules/ml/src/octave.cpp +++ b/modules/ml/src/octave.cpp @@ -239,11 +239,21 @@ void cv::Octave::processPositives(const Dataset* dataset, const FeaturePool* poo nnegatives = cvRound(nnegatives * total / (double)npositives); } +// #define USE_LONG_SEEDS +#if defined USE_LONG_SEEDS +# define INDEX_ENGINE_SEED 764224349868LU +#else +# define INDEX_ENGINE_SEED 76422434LU +#endif +# define DX_DY_SEED 65633343LU +#undef USE_LONG_SEEDS + + void cv::Octave::generateNegatives(const Dataset* dataset, const FeaturePool* pool) { // ToDo: set seed, use offsets - sft::Random::engine eng(65633343LU); - sft::Random::engine idxEng(764224349868LU); + sft::Random::engine eng(DX_DY_SEED); + sft::Random::engine idxEng(INDEX_ENGINE_SEED); int h = boundingBox.height;