Made changes concerning inserting prefiltering modes into CascadeClassifier class.
Now developers should call the method setFaceDetectionMaskGenerator() to use prefiltering mask generator implemented for face detection.
This commit is contained in:
parent
b8304ce764
commit
9f837d3486
@ -478,9 +478,11 @@ public:
|
||||
};
|
||||
void setMaskGenerator(Ptr<MaskGenerator> maskGenerator);
|
||||
Ptr<MaskGenerator> getMaskGenerator();
|
||||
|
||||
void setFaceDetectionMaskGenerator();
|
||||
|
||||
protected:
|
||||
Ptr<MaskGenerator> maskGenerator;
|
||||
Ptr<MaskGenerator> getDefaultMaskGenerator();
|
||||
};
|
||||
|
||||
|
||||
|
@ -787,13 +787,11 @@ Ptr<FeatureEvaluator> FeatureEvaluator::create( int featureType )
|
||||
|
||||
CascadeClassifier::CascadeClassifier()
|
||||
{
|
||||
maskGenerator=getDefaultMaskGenerator();
|
||||
}
|
||||
|
||||
CascadeClassifier::CascadeClassifier(const string& filename)
|
||||
{
|
||||
load(filename);
|
||||
maskGenerator=getDefaultMaskGenerator();
|
||||
}
|
||||
|
||||
CascadeClassifier::~CascadeClassifier()
|
||||
@ -872,12 +870,12 @@ Ptr<CascadeClassifier::MaskGenerator> CascadeClassifier::getMaskGenerator()
|
||||
return maskGenerator;
|
||||
}
|
||||
|
||||
Ptr<CascadeClassifier::MaskGenerator> CascadeClassifier::getDefaultMaskGenerator()
|
||||
void CascadeClassifier::setFaceDetectionMaskGenerator()
|
||||
{
|
||||
#ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
return tegra::getCascadeClassifierMaskGenerator(*this);
|
||||
setMaskGenerator(tegra::getCascadeClassifierMaskGenerator(*this));
|
||||
#else
|
||||
return Ptr<CascadeClassifier::MaskGenerator>();
|
||||
setMaskGenerator(Ptr<CascadeClassifier::MaskGenerator>());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user