cvCreateCascadeClassifier

来源:互联网 发布:淘宝关闭订单 编辑:程序博客网 时间:2024/05/22 06:58

原文如下:

/* * cvCreateCascadeClassifier * * Create cascade classifier * dirname          - directory name in which cascade classifier will be created. *   It must exist and contain subdirectories 0, 1, 2, ... (nstages-1). * vecfilename      - name of .vec file with object's images * bgfilename       - name of background description file * bg_vecfile       - true if bgfilename represents a vec file with discrete negatives * npos             - number of positive samples used in training of each stage * nneg             - number of negative samples used in training of each stage * nstages          - number of stages * numprecalculated - number of features being precalculated. Each precalculated feature *   requires (number_of_samples*(sizeof( float ) + sizeof( short ))) bytes of memory * numsplits        - number of binary splits in each weak classifier *   1 - stumps, 2 and more - trees. * minhitrate       - desired min hit rate of each stage * maxfalsealarm    - desired max false alarm of each stage * weightfraction   - weight trimming parameter * mode             - 0 - BASIC = Viola *                    1 - CORE  = All upright *                    2 - ALL   = All features * symmetric        - if not 0 vertical symmetry is assumed * equalweights     - if not 0 initial weights of all samples will be equal * winwidth         - sample width * winheight        - sample height * boosttype        - type of applied boosting algorithm *   0 - Discrete AdaBoost *   1 - Real AdaBoost *   2 - LogitBoost *   3 - Gentle AdaBoost * stumperror       - type of used error if Discrete AdaBoost algorithm is applied *   0 - misclassification error *   1 - gini error *   2 - entropy error */void cvCreateCascadeClassifier( const char* dirname,                                const char* vecfilename,                                const char* bgfilename,                                int npos, int nneg, int nstages,                                int numprecalculated,                                int numsplits,                                float minhitrate = 0.995F, float maxfalsealarm = 0.5F,                                float weightfraction = 0.95F,                                int mode = 0, int symmetric = 1,                                int equalweights = 1,                                int winwidth = 24, int winheight = 24,                                int boosttype = 3, int stumperror = 0 );void cvCreateTreeCascadeClassifier( const char* dirname,                                    const char* vecfilename,                                    const char* bgfilename,                                    int npos, int nneg, int nstages,                                    int numprecalculated,                                    int numsplits,                                    float minhitrate, float maxfalsealarm,                                    float weightfraction,                                    int mode, int symmetric,                                    int equalweights,                                    int winwidth, int winheight,                                    int boosttype, int stumperror,                                    int maxtreesplits, int minpos, bool bg_vecfile = false );


翻译如下:

/* * cvCreateCascadeClassifier *创建级联分类器 * dirname          -将创建目录分类器的目录名 *   该目录名必须存在,其包含的子目录为 0, 1, 2, ... (nstages-1). * vecfilename      - .vec文件,它包括包含样本图像的文件名 * bgfilename       - 背景描述文件名 * bg_vecfile       - 如果bgfilename 代表一个包含离散负样本文件,那么为true * npos             - 在每一个强分类器训练所需要的正样本数 * nneg             - 在每一个强分类器训练所需要的负样本数 * nstages          - 强分类器的层数 * numprecalculated - 预计算的特征数量,每一个预计算的特征需要的内存大小为: (number_of_samples*(sizeof( float ) + sizeof( short ))) bytes  * numsplits        -每个弱分类器的分支数  *   1 - stumps, 2 and more - trees. * minhitrate       - 每一级的最小击中率 * maxfalsealarm    - 每一级的最大虚警率 * weightfraction   - 剔除小样本的权重 * mode             - 0 - BASIC = Viola *                    1 - CORE  = All upright *                    2 - ALL   = All features * symmetric        - 非0表示垂直对称 * equalweights     - 非0表示所有样本的初始化权重相等 * winwidth         - 样本的宽 * winheight        - 样本的高 * boosttype        - 应用的提升算法类型 *   0 - Discrete AdaBoost *   1 - Real AdaBoost *   2 - LogitBoost *   3 - Gentle AdaBoost * stumperror       - 如果是 Discrete AdaBoost算法时使用的树桩错误率 *   0 - 错分不纯度 *   1 - 基尼不纯度 *   2 - 熵不纯度 */void cvCreateCascadeClassifier( const char* dirname,                                const char* vecfilename,                                const char* bgfilename,                                int npos, int nneg, int nstages,                                int numprecalculated,                                int numsplits,                                float minhitrate = 0.995F, float maxfalsealarm = 0.5F,                                float weightfraction = 0.95F,                                int mode = 0, int symmetric = 1,                                int equalweights = 1,                                int winwidth = 24, int winheight = 24,                                int boosttype = 3, int stumperror = 0 );void cvCreateTreeCascadeClassifier( const char* dirname,                                    const char* vecfilename,                                    const char* bgfilename,                                    int npos, int nneg, int nstages,                                    int numprecalculated,                                    int numsplits,                                    float minhitrate, float maxfalsealarm,                                    float weightfraction,                                    int mode, int symmetric,                                    int equalweights,                                    int winwidth, int winheight,                                    int boosttype, int stumperror,                                    int maxtreesplits, int minpos, bool bg_vecfile = false );



0 0