created abstract FeaturePool class

This commit is contained in:
marina.kolpakova
2013-01-09 14:29:14 +04:00
parent 19236b6e43
commit a3600b94db
5 changed files with 88 additions and 23 deletions

View File

@@ -117,7 +117,7 @@ int main(int argc, char** argv)
int nfeatures = cfg.poolSize;
cv::Size model = cfg.model(it);
std::cout << "Model " << model << std::endl;
sft::FeaturePool pool(model, nfeatures);
sft::ICFFeaturePool pool(model, nfeatures);
nfeatures = pool.size();
@@ -132,7 +132,7 @@ int main(int argc, char** argv)
std::string path = cfg.trainPath;
sft::Dataset dataset(path, boost.logScale);
if (boost.train(dataset, pool, cfg.weaks, cfg.treeDepth))
if (boost.train(dataset, &pool, cfg.weaks, cfg.treeDepth))
{
CvFileStorage* fout = cvOpenFileStorage(cfg.resPath(it).c_str(), 0, CV_STORAGE_WRITE);
boost.write(fout, cfg.cascadeName);
@@ -142,7 +142,7 @@ int main(int argc, char** argv)
cv::Mat thresholds;
boost.setRejectThresholds(thresholds);
boost.write(fso, pool, thresholds);
boost.write(fso, &pool, thresholds);
cv::FileStorage tfs(("thresholds." + cfg.resPath(it)).c_str(), cv::FileStorage::WRITE);
tfs << "thresholds" << thresholds;