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

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

?? acontourcollection.cpp

?? 微軟的基于HMM的人臉識別原代碼, 非常經典的說
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/*M///////////////////////////////////////////////////////////////////////////////////////
//
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
//  By downloading, copying, installing or using the software you agree to this license.
//  If you do not agree to this license, do not download, install,
//  copy or use the software.
//
//
//                        Intel License Agreement
//                For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
//   * Redistribution's of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//
//   * Redistribution's in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//
//   * The name of Intel Corporation may not be used to endorse or promote products
//     derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/

#define __COLLECTION__
#include "time.h"
#include "CvTest.h"

#define _CV_LINE_PUTSTARTPT 0x1
#define _CV_LINE_PUTENDPT   0x2

#define _MAX_BUFF_SIZE__  10

#define PI() (acos(-1))

/*****************************************************************************/
/*                          Secondaty function                               */
/*****************************************************************************/

double GetVald( double MaxVal, double Dispacement = 0. )
{
    ///////
    static double buff[ _MAX_BUFF_SIZE__ ];
    static bool   first = true;
    ///////
    bool   flag;
    double val = 0;
    int i;

    srand( (unsigned)time( NULL ) );

    srand( (unsigned)time( NULL ) );
    flag = true;
    while( flag )
    {
        val  = (double)rand() * MaxVal / RAND_MAX;
        val += Dispacement;

        if( first )
        {
            flag = false;
            first = false;
            for( i = 0 ; i < _MAX_BUFF_SIZE__ ; i++ )
            {
                buff[i] = static_cast<int>(val);
            }
        }
        else
        {
            flag = false;
            for( i = 0 ; i < _MAX_BUFF_SIZE__ ; i++ )
            {
                if( buff[i] == val ) flag = true;
            }
        }
    }

    for( i = _MAX_BUFF_SIZE__ - 1; i > 0 ; i-- )
    {
        buff[ i ] = buff[ i - 1 ];
    }

    buff[0] = static_cast<int>(val);
    return val;
} // double GetVald( double MaxVal, double Dispacement = 0. )

int GetVali( double MaxVal, double Dispacement = 0. )
{
    ////////
    static int buff[ _MAX_BUFF_SIZE__ ];
    static bool   first = true;
    static int    maxloop = 1000;
    ////////
    bool   flag;
    double val = 0;
    int i;

    srand( (unsigned)time( NULL ) );
    flag = true;
    int loop = maxloop;
    while( flag & ( loop != 0 ) )
    {
        loop--;
        val  = (  (double)rand() * MaxVal ) / (double)RAND_MAX;
        val += Dispacement;

        if( first )
        {
            flag = false;
            first = false;
            for( i = 0 ; i < _MAX_BUFF_SIZE__ ; i++ )
            {
                buff[i] = static_cast<int>(val);
            }
        }
        else
        {
            flag = false;
            for( i = 0 ; i < _MAX_BUFF_SIZE__ ; i++ )
            {
                if( buff[i] == static_cast<int>(val) ) flag = true;
            }
        }
    }

    for( i = _MAX_BUFF_SIZE__ - 1; i > 0 ; i-- )
    {
        buff[ i ] = buff[ i - 1 ];
    }

    buff[0] = static_cast<int>(val);

    return static_cast<int>(val);
} // GetVali( double MaxVal, double Dispacement = 0. )


bool CreateContour( CvSeq** ppSeq, int flags, 
                    CvMemStorage** ppStorage )
{
    ///////////////////////
    if( (ppSeq == NULL) || (ppStorage==NULL) )
    {
        return false;
    } // if( (ppSeq == NULL) || (ppStorage==NULL) || (pWriter==NULL) )

    ///////////////////////

    *ppSeq = cvCreateSeq( flags, sizeof(CvContour), sizeof(CvPoint), *ppStorage);
    if( *ppSeq == NULL )
    {
        return false;
    } // if( *ppSeq == NULL )

    return true;
} // CreateContour


