12 2019 档案

摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; Mat src, dst, map_x, map_y; const char* OUTPUT_TITLE = "remap demo"; int index = 0; void update_map(void); int m 阅读全文
posted @ 2019-12-13 13:22 喵小喵~ 阅读(166) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; Mat src, dst, map_x, map_y; const char* OUTPUT_TITLE = "remap demo"; int index = 0; void update_map(void); int m 阅读全文
posted @ 2019-12-12 16:47 喵小喵~ 阅读(197) 评论(0) 推荐(0)
摘要:方法1: 2.所以我们可以以如下方式进行投票: 遍历图像上的所有像素点,选取不同的半径进行投票,选择投票数超过阈值的那个像素点作为圆心,如下图所示: 缺点:计算量太大 方法二:霍夫梯度法 原理: 如下图所示: 圆的边缘点切线的垂直方向,也就是梯度方向过圆点,所以我们可以遍历图像的所有点,对每个像素点 阅读全文
posted @ 2019-12-12 13:03 喵小喵~ 阅读(1934) 评论(0) 推荐(0)
摘要:参考:https://blog.csdn.net/qq_15971883/article/details/80583364 image: 必须是二值图像,推荐使用canny边缘检测的结果图像; rho: 线段以像素为单位的距离精度,double类型的,推荐用1.0 theta: 线段以弧度为单位的角 阅读全文
posted @ 2019-12-11 13:55 喵小喵~ 阅读(351) 评论(0) 推荐(0)
摘要:原理: https://www.cnblogs.com/nowgood/p/cannyedge.html #include #include #include using namespace cv; using namespace std; Mat src, dst,dst2,gray_src; char* INPUT_WIN = "input image"; char* OUT... 阅读全文
posted @ 2019-12-09 14:51 喵小喵~ 阅读(809) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; Mat src, dst,dst2,gray_src; char* INPUT_WIN = "input image"; char* OUTPUT_WIN = "binary ima 阅读全文
posted @ 2019-12-09 14:11 喵小喵~ 阅读(1138) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; Mat src, dst,dst2,gray_src; char* INPUT_WIN = "input image"; char* OUTPUT_WIN = "binary ima 阅读全文
posted @ 2019-12-09 11:48 喵小喵~ 阅读(375) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; Mat src, dst,dst2,gray_src; char* INPUT_WIN = "input image"; char* OUTPUT_WIN = "binary ima 阅读全文
posted @ 2019-12-09 10:11 喵小喵~ 阅读(819) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; Mat src, dst,dst2,gray_src; char* INPUT_WIN = "input image"; char* output_title = "binary i 阅读全文
posted @ 2019-12-07 20:27 喵小喵~ 阅读(244) 评论(0) 推荐(0)
摘要:#include #include #include using namespace cv; using namespace std; Mat src, dst,dst2; //膨胀腐蚀的应用:消除噪声 int main() { //原图 src = imread(".//pic//kate.png", IMREAD_UNCHANGED); char*... 阅读全文
posted @ 2019-12-07 17:36 喵小喵~ 阅读(1495) 评论(0) 推荐(0)
摘要:效果图: 代码: 阅读全文
posted @ 2019-12-07 15:05 喵小喵~ 阅读(511) 评论(0) 推荐(0)
摘要:#include #include #include using namespace cv; using namespace std; Mat src, dst,dst2; //开操作:先腐蚀,再膨胀 //闭操作:先膨胀,再腐蚀 int main1() { //原图 src = imread(".//pic//1.png",IMREAD_UNCHANGED); ... 阅读全文
posted @ 2019-12-07 14:26 喵小喵~ 阅读(575) 评论(0) 推荐(0)
摘要:先膨胀再腐蚀消除裂痕: 代码: 阅读全文
posted @ 2019-12-07 10:24 喵小喵~ 阅读(553) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; const int g_nTrackbarMaxValue = 9; //定义轨迹条最大值 int g_nTrackbarValue; //定义轨迹条初始值 int g_nKerne 阅读全文
posted @ 2019-12-06 18:42 喵小喵~ 阅读(929) 评论(0) 推荐(0)
摘要:#include #include #include using namespace cv; using namespace std; //线 void MyLines(Mat &bgImage) { Point p1 = Point(20, 30); Point p2; p2.x = 300; p2.y = 300; Scalar color =... 阅读全文
posted @ 2019-12-06 15:48 喵小喵~ 阅读(302) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; int main() { Mat src1,dst,dst2; //原图 src1 = imread(".//pic//kate.png",IMREAD_UNCHANGED); if 阅读全文
posted @ 2019-12-06 14:32 喵小喵~ 阅读(370) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; int main() { Mat src1,src2,dst; //原图 src1 = imread(".//pic//kate.png",IMREAD_UNCHANGED); sr 阅读全文
posted @ 2019-12-06 14:01 喵小喵~ 阅读(124) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; int main() { Mat src; //原图 src = imread(".//pic//test.jpg",IMREAD_UNCHANGED); if (src.empty 阅读全文
posted @ 2019-12-06 13:31 喵小喵~ 阅读(1091) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespace cv; using namespace std; int main() { Mat src; //原图 src = imread(".//pic//test.jpg",IMREAD_UNCHANGED); if (src.empty 阅读全文
posted @ 2019-12-06 12:02 喵小喵~ 阅读(1007) 评论(0) 推荐(0)
摘要:代码: 阅读全文
posted @ 2019-12-06 11:07 喵小喵~ 阅读(1871) 评论(0) 推荐(0)
摘要:#include #include #include using namespace cv; using namespace std; int main() { //原图 Mat src1 = imread(".//pic//test.jpg",IMREAD_UNCHANGED); //灰度图 Mat src2 = imread(".//pic//test... 阅读全文
posted @ 2019-12-05 18:16 喵小喵~ 阅读(339) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-12-05 18:04 喵小喵~ 阅读(123) 评论(0) 推荐(0)