Feature Detection 特征检测
来源:互联网 发布:决战武羽扇进阶数据 编辑:程序博客网 时间:2024/06/03 19:54
边缘检测
前面我们用sobel算子和拉普拉斯变换也可以进行边缘检测,见我的上一篇blog:
http://blog.csdn.net/lu597203933/article/details/17252285
但这样得到的二值边缘图像有两大缺点。第一:检测到的边缘过粗,这意味着难以实现物体的精确定位。第二:难以找到这样的阀值,即能足够低检测到所有重要的边缘,同时也不至于包含过多次要的边缘。
这个正是canny算子要解决的。
Canny算子通常基于sobel算子,有两个阀值,这样可以得到两幅边缘图;canny算法组合这两幅边缘图以生成一副“最优”的轮廓图。如果存在连续的边缘点,则将低阀值图像中的边缘点与高阀值图像中的边缘相连接,那么就保留低阀值图像中的边缘点。这种使用双阀值以得到二值图像的策略被称为磁滞阀值化。
另附上:
Matlab的Canny算子
BW =edge(I,'canny')
用canny算子实现边缘检测
BW =edge(I,'canny',thresh)
为canny算法指定sensitivitythresholds(阈值)。
指定两个阈值(二维矢量):第一个元素为低阈值,第二个元素为高阈值。
指定一个阈值(单个数值):用作高阈值,低阈值为0.4*高阈值。
未指定阈值(或用[]代替):自动根据图像的梯度直方图计算高低阈值。
BW =edge(I,'canny',thresh,sigma)
sigma 表示高斯滤波器的标准差,默认值为sqrt(2)。滤波器大小根据sigma值自动计算。
[BW,thresh] =edge(I,'canny',...)
用thresh返回两个阈值。
OpenCV的Canny算子
cvCanny函数头:
void cvCanny(
const CvArr* img,
CvArr* edges,
double lowThresh,
double highThresh,
int apertureSize = 3
);
image 单通道输入图像
edges 单通道图像,保存图像边缘
threshold1 阈值1
threshold2 阈值2
apertureSize Sobel算子的孔径参数 (参见 cvSobel 函数)
------------------------------
来自:http://hi.baidu.com/windroc/item/2c3afac341a6542cee4665ca
- int main()
- {
- Mat image = imread("F:\\lena.png", 0); // 这里也可以是BGR 但是想想提取轮廓 效果是一样的
- if(!image.data)
- {
- cout << "Fail to load image" << endl;
- return 0;
- }
- Mat result;
- Canny(image, result, 150, 220);
- namedWindow("cannyResult");
- imshow("cannyResult", result);
- waitKey(0);
- return 0;
- }
- Feature Detection 特征检测
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 图像特征检测(Image Feature Detection)
- 【OpenCV2.3特征检测与描述】Feature Detection and Description
- 特征金字塔特征用于目标检测:Feature Pyramid Networks for Object Detection
- 行人检测“Pedestrian Detection with Unsupervised Multi-Stage Feature Learning”
- 行人检测论文笔记:Fast Feature Pyramids for Object Detection?
- 行人检测论文笔记:Fast Feature Pyramids for Object Detection?
- 目标检测--Feature Pyramid Networks for Object Detection
- 目标检测“Feature Pyramid Networks for Object Detection”
- How Many Maos Does the Guanxi Worth --HDU
- 2017年08月04日
- C 语言getopt与go语言flag获取命令参数
- ARM STM32F103VCT6驱动LCD屏12864实例
- C#之入门总结_对象补充_08
- Feature Detection 特征检测
- SQL 语言 实战总结
- Java 面向字节的IO流
- php 获取xml接口数据的处理
- Handler源码分析
- 人工智能时代即将到来—作为程序员你准备好了吗
- html javascript 全局变量和局部变量
- 北京邮电大学课程Java实验一
- 在浏览器上如何下载本地tomcat下root中的文件