////////////////////////////////////////////////////////////////////////////////
// 边界检测
////////////////////////////////////////////////////////////////////////////////
void CFaceDetectDlg::DoLOG(int left, int right, int top, int bottom, RGBQUAD **source, RGBQUAD **target)
{
int i,j;
double **result;
result = new double*[m_nWndHeight];
for(int l=0 ; l<m_nWndHeight; l++)
{
result[l] = new double[m_nWndWidth];
for(j=0; j<m_nWndWidth; j++)
result[l][j] = source[l][j].rgbRed;
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CFaceDetectDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CFaceDetectDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
CFaceDetectDlg::CFaceDetectDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFaceDetectDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFaceDetectDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CFaceDetectDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFaceDetectDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
CWnd *pWnd0= GetDlgItem(IDC_BMPSHOW);
pDCShow = pWnd0->GetDC();