摘要: int CalcGrade(cv::Mat& src, cv::Mat& grad, int scale/* = 1*/, int delta/* = 0*/, int ddepth/* = CV_16S*/) { cv::Mat src_gray; if (!src.data) { return -1; } cv::GaussianB... 阅读全文
posted @ 2016-10-17 15:57 秋月的私语 阅读(2619) 评论(0) 推荐(0)
摘要: #include #include //----------- Error Handling Function ------------------- void error(LPSTR lpszFunction) { CHAR szBuf[80]; DWORD dw = GetLastError(); sprintf(szBuf, "%s failed: GetLa... 阅读全文
posted @ 2016-09-08 11:03 秋月的私语 阅读(10489) 评论(0) 推荐(0)
摘要: //View类 int m_nDCHeight; int m_nDCWidth; HBITMAP m_hBmp; HBITMAP m_hOldBmp; CDC m_memDC; BYTE *m_pFrontBuffer; // 内存buffer =============================== //OnSiz... 阅读全文
posted @ 2016-08-10 10:30 秋月的私语 阅读(441) 评论(0) 推荐(0)
摘要: #define LINEINTERSECT_CROSS(ps,pe,p) ((pe->x-ps->x)*(p->y-ps->y)-(p->x-ps->x)*(pe->y-ps->y)) typedef struct XPOINT32Ftag { double x; double y; XPOINT32Ftag(double _x, double _y) { ... 阅读全文
posted @ 2016-08-10 10:28 秋月的私语 阅读(572) 评论(0) 推荐(0)
摘要: #include #include #define _SnapSame(x1, x2, lfSnap) (0==lfSnap?x1==x2:fabs(x1-x2)x2-lfSnap) #define _SnapLarge2(x1, x2, lfSnap) (x1>x2+lfSnap) //-1在外面,0在上面,1在里面 int PtInRegionEx(dou... 阅读全文
posted @ 2016-08-10 10:26 秋月的私语 阅读(753) 评论(0) 推荐(0)
摘要: double CalcAngle(MyPoint first, MyPoint cen, MyPoint second) { double dx1, dx2, dy1, dy2; double angle; dx1 = first.x - cen.x; dy1 = first.y - cen.y; 阅读全文
posted @ 2016-02-23 16:29 秋月的私语 阅读(1214) 评论(0) 推荐(0)
摘要: 额外添加的对话框,需要初始化可以添加WM_SHOWWINDOW消息,快捷键是Ctrl + Shift + X; 然后在函数OnShowWindow(BOOL bShow, UINT nStatus)中添加对应的初始化代码即可。 当然,如果能够给其添加OnInitialDialog()函数也是极好的, 阅读全文
posted @ 2015-08-27 11:18 秋月的私语 阅读(349) 评论(0) 推荐(0)
摘要: 直接上源代码:#include "stdafx.h"#include #include using namespace std;class CSaveByteToBmp{public: bool SaveDIB2Bmp(int fileNum, const CString& BMPFileNa... 阅读全文
posted @ 2015-08-18 17:21 秋月的私语 阅读(1009) 评论(0) 推荐(0)
摘要: public Form1() { InitializeComponent(); label1.Font = new Font("隶书", 20, FontStyle.Bold); //第一个是字体,第二个大小,第三个是样式, ... 阅读全文
posted @ 2015-08-11 13:33 秋月的私语 阅读(37501) 评论(0) 推荐(0)
摘要: 转载来自csdn资源下载,这里做记录。#include#include#include#include#define max(a,b) (((a)>(b))?(a):(b))#define min(a,b) (((a)>(b))?(b):(a))#define sign(x) ((x)>eps?1:... 阅读全文
posted @ 2015-08-05 11:13 秋月的私语 阅读(584) 评论(0) 推荐(0)