
opencv
ImgLearning
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
IplImage,CvMat和Mat相互转换
1, IplImage,CvMat和Mat相互转换 12345IplImage* img = cvLoadImage("lena.jpg",1);Mat mtx(img);// IplImage* -> MatIplImage* img1 = mtx;//Mat -> IplImage*CvMat oldmat = mtx原创 2017-07-17 14:58:37 · 407 阅读 · 0 评论 -
c++模板
模板是C++支持参数化多态的工具,使用模板可以使用户为类或者函数声明一种一般模式,使得类中的某些数据成员或者成员函数的参数、返回值取得任意类型。模板的声明或定义只能在全局,命名空间或类范围内进行。即不能在局部范围,函数内进行,比如不能在main函数中声明或定义一个模板。模版可以分为两类,一个是函数模版,另外一个是类模版。函数模板通用格式:template 返回类型 函原创 2017-12-28 14:09:32 · 258 阅读 · 0 评论 -
opencv mat互转byte
byte * matToBytes(Mat image){ int size = image.total() * image.elemSize(); byte * bytes = new byte[size]; // you will have to delete[] that later std::memcpy(bytes,image.data,size * sizeof(byte...原创 2018-04-13 10:26:13 · 10096 阅读 · 3 评论 -
获取当前路径GetCurrentPath
char* GetCurrentPath() { char currentPath[MAX_PATH] = { 0 }; int n = GetModuleFileNameA(NULL, currentPath, MAX_PATH); currentPath[strrchr(currentPath, '\\') - currentPath + 1] = 0;//将最后一个"\\"后的字符置为0 ...原创 2018-06-04 11:12:21 · 2607 阅读 · 0 评论