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

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

?? virtualimage.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*/// VirtualImage.cpp : implementation file
//

#include "stdafx.h"
#include "VMDemo.h"
#include "VirtualImage.h"
#include "raster.h"
#include <math.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CVirtualImage

CVirtualImage::CVirtualImage()
//	: CDialog(CVirtualImage::IDD, NULL)
{
    HoughLines = 0;
    numHoughLines = 0;
	rasterImage = 0;
    showScanlines = false;
}

/*======================================================================================*/

CVirtualImage::~CVirtualImage()
{
}

/*======================================================================================*/

BEGIN_MESSAGE_MAP(CVirtualImage, CWnd)
    //{{AFX_MSG_MAP(CVirtualImage)
    ON_WM_PAINT()
    ON_WM_SIZE()
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CVirtualImage message handlers

void CVirtualImage::OnPaint() 
{
    CPaintDC dc(this); // device context for painting

    RECT rect;

    GetClientRect(&rect);

    SIZE    size;
    int     n;
    int     x1,y1,x2,y2;
    size.cx = rect.right    - rect.left;
    size.cy = rect.bottom   - rect.top;

    if (rasterImage != 0 ) {
        if (rasterImage->GetImage() != 0)
            rasterImage->Draw(&dc,size);
        else {
            dc.Rectangle(&rect);
        }
    }
    else {
        dc.Rectangle(&rect);
    }

    if (*numScanlines>0 && showScanlines ) {
        CPen pen(PS_SOLID,1,RGB(255,0,0));
        dc.SelectObject(&pen);

        float wf = (float)(rasterImage->GetWidth()-1);
        float hf = (float)(rasterImage->GetHeight()-1);

        for (n = 0; n < *numScanlines; n +=10) {

            x1 = (*Scanlines)[n * 4    ];
            y1 = (*Scanlines)[n * 4 + 1];
            x2 = (*Scanlines)[n * 4 + 2];
            y2 = (*Scanlines)[n * 4 + 3];

            x1 = (int)(x1*size.cx/wf);
            y1 = (int)(y1*size.cy/hf);
            x2 = (int)(x2*size.cx/wf);
            y2 = (int)(y2*size.cy/hf);

            dc.MoveTo(x1,y1);
            dc.LineTo(x2,y2);
        }
    }

    if (HoughLines!=0) {
        int n;
        int w,h;
        int xp[2],yp[2];
        float wf,hf;
        float a,b,c;
        float x,y;
        int currPoint;
        currPoint = 0;
        for(n = 0; n < *numHoughLines; n++) {

            currPoint = 0;
            w = rasterImage->GetWidth();
            h = rasterImage->GetHeight();

            a = (float)(cos((*HoughLines)[n*2+1]));
            b = (float)(sin((*HoughLines)[n*2+1]));
            c = (float)((*HoughLines)[n*2]);


            wf = (float)(w-1);
            hf = (float)(h-1);
            
            /* 1,3 */
            if (b != 0) {

                /* 1 */
                x = 0;
                y = (c/b);
                if (y>=0 && y<=wf) {
                    xp[currPoint] = (int)x;
                    yp[currPoint] = (int)y;
                    currPoint++;
                }

                /* 3 */
                x = wf;
                y=(c-a*wf)/b;
                if (y>=0 && y<=wf) {
                    if (currPoint==0) {
                        xp[currPoint] = (int)x;
                        yp[currPoint] = (int)y;
                        currPoint++;
                    } else {
                        if (x!=xp[0] || y != yp[0] ) {
                            xp[currPoint] = (int)x;
                            yp[currPoint] = (int)y;
                            currPoint++;
                        }
                    }
                }
            }

            /* 2,4 */
            if (a != 0) {

                /* 2 */
                y = 0;
                x = (c/a);
                if (x>=0 && x<=hf && currPoint < 2) {
                    if (currPoint==0) {
                        xp[currPoint] = (int)x;
                        yp[currPoint] = (int)y;
                        currPoint++;
                    } else {
                        if (x!=xp[0] || y != yp[0] ) {
                            xp[currPoint] = (int)x;
                            yp[currPoint] = (int)y;
                            currPoint++;
                        }
                    }
                }

                /* 4 */
                y = hf;
                x=(c-b*hf)/a;
                if (x>=0 && x<=hf && currPoint < 2) {
                    if (currPoint==0) {
                        xp[currPoint] = (int)x;
                        yp[currPoint] = (int)y;
                        currPoint++;
                    } else {
                        if (x!=xp[0] || y != yp[0] ) {
                            xp[currPoint] = (int)x;
                            yp[currPoint] = (int)y;
                            currPoint++;
                        }
                    }
                }
            }

            if (currPoint == 2) {
                x1 = (int)(xp[0]*size.cx/wf);
                y1 = (int)(yp[0]*size.cy/hf);
                x2 = (int)(xp[1]*size.cx/wf);
                y2 = (int)(yp[1]*size.cy/hf);
                dc.MoveTo(x1,y1);
                dc.LineTo(x2,y2);

            }
        }
    }
    return;

}


