亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? opencvref_ml.htm

?? OpenCV1.0 + C++Builder6 example of finding coners programm. Highlites coners it found in frame.
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
in the method <code>predict</code>.</p>
<p>The suffix "const" means that prediction does not affect the internal model state, so
the method can be safely called from within different threads.</p>

<!-- *****************************************************************************************
     *****************************************************************************************
     ***************************************************************************************** -->

<hr><h2><a name="ch_nbayes">Normal Bayes Classifier</a></h2>
This is a simple classification model assuming that feature vectors from each class
are normally distributed (though, not necessarily independently distributed),
so the whole data distribution function is assumed to be a Gaussian mixture, one component per a class. 
Using the training data the algorithm estimates mean vectors and covariation matrices for every class,
and then it uses them for prediction.

<p><a name="NBC_paper"></a><b>
[Fukunaga90] K. Fukunaga.
Introduction to Statistical Pattern Recognition. second ed., New York: Academic Press, 1990.
</b>
</p>

<hr><h3><a name="decl_CvNormalBayesClassifier">CvNormalBayesClassifier</a></h3>
<p class="Blurb">Bayes classifier for normally distributed data</p>
<pre>
class CvNormalBayesClassifier : public CvStatModel
{
public:
    CvNormalBayesClassifier();
    virtual ~CvNormalBayesClassifier();

    CvNormalBayesClassifier( const CvMat* _train_data, const CvMat* _responses,
        const CvMat* _var_idx=0, const CvMat* _sample_idx=0 );

    virtual bool train( const CvMat* _train_data, const CvMat* _responses,
        const CvMat* _var_idx = 0, const CvMat* _sample_idx=0, bool update=false );

    virtual float predict( const CvMat* _samples, CvMat* results=0 ) const;
    virtual void clear();

    virtual void save( const char* filename, const char* name=0 );
    virtual void load( const char* filename, const char* name=0 );

    virtual void write( CvFileStorage* storage, const char* name );
    virtual void read( CvFileStorage* storage, CvFileNode* node );
protected:
    ...
};
</pre>

<hr><h3><a name="decl_CvNormalBayesClassifier_train">CvNormalBayesClassifier::train</a></h3>
<p class="Blurb">Trains the model</p>
<pre>
bool CvNormalBayesClassifier::train( const CvMat* _train_data, const CvMat* _responses,
               const CvMat* _var_idx = 0, const CvMat* _sample_idx=0, bool update=false );
</pre>
<p>
The method trains the Normal Bayes classifier. It follows the conventions of
generic <a href="#decl_CvStatModel_train">train</a> "method" with the following limitations:
only CV_ROW_SAMPLE data layout is supported; the input variables are all ordered;
the output variable is categorical (i.e. elements of <code>_responses</code>
must be integer numbers, though the vector may have <code>32fC1</code> type),
missing measurements are not supported.</p>
<p>In addition, there is <code>update</code> flag that identifies, whether the model should
be trained from scratch (<code>update=false</code>) or should be updated using new training data
(<code>update=true</code>).
</p>


<hr><h3><a name="decl_CvNormalBayesClassifier_predict">CvNormalBayesClassifier::predict</a></h3>
<p class="Blurb">Predicts the response for sample(s)</p>
<pre>
float CvNormalBayesClassifier::predict( const CvMat* samples, CvMat* results=0 ) const;
</pre>
<p>
The method <code>predict</code> estimates the most probable classes for the input vectors.
The input vectors (one or more) are stored as rows of the matrix <code>samples</code>.
In case of multiple input vectors, there should be output vector <code>results</code>.
The predicted class for a single input vector is returned by the method.</p>

<!-- *****************************************************************************************
     *****************************************************************************************
     ***************************************************************************************** -->

<hr>
<h2><a name="ch_knn">K Nearest Neighbors</a></h2>

<p>
The algorithm caches all the training samples, and it predicts the response for
a new sample by analyzing a certain number (<em>K</em>) of the nearest neighbors 
of the sample (using voting, calculating weighted sum etc.) The method is 
sometimes referred to as &quot;learning by example&quot;, i.e. for prediction it looks for 
the feature vector
with a known response that is closest to the given vector.
</p>

<hr><h3><a name="decl_CvKNearest">CvKNearest</a></h3>
<p class="Blurb">K Nearest Neighbors model</p>
<pre>
class CvKNearest : public CvStatModel
{
public:

    CvKNearest();
    virtual ~CvKNearest();

    CvKNearest( const CvMat* _train_data, const CvMat* _responses,
                const CvMat* _sample_idx=0, bool _is_regression=false, int max_k=32 );

