摘要: DrawShapes.cxx # include "DrawShapes_utils.h" #define WINDOW_NAME1 "Painting 1" #define WINDOW_NAME2 "Painting 2" // main int main( void ) { // crate 阅读全文
posted @ 2016-07-16 22:21 TinaSmile 阅读(1475) 评论(0) 推荐(0)
摘要: Matx 轻量级的Mat,必须在使用前规定好大小,比如一个2x3的float型的Matx,可以声明为Matx23f Vec Vec是Matx的一个派生类,是一个一维的Matx,跟vector很相似。在OpenCV源码中定义如下: template<typename _TP, int n> class 阅读全文
posted @ 2016-07-16 22:18 TinaSmile 阅读(843) 评论(0) 推荐(0)
摘要: void cvtColor(InputArray src, OutputArray dst, int code, int dstCn=0) src: 输入图像 dst: 输出图像 code: 颜色空间转换标识符 OpenCV2的CV_前缀宏命名规范被OpenCV3中的COLOR_式的宏命名前缀取代 阅读全文
posted @ 2016-07-16 22:06 TinaSmile 阅读(15965) 评论(0) 推荐(0)
摘要: Point 二维坐标系下的整数点, 定义如下 typedef Point_<int> Point2i; typedef Point2i Point; typedef Point_<float> Point2f; 构造函数如下: Point_ () Point_ (_Tp _x, _Tp _y) Po 阅读全文
posted @ 2016-07-16 22:03 TinaSmile 阅读(518) 评论(0) 推荐(0)
摘要: IplImage 与 Mat IplImage是OpenCV1中的图像存储结构体,基于C接口创建。在退出之前必须release,否则就会造成内存泄露。在一些只能使用C语言的嵌入式系统中,不得不使用。 IplImage* img = cvLoadImage("imagename.jpg",1); Ma 阅读全文
posted @ 2016-07-16 21:52 TinaSmile 阅读(3449) 评论(0) 推荐(0)
摘要: void setMouseCallback(const string& winname, MouseCallback onMouse, void* userdata=0) winname 窗口名字 onMouse 指定窗口每次鼠标事件发生的时候,被调用的函数指针。函数的原型应为void Foo(in 阅读全文
posted @ 2016-07-16 21:41 TinaSmile 阅读(1566) 评论(0) 推荐(0)
摘要: OpenCV中没有实现按钮的功能,我们可以利用滑动条来实现按钮功能。 int createTrackerbar(const string& trackerbarname, const string winame, int* value, int count, TrackbarCallback onC 阅读全文
posted @ 2016-07-16 21:38 TinaSmile 阅读(2931) 评论(0) 推荐(0)