All modules (except ocl and gpu) compiles and pass tests

This commit is contained in:
Andrey Kamaev
2013-03-20 20:13:46 +04:00
parent 762aefd71b
commit 2ad7b97f1c
91 changed files with 606 additions and 604 deletions

View File

@@ -626,7 +626,7 @@ void RandomizedTree::write(std::ostream &os) const
}
void RandomizedTree::savePosteriors(std::string url, bool append)
void RandomizedTree::savePosteriors(cv::String url, bool append)
{
std::ofstream file(url.c_str(), (append?std::ios::app:std::ios::out));
for (int i=0; i<num_leaves_; i++) {
@@ -641,7 +641,7 @@ void RandomizedTree::savePosteriors(std::string url, bool append)
file.close();
}
void RandomizedTree::savePosteriors2(std::string url, bool append)
void RandomizedTree::savePosteriors2(cv::String url, bool append)
{
std::ofstream file(url.c_str(), (append?std::ios::app:std::ios::out));
for (int i=0; i<num_leaves_; i++) {
@@ -915,7 +915,7 @@ printf("RTreeClassifier::write: num_quant_bits_=%i\n", num_quant_bits_);
tree_it->write(os);
}
void RTreeClassifier::saveAllFloatPosteriors(std::string url)
void RTreeClassifier::saveAllFloatPosteriors(cv::String url)
{
printf("[DEBUG] writing all float posteriors to %s...\n", url.c_str());
for (int i=0; i<(int)trees_.size(); ++i)
@@ -923,7 +923,7 @@ void RTreeClassifier::saveAllFloatPosteriors(std::string url)
printf("[DEBUG] done\n");
}
void RTreeClassifier::saveAllBytePosteriors(std::string url)
void RTreeClassifier::saveAllBytePosteriors(cv::String url)
{
printf("[DEBUG] writing all byte posteriors to %s...\n", url.c_str());
for (int i=0; i<(int)trees_.size(); ++i)
@@ -932,7 +932,7 @@ void RTreeClassifier::saveAllBytePosteriors(std::string url)
}
void RTreeClassifier::setFloatPosteriorsFromTextfile_176(std::string url)
void RTreeClassifier::setFloatPosteriorsFromTextfile_176(cv::String url)
{
std::ifstream ifs(url.c_str());

View File

@@ -465,7 +465,7 @@ namespace cv{
void OneWayDescriptor::Initialize(int pose_count, IplImage* frontal, const char* feature_name, int norm)
{
m_feature_name = std::string(feature_name);
m_feature_name = cv::String(feature_name);
CvRect roi = cvGetImageROI(frontal);
m_center = rect_center(roi);
@@ -482,7 +482,7 @@ namespace cv{
Initialize(pose_count, frontal, feature_name, 1);
return;
}
m_feature_name = std::string(feature_name);
m_feature_name = cv::String(feature_name);
CvRect roi = cvGetImageROI(frontal);
m_center = rect_center(roi);
@@ -1287,8 +1287,8 @@ namespace cv{
}
OneWayDescriptorBase::OneWayDescriptorBase(CvSize patch_size, int pose_count, const std::string &pca_filename,
const std::string &train_path, const std::string &images_list, float _scale_min, float _scale_max,
OneWayDescriptorBase::OneWayDescriptorBase(CvSize patch_size, int pose_count, const cv::String &pca_filename,
const cv::String &train_path, const cv::String &images_list, float _scale_min, float _scale_max,
float _scale_step, int pyr_levels,
int pca_dim_high, int pca_dim_low)
: m_pca_dim_high(pca_dim_high), m_pca_dim_low(pca_dim_low), scale_min(_scale_min), scale_max(_scale_max), scale_step(_scale_step)
@@ -2080,8 +2080,8 @@ namespace cv{
m_part_id = 0;
}
OneWayDescriptorObject::OneWayDescriptorObject(CvSize patch_size, int pose_count, const std::string &pca_filename,
const std::string &train_path, const std::string &images_list, float _scale_min, float _scale_max, float _scale_step, int pyr_levels) :
OneWayDescriptorObject::OneWayDescriptorObject(CvSize patch_size, int pose_count, const cv::String &pca_filename,
const cv::String &train_path, const cv::String &images_list, float _scale_min, float _scale_max, float _scale_step, int pyr_levels) :
OneWayDescriptorBase(patch_size, pose_count, pca_filename, train_path, images_list, _scale_min, _scale_max, _scale_step, pyr_levels)
{
m_part_id = 0;
@@ -2145,7 +2145,7 @@ namespace cv{
void readPCAFeatures(const FileNode &fn, CvMat** avg, CvMat** eigenvectors, const char* postfix)
{
std::string str = std::string ("avg") + postfix;
cv::String str = cv::String ("avg") + postfix;
CvMat* _avg = reinterpret_cast<CvMat*> (fn[str].readObj());
if (_avg != 0)
{
@@ -2153,7 +2153,7 @@ namespace cv{
cvReleaseMat(&_avg);
}
str = std::string ("eigenvectors") + postfix;
str = cv::String ("eigenvectors") + postfix;
CvMat* _eigenvectors = reinterpret_cast<CvMat*> (fn[str].readObj());
if (_eigenvectors != 0)
{
@@ -2166,8 +2166,8 @@ namespace cv{
* OneWayDescriptorMatcher *
\****************************************************************************************/
OneWayDescriptorMatcher::Params::Params( int _poseCount, Size _patchSize, std::string _pcaFilename,
std::string _trainPath, std::string _trainImagesList,
OneWayDescriptorMatcher::Params::Params( int _poseCount, Size _patchSize, cv::String _pcaFilename,
cv::String _trainPath, cv::String _trainImagesList,
float _minScale, float _maxScale, float _stepScale ) :
poseCount(_poseCount), patchSize(_patchSize), pcaFilename(_pcaFilename),
trainPath(_trainPath), trainImagesList(_trainImagesList),
@@ -2271,7 +2271,7 @@ namespace cv{
void OneWayDescriptorMatcher::read( const FileNode &fn )
{
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, std::string (), std::string (), std::string (),
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, cv::String (), cv::String (), cv::String (),
params.minScale, params.maxScale, params.stepScale );
base->Read (fn);
}

View File

@@ -617,7 +617,7 @@ void LDetector::read(const FileNode& objnode)
clusteringDistance = (int)objnode["clustering-distance"];
}
void LDetector::write(FileStorage& fs, const std::string& name) const
void LDetector::write(FileStorage& fs, const cv::String& name) const
{
WriteStructContext ws(fs, name, CV_NODE_MAP);
@@ -707,7 +707,7 @@ FernClassifier::FernClassifier(const std::vector<std::vector<Point2f> >& points,
}
void FernClassifier::write(FileStorage& fs, const std::string& objname) const
void FernClassifier::write(FileStorage& fs, const cv::String& objname) const
{
WriteStructContext ws(fs, objname, CV_NODE_MAP);
@@ -1228,7 +1228,7 @@ nstructs(_nstructs), structSize(_structSize), nviews(_nviews),
compressionMethod(_compressionMethod), patchGenerator(_patchGenerator)
{}
FernDescriptorMatcher::Params::Params( const std::string& _filename )
FernDescriptorMatcher::Params::Params( const cv::String& _filename )
{
filename = _filename;
}
@@ -1476,7 +1476,7 @@ void PlanarObjectDetector::read(const FileNode& node)
}
void PlanarObjectDetector::write(FileStorage& fs, const std::string& objname) const
void PlanarObjectDetector::write(FileStorage& fs, const cv::String& objname) const
{
WriteStructContext ws(fs, objname, CV_NODE_MAP);