- 博客(23)
- 资源 (7)
- 收藏
- 关注
原创 opencv——操作图像中每一个像素
以下均针对opencv1.0 第一种方法:使用cvGet2D及cvSet2D对于单通道图像: IplImage* img = cvCreateImage(cvSize(640, 480), IPL_DEPTH_8U, 1); for (int i = 0; i < img->height; i++)//height对应图像的行 { for (int j = 0
2016-07-21 19:32:51 3251
转载 opencv——hough变换
参考:http://blog.csdn.net/sunshine_in_moon/article/details/45273909
2016-07-21 11:12:23 620
原创 opencv——检测四边形的四个角点
#include "stdio.h" #include "cv.h" #include "highgui.h" #include "Math.h"#define max_corners 4#define C CV_PI /3int Otsu(IplImage* src);int main(int argc, char*argv[]){ IplImage* img = cvL
2016-07-21 11:08:00 15297 8
原创 c++——指针在数组中的应用
#include<iostream>#include<stdlib.h>using namespace std;int main(){ int a[3] = { 1, 2, 3 }; int*p = a;//一维数组名指向数组首元素,指针p指向数组收元素 cout << *p << endl; int*q = &a[0];//指针q指向数组首元素 cou
2016-07-20 09:53:26 571
原创 c++——数组指针和指针数组
————–指针—————- int a=10; int *p=&a;————-指针的指针———– int b=20; int *p=&b; int **p2p=&p;————-简单数组—————– int c[10];//整数数组,含有10个整数元素 也就是说每一个元素都是整数————–指针数组 是数组——————– int *p[10];//指针数组,含有10个
2016-07-19 19:20:01 1979
转载 c++——将数组中重复的数剔除
#include <iostream>using namespace std;int main(){ int k[10] = {0,1,1,0,2,3,2,4,2,4}; int l[10]; // 申请一个和k相同大小的数组,因为是排除相同,那l种大小必定小于等于k的大小 int m = 0; // 记录当前l种到底存了多少个元素 for(int i= 0;
2016-07-19 18:41:55 7728
转载 opencv-cvCopy和cvCloneImage
如果设定了ROI等参数的时候,cvCopy只是复制被设定的区域,复制到一个和所设定参数相吻合的新的IplImage中 而cvCloneImage则是将整个IplImage结构复制到新的IplImage中,其中的ROI等参数也会一同复制。新的IplImage将会和原来的一模一样。cvCopy的原型是: void cvCopy( const CvArr* src, CvArr* dst, const
2016-07-19 09:49:10 836
转载 opencv-把一个图像的一小块区域拷贝到另一个图像的指定区域
// vv.cpp : 定义控制台应用程序的入口点。//opencv把一个图像的一小块区域拷贝到另一个图像的指定区域#include "stdafx.h"#include "cv.h"#include "highgui.h"int main(){ IplImage* img = cvLoadImage("c:\\lh.jpg",0); CvRect roi =cvR
2016-07-19 09:24:00 9268
转载 opencv-cvSetImageROI及cvResetImageROI
void cvSetImageROI( IplImage* image, CvRect rect ); image 图像. rect ROI 矩形. 函数 cvSetImageROI 基于给定的矩形设置图像的 ROI(感兴趣区域) . 如果ROI是NULL 并且参数RECT的值不等于整个图像, ROI被分配.#include<cv.h> #include<cxcore.h>
2016-07-19 09:18:01 1435
原创 opencv——最大阈值分割
#include "stdio.h" #include "cv.h" #include "highgui.h" #include "Math.h"int Otsu(IplImage* src);int main(int argc, char*argv[]){ IplImage* img = cvLoadImage("D:\\chengxu\\opencv\\Desert.j
2016-07-13 20:26:39 2811
原创 opencv——角点检测
cvGoodFeaturesToTrack()#include"cv.h"#include"highgui.h"#include"stdio.h"#define max_corners 50int main(int argc, char** argv){ int cornerCount = max_corners; CvPoint2D32f corners[max_corne
2016-07-13 20:08:40 552
原创 c++——union、struct、enum
1.union 共用体使用覆盖技术,几个变量相互覆盖,从而使几个不同变量共占同一段内存的结构,成为共同体类型的结构。 共同体的定义类似结构体,不过共同体的所有成员都在同一段内存中存放,起始地址一样,并且同一时刻只能使用其中的一个成员变量。 (1)不能应用共用体变量,而只能引用共用体变量中的成员。 (2)使用共用体变量的目的是希望通过统一内存段存放几种不同类型的数据。 (3)不能对共用体变量名
2016-07-08 11:09:46 470
转载 c++——static关键字
参考:http://blog.csdn.net/hackbuteer1/article/details/7487694
2016-07-07 15:59:00 310
原创 c++——复制构造函数的使用
#include<vector>#include<iostream>#include<stdlib.h>using namespace std;struct student{ student(){ cout << "默认构造函数" << endl; } student(const student&){ cout << "复制构造函数" << endl; } stud
2016-07-06 14:36:52 575
原创 c++——this指针
1.一个对象的this指针并不是对象本身的一部分,不会影响sizeof(对象)的结果。this作用域是在类内部,当在类的非静态成员函数中访问类的非静态成员的时候,编译器会自动将对象本身的地址作为一个隐含参数传递给函数。 参考:http://blog.csdn.net/feiyond/article/details/1652505
2016-07-06 12:33:36 291
原创 c++——成员初始化列表
1.成员初始化的顺序: 按照他们在类中出现的顺序进行初始化的,而不是按照他们在初始化列表出现的顺序初始化的。 2.必须在初始化列表中初始化的成员: •常量成员,因为常量只能初始化不能赋值,所以必须放在初始化列表里面 •引用类型,引用必须在定义的时候初始化,并且不能重新赋值,所以也要写在初始化列表里面 •没有默认构造函数的类类型,因为使用初始化列表可以不必调用默认构造函数来初始化,而是直接调
2016-07-06 12:22:36 468
原创 opencv学习(8)——threshold阈值分割
#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui/highgui.hpp"#include <stdlib.h>#include <stdio.h>using namespace cv;/// Global variablesint threshold
2016-07-03 18:13:23 1209
原创 opencv学习(7)——图像平滑
#include <iostream>#include <vector>#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui/highgui.hpp"#include "opencv2/features2d/features2d.hpp"using nam
2016-07-03 18:00:42 690
原创 opencv学习(6)——图像金字塔
#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui/highgui.hpp"#include <math.h>#include <stdlib.h>#include <stdio.h>using namespace cv;/// Global vari
2016-07-03 17:36:57 394
原创 opencv学习(5)——腐蚀与膨胀
#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui/highgui.hpp"#include <stdlib.h>#include <stdio.h>using namespace cv;/// Global variablesMat src, ero
2016-07-03 15:31:34 1044
原创 opencv学习(4)——图像亮度、对比度调整
#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui/highgui.hpp"#include <iostream>using namespace cv;double alpha; /**< Simple contrast control */int beta; /**< Simple brightness control *//
2016-07-03 12:27:28 2920
原创 opencv学习(3)——addWeighted函数将两幅图像叠加
#include "opencv2/imgcodecs.hpp"#include "opencv2/highgui/highgui.hpp"#include <iostream>#include<stdlib.h>using namespace cv;/** * @function main * @brief Main function */int main( void ){
2016-07-03 12:13:56 4797
AXI4_master_slave源码对应分析
2018-06-08
AXI4_Lite_master源码分析
2018-06-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人