图像边缘提取经典算法MFC实现


本代码是作者自己编写,采用MFC框架,运用C++语言对常用边缘提取算法进行实现,代码包中含有示例图片,从图片处理效果可以看出该代码稳定可靠,能为图像处理算法初学者带来一定启发。
资源截图
代码片段和文件信息
// EdgeDetection.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “EdgeDetection.h“
#include “EdgeDetectionDlg.h“

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

/////////////////////////////////////////////////////////////////////////////
// CEdgeDetectionApp

BEGIN_MESSAGE_MAP(CEdgeDetectionApp CWinApp)
//{{AFX_MSG_MAP(CEdgeDetectionApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEdgeDetectionApp construction

CEdgeDetectionApp::CEdgeDetectionApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CEdgeDetectionApp object

CEdgeDetectionApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CEdgeDetectionApp initialization

BOOL CEdgeDetectionApp::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CEdgeDetectionDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}

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

     文件     824790  2009-12-22 15:57  边缘检测32.bmp

     文件       6598  2008-09-01 10:44  边缘检测CxImagecximage.dsp

     文件        537  2001-08-06 17:19  边缘检测CxImagecximage.dsw

     文件    2237440  2009-10-20 15:26  边缘检测CxImagecximage.ncb

     文件      51712  2009-10-20 15:26  边缘检测CxImagecximage.opt

     文件       5024  2009-10-20 15:26  边缘检测CxImageCxImage.plg

     文件      18164  2009-04-27 16:33  边缘检测CxImageCxImageDLLCxImageCrtDll.aps

     文件        282  2003-03-23 15:26  边缘检测CxImageCxImageDLLCxImageCrtDll.cpp

     文件       8356  2004-10-03 14:34  边缘检测CxImageCxImageDLLCxImageCrtDll.dsp

     文件      24214  2008-07-10 12:31  边缘检测CxImageCxImageDLLCxImageCrtDll.plg

     文件       3031  2004-10-17 09:40  边缘检测CxImageCxImageDLLCxImageCrtDll.rc

     文件       2998  2003-04-06 13:33  边缘检测CxImageCxImageDLLCxImageDll.dsw

     文件    1033216  2009-04-27 16:36  边缘检测CxImageCxImageDLLCxImageDll.ncb

     文件      70144  2009-04-27 16:36  边缘检测CxImageCxImageDLLCxImageDll.opt

     文件      17980  2008-12-03 22:29  边缘检测CxImageCxImageDLLCxImageMfcDll.aps

     文件        364  2003-03-23 14:55  边缘检测CxImageCxImageDLLCxImageMfcDll.clw

     文件       1817  2003-03-23 14:55  边缘检测CxImageCxImageDLLCxImageMfcDll.cpp

     文件       7544  2004-10-03 14:34  边缘检测CxImageCxImageDLLcximagemfcdll.dsp

     文件       1330  2003-03-23 14:55  边缘检测CxImageCxImageDLLCxImageMfcDll.h

     文件       3029  2004-10-17 09:39  边缘检测CxImageCxImageDLLCxImageMfcDll.rc

     文件      78548  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugcximagecrtd.exp

     文件     133590  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugcximagecrtd.lib

     文件      25600  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugcximagecrtd.pdb

     文件       6228  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugCxImageCrtDll.obj

     文件        972  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugCxImageCrtDll.res

     文件      49956  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebug if_xfile.obj

     文件     159744  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugvc60.pdb

     文件      53846  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugximabmp.obj

     文件     163071  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugximadsp.obj

     文件     134301  2008-07-10 12:31  边缘检测CxImageCxImageDLLDebugximaenc.obj

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

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

发表评论

评论列表(条)