文件名称:图像处理程序大全 C++
文件大小:1.45MB
文件格式:RAR
更新时间:2014-04-16 15:29:06
图像处理程序大全
本资源含大量的图像处理代码(C++) int kind = 0; // 图像类型(8位kind=1,24位kind=3,初始化kind=0) LONG Bytes = 0; // 图像分配内存的最大值 BOOL Step; // 菜单上一步、下一步启动禁用标志 -> FALSE为下一步禁用 BOOL Step_All = TRUE; // 初始化上一步、下一步 -> TRUE为禁用 BOOL fdj = TRUE; // 可以使用放大镜的标志 int screen_width = GetSystemMetrics(SM_CXSCREEN); // 获取屏幕宽度 int screen_height = GetSystemMetrics(SM_CYSCREEN); // 获取屏幕高度 BOOL DirectDraw_Pause = FALSE; // DirectDraw显示时键盘中断标志 int Match_x = 0; // 模板匹配中左上方坐标 - 行 int Match_y = 0; // 模板匹配中左上方坐标 - 列 CString Match_result = ""; // 模板匹配结果 SOCKET m_socket; // 定义一个套接字 ///////////////////////////////////////////////////////////////////////////// // CMy002App initialization BOOL CMy002App::InitInstance() { // *** 判断程序是否已运行 *** HANDLE hMutex; // 定义一个句柄 // 创建一个互斥对象,并返回句柄 hMutex = CreateMutex(NULL, TRUE, "7 4 的程序"); // 主线程拥有互斥对象,相当于一次请求互斥对象 // hMutex = CreateMutex(NULL, FALSE, "7 4 的程序"); // 主线程不拥有互斥对象 // WaitForSingleObject(hMutex,INFINITE); // 请求互斥对象 if (hMutex) // 判断句柄是否有值 { if (ERROR_ALREADY_EXISTS == GetLastError()) // 判断程序是否已运行 { AfxMessageBox("该应用程序已运行! ", MB_ICONINFORMATION | MB_OK); ExitProcess(0); // 退出应用程序 } } ReleaseMutex(hMutex); // 释放互斥对象 // *** 登陆密码对话框 *** Password dlg; // 定义对话框对象 dlg.DoModal(); // 显示并运行模态对话框 - 用户登录对话框 // CG: The following block was added by the Splash Screen component. \ { \ CCommandLineInfo cmdInfo; \ ParseCommandLine(cmdInfo); \ \ C_SplashWnd::EnableSplashScreen(cmdInfo.m_bShowSplash); \ } 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 // 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")); LoadStdProfileSettings(); // Load standard INI file options (including MRU) // Register the application's document templates. Document templates // serve as the connection between documents, frame windows and views. CMultiDocTemplate* pDocTemplate; pDocTemplate = new CMultiDocTemplate( IDR_MY002TYPE, RUNTIME_CLASS(CMy002Doc), RUNTIME_CLASS(CChildFrame), // custom MDI child frame RUNTIME_CLASS(CMy002View)); AddDocTemplate(pDocTemplate); // create main MDI Frame window CMainFrame* pMainFrame = new CMainFrame; if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; m_pMainWnd = pMainFrame; // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); // 启动时不打开子窗口 cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; // The main window has been initialized, so show and update it. pMainFrame->ShowWindow(m_nCmdShow); pMainFrame->UpdateWindow(); return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CAboutDlg dialog used for App About class CAboutDlg : public CDialog // *** 关于对话框 *** { public: CAboutDlg(); // Dialog Data //{{AFX_DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX }; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: //{{AFX_MSG(CAboutDlg) //}}AFX_MSG DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAboutDlg) //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) //{{AFX_MSG_MAP(CAboutDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() // App command to run the dialog void CMy002App::OnAppAbout() { CAboutDlg aboutDlg; aboutDlg.DoModal(); } ///////////////////////////////////////////////////////////////////////////// // CMy002App message handlers BOOL CMy002App::PreTranslateMessage(MSG* pMsg) { // CG: The following lines were added by the Splash Screen component. if (C_SplashWnd::PreTranslateAppMessage(pMsg)) return TRUE; return CWinApp::PreTranslateMessage(pMsg); }
【文件预览】:
图像处理程序
----Image_DilationDIB.cpp(4KB)
----002View.cpp(78KB)
----Image_Template.h(2KB)
----Splash.cpp(3KB)
----Image_GradSharp.h(1KB)
----Image_ErosionDIB.h(2KB)
----Image_ZFT.h(1KB)
----002.rc(41KB)
----002Doc.h(2KB)
----StdAfx.cpp(205B)
----Image_Close.h(2KB)
----resource.h(8KB)
----Chat.h(1KB)
----Image_MatchDIB_2.cpp(2KB)
----DIB_API.cpp(17KB)
----Image_MedianFilter.h(1KB)
----002.clw(16KB)
----Image_MatchDIB_1.cpp(5KB)
----Image_ThresholdTrans.cpp(7KB)
----Image_Open.cpp(4KB)
----Image_Close.cpp(4KB)
----DirectDraw.cpp(7KB)
----Image_FDJ.cpp(3KB)
----Image_MedianFilter.cpp(2KB)
----Image_FDJ.h(1KB)
----Image_Even.cpp(1KB)
----Splash.h(1KB)
----Chat.cpp(6KB)
----002.opt(323KB)
----Image_MatchDIB_2.h(1KB)
----Password.cpp(3KB)
----MainFrm.h(2KB)
----002.cpp(6KB)
----New_Password.h(1KB)
----Image_Open.h(2KB)
----002.aps(854KB)
----Image_GrayStretch.h(2KB)
----Image_ThresholdTrans.h(2KB)
----Image_RotateDIB.h(1KB)
----Image_RotateDIB.cpp(1KB)
----Image_GradSharp.cpp(1KB)
----Image_ZoomDIB.cpp(1KB)
----Image_GrayStretch.cpp(7KB)
----Debug()
----002View.h(6KB)
----Image_ZoomDIB.h(1KB)
----New_Password.cpp(2KB)
----ReadMe.txt(5KB)
----StdAfx.h(1KB)
----002.dsp(8KB)
----DIB_API.h(1KB)
----MainFrm.cpp(8KB)
----IMAGE_PROCESS.cpp(75KB)
----Image_MatchDIB_1.h(2KB)
----线条图像.wmf(4KB)
----res()
--------Start.wav(864KB)
--------002.ico(1KB)
--------002Doc.ico(1KB)
--------柯南.bmp(900KB)
--------Thumbs.db(15KB)
--------Toolbar.bmp(2KB)
--------002.rc2(462B)
--------Start.bmp(800KB)
--------cursor1.cur(766B)
----Image_ErosionDIB.cpp(4KB)
----002.h(1KB)
----ChildFrm.cpp(2KB)
----002.ncb(265KB)
----ChildFrm.h(1KB)
----002.plg(3KB)
----DirectDraw.h(1KB)
----002Doc.cpp(9KB)
----002.dsw(514B)
----Image_Even.h(1KB)
----Image_Template.cpp(4KB)
----Image_ZFT.cpp(3KB)
----Password.h(1KB)
----IMAGE_PROCESS.h(3KB)
----Image_DilationDIB.h(2KB)