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

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

?? ameanshift.cpp

?? 微軟的基于HMM的人臉識別原代碼, 非常經(jīng)典的說
?? CPP
字號:
/*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*/

#include "CvTest.h"

#define Pi 3.14159265358979f

/* Testing parameters */
static char* FuncName = "cvMeanShift8uC1R";

static char TestName[]    = "Calculating MeanShift";
static char TestClass[]   = "Algorithm";

static int height;
static int width;
static int Lenght;
static int Width;
static int iter;
static float epsilon;
static int steps;

#define ATS_8U  0
#define ATS_8S  1
#define ATS_32F 2

#define EPS_8U      (ATS_8U << 4) | CV_TERMCRIT_EPS
#define ITER_8U     (ATS_8U << 4) | CV_TERMCRIT_ITER
#define EPS_ITER_8U (ATS_8U << 4) | CV_TERMCRIT_EPS | CV_TERMCRIT_EPS

#define EPS_8S      (ATS_8S << 4) | CV_TERMCRIT_EPS
#define ITER_8S     (ATS_8S << 4) | CV_TERMCRIT_ITER
#define EPS_ITER_8S (ATS_8S << 4) | CV_TERMCRIT_EPS | CV_TERMCRIT_EPS

#define EPS_32F      (ATS_32F << 4) | CV_TERMCRIT_EPS
#define ITER_32F     (ATS_32F << 4) | CV_TERMCRIT_ITER
#define EPS_ITER_32F (ATS_32F << 4) | CV_TERMCRIT_EPS | CV_TERMCRIT_EPS

static int foaMeanShiftC1R( void* prm )
{
    /* Some variables */
    long       lParam  = (long)prm;
    int        Flvr = (lParam >> 4) & 0xf;
    int        depth = (Flvr == ATS_8U ? IPL_DEPTH_8U : 
                        Flvr == ATS_8S ? IPL_DEPTH_8S : IPL_DEPTH_32F);
    int        Type = lParam & 0xf;
    int        Errors = 0;

    CvTermCriteria criteria;
    CvRect     Window;
    CvSize     roi;

    IplImage*  src;

    float      alpha = 0;
    int        i;
    int        x, y;

    float      destArea = 0;
    int        destIters = 0;

    static int  read_param = 0;

    /* Initialization global parameters */
    if( !read_param )
    {
        read_param = 1;
        trsiRead( &height, "512", "source array lenght" );
        trsiRead( &width, "512", "source array width" );
        trsiRead( &Lenght, "68", "oval lenght" );
        trsiRead( &Width, "15", "oval width" );
        trsiRead( &iter, "10", "iterations" );
        trsiRead( &steps, "10", "steps" );
        trssRead( &epsilon, "1", "epsilon" );
    }

    /* Initilization */
    Window.x = width / 4;
    Window.y = height / 4;
    Window.width = width / 2;
    Window.height = height / 2;

    roi.width = width;
    roi.height = height;

    criteria.type = Type;
    criteria.epsilon = epsilon;
    criteria.maxIter = iter;

    /* Allocating source arrays; */
    src = cvCreateImage(roi, depth, 1);
    assert(src);

    for( alpha = -Pi / 2; alpha < Pi / 2; alpha += Pi / steps )
    {
        x = (int)(width  / 2 + width / 8 * cos(alpha));
        y = (int)(height / 2 + height / 8 * sin(alpha));

        switch( Flvr )
        {
        case ATS_8U:
            atsbInitEllipse( (uchar*)src->imageData,
                             roi.width,
                             roi.height,
                             src->widthStep,
                             x,
                             y,
                             Lenght,
                             Width,
                             alpha,
                             10 );
            break;
        case ATS_8S:
            atsbInitEllipse( (uchar*)src->imageData,
                             roi.width,
                             roi.height,
                             src->widthStep,
                             x,
                             y,
                             Lenght,
                             Width,
                             alpha,
                             10 );
            break;
        case ATS_32F:
            atsfInitEllipse( (float*)src->imageData,
                             roi.width,
                             roi.height,
                             src->widthStep,
                             x,
                             y,
                             Lenght,
                             Width,
                             alpha,
                             10 );
            break;
        } /* switch( Flvr ) */

        for( i = 0; i < steps; i++ )
        {
            CvConnectedComp comp;
            destIters = cvMeanShift( src, Window, criteria, &comp );
            Window = comp.rect;
            destArea = (float) comp.area;
        }
        
        /* Checking results */
        /* Checking x-centers */
        if( fabs( x - (Window.x + Window.width / 2) ) > epsilon )
        {
            Errors++;
            trsWrite( ATS_LST,
                      "x-center: act: %d,  exp: %d\n",
                      Window.x + Window.width / 2,
                      x );
        }
        /* Checking lenght */
        /* Checking x-centers */
        if( fabs( y - (Window.y + Window.height / 2) ) > epsilon )
        {
            Errors++;
            trsWrite( ATS_LST,
                      "y-center: act: %d,  exp: %d\n",
                      Window.y + Window.height / 2,
                      y );
        }
    }

    cvReleaseImage(&src);

    return Errors == 0 ? TRS_OK : trsResult( TRS_FAIL, "Fixed %d errors", Errors );

} /* foaCamShiftC1R */


