• 大小: 49.73MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-17
  • 语言: C/C++
  • 标签: MFC    OpenCV    Mat  

资源简介

MFC OpenCV 显示图像,VS2013 写的,不用添加CvvImage类,用的是VS2013 + OPENCV2.4.9 , 其他版本类似,界面能显示打开图片的路径,同时有灰度直方图均衡化和中值滤波的代码,网上其他程序要不是用vc6.0写,太老了,有的还要加已经被淘汰的CVVimage类。

资源截图

代码片段和文件信息


// ImageProcess.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “ImageProcess.h“
#include “ImageProcessDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CImageProcessApp

BEGIN_MESSAGE_MAP(CImageProcessApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CImageProcessApp construction

CImageProcessApp::CImageProcessApp()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

// TODO: add construction code here
// Place all significant initialization in InitInstance
}


// The one and only CImageProcessApp object

CImageProcessApp theApp;


// CImageProcessApp initialization

BOOL CImageProcessApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles.  Otherwise any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();


AfxEnableControlContainer();

// Create the shell manager in case the dialog contains
// any shell tree view or shell list view controls.
CShellManager *pShellManager = new CShellManager;

// Activate “Windows Native“ visual manager for enabling themes in MFC controls
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));

// 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
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));

CImageProcessDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();

     if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}
else if (nResponse == -1)
{
TRACE(traceAppMsg 0 “Warning: dialog creation failed so application is terminating unexpectedly.\n“);
TRACE(traceAppMsg 0 “Warning: if you are using MFC controls on the dialog you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n“);
}

// Delete the shell manager created above.
if (pShellManager != NULL)
{
delete pShellManager;
}

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


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-24 20:30  ImageProcess\
     目录           0  2017-10-24 20:27  ImageProcess\Debug\
     文件      243200  2017-10-24 20:27  ImageProcess\Debug\ImageProcess.exe
     文件     1367424  2017-10-24 20:27  ImageProcess\Debug\ImageProcess.ilk
     文件     9826304  2017-10-24 20:27  ImageProcess\Debug\ImageProcess.pdb
     目录           0  2017-10-24 20:26  ImageProcess\ImageProcess\
     目录           0  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\
     文件        3864  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.log
     文件       44766  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.obj
     文件    73400320  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.pch
     文件       69632  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.res
     目录           0  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\
     文件      361272  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\CL.read.1.tlog
     文件        9816  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\CL.write.1.tlog
     文件         173  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\ImageProcess.lastbuildstate
     文件        9650  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\cl.command.1.tlog
     文件       14006  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\link.command.1.tlog
     文件       40498  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\link.read.1.tlog
     文件        4018  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\link.write.1.tlog
     文件        2874  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\rc.command.1.tlog
     文件       12602  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\rc.read.1.tlog
     文件        1202  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcess.tlog\rc.write.1.tlog
     文件      275683  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\ImageProcessDlg.obj
     文件     1254197  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\stdafx.obj
     文件     2878464  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\vc120.idb
     文件     8605696  2017-10-24 20:27  ImageProcess\ImageProcess\Debug\vc120.pdb
     文件      108700  2017-07-25 19:59  ImageProcess\ImageProcess\ImageProcess.aps
     文件        2880  2017-07-14 14:36  ImageProcess\ImageProcess\ImageProcess.cpp
     文件         541  2017-07-14 14:33  ImageProcess\ImageProcess\ImageProcess.h
     文件       11190  2017-07-25 19:59  ImageProcess\ImageProcess\ImageProcess.rc
     文件        6184  2017-07-14 15:10  ImageProcess\ImageProcess\ImageProcess.vcxproj
............此处省略15个文件信息

评论

共有 条评论