-
大小: 3.86MB文件類(lèi)型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-09-20
- 語(yǔ)言: C/C++
- 標(biāo)簽:
資源簡(jiǎn)介
該代碼是對(duì)作者博文《圖像濾波常見(jiàn)方法原理總結(jié)及VC下實(shí)現(xiàn)》中所描述方法的實(shí)現(xiàn)。代碼基于MFC對(duì)話框編程,首先進(jìn)行彩色圖像的灰度化,在此基礎(chǔ)上,實(shí)現(xiàn)了四種常見(jiàn)的濾波方式,包括高斯濾波,中值濾波,均值濾波以及雙邊濾波。

代碼片段和文件信息
//?Filter.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Filter.h“
#include?“FilterDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CFilterApp
BEGIN_MESSAGE_MAP(CFilterApp?CWinApp)
//{{AFX_MSG_MAP(CFilterApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CFilterApp?construction
CFilterApp::CFilterApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CFilterApp?object
CFilterApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CFilterApp?initialization
BOOL?CFilterApp::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
CFilterDlg?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;
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件??????11041??2011-10-31?17:46??Filter\11.JPG
?????文件??????67756??2011-10-31?20:11??Filter\2.JPG
?????文件??????53906??2011-08-11?13:06??Filter\49138.jpg
?????文件????4015104??2011-10-31?20:59??Filter\Debug\Filter.bsc
?????文件?????110674??2011-10-31?20:59??Filter\Debug\Filter.exe
?????文件?????592368??2011-10-31?20:59??Filter\Debug\Filter.ilk
?????文件??????15254??2011-10-31?20:59??Filter\Debug\Filter.obj
?????文件????6878044??2011-10-31?14:19??Filter\Debug\Filter.pch
?????文件?????386048??2011-10-31?20:59??Filter\Debug\Filter.pdb
?????文件???????2572??2011-10-31?20:59??Filter\Debug\Filter.res
?????文件??????????0??2011-10-31?20:59??Filter\Debug\Filter.sbr
?????文件??????50445??2011-10-31?20:59??Filter\Debug\FilterDlg.obj
?????文件??????????0??2011-10-31?20:59??Filter\Debug\FilterDlg.sbr
?????文件?????106101??2011-10-31?14:19??Filter\Debug\StdAfx.obj
?????文件????1376615??2011-10-31?14:19??Filter\Debug\StdAfx.sbr
?????文件?????238592??2011-10-31?20:59??Filter\Debug\vc60.idb
?????文件?????389120??2011-10-31?20:59??Filter\Debug\vc60.pdb
?????文件??????35716??2011-10-31?20:59??Filter\Filter.aps
?????文件???????1155??2011-10-31?21:00??Filter\Filter.clw
?????文件???????2063??2011-10-31?10:36??Filter\Filter.cpp
?????文件???????4333??2011-10-31?13:30??Filter\Filter.dsp
?????文件????????537??2011-10-31?10:36??Filter\Filter.dsw
?????文件???????1324??2011-10-31?10:36??Filter\Filter.h
?????文件??????41984??2011-10-31?21:00??Filter\Filter.ncb
?????文件??????54784??2011-10-31?21:00??Filter\Filter.opt
?????文件???????1523??2011-10-31?20:59??Filter\Filter.plg
?????文件???????5319??2011-10-31?20:59??Filter\Filter.rc
?????文件??????19833??2011-10-31?21:00??Filter\FilterDlg.cpp
?????文件???????1996??2011-10-31?20:59??Filter\FilterDlg.h
?????文件?????146045??2010-06-26?12:08??Filter\lena.jpg
............此處省略12個(gè)文件信息
評(píng)論
共有 條評(píng)論