// 21316116LiuDlg.cpp: 实现文件
//
#include "stdafx.h"
#include "21316116Liu.h"
#include "21316116LiuDlg.h"
#include "afxdialogex.h"
#include "CvvImage.h"
#include "cv.h"
#include "highgui.h"
#include "cvaux.h"
#include "cxcore.h"
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc.hpp"
using namespace cv;
using namespace std;
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
//高斯滤波
//Mat g_srcImage; //输入图像高斯滤波
//Mat g_dstImage; //输出图像高斯滤波
//
// 定义轨迹条最大值参量
//const int g_nKwidthTrackBarMaxValue = 9;
//const int g_nKheightTrackBarMaxValue = 9;
//const int g_nsigmaXTrackBarMaxValue = 5;
//const int g_nsigmaYTrackBarMaxvalue = 5;
//
//定义每个轨迹条的初始值
//int g_nKwidthTrackBarValue = 1;
//int g_nKheightTrackBarValue = 1;
//int g_nsigmaXTrackBarValue = 1;
//int g_nsigmaYTrackBarValue = 1;
//
//int g_kernelWidthValue;
//int g_kernelHeightValue;
//
//void on_GaussianBlurTrackbar(int, void*); //定义回调函数
//高斯滤波
//亮度、对比度
//-----------------------------------【全局函数声明部分】--------------------------------------
// 描述:全局函数声明
//-----------------------------------------------------------------------------------------------
static void ContrastAndBright(int, void *);
//-----------------------------------【全局变量声明部分】--------------------------------------
// 描述:全局变量声明
//-----------------------------------------------------------------------------------------------
int g_nContrastValue; //对比度值
int g_nBrightValue; //亮度值
Mat g_srcImage1, g_dstImage1;
//const int g_nMaxThresh = 255;
//int g_nThresh_low;
//int g_nThresh_high;
//Mat imgSrc;//输入图像,彩色
//Mat imgEdge;//边缘图像
//Mat imgGray;//输入图像,灰度图像
//void on_Trackbar(int, void*);
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_ABOUTBOX };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
DECLARE_MESSAGE_MAP()
public:
};
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()
// CMy21316116LiuDlg 对话框
CMy21316116LiuDlg::CMy21316116LiuDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_MY21316116LIU_DIALOG, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CMy21316116LiuDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CMy21316116LiuDlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_COMMAND(ID_dakia, &CMy21316116LiuDlg::Ondakia)
ON_COMMAND(ID_32776, &CMy21316116LiuDlg::Onhuiduhua)
ON_COMMAND(ID_32777, &CMy21316116LiuDlg::On32777)
ON_COMMAND(ID_32778, &CMy21316116LiuDlg::On32778)
ON_COMMAND(ID_32779, &CMy21316116LiuDlg::On32779)
ON_COMMAND(ID_32781, &CMy21316116LiuDlg::On32781)
ON_COMMAND(ID_32780, &CMy21316116LiuDlg::On32780)
ON_COMMAND(ID_32783, &CMy21316116LiuDlg::On32783)
ON_COMMAND(ID_SOBEL32785, &CMy21316116LiuDlg::OnSobel32785)
ON_COMMAND(ID_SOBEL32786, &CMy21316116LiuDlg::OnSobel32786)
ON_COMMAND(ID_SOBEL32787, &CMy21316116LiuDlg::OnSobel32787)
ON_BN_CLICKED(IDC_BUTTON1, &CMy21316116LiuDlg::OnBnClickedButton1)
ON_COMMAND(ID_32788, &CMy21316116LiuDlg::On32788)
ON_COMMAND(ID_SCHARR32790, &CMy21316116LiuDlg::OnScharr32790)
ON_COMMAND(ID_SCHARR32791, &CMy21316116LiuDlg::OnScharr32791)
ON_COMMAND(ID_SCHARR32792, &CMy21316116LiuDlg::OnScharr32792)
ON_COMMAND(ID_32794, &CMy21316116LiuDlg::On32794)
ON_COMMAND(ID_32795, &CMy21316116LiuDlg::On32795)
ON_COMMAND(ID_32796, &CMy21316116LiuDlg::On32796)
END_MESSAGE_MAP()
// CMy21316116LiuDlg 消息处理程序
BOOL CMy21316116LiuDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// 将“关于...”菜单项添加到系统菜单中。
// IDM_ABOUTBOX 必须在系统命令范围内。
ASSERT((IDM_ABOUT�
评论0