    virtual bool train( const CvMat* _train_data, const CvMat* _responses,
                        const CvMat* _sample_idx=0, bool is_regression=false,
                        int _max_k=32, bool _update_base=false );

    virtual float find_nearest( const CvMat* _samples, int k, CvMat* results,
        const float** neighbors=0, CvMat* neighbor_responses=0, CvMat* dist=0 ) const;

    virtual void clear();
    int get_max_k() const;
    int get_var_count() const;
    int get_sample_count() const;
    bool is_regression() const;

protected:
    ...
};
</pre>


<hr><h3><a name="decl_CvKNearest_train">CvKNearest::train</a></h3>
<p class="Blurb">Trains the model</p>
<pre>
bool CvKNearest::train( const CvMat* _train_data, const CvMat* _responses,
                        const CvMat* _sample_idx=0, bool is_regression=false,
                        int _max_k=32, bool _update_base=false );
</pre>
<p>
The method trains the K-Nearest model. It follows the conventions of
generic <a href="#decl_CvStatModel_train">train</a> "method" with the following limitations:
only CV_ROW_SAMPLE data layout is supported, the input variables are all ordered,
the output variables can be either categorical (<code>is_regression=false</code>)
or ordered (<code>is_regression=true</code>), variable subsets (<code>var_idx</code>) and
missing measurements are not supported.</p>
<p>The parameter <code>_max_k</code> specifies the number of maximum neighbors that may be
passed to the method <a href="decl_CvKNearest_find_nearest">find_nearest</a>.</p>
<p>The parameter <code>_update_base</code> specifies, whether the model is trained from scratch (<code>_update_base=false</code>), or
it is updated using the new training data
(<code>_update_base=true</code>). In the latter case the parameter <code>_max_k</code>
must not be larger than the original value.</p>


<hr><h3><a name="decl_CvKNearest_find_nearest">CvKNearest::find_nearest</a></h3>
<p class="Blurb">Finds the neighbors for the input vectors</p>
<pre>
float CvKNearest::find_nearest( const CvMat* _samples, int k, CvMat* results=0,
        const float** neighbors=0, CvMat* neighbor_responses=0, CvMat* dist=0 ) const;
</pre>
<p>
For each input vector (which are rows of the matrix <code>_samples</code>)
the method finds <code>k&le;get_max_k()</code> nearest neighbor. In case of regression,
the predicted result will be a mean value of the particular vector's neighbor responses.
In case of classification the class is determined by voting.</p>
<p>
For custom classification/regression prediction, the method can optionally return
pointers to the neighbor vectors themselves (<code>neighbors</code>, array of
<code>k*_samples-&gt;rows</code> pointers), their corresponding output values
(<code>neighbor_responses</code>, a vector of <code>k*_samples-&gt;rows</code> elements)
and the distances from the input vectors to the neighbors
(<code>dist</code>, also a vector of <code>k*_samples-&gt;rows</code> elements).</p>
<p>For each input vector the neighbors are sorted by their distances to the vector.</p>
<p>If only a single input vector is passed, all output matrices are optional and the
predicted value is returned by the method.</p>


<hr>
<h3>Example. Classification of 2D samples from a gaussian mixture with k-nearest classifier</h3>
<pre>
#include "ml.h"
#include "highgui.h"

