随笔分类 -  C++

摘要:#include <iostream>#include <opencv2/opencv.hpp>#include <opencv2/xfeatures2d.hpp> using namespace std;using namespace cv;using namespace cv::xfeature 阅读全文
posted @ 2018-10-12 21:28 西北逍遥 阅读(674) 评论(0) 推荐(0)
摘要:vector<vector<Point>> vec_point;vector<Vec4i> hireachy;findContours(img_canny1, vec_point, hireachy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0));//绘制 阅读全文
posted @ 2018-10-08 15:26 西北逍遥 阅读(2655) 评论(0) 推荐(0)
摘要:HOGDescriptor hogDescriptor = HOGDescriptor(); hogDescriptor.setSVMDetector(hogDescriptor.getDefaultPeopleDetector()); vector<Rect> vec_rect; hogDescr 阅读全文
posted @ 2018-10-05 09:50 西北逍遥 阅读(617) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5, img6, img_result, img_gray1 阅读全文
posted @ 2018-10-04 15:01 西北逍遥 阅读(700) 评论(0) 推荐(0)
摘要:Size winSize = Size(5,5); Size zerozone = Size(-1,-1); TermCriteria tc = TermCriteria(TermCriteria::EPS + TermCriteria::MAX_ITER, 40, 0.001); cornerSu 阅读全文
posted @ 2018-10-04 12:43 西北逍遥 阅读(637) 评论(0) 推荐(0)
摘要:void cv::convertScaleAbs( cv::InputArray src, // 输入数组 cv::OutputArray dst, // 输出数组 double alpha = 1.0, // 乘数因子 double beta = 0.0 // 偏移量); // Copyright 阅读全文
posted @ 2018-10-03 20:43 西北逍遥 阅读(3039) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5, img6, img_result, img_gray1 阅读全文
posted @ 2018-10-03 20:38 西北逍遥 阅读(737) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5, img6, img_result, img_gray1 阅读全文
posted @ 2018-10-03 20:24 西北逍遥 阅读(1143) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5,img6,img_result, img_gray1, 阅读全文
posted @ 2018-10-03 13:17 西北逍遥 阅读(906) 评论(0) 推荐(0)
摘要://通过拉普拉斯-锐化边缘 kernel = (Mat_<float>(3,3)<<1,1,1,1,-8,1,1,1,1);//Laplace算子 filter2D(img2, img_laplance, CV_32F,kernel, Point(-1, -1), 0, BORDER_DEFAULT 阅读全文
posted @ 2018-10-03 10:04 西北逍遥 阅读(474) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img_result, img_gray1, img_gray2, 阅读全文
posted @ 2018-10-02 19:50 西北逍遥 阅读(207) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img_result, img_gray1, img_gray2, 阅读全文
posted @ 2018-10-02 16:47 西北逍遥 阅读(795) 评论(0) 推荐(0)
摘要:vector<vector<Point>> vec_p; vector<Vec4i> vec_4f; findContours(img_canny1, vec_p, vec_4f,RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0)); drawContours(i 阅读全文
posted @ 2018-10-02 16:25 西北逍遥 阅读(2718) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4,img_result, img_gray1, img_gray2, 阅读全文
posted @ 2018-10-02 16:00 西北逍遥 阅读(3725) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img_result, img_gray1, img_gray2, img_g 阅读全文
posted @ 2018-10-02 15:18 西北逍遥 阅读(213) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img_gray, map_x, map_y; char win1[] = " 阅读全文
posted @ 2018-10-02 13:49 西北逍遥 阅读(299) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img_gray, kernel_x, kernel_y; char win1 阅读全文
posted @ 2018-10-01 20:42 西北逍遥 阅读(221) 评论(0) 推荐(0)
摘要:图像的二值化就是将图像上的像素点的灰度值设置为0或255,这样将使整个图像呈现出明显的黑白效果。在数字图像处理中,二值图像占有非常重要的地位,图像的二值化使图像中数据量大为减少,从而能凸显出目标的轮廓。 threshold( InputArray src, OutputArray dst, doub 阅读全文
posted @ 2018-10-01 20:33 西北逍遥 阅读(363) 评论(0) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; //Robert算子int Demo_Robert(){ char win1[] = "window1"; char wi 阅读全文
posted @ 2018-10-01 17:16 西北逍遥 阅读(2498) 评论(3) 推荐(0)
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; //形态学操作int Demo_Morphology(){ char win1[] = "window1"; char w 阅读全文
posted @ 2018-10-01 10:10 西北逍遥 阅读(155) 评论(0) 推荐(0)