created abstract FeaturePool class
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user