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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? aoptflowpyrlk.cpp

?? 微軟的基于HMM的人臉識(shí)別原代碼, 非常經(jīng)典的說(shuō)
?? CPP
字號(hào):
/*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 <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <float.h>

#include "CvTest.h"

static char* funcs[] =
{
    "cvCalcOpticalFlowPyrLK",
};

static char *test_desc = "Regression Test for Lucas Kanade pyramid-based optical flow";


/* ///////////////////// pyrlk_test ///////////////////////// */

static int pyrlk_test( void )
{
    const double success_error_level = 0.2;

    const char* all_is_ok = "No errors";
    const char* error_string = all_is_ok;

    /* test parameters */
    double  max_err = 0., sum_err = 0;
    int     pt_cmpd = 0;
    int     pt_exceed = 0;
    int     merr_i = 0, merr_j = 0, merr_k = 0;
    char    filepath[100];
    char    filename[100];
    const   char* i_pts_file = "lk_prev.dat";
    const   char* j_pts_file = "lk_next.dat";
    const   char* i_img_file = "rock_1.bmp";
    const   char* j_img_file = "rock_2.bmp";

    CvPoint2D32f*  u = 0;
    CvPoint2D32f*  v = 0;
    CvPoint2D32f*  v2 = 0;
    char* status = 0;

    IplImage* imgI = 0;
    IplImage* imgJ = 0;

    int     n = 0, i = 0, j = 0;

    atsGetTestDataPath( filepath, "OptFlow", 0, 0 );

    /* read feature points from the first image */
    strcpy( filename, filepath );
    strcat( filename, i_pts_file );

    u = (CvPoint2D32f*)atsReadMatrix( filename, &n, &i );
    
    if( !u )
    {
        error_string = "couldn't read lk_prev.dat file"; 
        goto test_exit;
    }

    if( i != 2 || n <= 0 )
    {
        error_string = "lk_prev.dat file has been corrupted"; 
        goto test_exit;
    }

    /* read feature points from the second image (calculated by MATLAB script) */
    strcpy( filename, filepath );
    strcat( filename, j_pts_file );

    v = (CvPoint2D32f*)atsReadMatrix( filename, &j, &i );
    if( !v )
    {
        error_string = "couldn't read lk_next.dat file"; 
        goto test_exit;
    }

    if( i != 2 || j != n )
    {
        error_string = "lk_next.dat file has been corrupted"; 
        goto test_exit;
    }

    /* allocate adidtional buffers */
    v2 = (CvPoint2D32f*)icvAlloc( n*sizeof(v2[0]));
    status = (char*)icvAlloc(n*sizeof(status[0]));

    /* read first image */
    strcpy( filename, filepath );
    strcat( filename, i_img_file );
    
    imgI = atsCreateImageFromFile( filename );

    if( !imgI )
    {
        error_string = "first image can't be readed"; 
        goto test_exit;
    }

    /* read second image */
    strcpy( filename, filepath );
    strcat( filename, j_img_file );

    imgJ = atsCreateImageFromFile( filename );

    if( !imgJ )
    {
        error_string = "second image can't be readed"; 
        goto test_exit;
    }
    
    /* calculate flow */
    cvCalcOpticalFlowPyrLK( imgI, imgJ, 0, 0, u, v2, n, cvSize( 20, 20 ),
                            4, status, 0, cvTermCriteria( CV_TERMCRIT_ITER|
                            CV_TERMCRIT_EPS, 30, 0.01f ), 0 );

    /* compare results */
    for( i = 0; i < n; i++ )
    {
        if( status[i] != 0 )
        {
            double err;
            if( atsIsNaN( v[i].x ))
            {
                merr_j++;
                continue;
            }

            err = fabs(v2[i].x - v[i].x) + fabs(v2[i].y - v[i].y);
            if( err > max_err )
            {
                max_err = err;
                merr_i = i;
            }

            pt_exceed += err > success_error_level;

            sum_err += err;
            pt_cmpd++;
        }
        else
        {
            if( !atsIsNaN( v[i].x ))
            {
                merr_i = i;
                merr_k++;
            }
        }
    }

test_exit:

    /* release occupied memory */
    icvFree( &status );
    icvFree( &v2 );
    free( u );
    free( v );
    if( imgI ) atsReleaseImage( imgI );
    if( imgJ ) atsReleaseImage( imgJ );

    if( error_string == all_is_ok )
    {
        trsWrite( ATS_LST, "Avg.err is %g, max. err is %g at i = %d, poor pts = %d,"
                           "superflous = %d, deficient = %d",
                           sum_err/MAX(pt_cmpd,1),  max_err, merr_i, pt_exceed,
                           merr_j, merr_k );

        return max_err < 1 && pt_exceed < 3 && merr_k == 0 ?
            trsResult( TRS_OK, "No errors" ) :
            trsResult( TRS_FAIL, "Bad accuracy" );
    }
    else
    {
        trsWrite( ATS_LST, "Fatal error" );
        return trsResult( TRS_FAIL, error_string );
    }
}


