mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Merge remote-tracking branch 'upstream/master' into svm_hog
This commit is contained in:
@@ -1391,6 +1391,8 @@ bool CvSVM::do_train( int svm_type, int sample_count, int var_count, const float
|
||||
for( i = 0; i < sample_count; i++ )
|
||||
sv_count += fabs(alpha[i]) > 0;
|
||||
|
||||
CV_Assert(sv_count != 0);
|
||||
|
||||
sv_total = df->sv_count = sv_count;
|
||||
CV_CALL( df->alpha = (double*)cvMemStorageAlloc( storage, sv_count*sizeof(df->alpha[0])) );
|
||||
CV_CALL( sv = (float**)cvMemStorageAlloc( storage, sv_count*sizeof(sv[0])));
|
||||
@@ -2997,4 +2999,3 @@ cvTrainSVM_CrossValidation( const CvMat* train_data, int tflag,
|
||||
#endif
|
||||
|
||||
/* End of file. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user