Download apps/traincascade/cascadeclassifier.h from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 3.97 kB
-
https://huggingface.co/tgollogly/test/resolve/main/apps/traincascade/cascadeclassifier.h
- Command line
-
hf download hf://tgollogly/test/apps/traincascade/cascadeclassifier.h
-
curl -L -o cascadeclassifier.h https://huggingface.co/tgollogly/test/resolve/main/apps/traincascade/cascadeclassifier.h
3.97 kB
| class CvCascadeParams : public CvParams | |
| { | |
| public: | |
| enum { BOOST = 0 }; | |
| static const int defaultStageType = BOOST; | |
| static const int defaultFeatureType = CvFeatureParams::HAAR; | |
| CvCascadeParams(); | |
| CvCascadeParams( int _stageType, int _featureType ); | |
| void write( cv::FileStorage &fs ) const; | |
| bool read( const cv::FileNode &node ); | |
| void printDefaults() const; | |
| void printAttrs() const; | |
| bool scanAttr( const std::string prmName, const std::string val ); | |
| int stageType; | |
| int featureType; | |
| cv::Size winSize; | |
| }; | |
| class CvCascadeClassifier | |
| { | |
| public: | |
| bool train( const std::string _cascadeDirName, | |
| const std::string _posFilename, | |
| const std::string _negFilename, | |
| int _numPos, int _numNeg, | |
| int _precalcValBufSize, int _precalcIdxBufSize, | |
| int _numStages, | |
| const CvCascadeParams& _cascadeParams, | |
| const CvFeatureParams& _featureParams, | |
| const CvCascadeBoostParams& _stageParams, | |
| bool baseFormatSave = false, | |
| double acceptanceRatioBreakValue = -1.0 ); | |
| private: | |
| int predict( int sampleIdx ); | |
| void save( const std::string cascadeDirName, bool baseFormat = false ); | |
| bool load( const std::string cascadeDirName ); | |
| bool updateTrainingSet( double minimumAcceptanceRatio, double& acceptanceRatio ); | |
| int fillPassedSamples( int first, int count, bool isPositive, double requiredAcceptanceRatio, int64& consumed ); | |
| void writeParams( cv::FileStorage &fs ) const; | |
| void writeStages( cv::FileStorage &fs, const cv::Mat& featureMap ) const; | |
| void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const; | |
| bool readParams( const cv::FileNode &node ); | |
| bool readStages( const cv::FileNode &node ); | |
| void getUsedFeaturesIdxMap( cv::Mat& featureMap ); | |
| CvCascadeParams cascadeParams; | |
| cv::Ptr<CvFeatureParams> featureParams; | |
| cv::Ptr<CvCascadeBoostParams> stageParams; | |
| cv::Ptr<CvFeatureEvaluator> featureEvaluator; | |
| std::vector< cv::Ptr<CvCascadeBoost> > stageClassifiers; | |
| CvCascadeImageReader imgReader; | |
| int numStages, curNumSamples; | |
| int numPos, numNeg; | |
| }; | |