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

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

?? aimage.cpp

?? 微軟的基于HMM的人臉識別原代碼, 非常經典的說
?? 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*/

#define DEPTH_8U 0

#include "CvTest.h"

/* Testing parameters */
static char test_desc[] = "Image Creatoion & access";
static char TestClass[] = "Algorithm";
static char func_name[] = "cvCreateImage cvCreateImageHeader cvSetImageROI cvGetImageROI "
                          "cvSetImageCOI cvCreateImageData cvReleaseImageData "
                          "cvSetImageData cvCloneImage cvCopyImage cvInitImageHeader";

static int depths[7] = {IPL_DEPTH_1U,
                        IPL_DEPTH_8U, IPL_DEPTH_8S,
                        IPL_DEPTH_16U, IPL_DEPTH_16S,
                        IPL_DEPTH_32S, IPL_DEPTH_32F};
static int channels[3] = {1, 3, 4};

static char* imageData = (char*)icvAlloc(10000);

const int align = 4;

static int foaImage( void )
{
    CvSize size = cvSize(320, 200);
    int i, j;
    int Errors = 0;
    //Creating new image with different channels & depths
    for( i = 0; i < 7; i++ )  // cycle for depths
        for(j = 0; j < 3; j++)  // cycle for channels
        {
            if( depths[i] == IPL_DEPTH_1U && channels[j] != 1 ) // skip for IPL_DEPTH_1U
                continue;                                       // all non 1 channels
            IplImage* image = cvCreateImage( size, depths[i], channels[j] );
            if( image->width != size.width || image->height != size.height )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCreateImage: Size mismatch: act %d x %d      exp %d x %d\n",
                          image->width, image->height, size.width, size.height );
                Errors++;
            }
            if( size.width * (depths[i] & IPL_DEPTH_MASK) / 8 > image->widthStep ||
                (image->widthStep & 3) )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCreateImage: Wrong widthStep: act %d\n",
                          image->widthStep );
                Errors++;
            }

            cvReleaseImage( &image );
        }
    trsWrite( ATS_CON, "cvCreateImage: ... done\n" );

    //Creating new image header with different channels & depths
    for( i = 0; i < 7; i++ )  // cycle for depths
        for(j = 0; j < 3; j++)  // cycle for channels
        {
            if( depths[i] == IPL_DEPTH_1U && channels[j] != 1 ) // skip for IPL_DEPTH_1U
                continue;                                       // all non 1 channels
            IplImage* image = cvCreateImageHeader( size, depths[i], channels[j] );
            if( image->width != size.width || image->height != size.height )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCreateImageHeader: Size mismatch: act %d x %d      exp %d x %d\n",
                          image->width, image->height, size.width, size.height );
                Errors++;
            }
            if( size.width * (depths[i] & IPL_DEPTH_MASK) / 8 > image->widthStep ||
                (image->widthStep & 3) )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCreateImageHeader: Wrong widthStep: act %d\n",
                          image->widthStep );
                Errors++;
            }
            if( image->imageData )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCreateImageHeader: imageData created :(\n" );
                Errors++;
            }

            cvSetImageROI( image, cvRect(1, 1, size.width - 1, size.height - 1) );
            if( image->roi->coi )
            {
                trsWrite( ATS_CON | ATS_LST, "cvSetImageROI: coi non zero\n" );
                Errors++;
            }

            CvRect rect = cvGetImageROI( image );
            if( rect.x != 1 || rect.y != 1 ||
                rect.width != size.width - 1 || rect.height != size.height - 1 )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvGetImageROI: wrong rect: act %d x %d x %d x %d       "
                          "exp %d x %d x %d x %d\n",
                          rect.x, rect.y, rect.width, rect.height,
                          1, 1, size.width - 1, size.height - 1 );
                Errors++;
            }

            cvSetImageCOI( image, 1 );
            if( image->roi->coi != 1 )
            {
                trsWrite( ATS_CON | ATS_LST, "cvSetImageCOI: soi non 1\n" );
                Errors++;
            }
            if( image->roi->xOffset != 1 || image->roi->yOffset != 1 ||
                image->roi->width != size.width  - 1 ||
                image->roi->height != size.height - 1)
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCreateImageHeader: Size mismatch: act %d x %d x %d x %d"
                          "exp %d x %d x %d x %d\n",
                          image->roi->xOffset, image->roi->yOffset,
                          image->roi->width, image->roi->height,
                          1, 1, size.width - 1, size.height - 1 );
                Errors++;
            }

            cvCreateImageData( image );
            if( !image->imageData )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCreateImageData: Wow :)... where is imageData ?....\n" );
                Errors++;
            }

            cvReleaseImageData( image );
            if( image->imageData )
            {
                trsWrite( ATS_CON | ATS_LST, "cvReleaseImageData: imageData non zero :(\n" );
                Errors++;
            }

            cvSetImageData( image, imageData, size.width * channels[j] * 8 ); // magic width step :)
            if( image->imageData != imageData )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvSetImageData: wrong pointer to imageData: act %x,  exp %x\n",
                          image->imageData, imageData );
                Errors++;
            }
            if( image->widthStep != size.width * channels[j] * 8 )
            {
                trsWrite( ATS_CON | ATS_LST, "cvSetImageData: wrong imageStep: act %d,   exp %d\n",
                          image->widthStep, size.width * channels[j] * 8 );
                Errors++;
            }

            cvReleaseImageHeader( &image );
        }
    trsWrite( ATS_CON, "cvCreateImageHeader: ... done\n" );
    trsWrite( ATS_CON, "cvSetImageROI: ... done\n" );
    trsWrite( ATS_CON, "cvGetImageROI: ... done\n" );
    trsWrite( ATS_CON, "cvSetImageCOI: ... done\n" );
    trsWrite( ATS_CON, "cvCreateImageData: ... done\n" );
    trsWrite( ATS_CON, "cvReleaseImageData: ... done\n" );
    trsWrite( ATS_CON, "cvSetImageData: ... done\n" );

    for( i = 0; i < 7; i++ )  // cycle for depths
        for(j = 0; j < 3; j++)  // cycle for channels
        {
            if( depths[i] == IPL_DEPTH_1U && channels[j] != 1 ) // skip for IPL_DEPTH_1U
                continue;                                       // all non 1 channels
            IplImage* src = cvCreateImage( size, depths[i], channels[j] );
            IplImage* dst = cvCreateImage( size, depths[i], channels[j] );
            IplImage* clone = 0;

            cvSetImageROI( src, cvRect(1, 1, size.width - 1, size.height - 1) );

            for( int k = 0; k < src->widthStep * src->height; k++ )
                src->imageData[k] = (char)k;

            cvCopyImage( src, dst );
            clone = cvCloneImage( src );
            if( clone->width != dst->width || clone->height != dst->height )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCopyImage/cvCloneImage: wrong destination size:"
                          "%d x %d  <>  %d %d\n",
                          clone->width, clone->height, dst->width, dst->height );
                Errors++;
            }
            if( clone->widthStep != src->widthStep )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCloneImage: wrong width step: act %d   exp %d\n",
                          clone->widthStep, src->widthStep );
                Errors++;
            }
            if( !clone->roi )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCloneImage: roi was lost\n" );
                Errors++;
            }
            else
            {
                if( clone->roi->xOffset != 1 || clone->roi->yOffset != 1 ||
                    clone->roi->width != size.width  - 1 ||
                    clone->roi->height != size.height - 1 )
                {
                    trsWrite( ATS_CON | ATS_LST,
                              "cvCloneImage: Size mismatch: act %d x %d x %d x %d"
                              "exp %d x %d x %d x %d\n",
                              clone->roi->xOffset, clone->roi->yOffset,
                              clone->roi->width, clone->roi->height,
                              1, 1, size.width - 1, size.height - 1 );
                    Errors++;
                }

            }
            if( i == 6 )
            {
                src->depth = IPL_DEPTH_32S;
                dst->depth = IPL_DEPTH_32S;
                clone->depth = IPL_DEPTH_32S;
            }

            if( iplNorm( src, dst, IPL_L1 ) )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCopyImage: wrong destination image\n" );
                Errors++;
            }
            if( iplNorm( src, clone, IPL_L1 ) )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCloneImage: wrong destination image\n" );
                Errors++;
            }

            if( i == 6 )
            {
                src->depth = depths[i];
                dst->depth = depths[i];
                clone->depth = depths[i];
            }

            cvReleaseImage( &src );
        }
    trsWrite( ATS_CON, "cvCloneImage: ... done\n" );
    trsWrite( ATS_CON, "cvCopyImage: ... done\n" );

    //Init new image header with different channels & depths
    for( i = 0; i < 7; i++ )  // cycle for depths
        for(j = 0; j < 3; j++)  // cycle for channels
        {
            if( depths[i] == IPL_DEPTH_1U && channels[j] != 1 ) // skip for IPL_DEPTH_1U
                continue;                                       // all non 1 channels
            IplImage image;
            cvInitImageHeader( &image, size, depths[i], channels[j], IPL_ORIGIN_TL, align, 1 );
            if( image.width != size.width || image.height != size.height )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvInitImageHeader: Size mismatch: act %d x %d      exp %d x %d\n",
                          image.width, image.height, size.width, size.height );
                Errors++;
            }
            if( ((size.width * channels[j] * (depths[i] & IPL_DEPTH_MASK) / 8 + align - 1) &
                ~(align - 1)) != image.widthStep )
            {
                trsWrite( ATS_CON | ATS_LST,
                          "cvCreateImageHeader: Wrong widthStep: act %d   exp: %d\n",
                          image.widthStep,
                          (size.width * (depths[i] & IPL_DEPTH_MASK) / 8 + align - 1) &
                          ~(align - 1) );
                Errors++;
            }
            if( image.imageData )
            {
                trsWrite( ATS_CON | ATS_LST, "cvCreateImageHeader: imageData created :(\n" );
                Errors++;
            }
        }
    trsWrite( ATS_CON, "cvInitImageHeader: ... done\n" );

    if( !Errors )
        return trsResult( TRS_OK, "Ok" );
    else
        return trsResult( TRS_FAIL, "%d errors" );
}



