随笔分类 - C++
摘要:#include <iostream>#include <opencv2/opencv.hpp>#include <opencv2/xfeatures2d.hpp> using namespace std;using namespace cv;using namespace cv::xfeature
阅读全文
摘要:vector<vector<Point>> vec_point;vector<Vec4i> hireachy;findContours(img_canny1, vec_point, hireachy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0));//绘制
阅读全文
摘要:HOGDescriptor hogDescriptor = HOGDescriptor(); hogDescriptor.setSVMDetector(hogDescriptor.getDefaultPeopleDetector()); vector<Rect> vec_rect; hogDescr
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5, img6, img_result, img_gray1
阅读全文
摘要:Size winSize = Size(5,5); Size zerozone = Size(-1,-1); TermCriteria tc = TermCriteria(TermCriteria::EPS + TermCriteria::MAX_ITER, 40, 0.001); cornerSu
阅读全文
摘要:void cv::convertScaleAbs( cv::InputArray src, // 输入数组 cv::OutputArray dst, // 输出数组 double alpha = 1.0, // 乘数因子 double beta = 0.0 // 偏移量); // Copyright
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5, img6, img_result, img_gray1
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5, img6, img_result, img_gray1
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img5,img6,img_result, img_gray1,
阅读全文
摘要://通过拉普拉斯-锐化边缘 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
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img_result, img_gray1, img_gray2,
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4, img_result, img_gray1, img_gray2,
阅读全文
摘要: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
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img4,img_result, img_gray1, img_gray2,
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img_result, img_gray1, img_gray2, img_g
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img_gray, map_x, map_y; char win1[] = "
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; Mat img1, img2, img3, img_gray, kernel_x, kernel_y; char win1
阅读全文
摘要:图像的二值化就是将图像上的像素点的灰度值设置为0或255,这样将使整个图像呈现出明显的黑白效果。在数字图像处理中,二值图像占有非常重要的地位,图像的二值化使图像中数据量大为减少,从而能凸显出目标的轮廓。 threshold( InputArray src, OutputArray dst, doub
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; //Robert算子int Demo_Robert(){ char win1[] = "window1"; char wi
阅读全文
摘要:#include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; //形态学操作int Demo_Morphology(){ char win1[] = "window1"; char w
阅读全文