自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

u012767067的专栏

提供的代码希望能有帮助,用于有意义的地方

  • 博客(21)
  • 资源 (8)
  • 收藏
  • 关注

转载 利用ADO操作Excel文件

http://blog.csdn.net/tabby/article/details/1889217今天花时间研究了一下ADO操作Excel文件的问题,跟大家分享一下:首先利用Excel2003创建了一个名为Demo.xls的文件,内容如下:NameAgeTY12TZL15然后打开V

2014-04-11 09:37:05 2035

转载 C++读写EXCEL文件方式比较

zhttp://blog.csdn.net/fullsail/article/details/4067416因为有些朋友问代码的问题,将OLE读写的代码分享在这个地方,大家请自己看。 http://blog.csdn.net/fullsail/article/details/8449448C++读取Excel的XLS文件的方法有很多,但是也许就是因为方法

2014-04-11 08:52:56 962

原创 多线程例子

// linethread.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;int index = 0;HANDLE hmutex;DWORD WINAPI FUN1(LPVOID lpParameter){ int i=0; while (true) {

2014-02-25 14:36:56 774

原创 OPENCV 两点之间的操作

#include #include #include #include "cxcore.h" #include #include using namespace std;#pragma onceclass calTwoPoint{public: calTwoPoint(CvPoint pointO,CvPoint pointA); ~calTwoPoint(

2014-02-18 11:22:11 12509 2

原创 判断一点是否在矩形中,已知矩形的顶点坐标

#include #include #include #include "Point.h"using namespace std;#pragma onceclass eleRect{public: eleRect(vector & rect, int index = 0); ~eleRect(void); bool if_in_quadrilat(CPoint po

2014-02-18 10:59:42 1327

原创 求两直线交点

crossPoint.h#include #include #include #include "cxcore.h" #include #include using namespace std;#pragma oncetypedef struct _Line { CvPoint p1,p2; double a,b,c;

2014-02-18 10:55:19 974

原创 opencv 颜色识别