void InitAMeanShift()
{
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, EPS_8U );
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, ITER_8U );
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, EPS_ITER_8U );

    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, EPS_8S );
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, ITER_8S );
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, EPS_ITER_8S );

    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, EPS_32F );
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, ITER_32F );
    trsRegArg( FuncName, TestName, TestClass, foaMeanShiftC1R, EPS_ITER_32F );
} /* InitAMeanShiftC1R */


/* End of file. */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区婷婷月色| 成人午夜在线播放| 欧美日韩精品免费观看视频| 一区二区高清在线| 色哟哟国产精品| 亚洲制服丝袜在线| 日韩一区和二区| 国产一区二区三区精品视频| 久久精品亚洲乱码伦伦中文| 国产成人精品1024| 欧美激情一区二区三区不卡| av一本久道久久综合久久鬼色| 亚洲天堂2016| 欧美精品黑人性xxxx| 国产一区二区三区综合| 国产精品女主播av| 欧美日韩中文字幕一区二区| 日韩精品一区第一页| 26uuu久久天堂性欧美| 国产成人99久久亚洲综合精品| 中文字幕日韩av资源站| 欧美日韩一区二区三区视频| 久久成人免费网站| 亚洲欧洲99久久| 91精品国产一区二区人妖| 国产精选一区二区三区| 亚洲美女视频在线| 日韩你懂的在线观看| 成人教育av在线| 亚洲成人精品影院| 中文字幕免费不卡在线| jizz一区二区| 亚洲高清视频在线| 国产午夜亚洲精品理论片色戒 | 久久久99精品久久| 粉嫩av亚洲一区二区图片| 亚洲亚洲人成综合网络| 26uuu久久综合| 欧美视频日韩视频在线观看| 国产精品影视在线观看| 午夜精品国产更新| 欧美激情一区二区三区四区| 在线播放日韩导航| 99久久国产综合精品色伊| 精品一区二区影视| 亚洲国产精品一区二区尤物区| 国产三区在线成人av| 日韩欧美中文字幕制服| 色偷偷成人一区二区三区91 | 国产成人精品一区二区三区四区| 亚洲一区二区在线播放相泽| 欧美激情一区二区在线| 精品国产乱码久久久久久影片| 欧美日韩在线直播| 日本道免费精品一区二区三区| 国产高清精品在线| 国产在线精品一区二区不卡了 | av资源站一区| 国产一区二区三区日韩| 免费欧美日韩国产三级电影| 亚洲一卡二卡三卡四卡五卡| 亚洲欧美另类小说| 国产精品美女久久久久久久久久久 | 国产成人av电影在线观看| 视频在线观看一区| 亚洲国产综合人成综合网站| 亚洲日本免费电影| 中文字幕在线播放不卡一区| 久久精品视频免费观看| 久久综合99re88久久爱| 亚洲精品在线免费观看视频| 日韩亚洲欧美综合| 欧美一区二区性放荡片| 精品视频在线免费观看| 欧美亚洲免费在线一区| 欧美日韩精品欧美日韩精品一| 欧美午夜精品久久久久久孕妇| 91高清视频免费看| 欧美在线高清视频| 欧美日韩三级视频| 91精品国产综合久久久久久久| 制服.丝袜.亚洲.中文.综合| 在线成人免费视频| 欧美成人精精品一区二区频| 2022国产精品视频| 久久精品一区蜜桃臀影院| 国产日韩精品一区二区三区| 国产午夜精品福利| 最新成人av在线| 亚洲一区影音先锋| 日本午夜精品视频在线观看| 久久av资源站| 国产成人精品亚洲午夜麻豆| 91网站在线播放| 欧美精品aⅴ在线视频| 欧美一区二区精品在线| 2014亚洲片线观看视频免费| 中文字幕av资源一区| 亚洲人精品一区| 香蕉乱码成人久久天堂爱免费| 免费成人美女在线观看.| 国产一区欧美二区| 91在线观看高清| 欧美日韩中字一区| 亚洲精品一区二区三区精华液| 日本一区二区三级电影在线观看| 亚洲三级久久久| 蜜桃av一区二区| 成人午夜免费av| 欧美日韩另类国产亚洲欧美一级| 精品999在线播放| 国产精品美女久久久久aⅴ| 亚洲一区二区三区小说| 久久狠狠亚洲综合| 91视频com| 精品国产乱码久久久久久老虎 | 欧美国产一区视频在线观看| 亚洲国产视频在线| 国产一区二区久久| 欧美视频中文字幕| 久久精品夜夜夜夜久久| 亚洲国产精品久久一线不卡| 国产精一区二区三区| 欧美视频中文字幕| 国产精品视频你懂的| 日本不卡1234视频| 91视频免费播放| 2020国产成人综合网| 亚洲第一搞黄网站| 不卡的电影网站| 精品国产乱码久久| 亚洲 欧美综合在线网络| 成人激情免费视频| 欧美一区二区三区影视| 日韩中文字幕麻豆| caoporn国产精品| 久久综合色鬼综合色| 亚洲午夜精品网| 91视频观看视频| 中文字幕第一区| 韩国理伦片一区二区三区在线播放| 91福利在线看| 国产精品乱码一区二三区小蝌蚪| 日本不卡一区二区三区高清视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美放荡的少妇| 亚洲视频一区二区在线观看| 国产麻豆91精品| 欧美不卡一区二区| 日本特黄久久久高潮| 一本色道久久加勒比精品| 国产日韩精品久久久| 久久精品99国产精品日本| 欧美日韩国产美女| 亚洲一区二区欧美| 色婷婷一区二区三区四区| 国产欧美一区二区在线| 国产综合色产在线精品| 欧美一区二区三区视频免费播放 | 欧美日韩另类一区| 亚洲一二三区在线观看| 色噜噜偷拍精品综合在线| 中文字幕在线不卡一区 | 国产伦精品一区二区三区视频青涩 | 中文字幕av一区二区三区高| 国产麻豆午夜三级精品| 久久日一线二线三线suv| 久久国产免费看| 精品av综合导航| 国产精品一二三区在线| 久久久久久久综合| 国产激情一区二区三区四区| 国产婷婷色一区二区三区四区| 国产高清不卡一区| 国产色产综合产在线视频| 成人理论电影网| 亚洲色图清纯唯美| 欧美伊人久久久久久久久影院 | 国产精品理伦片| 色综合天天综合网国产成人综合天| 国产精品久久久久桃色tv| 一本久久综合亚洲鲁鲁五月天 | 欧美剧情电影在线观看完整版免费励志电影| 亚洲乱码日产精品bd| 欧美优质美女网站| 天天综合色天天综合| 日韩精品一区二区三区老鸭窝| 韩日av一区二区| 国产精品欧美极品| 欧美探花视频资源| 日韩国产精品久久久| 亚洲精品一区二区精华| av爱爱亚洲一区| 亚洲18女电影在线观看| 欧美精品一区二区在线播放| 国产99一区视频免费| 亚洲一区二区三区四区的| 欧美成人性战久久| av在线一区二区三区| 偷拍自拍另类欧美|