int main( int argc, char** argv )
{
    const int K = 10;
    int i, j, k, accuracy;
    float response;
    int train_sample_count = 100;
    CvRNG rng_state = cvRNG(-1);
    CvMat* trainData = cvCreateMat( train_sample_count, 2, CV_32FC1 );
    CvMat* trainClasses = cvCreateMat( train_sample_count, 1, CV_32FC1 );
    IplImage* img = cvCreateImage( cvSize( 500, 500 ), 8, 3 );
    float _sample[2];
    CvMat sample = cvMat( 1, 2, CV_32FC1, _sample );
    cvZero( img );

    CvMat trainData1, trainData2, trainClasses1, trainClasses2;

    // form the training samples
    cvGetRows( trainData, &trainData1, 0, train_sample_count/2 );
    cvRandArr( &rng_state, &trainData1, CV_RAND_NORMAL, cvScalar(200,200), cvScalar(50,50) );

    cvGetRows( trainData, &trainData2, train_sample_count/2, train_sample_count );
    cvRandArr( &rng_state, &trainData2, CV_RAND_NORMAL, cvScalar(300,300), cvScalar(50,50) );

    cvGetRows( trainClasses, &trainClasses1, 0, train_sample_count/2 );
    cvSet( &trainClasses1, cvScalar(1) );

    cvGetRows( trainClasses, &trainClasses2, train_sample_count/2, train_sample_count );
    cvSet( &trainClasses2, cvScalar(2) );

    // learn classifier
    CvKNearest knn( trainData, trainClasses, 0, false, K );
    CvMat* nearests = cvCreateMat( 1, K, CV_32FC1);

    for( i = 0; i &lt; img-&gt;height; i++ )
    {
        for( j = 0; j &lt; img-&gt;width; j++ )
        {
            sample.data.fl[0] = (float)j;
            sample.data.fl[1] = (float)i;

            // estimates the response and get the neighbors' labels
            response = knn.find_nearest(&sample,K,0,0,nearests,0);

            // compute the number of neighbors representing the majority
            for( k = 0, accuracy = 0; k &lt; K; k++ )
            {
                if( nearests-&gt;data.fl[k] == response)
                    accuracy++;
            }
            // highlight the pixel depending on the accuracy (or confidence)
            cvSet2D( img, i, j, response == 1 ?
                (accuracy &gt; 5 ? CV_RGB(180,0,0) : CV_RGB(180,120,0)) :
                (accuracy &gt; 5 ? CV_RGB(0,180,0) : CV_RGB(120,120,0)) );
        }
    }

    // display the original training samples
    for( i = 0; i &lt; train_sample_count/2; i++ )
    {
        CvPoint pt;
        pt.x = cvRound(trainData1.data.fl[i*2]);
        pt.y = cvRound(trainData1.data.fl[i*2+1]);
        cvCircle( img, pt, 2, CV_RGB(255,0,0), CV_FILLED );
        pt.x = cvRound(trainData2.data.fl[i*2]);
        pt.y = cvRound(trainData2.data.fl[i*2+1]);
        cvCircle( img, pt, 2, CV_RGB(0,255,0), CV_FILLED );
    }

    cvNamedWindow( "classifier result", 1 );
    cvShowImage( "classifier result", img );
    cvWaitKey(0);

    cvReleaseMat( &trainClasses );
    cvReleaseMat( &trainData );
    return 0;
}

</pre>

<!-- *****************************************************************************************
     *****************************************************************************************
     ***************************************************************************************** -->
<hr><h2><a name="ch_svm">Support Vector Machines</a></h2>