int whetherYellow(CvScalar temp, int T) { if (((temp.val[2] - temp.val[0]) > T) && ((temp.val[1] - temp.val[0])> T)) { return 1; } return 0; } int whetherRed(CvScalar temp

2014-02-14 12:01:29 1424

原创 获取两点之间的距离

/************************************************************************ *函数名: getDistance * *函数作用: 获取两点之间的距离 * *函数参数: *CvPoint2D32f pointO - 起点 *CvPoint2D32f pointA - 终点 * *函数

2014-02-14 11:59:00 8883

转载 for_each如何调用全局的和类的成员函数举例

转自 http://hi.baidu.com/xmuwubo/item/0dc94409b01a67c9905718f3#include "StdAfx.h"#include #include #include #include using namespace std;void printInt(int i){ cout <<i <<endl;}class CAdd{

2014-02-12 15:43:55 889

转载 STL中的list容器的一点总结

转自 http://www.cnblogs.com/BeyondAnyTime/archive/2012/08/10/2631191.htmlSTL中的list容器的一点总结1.关于list容器list是一种序列式容器。list容器完成的功能实际上和数据结构中的双向链表是极其相似的,list中的数据元素是通过链表指针串连成逻辑意义上的线性表,也就是list也具有链表的主

2014-01-26 14:03:33 686

原创 已知两点获取单位向量 和 单位垂直向量

根据两点获取单位向量 和 垂直单位向量/*************************************************************************函数名: getUnitVector**函数作用: 根据两点获取单位向量**函数参数:*CvPoint pointO - 起点*CvPoint pointA - 终

2014-01-26 11:43:05 7276 1

原创 已知2个坐标点,求从 0------->x 逆时针需旋转多少角度到该位置

/************************************************************************ *函数名: getAngle * *函数作用: 已知2个坐标点,求从 0------->x 逆时针需旋转多少角度到该位置 * * | * |

2014-01-26 10:55:03 1069

转载 list 容器 排序函数

点击打开链接list 容器 排序函数struct Point{ double x,y,z;};  制定排序规则,重载()运算符: (一) 按x值的大小 进行升序排序 class ascend_x{public: bool operator()(const Point &t1,Point &t2) {return t

2014-01-26 10:22:23 899

转载 Struct和Class的区别

转载来源:http://blog.sina.com.cn/s/blog_48f587a80100k630.htmlC++中的struct对C中的struct进行了扩充,它已经不再只是一个包含不同数据类型的数据结构了,它已经获取了太多的功能。struct能包含成员函数吗? 能!struct能继承吗? 能!!struct能实现多态吗? 能!!! 既然这些它都

2014-01-24 16:38:47 633

原创 虚函数实现多态的使用例子

#include "StdAfx.h" #include #include #include #include #include using namespace std;class student{public: char * name; bool female; int age; student(); student(char * nam

2014-01-24 14:45:44 819

原创 struct 重载 和 继承 的使用例子

#include "StdAfx.h"#include #include using namespace std;typedef struct _CPoint { int x; int y; _CPoint (); _CPoint (int a,int b); _CPoint operator + (_CPoint point); _CPoint opera

2014-01-24 13:50:42 809

原创 vector 的使用例子

#include "StdAfx.h"#include #include using namespace std;typedef vector :: iterator vIntIndex;int main(void){ vector arr; int a[] = {0,1,8}; array_num(arr,a,3); vIntIndex index; index

2014-01-22 10:23:08 893

转载 求两直线交点

http://blog.csdn.net/yangtrees/article/details/7965983struct Line { CvPoint p1,p2; double a,b,c; }; void GetLinePara(Line &l) { l.a=l.p1.y-l.p2.y; l.b=l.p2.x-l.p1.x; l.c=l.p

2014-01-08 18:02:31 937

原创 已知旋转中心和旋转角度,获得旋转之后的一组点坐标

//已知旋转中心和旋转角度,获得旋转之后的一组点坐标bool rotPoint(CPoint center,float rotAngleNow,CPoint src_corners[],CPoint dst_corners[],int num){ float reverseH[6]; float x = (float) (cos (rotAngleNow * PI / 180.));

2013-12-26 10:13:34 6019 1

原创 socket 套接字TCP MAKEWORD( 1, 1 ),MAKEWORD( 2, 2 ) 两个版本的

#include "StdAfx.h"#include #include #pragma comment( lib, "ws2_32.lib" )class socket264{public: socket264(); ~socket264(); bool recv264(char buf[50]); bool send264(char * sendBuffer);pr

2013-12-13 11:54:33 5231

原创 带有汉字的字符串与ASCII码相互转换

//带有汉字的字符串与ASCII码相互转换class AsciiTranslation{public: AsciiTranslation(); ~AsciiTranslation(); char * getAscii(char * input); char * AsciitoNum(char * input);private:};AsciiTranslation :: Asci

2013-12-10 10:10:53 1754

基于opencv的道路车道线检测

基于opencv的道路车道线检测。 采用了边缘检测法先检测出绘图图像的边缘,再hough直线拟合,拟合出图中的直线。由于这样查找到的直线非常多,所以先筛选掉角度明显有误的直线,在剩下的直线中保留最长的一组。 然后根据栅格扫描的方式进行逐行扫秒,把得到的交点,和道路中间的灰度小块进行块匹配,因为道路的分道线和道路的颜色是不一样的,根据块匹配区分该点是在分道线上还是在道路上,统计得到中心点左右两侧最匹配的两条直线,作为检测到的道路车道线。

2014-01-10

ffmpeg解码视频文件,opencv显示

ffmpeg解码视频文件,opencv显示,工程自带了需要的库文件,下载下来应该就可以直接运行

2013-12-12

ffmpeg解码,opencv显示

先用ffmpeg解码,再用opencv实时显示

2013-12-03

opencv捕获摄像头视频x264编码

用opencv捕获摄像头视频,然后用x264编码

2013-12-03

opencv实现显示摄像头视频

c++ 编写了一个类,调用opencv函数实现显示摄像头视频: class avishow { public: double fps; CvSize size; avishow(); avishow(char * aviOutName); ~avishow(); IplImage * currentFrameGet(); int currentFrameNum(); bool aviSave(IplImage* p); bool frameSave(IplImage * pFrame,char * frameOutName); private: int pFrameNum; CvCapture* pCapture; CvVideoWriter* writer; };

2013-11-25

opencv轮廓(contour)检测

一个opencv轮廓检测的例子 使用opencv函数 cvFindContours函数查找轮廓的例子

2013-11-25

创建和使用动态链接库dll

生成和使用动态链接库dll文件的例子,包含编译和使用2个工程

2013-11-25

【动态链接库】VC++2010中创建和使用动态链接库dll code例子

【动态链接库】VC++2010中创建和使用动态链接库dll 代码的简单例子 有生成和使用2个工程文件。

2013-11-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除