/*======================================================================================*/

void CVirtualImage::OnSize(UINT nType, int cx, int cy) 
{
    CWnd::OnSize(nType, cx, cy);

    Invalidate();
}


/*======================================================================================*/

int CVirtualImage::SetRasterImage(CRaster *newRasterImage)
{
    rasterImage = newRasterImage;
    Invalidate();
    return 0;
}

/*======================================================================================*/

void CVirtualImage::SetScanlines(int **scan,int *numScan)
{
    Scanlines       = scan;
    numScanlines    = numScan;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91首页免费视频| 国产欧美久久久精品影院| 日韩一区二区影院| 亚洲欧美另类小说| 国产麻豆一精品一av一免费 | 91福利视频在线| www久久精品| 亚洲国产日韩综合久久精品| 国产99精品视频| 在线综合亚洲欧美在线视频| 亚洲另类春色校园小说| 国产高清亚洲一区| 欧美成人在线直播| 亚洲成精国产精品女| 成人黄色在线看| 久久嫩草精品久久久久| 日本va欧美va欧美va精品| 欧美性xxxxx极品少妇| 国产精品国产三级国产aⅴ原创| 久久精品国产在热久久| 91超碰这里只有精品国产| 亚洲三级久久久| 国产99久久久国产精品潘金网站| 日韩欧美国产成人一区二区| 亚洲一二三区不卡| 在线一区二区三区四区| 亚洲视频在线观看三级| 成人在线视频一区| 欧美国产亚洲另类动漫| 国产麻豆91精品| 久久久精品人体av艺术| 激情欧美一区二区| 精品国产123| 国产在线观看一区二区 | 色狠狠一区二区| 中文字幕一区免费在线观看| 成人污污视频在线观看| 欧美国产一区二区| 99国产精品视频免费观看| 一区精品在线播放| 色屁屁一区二区| 一区二区激情视频| 欧美精三区欧美精三区| 日一区二区三区| 欧美丰满少妇xxxbbb| 蜜臀av亚洲一区中文字幕| 欧美xxxx在线观看| 国产成人免费视频网站| 中文字幕第一页久久| 99riav久久精品riav| 亚洲精品久久久久久国产精华液| 欧洲精品中文字幕| 日韩av电影免费观看高清完整版 | 国产成人av影院| 成人免费在线观看入口| 欧美视频一区二区三区四区| 日日摸夜夜添夜夜添国产精品| 日韩午夜三级在线| 成人永久aaa| 一区二区国产视频| 欧美tickle裸体挠脚心vk| 粉嫩在线一区二区三区视频| 亚洲乱码一区二区三区在线观看| 在线不卡欧美精品一区二区三区| 久久精品99国产国产精| 欧美国产一区视频在线观看| 欧美亚一区二区| 国产在线国偷精品免费看| 亚洲欧美日韩久久| 日韩免费在线观看| 91在线观看视频| 男女男精品视频| 国产精品国产自产拍高清av| 91黄色免费网站| 国产精品18久久久久久久久 | 在线精品国精品国产尤物884a| 美洲天堂一区二卡三卡四卡视频| 欧美激情在线免费观看| 欧美日韩专区在线| 国产成人免费在线视频| 丝袜a∨在线一区二区三区不卡| 久久久久99精品一区| 在线观看欧美黄色| 成人一区在线观看| 日本中文字幕一区二区有限公司| 国产精品美女久久久久久久| 欧美一区二区私人影院日本| 99久久精品国产麻豆演员表| 久久精品国产亚洲5555| 亚洲综合丝袜美腿| 国产精品丝袜一区| 久久女同性恋中文字幕| 欧美日韩国产区一| 91丨porny丨国产入口| 国产一区二区福利视频| 日本视频中文字幕一区二区三区| 亚洲视频在线一区观看| 国产欧美精品一区二区三区四区| 91精品国产手机| 欧美日韩国产影片| 在线中文字幕不卡| 99久久免费视频.com| 高清不卡在线观看av| 国产真实精品久久二三区| 日韩精品视频网站| 亚洲大片一区二区三区| 亚洲自拍偷拍九九九| 国产精品久久久久久久蜜臀| 久久精品免视看| 久久亚洲二区三区| 久久久久久久综合日本| 精品国免费一区二区三区| 欧美一区日韩一区| 日韩欧美一区二区不卡| 欧美一区二区视频网站| 3d成人动漫网站| 91精品国产综合久久精品app| 欧美精品黑人性xxxx| 欧美日韩色一区| 欧美一区二区性放荡片| 日韩午夜av一区| 久久久久综合网| 日本一区二区免费在线 | 成人一级片在线观看| 国v精品久久久网| 99久久免费视频.com| 色婷婷久久久亚洲一区二区三区| 在线观看av一区二区| 欧美日韩在线观看一区二区 | 国产精品夜夜嗨| 成人小视频在线| 91看片淫黄大片一级在线观看| av网站免费线看精品| 色婷婷av一区二区三区之一色屋| 欧亚一区二区三区| 91精品国产综合久久国产大片| 日韩欧美成人午夜| 国产人伦精品一区二区| 亚洲欧美日韩在线不卡| 亚洲成人综合在线| 国内一区二区在线| 99国产精品久久| 91精品午夜视频| 国产日韩欧美麻豆| 亚洲一二三专区| 久久不见久久见免费视频7| 成人动漫视频在线| 欧美三级电影在线观看| 26uuu欧美| 亚洲欧美日韩系列| 蜜桃av噜噜一区二区三区小说| 国产传媒欧美日韩成人| 在线免费观看日本一区| 欧美成人艳星乳罩| 亚洲精品一二三| 久久成人久久爱| 色欧美88888久久久久久影院| 91麻豆精品国产| 亚洲欧洲韩国日本视频| 免费成人美女在线观看| 91欧美一区二区| 欧美精品一区二区在线播放| 亚洲综合男人的天堂| 国产一区二区在线看| 在线观看av不卡| 国产农村妇女精品| 免费欧美日韩国产三级电影| 99久久免费视频.com| 26uuu欧美| 午夜成人在线视频| 91麻豆产精品久久久久久| 日韩美女一区二区三区| 亚洲专区一二三| 成人av综合一区| 久久综合九色综合欧美98| 亚洲一区二区三区四区五区黄| 国产传媒欧美日韩成人| 日韩精品一区二区在线| 亚洲自拍偷拍九九九| 9久草视频在线视频精品| 久久综合一区二区| 久久精品99国产国产精| 欧美日韩第一区日日骚| 亚洲蜜桃精久久久久久久| 国产精品一区在线| 精品盗摄一区二区三区| 日本中文字幕一区二区视频| 欧洲一区二区三区在线| 国产精品久久久久久亚洲伦| 国产不卡在线视频| 精品国产乱码久久久久久免费| 婷婷综合五月天| 欧美日韩精品高清| 亚洲成人免费视频| 欧美午夜片在线观看| 亚洲伦理在线精品| 在线观看免费成人| 亚洲一区二区三区视频在线播放| 色天天综合色天天久久| 日韩伦理电影网|