refactor feature pool

This commit is contained in:
marina.kolpakova
2013-01-30 09:57:09 +04:00
parent b4aa33b6d3
commit 0b039f3c6b
5 changed files with 33 additions and 28 deletions

View File

@@ -53,12 +53,6 @@ sft::ICFFeaturePool::ICFFeaturePool(cv::Size m, int n) : FeaturePool(), model(m)
{
CV_Assert(m != cv::Size() && n > 0);
fill(nfeatures);
builder = cv::ChannelFeatureBuilder::create();
}
void sft::ICFFeaturePool::preprocess(cv::InputArray frame, cv::OutputArray integrals) const
{
(*builder)(frame, integrals);
}
float sft::ICFFeaturePool::apply(int fi, int si, const Mat& integrals) const

View File

@@ -61,7 +61,6 @@ public:
virtual int size() const { return (int)pool.size(); }
virtual float apply(int fi, int si, const cv::Mat& integrals) const;
virtual void preprocess(cv::InputArray _frame, cv::OutputArray _integrals) const;
virtual void write( cv::FileStorage& fs, int index) const;
virtual ~ICFFeaturePool();
@@ -77,8 +76,6 @@ private:
static const unsigned int seed = 0;
cv::Ptr<cv::ChannelFeatureBuilder> builder;
enum { N_CHANNELS = 10 };
};

View File

@@ -130,7 +130,7 @@ int main(int argc, char** argv)
typedef cv::SoftCascadeOctave Octave;
cv::Ptr<Octave> boost = Octave::create(boundingBox, npositives, nnegatives, *it, shrinkage);
cv::Ptr<Octave> boost = Octave::create(boundingBox, npositives, nnegatives, *it, shrinkage, nfeatures);
std::string path = cfg.trainPath;
sft::ScaledDataset dataset(path, *it);