All modules (except ocl and gpu) compiles and pass tests
This commit is contained in:
@@ -285,7 +285,7 @@ const CvMat* CvMLData::get_missing() const
|
||||
return missing;
|
||||
}
|
||||
|
||||
const std::map<std::string, int>& CvMLData::get_class_labels_map() const
|
||||
const std::map<cv::String, int>& CvMLData::get_class_labels_map() const
|
||||
{
|
||||
return class_map;
|
||||
}
|
||||
|
@@ -1537,7 +1537,7 @@ CvERTrees::~CvERTrees()
|
||||
{
|
||||
}
|
||||
|
||||
std::string CvERTrees::getName() const
|
||||
cv::String CvERTrees::getName() const
|
||||
{
|
||||
return CV_TYPE_NAME_ML_ERTREES;
|
||||
}
|
||||
|
@@ -1117,7 +1117,7 @@ void CvGBTrees::write( CvFileStorage* fs, const char* name ) const
|
||||
|
||||
CvSeqReader reader;
|
||||
int i;
|
||||
std::string s;
|
||||
cv::String s;
|
||||
|
||||
cvStartWriteStruct( fs, name, CV_NODE_MAP, CV_TYPE_NAME_ML_GBT );
|
||||
|
||||
@@ -1167,7 +1167,7 @@ void CvGBTrees::read( CvFileStorage* fs, CvFileNode* node )
|
||||
CvFileNode* trees_fnode;
|
||||
CvMemStorage* storage;
|
||||
int i, ntrees;
|
||||
std::string s;
|
||||
cv::String s;
|
||||
|
||||
clear();
|
||||
read_params( fs, node );
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include "cvconfig.h"
|
||||
#endif
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/ml.hpp"
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
@@ -246,7 +246,7 @@ CvRTrees::~CvRTrees()
|
||||
clear();
|
||||
}
|
||||
|
||||
std::string CvRTrees::getName() const
|
||||
cv::String CvRTrees::getName() const
|
||||
{
|
||||
return CV_TYPE_NAME_ML_RTREES;
|
||||
}
|
||||
@@ -730,7 +730,7 @@ void CvRTrees::write( CvFileStorage* fs, const char* name ) const
|
||||
if( ntrees < 1 || !trees || nsamples < 1 )
|
||||
CV_Error( CV_StsBadArg, "Invalid CvRTrees object" );
|
||||
|
||||
std::string modelNodeName = this->getName();
|
||||
cv::String modelNodeName = this->getName();
|
||||
cvStartWriteStruct( fs, name, CV_NODE_MAP, modelNodeName.c_str() );
|
||||
|
||||
cvWriteInt( fs, "nclasses", nclasses );
|
||||
|
@@ -1924,7 +1924,7 @@ bool CvSVM::train_auto( const CvMat* _train_data, const CvMat* _responses,
|
||||
qsort(ratios, k_fold, sizeof(ratios[0]), icvCmpIndexedratio);
|
||||
double old_dist = 0.0;
|
||||
for (int k=0; k<k_fold; ++k)
|
||||
old_dist += abs(ratios[k].val-class_ratio);
|
||||
old_dist += cv::abs(ratios[k].val-class_ratio);
|
||||
double new_dist = 1.0;
|
||||
// iterate to make the folds more balanced
|
||||
while (new_dist > 0.0)
|
||||
@@ -1941,7 +1941,7 @@ bool CvSVM::train_auto( const CvMat* _train_data, const CvMat* _responses,
|
||||
qsort(ratios, k_fold, sizeof(ratios[0]), icvCmpIndexedratio);
|
||||
new_dist = 0.0;
|
||||
for (int k=0; k<k_fold; ++k)
|
||||
new_dist += abs(ratios[k].val-class_ratio);
|
||||
new_dist += cv::abs(ratios[k].val-class_ratio);
|
||||
if (new_dist < old_dist)
|
||||
{
|
||||
// swapping really improves, so swap the samples
|
||||
|
Reference in New Issue
Block a user