void  InitAOptFlowPyrLK(void)
{
    /* Registering test functions */
    trsReg( funcs[0], test_desc, atsAlgoClass, pyrlk_test );

} /* InitAOptFlowPyrLK */

/* End of file. */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合久久av| 亚洲人快播电影网| 99r国产精品| 青青草伊人久久| 中文字幕综合网| 亚洲精品一区二区三区影院| 91视频在线观看| 国产伦精一区二区三区| 一区二区三区在线视频免费| 国产午夜一区二区三区| 51精品秘密在线观看| 99国产精品久久| 国产iv一区二区三区| 日本成人在线电影网| 亚洲欧美另类在线| 欧美国产精品劲爆| www激情久久| 欧美精品vⅰdeose4hd| 91国产免费看| 99精品久久只有精品| 国模娜娜一区二区三区| 免费的国产精品| 亚洲成人免费看| 亚洲你懂的在线视频| 国产亚洲欧美日韩日本| 日韩欧美国产精品一区| 欧美日本一区二区| 欧美在线看片a免费观看| 成人黄色av电影| 成人国产精品免费观看视频| 国产伦精品一区二区三区视频青涩 | 日韩黄色片在线观看| 亚洲国产精品一区二区久久| 成人免费一区二区三区视频| 中文字幕高清一区| 国产午夜久久久久| 亚洲一二三四区不卡| 国产精品久久午夜夜伦鲁鲁| 国产午夜精品一区二区 | 亚洲精品国产第一综合99久久| 国产亚洲精品中文字幕| 久久婷婷综合激情| 久久九九久精品国产免费直播| 久久精品视频免费观看| 久久婷婷久久一区二区三区| 精品国产一二三| 久久午夜国产精品| 国产免费成人在线视频| 日本一区二区三区国色天香 | 亚洲成人av免费| 天天影视涩香欲综合网| 日韩成人av影视| 日韩成人一级片| 麻豆91免费看| 国产剧情一区在线| 成人免费看视频| 91网页版在线| 欧美日韩一区二区三区四区五区| 欧美日韩免费一区二区三区| 欧美疯狂做受xxxx富婆| 日韩欧美你懂的| 久久免费偷拍视频| 亚洲欧洲精品一区二区精品久久久 | 一区二区三区成人在线视频| 一级做a爱片久久| 欧美天堂亚洲电影院在线播放| 欧美日韩国产片| 精品国产一区二区三区忘忧草| 国产日产欧产精品推荐色| 国产精品网曝门| 亚洲一区二区三区自拍| 精品亚洲porn| 色综合欧美在线| 日韩一区二区三区在线观看| 欧美国产精品专区| 亚洲成av人片在线| 国产精品一区二区久久精品爱涩 | 欧美日韩一区二区三区免费看 | 欧美xxxxx裸体时装秀| 国产调教视频一区| 亚洲一区二区高清| 国内精品视频一区二区三区八戒| 成人蜜臀av电影| 这里只有精品视频在线观看| 国产日韩欧美不卡| 五月婷婷久久综合| 成人美女视频在线观看| 欧美视频日韩视频在线观看| 久久久三级国产网站| 亚洲主播在线观看| 国产成人精品亚洲777人妖| 欧美午夜精品久久久久久超碰| 久久夜色精品一区| 亚洲一卡二卡三卡四卡五卡| 狠狠色狠狠色综合系列| 欧美亚洲尤物久久| 国产精品久久久久久久久免费樱桃| 亚洲国产精品人人做人人爽| 国产高清亚洲一区| 在线播放中文字幕一区| 亚洲欧洲精品一区二区精品久久久| 青青草97国产精品免费观看| 99riav一区二区三区| www国产精品av| 日韩国产欧美一区二区三区| 91在线精品一区二区三区| 日韩欧美一二区| 亚洲成人一区在线| 色婷婷综合久久久中文一区二区| 久久久噜噜噜久久中文字幕色伊伊| 亚洲第一综合色| 91社区在线播放| 亚洲国产精品激情在线观看| 麻豆传媒一区二区三区| 欧美在线免费播放| 亚洲人成亚洲人成在线观看图片| 国产一区二区三区在线观看免费视频 | 欧美一区二区视频在线观看2020 | 中文字幕欧美国产| 狠狠网亚洲精品| 欧美电视剧在线观看完整版| 亚洲成人一二三| 欧美一a一片一级一片| 一区免费观看视频| 不卡视频在线看| 国产精品女主播在线观看| 激情综合五月天| 日韩视频一区在线观看| 日韩不卡一二三区| 日韩一区二区在线看| 日韩av网站在线观看| 欧美二区三区的天堂| 亚洲国产精品天堂| 欧美日韩高清一区| 亚洲成人1区2区| 欧美日韩免费观看一区二区三区| 亚洲精品国产视频| 在线亚洲免费视频| 亚洲成a人v欧美综合天堂下载| 在线观看日韩高清av| 亚洲最大成人综合| 欧美日韩一卡二卡三卡| 亚洲国产中文字幕在线视频综合| 欧美三级日本三级少妇99| 亚洲国产乱码最新视频| 在线播放欧美女士性生活| 秋霞影院一区二区| 精品欧美一区二区久久| 国产一区二区三区蝌蚪| 亚洲国产成人午夜在线一区| 99在线精品免费| 一区二区三区欧美在线观看| 欧洲另类一二三四区| 午夜在线电影亚洲一区| 日韩一区二区三区av| 精品在线免费观看| 欧美国产精品久久| 在线视频中文字幕一区二区| 性久久久久久久| 久久综合九色综合欧美98| 成人性视频免费网站| 亚洲精品一二三| 欧美日本一区二区在线观看| 久久99久久精品欧美| 国产精品麻豆久久久| 在线观看一区二区精品视频| 日韩 欧美一区二区三区| 久久精品一区二区三区不卡牛牛 | 夜夜爽夜夜爽精品视频| 4438x成人网最大色成网站| 精彩视频一区二区三区| 国产精品久久久久三级| 欧美日韩一级二级| 国内精品国产成人| 亚洲精品乱码久久久久久黑人| 91麻豆精品国产91久久久更新时间| 黑人巨大精品欧美黑白配亚洲| 亚洲色图欧洲色图婷婷| 在线播放中文字幕一区| 国产成人在线电影| 亚洲午夜国产一区99re久久| 久久久久久久久久久久久久久99 | 亚洲色图制服丝袜| 日韩视频一区二区在线观看| 不卡一区二区在线| 麻豆成人91精品二区三区| 国产精品福利一区二区| 日韩美女视频在线| 日本韩国欧美三级| 激情综合网av| 亚洲高清视频的网址| 国产精品久久免费看| 欧美大片免费久久精品三p| 91在线免费视频观看| 国产一区二区免费在线| 亚洲电影一级黄| 日韩美女啊v在线免费观看| 欧美成人女星排名| 欧美日韩中文精品| www.66久久|