void Line( CvPoint StartPt, CvPoint EndPt, CvSeq* Seq,
           int flags = _CV_LINE_PUTSTARTPT | _CV_LINE_PUTENDPT )
{
    //////////////// variables ///////////////
    CvPoint Pt;
    int dx = abs( StartPt.x - EndPt.x );
    int dy = abs( StartPt.y - EndPt.y );
    int sx = ( ( StartPt.x > EndPt.x ) ? -1 : 1 );
    int sy = ( ( StartPt.y > EndPt.y ) ? -1 : 1 );
    int x, y;
    int d, d1, d2;
    int i;

    ////////////// put start point //////////////////
    if( flags & _CV_LINE_PUTSTARTPT )
    {
        cvSeqPush( Seq, &StartPt );
    }

    /////////// drow line ///////////////////
    if( dy < dx )
    {
        d2 = 2*( dy - dx );
        d1 = 2*dy;
        d  = d1 - dx;
        
        for( x = StartPt.x, y = StartPt.y, i=1; i < dx ; i++ )
        {
            if( d > 0 )
            {
                d += d2;
                y += sy;
            } // if( d > 0 )
            else
            {
                d += d1;
            } // if( d > 0 ) else

            x += sx;
            Pt.x = x;
            Pt.y = y;
            cvSeqPush( Seq, &Pt );
        }
    } // if( dy < dx )
    else
    {
        d2 = 2*( dx - dy );
        d1 = 2*dx;
        d  = d1 - dy;

        for( y = StartPt.y, x = StartPt.x, i=1; i < dy ; i++ )
        {
            if( d > 0 )
            {
                d += d2;
                x += sx;
            } // if( d > 0 )
            else
            {
                d += d1;
            } // if( d > 0 ) else

            y += sy;
            Pt.x = x;
            Pt.y = y;
            cvSeqPush( Seq, &Pt );
        } // for( y = StartPt.y, x = StartPt.x, i=1; i < dy ; i++ )
    } // if( dy < dx ) else
    
    //////////////  put end point //////////////////
    if( flags & _CV_LINE_PUTENDPT )
    {
            cvSeqPush( Seq, &EndPt );
    } // if( flags & _CV_LINE_PUTENDPT )

    return;
} // Line

/*****************************************************************************/
/*****************************************************************************/
/***                          Collection                                   ***/
/*****************************************************************************/
/*****************************************************************************/

/****************************************************************/
/****************       PolyLine        *************************/
/****************************************************************/
CvSeq* PolyLine( CvMemStorage* Storage )
{
    ///////////////////////
    int Max_dY = 50;
    int Max_dX = 50;
    int Max_Piece = 100;
    //////
    CvPoint FirstPt,SecondPt;
    int x,y;
    int P;
    /////
    CvSeq*        Seq     = NULL;

    ///////////// create contour //////////
    if( !CreateContour( &Seq,CV_SEQ_POLYGON,&Storage) )
    {
        return NULL;
    }
    
    /////////////// initialising /////////
    P = GetVali( Max_Piece );

    FirstPt.x = FirstPt.y = 0;
    cvSeqPush( Seq, &FirstPt );

    ////////// make contour ////////////
    for( int i = 0 ; i < P ; i++ )
    {
        x = y = 0;
        while( ( x == 0 ) || ( y == 0 ) )
        {
            x = GetVali( Max_dX );
            y = GetVali( Max_dY );
        }

        SecondPt.x = FirstPt.x;
        SecondPt.y = FirstPt.y;
        FirstPt.x += x;
        FirstPt.y += y;
        Line( SecondPt,FirstPt,Seq,_CV_LINE_PUTENDPT);
    }
    
    //////////////////////////

    return Seq;
} // CvSeq* PolyLine()

/****************************************************************/
/****************        arc cos        *************************/
/****************************************************************/
CvSeq* arccos( CvMemStorage* Storage )
{
    /////
    int X_Mul_Max = 10;
    int Y_Mul_Max = 10;
    /////
    int Y_Mul = 1;
    int X_Mul = 1;
    double displacement = 0.1;
    double interval     = 10;
    double t, t_step;
    /////
    CvPoint FirstPt, SecondPt;
    /////
    CvSeq*        Seq     = NULL;

    ///////////// create contour //////////
    if( !CreateContour( &Seq,CV_SEQ_POLYGON,&Storage) )
    {
        return NULL;
    }

    /////////////// initialising /////////
    t_step = 0;
    while( t_step == 0. )
    {
        Y_Mul = GetVali( Y_Mul_Max ,1);
        X_Mul = GetVali( X_Mul_Max ,1);

        interval = GetVald( 2 * PI()  );
        displacement = GetVald( 2 * PI() - interval );

        t_step = (int)( interval * X_Mul );
        t_step = interval / t_step;
    }

    //////////// create contour //////////////////////////
    FirstPt.x = static_cast<int>( displacement * X_Mul );
    FirstPt.y = static_cast<int>( acos( displacement ) * Y_Mul );
    cvSeqPush( Seq, &FirstPt );

    for( t = displacement - PI() ; t < interval + displacement ; t += t_step )
    {
        SecondPt.x = FirstPt.x;
        SecondPt.y = FirstPt.y;

        FirstPt.x = static_cast<int>( t * X_Mul );
        FirstPt.y = static_cast<int>( acos( t ) * Y_Mul );

        Line( SecondPt,FirstPt,Seq,_CV_LINE_PUTENDPT);
    }

    return Seq;
} //CvSeq* arccos()

