refactor feature pool
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 };
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user