void InitAImage()
{
    /* Register test function */
    trsReg( func_name, test_desc, atsAlgoClass, foaImage );
} /* InitACanny */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成亚洲人成在线观看图片| 美女在线一区二区| 日本欧美一区二区| 国产99久久久精品| 欧美精品日韩一区| 中文字幕亚洲电影| 国产在线精品视频| 在线成人免费观看| 中文字幕一区二区三中文字幕| 日韩高清不卡一区二区三区| 一本久久a久久精品亚洲| 精品伦理精品一区| 亚洲国产毛片aaaaa无费看| 不卡的av中国片| 欧美成人r级一区二区三区| 亚洲免费在线播放| 国产**成人网毛片九色 | 国产女人18毛片水真多成人如厕 | 在线一区二区视频| 国产精品福利在线播放| 韩国欧美一区二区| 日韩欧美专区在线| 香蕉成人伊视频在线观看| av在线一区二区| 久久精品视频在线免费观看| 免费高清成人在线| 91.麻豆视频| 日本不卡123| 91精品国产91久久久久久一区二区| 亚洲男人的天堂av| 91丨九色丨尤物| 中文字幕在线观看一区二区| 成人激情校园春色| 自拍偷拍国产精品| 91片在线免费观看| 亚洲自拍偷拍麻豆| 欧美色老头old∨ideo| 一区二区三区四区在线播放| 91蝌蚪porny成人天涯| 亚洲免费观看在线观看| 色噜噜狠狠色综合欧洲selulu| 亚洲欧美一区二区三区久本道91 | 久久国产精品区| 欧美三区在线观看| 三级亚洲高清视频| 日韩欧美国产麻豆| 国产精品小仙女| 国产精品污网站| 色综合久久综合中文综合网| 亚洲黄色片在线观看| 国产精品狼人久久影院观看方式| 国产精品一区二区你懂的| 日本一区二区三区高清不卡| 99久久免费视频.com| 亚洲女人小视频在线观看| 欧美在线free| 国产精品不卡在线| 在线一区二区视频| 久久精品久久99精品久久| 久久亚洲免费视频| 99久久国产免费看| 午夜婷婷国产麻豆精品| 欧美成人精品3d动漫h| 国产99久久久国产精品免费看| 亚洲欧美综合色| 911精品国产一区二区在线| 韩国午夜理伦三级不卡影院| 亚洲天堂2016| 日韩三级视频中文字幕| 高清在线不卡av| 亚州成人在线电影| 国产午夜精品一区二区三区嫩草| 色噜噜狠狠色综合中国| 美女视频黄 久久| 国产精品成人在线观看| 欧美精品少妇一区二区三区| 粉嫩嫩av羞羞动漫久久久| 亚洲成av人片在线观看无码| 精品91自产拍在线观看一区| av激情成人网| 久久成人麻豆午夜电影| 亚洲欧美日韩系列| 精品乱码亚洲一区二区不卡| 91成人在线精品| 国产精品一二三区| 丝袜美腿亚洲色图| 亚洲欧洲性图库| 精品入口麻豆88视频| 日本乱人伦aⅴ精品| 丁香啪啪综合成人亚洲小说 | 亚洲色大成网站www久久九九| 欧美一区二区免费| 在线视频国内自拍亚洲视频| 国产99久久久国产精品免费看| 美腿丝袜亚洲三区| 亚洲gay无套男同| 亚洲三级电影网站| 国产精品视频观看| 国产喂奶挤奶一区二区三区| 欧美一级精品在线| 欧美猛男gaygay网站| 91免费观看国产| 岛国一区二区在线观看| 精品一区免费av| 蜜桃av噜噜一区二区三区小说| 亚洲国产成人av| 夜夜夜精品看看| 亚洲美女免费在线| 国产精品国产三级国产普通话三级| 久久青草欧美一区二区三区| 日韩一区二区在线观看视频| 欧美高清性hdvideosex| 欧美日韩视频在线第一区| 一本大道久久a久久综合婷婷| www.欧美.com| 99re8在线精品视频免费播放| 国产成人a级片| www..com久久爱| 99久久精品国产精品久久| 99精品视频中文字幕| 99国产精品久久久久久久久久| 成人美女视频在线观看| 成人激情小说乱人伦| 99免费精品在线观看| 色香蕉成人二区免费| 色婷婷香蕉在线一区二区| 色狠狠桃花综合| 欧美日韩一区二区在线观看| 欧美群妇大交群的观看方式| 91精品国模一区二区三区| 欧美一卡2卡3卡4卡| 精品国产免费一区二区三区四区| 久久综合久久综合久久综合| 日本一区二区动态图| 亚洲欧美日韩在线| 亚洲va国产天堂va久久en| 热久久免费视频| 国产露脸91国语对白| 粉嫩av一区二区三区| 91丨九色丨黑人外教| 欧美日韩中文另类| 欧美mv日韩mv国产| 国产精品电影一区二区| 亚洲一区二区三区视频在线播放| 午夜欧美大尺度福利影院在线看| 奇米影视7777精品一区二区| 国产乱码精品一区二区三| 99久久综合色| 91精品国产一区二区三区香蕉 | 综合婷婷亚洲小说| 香蕉av福利精品导航| 国产一区二区成人久久免费影院| a在线欧美一区| 欧美精品aⅴ在线视频| 国产免费成人在线视频| 一区二区三区在线看| 狠狠色丁香久久婷婷综合_中| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 日韩美一区二区三区| 欧美高清在线一区二区| 一区二区高清在线| 国产乱子轮精品视频| 欧美丝袜丝交足nylons图片| 日韩欧美高清在线| 亚洲男女一区二区三区| 韩国成人精品a∨在线观看| 在线观看国产日韩| 国产欧美一区二区三区在线老狼| 亚洲一区av在线| 成人综合在线视频| 欧美xxxx老人做受| 亚洲国产成人91porn| av亚洲精华国产精华精| 欧美tickling网站挠脚心| 亚洲国产va精品久久久不卡综合| 国产成人av福利| 欧美成人三级在线| 午夜精品一区二区三区三上悠亚| 成a人片亚洲日本久久| 久久综合久久鬼色中文字| 午夜欧美在线一二页| 色综合天天综合给合国产| 久久人人超碰精品| 精品亚洲欧美一区| 日韩一级片网站| 午夜久久久影院| 色天使色偷偷av一区二区| 国产精品女人毛片| 国产成人精品免费一区二区| 欧美精品一区二区三区蜜臀 | 亚洲一区二区三区四区在线观看| 成人激情免费电影网址| 久久蜜桃一区二区| 加勒比av一区二区| 精品国产99国产精品| 久久精品国产精品亚洲红杏| 6080yy午夜一二三区久久| 午夜免费久久看| 欧美日本免费一区二区三区| 午夜久久久影院|