/****************************************************************/
/****************        arc tangent    *************************/
/****************************************************************/
CvSeq* arctan( CvMemStorage* Storage )
{
    /////
    int X_Mul_Max = 5;
    int Y_Mul_Max = 5;
    /////
    int Y_Mul = 1;
    int X_Mul = 1;
    double displacement = 0.1;
    double interval     = 0.1;
    double t, t_step;
    /////
    CvPoint FirstPt, SecondPt;
    /////
    CvSeq*        Seq     = NULL;

    ///////////// create contour //////////
    if( !CreateContour( &Seq,CV_SEQ_POLYGON,&Storage) )
    {
        return NULL;
    }

    /////////////// initialising /////////
    t_step = 0;
    while( t_step == 0. )
    {
        Y_Mul = GetVali( Y_Mul_Max ,1);
        X_Mul = GetVali( X_Mul_Max ,1);

        interval = GetVald( 2 * PI() -0.1, 0.1 );
        displacement = GetVald( 2 * PI() - interval - 0.1, 0.1);

        t_step = (int)( interval * X_Mul );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
717成人午夜免费福利电影| 日韩欧美国产综合一区| 91精品国产手机| 欧美激情综合五月色丁香 | 99re66热这里只有精品3直播 | 欧美一激情一区二区三区| 国产网站一区二区三区| 免费在线观看精品| 欧洲精品在线观看| 欧美国产欧美综合| 黄色资源网久久资源365| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 日韩va亚洲va欧美va久久| 99国产精品久久久久久久久久| 日韩一级免费一区| 亚瑟在线精品视频| 色综合中文字幕国产 | 一区二区三区欧美日韩| 国产风韵犹存在线视精品| 日韩午夜小视频| 亚洲午夜三级在线| 色拍拍在线精品视频8848| 国产精品久久久久影院亚瑟| 国产在线麻豆精品观看| 精品不卡在线视频| 美国毛片一区二区三区| 欧美日韩国产大片| 亚洲成精国产精品女| 在线一区二区三区四区五区| 亚洲精品国产无套在线观 | 国产在线精品不卡| 精品噜噜噜噜久久久久久久久试看| 香港成人在线视频| 欧美午夜视频网站| 日韩黄色片在线观看| 欧美丰满少妇xxxxx高潮对白| 亚洲一区二区不卡免费| 欧美色涩在线第一页| 亚洲成av人在线观看| 91精品在线免费观看| 日韩av网站在线观看| 久久尤物电影视频在线观看| 国产最新精品免费| 国产精品色哟哟网站| av色综合久久天堂av综合| 综合婷婷亚洲小说| 欧美老女人在线| 精一区二区三区| 亚洲国产精品99久久久久久久久| 成人sese在线| 亚洲一区二区四区蜜桃| 欧美一区二区三级| 国产成人自拍在线| 亚洲免费观看高清完整版在线| 91福利视频网站| 久久99久久久久| 国产精品午夜久久| 欧美天堂一区二区三区| 蜜桃视频在线观看一区| 国产精品久久久久久妇女6080| 一本在线高清不卡dvd| 日韩成人午夜电影| 欧美国产乱子伦| 欧美视频一区在线| 国产精品一二一区| 亚洲中国最大av网站| 久久一留热品黄| 欧美在线观看视频一区二区三区| 老司机免费视频一区二区| 最好看的中文字幕久久| 日韩一卡二卡三卡| 91丨porny丨首页| 免费成人美女在线观看.| 国产精品久久福利| 337p亚洲精品色噜噜| 成人ar影院免费观看视频| 日本欧美肥老太交大片| 一区在线观看免费| 精品国产麻豆免费人成网站| 色婷婷久久久亚洲一区二区三区| 久久精品国产77777蜜臀| 亚洲美女视频在线| 久久精品男人天堂av| 欧美精品在线一区二区| 色综合中文字幕国产 | 国产精品三级久久久久三级| 在线播放中文一区| 91色porny蝌蚪| 国产成人精品一区二| 蜜臀av在线播放一区二区三区| 国产精品久久久久久久岛一牛影视 | 91精品国产综合久久精品性色| 国产成人av电影在线观看| 日本伊人午夜精品| 亚洲一区二区视频在线观看| 国产精品国产自产拍在线| 精品国产不卡一区二区三区| 欧美精品丝袜中出| 欧美亚洲禁片免费| 色老汉av一区二区三区| 91在线视频免费观看| 国产精品77777| 国模少妇一区二区三区| 久久99精品国产.久久久久| 肉色丝袜一区二区| 亚洲午夜av在线| 亚洲特级片在线| 亚洲精品亚洲人成人网在线播放| 欧美高清在线一区二区| 久久久777精品电影网影网| 久久婷婷成人综合色| 日韩欧美成人一区二区| 精品国内片67194| 精品国产一区二区三区久久影院| 日韩一区二区三区免费看| 3atv在线一区二区三区| 欧美一区二区三区四区高清| 717成人午夜免费福利电影| 91精品久久久久久久久99蜜臂| 9191成人精品久久| 日韩一区二区三区免费看| 精品蜜桃在线看| 国产亚洲一区二区三区在线观看| 久久精品亚洲麻豆av一区二区| 久久精品亚洲乱码伦伦中文 | 久久久综合精品| 国产欧美一区二区精品秋霞影院 | 日本一道高清亚洲日美韩| 日本成人在线视频网站| 精品一区二区三区影院在线午夜 | 日韩精品每日更新| 久久成人久久鬼色| 国产精品香蕉一区二区三区| 成人国产亚洲欧美成人综合网 | 亚洲在线中文字幕| 丝袜亚洲另类丝袜在线| 久久99精品久久久久婷婷| 久久99精品一区二区三区| 成人性生交大片免费看中文网站 | 国产成人综合在线| 99精品视频在线播放观看| 在线一区二区三区做爰视频网站| 91精品国产色综合久久不卡电影| 精品国内片67194| 亚洲欧美视频一区| 日本不卡高清视频| 懂色av一区二区夜夜嗨| 91国偷自产一区二区使用方法| 91精品国产91久久综合桃花| 国产欧美一区二区精品久导航| 一区二区三区四区蜜桃| 国产一区二区三区免费在线观看| 99久精品国产| 日韩一区二区免费视频| 中文字幕乱码亚洲精品一区| 亚洲一区在线视频| 国产高清不卡二三区| 精品视频123区在线观看| 久久九九全国免费| 视频一区二区不卡| 99久精品国产| 欧美成人福利视频| 日韩伦理av电影| 国产做a爰片久久毛片| 欧美日韩日日夜夜| 国产精品国产三级国产专播品爱网 | av不卡在线播放| 日韩欧美国产三级电影视频| 中文字幕亚洲在| 国产成人精品aa毛片| 欧美一级欧美一级在线播放| 国产精品久久久久久久第一福利| 青草av.久久免费一区| 欧洲国内综合视频| 综合色中文字幕| 成人午夜在线播放| 国产午夜一区二区三区| 男女视频一区二区| 欧美性xxxxxxxx| 17c精品麻豆一区二区免费| 国产九色sp调教91| 日韩精品一区国产麻豆| 亚洲一区二区三区四区在线免费观看 | 欧美综合在线视频| 中文字幕在线观看不卡| 国产成人亚洲精品狼色在线| 7777精品伊人久久久大香线蕉的 | 中文字幕一区二区三区不卡在线 | 久久精品噜噜噜成人88aⅴ| 欧美日韩高清一区| 亚洲电影欧美电影有声小说| 91麻豆自制传媒国产之光| 国产精品久久久爽爽爽麻豆色哟哟 | 欧美性生活影院| 亚洲欧美电影院| 色网站国产精品| 国产精品理伦片| 99在线精品免费| 亚洲综合在线第一页| 欧美综合一区二区|