<p>Originally, support vector machines (SVM) was a technique for building an optimal (in some sense)
binary (2-class) classifier. Then the technique has been extended to regression and clustering problems.
SVM is a partial case of kernel-based methods,
it maps feature vectors into higher-dimensional space using some kernel function, and then it builds

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品传媒视频| 久久99久久久欧美国产| 亚洲午夜一二三区视频| 奇米精品一区二区三区在线观看| 成人激情小说乱人伦| 欧美日韩亚洲不卡| 久久精品人人爽人人爽| 日本特黄久久久高潮| av成人老司机| 日本一区二区免费在线 | 亚洲婷婷在线视频| 国产精品中文字幕日韩精品 | 亚洲免费在线观看| 国产精品影视天天线| 欧美伦理影视网| 亚洲啪啪综合av一区二区三区| 久久99热狠狠色一区二区| 欧美三级蜜桃2在线观看| 国产精品色在线| 国产米奇在线777精品观看| 欧美日韩高清在线播放| 亚洲视频小说图片| 成人av在线资源网站| 国产午夜精品久久久久久免费视 | 91同城在线观看| 欧美精彩视频一区二区三区| 久久精品国产亚洲高清剧情介绍| 欧美日韩精品久久久| 亚洲精品菠萝久久久久久久| 91原创在线视频| 国产精品免费网站在线观看| 国产ts人妖一区二区| 久久综合成人精品亚洲另类欧美| 男女男精品视频| 欧美大片拔萝卜| 青椒成人免费视频| 欧美大黄免费观看| 国内精品在线播放| 欧美韩日一区二区三区| 成人免费的视频| 亚洲男人的天堂一区二区| 91蜜桃网址入口| 一区二区三区在线影院| 在线观看日韩一区| 午夜日韩在线电影| 777午夜精品视频在线播放| 琪琪一区二区三区| 久久久久久久综合狠狠综合| 丰满亚洲少妇av| 亚洲人精品一区| 欧美性大战久久久| 麻豆久久久久久| 久久久99免费| 91小视频免费看| 日本最新不卡在线| 欧美精品一区二| aaa亚洲精品| 午夜精品视频在线观看| 日韩欧美123| 不卡视频免费播放| 亚洲一区二区欧美| 26uuu精品一区二区| 成人免费视频网站在线观看| 一区二区视频免费在线观看| 欧美一区二区人人喊爽| 高清在线不卡av| 亚洲一区自拍偷拍| 久久久久久一二三区| 91久久一区二区| 久久66热偷产精品| 一区二区三区在线视频播放| 日韩三级视频在线观看| www.亚洲人| 日韩精品久久久久久| 欧美激情中文字幕| 欧美精品免费视频| 成人妖精视频yjsp地址| 日韩影视精彩在线| 自拍偷拍亚洲激情| 日韩欧美成人激情| 欧美影视一区在线| 国产成人在线电影| 麻豆91在线播放免费| 综合欧美一区二区三区| 欧美精品一区二区三区久久久| 色婷婷av久久久久久久| 国产mv日韩mv欧美| 裸体健美xxxx欧美裸体表演| 一区二区三区在线视频播放| 国产日韩欧美制服另类| 欧美一区二区性放荡片| 成人福利电影精品一区二区在线观看| 日韩成人伦理电影在线观看| 亚洲欧美偷拍另类a∨色屁股| 精品日韩欧美一区二区| 欧美一区国产二区| 欧美视频在线不卡| 91麻豆国产自产在线观看| 激情综合亚洲精品| 麻豆国产欧美一区二区三区| 亚洲一区二区美女| 亚洲视频一区二区在线| 国产精品视频一区二区三区不卡| 精品少妇一区二区三区视频免付费 | 亚洲电影一级黄| 日韩一区中文字幕| 国产精品毛片无遮挡高清| 久久精品人人做| 久久久久高清精品| 日本一区二区视频在线| 久久久激情视频| 国产午夜亚洲精品羞羞网站| 精品播放一区二区| 久久综合久久鬼色中文字| 欧美一区二区在线播放| 日韩亚洲电影在线| 日韩免费观看2025年上映的电影| 555夜色666亚洲国产免| 在线电影院国产精品| 88在线观看91蜜桃国自产| 欧美精品在线观看一区二区| 777午夜精品免费视频| 欧美丰满高潮xxxx喷水动漫| 欧美喷水一区二区| 日韩欧美在线一区二区三区| 日韩欧美电影一二三| 日韩免费一区二区三区在线播放| 欧美精品一区二区三区在线播放| 精品国产露脸精彩对白| 国产日韩欧美综合在线| 国产精品国产馆在线真实露脸| 亚洲乱码精品一二三四区日韩在线| 椎名由奈av一区二区三区| 一区二区三区高清| 天天色图综合网| 久久99精品国产.久久久久| 国产成人自拍网| 91日韩一区二区三区| 欧美日韩高清在线| 久久久久久亚洲综合| 亚洲欧美偷拍卡通变态| 日韩国产欧美在线视频| 国产伦精品一区二区三区免费迷| 成人av电影免费在线播放| 欧美日精品一区视频| 欧美大胆一级视频| 1024精品合集| 免费成人美女在线观看| eeuss鲁一区二区三区| 7777精品伊人久久久大香线蕉经典版下载 | 欧美日韩国产精品成人| 日韩女优电影在线观看| 国产精品美女久久福利网站| 亚洲一区二区视频在线观看| 老司机一区二区| 91网址在线看| 日韩精品一区二区三区蜜臀| 亚洲免费资源在线播放| 极品尤物av久久免费看| 色94色欧美sute亚洲线路二| 欧美成人艳星乳罩| 亚洲精品成a人| 国产999精品久久久久久绿帽| 色综合久久88色综合天天免费| 日韩欧美在线一区二区三区| 亚洲色大成网站www久久九九| 蜜桃视频一区二区三区在线观看| 99久久免费国产| 26uuu国产电影一区二区| 亚洲国产精品精华液网站| 成人黄页在线观看| 日韩视频在线永久播放| 亚洲综合激情另类小说区| 国产91露脸合集magnet| 91精品国产综合久久久久久| 亚洲欧美日韩国产手机在线| 国产麻豆视频一区二区| 日韩一区二区在线看片| 一区二区三区在线视频播放| 成人av网站在线观看| 26uuu亚洲综合色欧美| 日韩精品高清不卡| 欧美色中文字幕| 亚洲欧美日韩系列| av男人天堂一区| 久久久久99精品国产片| 老司机一区二区| 欧美一区二区在线免费播放| 亚洲永久免费av| 在线精品视频一区二区| 亚洲美女偷拍久久| 色婷婷综合在线| 亚洲视频一区二区在线| 91免费在线视频观看| 亚洲色图.com| 日本电影欧美片| 亚洲国产精品久久人人爱蜜臀| 欧洲一区在线电影| 亚洲高清免费视频| 91精品国产手机|