基于Moravec算子特征提取的影像匹配


相关系数影像匹配是一种二维相关,即先在左影像上确定一个待定点,称之为目标点,以此待定点为中心选取m*n个像素的灰度阵列作为目标区或称目标窗口。为了在右影像上搜索同名点,必须估计出该同名点可能存在的范围,建立一个k*l(k>m,l>n)个像素的灰度阵列作为搜索区,相关的过程就是依次在搜索区中取出m*n个像素灰度阵列,计算其与目标区的相关系数ρ。当ρ取得最大值时,该搜索窗口的中心像素被认为是同名点。
资源截图
代码片段和文件信息
// MainFrm.cpp : implementation of the CMainframe class
//

#include “stdafx.h“
#include “Moravec.h“

#include “MainFrm.h“

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

/////////////////////////////////////////////////////////////////////////////
// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CframeWnd)

BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};

/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction

CMainframe::CMainframe()
{
// TODO: add member initialization code here

}

CMainframe::~CMainframe()
{
}

int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.CreateEx(this TBstyle_FLAT WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar
“);
return -1;      // fail to create
}

if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar
“);
return -1;      // fail to create
}

// TODO: Delete these three lines if you don‘t want the toolbar to
//  be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);

return 0;
}

BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CframeWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs

return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// CMainframe diagnostics

#ifdef _DEBUG
void CMainframe::AssertValid() const
{
CframeWnd::AssertValid();
}

void CMainframe::Dump(CDumpContext& dc) const
{
CframeWnd::Dump(dc);
}

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMainframe message handlers


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .CA....      6331  2011-11-12 12:58  MoravecCBmpFile.h

    .CA....     19633  2012-03-21 19:50  MoravecDebugMainFrm.obj

    .CA....    135218  2012-04-09 20:25  MoravecDebugMoravec.exe

    .CA....    343908  2012-04-09 20:25  MoravecDebugMoravec.ilk

    .CA....     22760  2012-04-09 20:16  MoravecDebugMoravec.obj

    .CA....   5499960  2012-03-21 19:50  MoravecDebugMoravec.pch

    .CA....    492544  2012-04-09 20:25  MoravecDebugMoravec.pdb

    .CA....      7964  2012-04-05 20:45  MoravecDebugMoravec.res

    .CA....     19257  2012-04-05 22:51  MoravecDebugMoravecDoc.obj

    .CA....     41854  2012-04-09 20:25  MoravecDebugMoravecView.obj

    .CA....     10047  2012-03-21 19:50  MoravecDebugParaDialog.obj

    .CA....    105368  2012-03-21 19:50  MoravecDebugStdAfx.obj

    .CA....    222208  2012-04-09 20:25  MoravecDebugvc60.idb

    .CA....    372736  2012-04-09 20:25  MoravecDebugvc60.pdb

    .CA....      9947  2012-04-05 20:45  MoravecDebugWinDlg.obj

    .CA....      2508  2012-03-21 19:36  MoravecMainFrm.cpp

    .CA....      1581  2012-03-21 19:36  MoravecMainFrm.h

    .CA....     45000  2012-04-05 20:45  MoravecMoravec.aps

    .CA....      3535  2012-04-09 20:13  MoravecMoravec.clw

    .CA....      4227  2012-03-21 19:36  MoravecMoravec.cpp

    .CA....      4892  2012-04-05 20:48  MoravecMoravec.dsp

    .CA....       539  2012-03-21 19:36  MoravecMoravec.dsw

    .CA....      1367  2012-03-21 19:36  MoravecMoravec.h

    .CA....     74752  2012-04-09 21:14  MoravecMoravec.ncb

    .CA....     51712  2012-04-09 21:14  MoravecMoravec.opt

    .CA....      1318  2012-04-09 20:25  MoravecMoravec.plg

    .CA....     13312  2012-04-05 20:45  MoravecMoravec.rc

    .CA....      1762  2012-03-21 19:36  MoravecMoravecDoc.cpp

    .CA....      1578  2012-04-05 22:51  MoravecMoravecDoc.h

    .CA....     10811  2012-04-09 20:25  MoravecMoravecView.cpp

............此处省略21个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)