Merge remote-tracking branch 'origin/2.4' into merge-2.4

Conflicts:
	CMakeLists.txt
	cmake/OpenCVDetectCUDA.cmake
	doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.rst
	modules/core/src/cmdparser.cpp
	modules/gpu/CMakeLists.txt
	modules/gpu/doc/introduction.rst
	modules/gpu/perf/perf_video.cpp
	modules/highgui/doc/reading_and_writing_images_and_video.rst
	modules/ocl/src/cl_context.cpp
	modules/video/include/opencv2/video/background_segm.hpp
	samples/cpp/image_sequence.cpp
	samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp
	samples/python/chessboard.py
	samples/python/cvutils.py
	samples/python/demhist.py
	samples/python/dft.py
	samples/python/distrans.py
	samples/python/edge.py
	samples/python/ffilldemo.py
	samples/python/fitellipse.py
	samples/python/houghlines.py
	samples/python/inpaint.py
	samples/python/logpolar.py
	samples/python/morphology.py
	samples/python/numpy_array.py
	samples/python/watershed.py
This commit is contained in:
Roman Donchenko
2013-12-03 15:50:44 +04:00
125 changed files with 3283 additions and 304 deletions

View File

@@ -137,6 +137,9 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
const CvCascadeBoostParams& _stageParams,
bool baseFormatSave )
{
// Start recording clock ticks for training time output
const clock_t begin_time = clock();
if( _cascadeDirName.empty() || _posFilename.empty() || _negFilename.empty() )
CV_Error( CV_StsBadArg, "_cascadeDirName or _bgfileName or _vecFileName is NULL" );
@@ -247,6 +250,14 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
fs << FileStorage::getDefaultObjectName(stageFilename) << "{";
tempStage->write( fs, Mat() );
fs << "}";
// Output training time up till now
float seconds = float( clock () - begin_time ) / CLOCKS_PER_SEC;
int days = int(seconds) / 60 / 60 / 24;
int hours = (int(seconds) / 60 / 60) % 24;
int minutes = (int(seconds) / 60) % 60;
int seconds_left = int(seconds) % 60;
cout << "Training until now has taken " << days << " days " << hours << " hours " << minutes << " minutes " << seconds_left <<" seconds." << endl;
}
if(stageClassifiers.size() == 0)
@@ -310,6 +321,7 @@ int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositiv
if( predict( i ) == 1.0F )
{
getcount++;
printf("%s current samples: %d\r", isPositive ? "POS":"NEG", getcount);
break;
}
}