canny边缘检测算法

Canny edge detector is a multi-step algorithm to detect the edges for any input image. It involves below mentioned steps to be followed while detecting edges of an image.

Canny边缘检测器是一种多步算法,可检测任何输入图像的边缘。 它涉及检测图像边缘时要遵循的下述步骤。

1. Removal of noise in input image using Gausian filter.

1.使用高斯滤波器消除输入图像中的噪声。

2. Computing the derivative of Gausian filter in order to calculate the gradient of image pixels to obtain magnitude along x and y dimension.

2.计算高斯滤波器的导数,以便计算图像像素的梯度以获得沿x和y维度的幅度。

3. Considering a group of neighbours for any curve in direction perpendicular to given edge supress the non-max edge contributor pixel points.

3.考虑在垂直于给定边缘的方向上的任何曲线的一组邻居抑制非最大边缘贡献者像素点。

4. Lastly use the Hysteresis Thresholding method to preserve the pixels higher than gradient magnitude and neglect the ones lower than the low threshold value.

4.最后,使用滞后阈值方法来保留高于梯度幅度的像素,而忽略低于低阈值的像素。

Before deep diving into the steps below are the three conclusions that J.K Canny who derived the algorithm :

在深入研究以下步骤之前,请先得出算法的JK Canny的三个结论:

- Good Detection : The optimal detector must eliminate the possibility of getting false positives and false negatives.

- 良好的检测:最佳检测器必须消除出现假阳性和假阴性的可能性。

- Good Localisation : The detected edges must be as close to true edges.

- 良好的本地化:检测到的边缘必须尽可能接近真实边缘。

- Single Response Constraint : The detector must return one point only for each edge point.

- 单一响应约束:检测器必须仅对每个边缘点返回一个点。

Steps to followed during Canny Algorithm:

Canny算法期间要遵循的步骤:

Noise Removal or Image Smoothing:

去噪或图像平滑:

During the noise presence the pixel may not be close to being similar to its neigbouring pixels. This might result in obtaining improper or inappropriate detection of edges . In order to avoid the same we use the Gausian filter which is convolved with the image and removes the noise which prevents from getting the desired edges in output images.

在噪声存在期间,像素可能与其附近像素不太接近。 这可能导致获得不正确或不合适的边缘检测。 为了避免同样的情况,我们使用了高斯滤波器,该滤波器与图像进行卷积,并去除了噪声,从而阻止了在输出图像中获得所需的边缘。

In the below example we are convolving gausian filter or kernel g(x,y) with image I. Here we wish to make sure that any given pixel must be alike its neighbouring pixels in output and so we use the matrix [1 1 1] in order to maintain the similarity between pixels and remove the noise.

在下面的示例中,我们将高斯滤波器或核g(x,y)与图像I卷积在一起。在这里,我们希望确保任何给定的像素在输出中都必须与其相邻像素相似,因此我们使用矩阵[1 1 1]为了保持像素之间的相似度并消除噪点。

g(x,y)= Gausian Distribution

g(x,y)=高斯分布

I = input image

I =输入图像

Derivative :

导数:

Calculate the derivative of filter w.r.t X and Y dimensions and convolve it with I to give the gradient magnitude along the dimensions. Also the direction of image can be calculated using the tangent of angle between the two dimensions.

计算滤波器X和Y尺寸的导数,并将其与I卷积,以得出沿尺寸的梯度幅度。 同样,可以使用两个维度之间的角度切线来计算图像方向。

The above convolution results in gradient vector which has magnitude and direction.

上述卷积导致具有大小和方向的梯度矢量。

Below is an example of Gausian Derivatives which finally contribute to edges in output images.

下面是高斯导数的一个示例,它们最终有助于输出图像中的边缘。

Non Max Suppression

非最大抑制

Along an edge it is generally observed that the presence of few points make the visibility of edge more clearer. So we can neglect those edge points which don’t contribute more towards feature visibility. In order to achieve the same we use the Non Maximum Supression method . Here we mark the points on the curve of edge where the magnitude is largest . This can be obtained by looking for a maximum along a slice normal to the curve.

通常沿着边缘观察到很少的点会使边缘的可见性更加清晰。 因此,我们可以忽略那些对特征可见性没有更多贡献的边缘点。 为了达到相同的目的,我们使用非最大压缩方法。 在这里,我们在边缘曲线上标记幅度最大的点。 这可以通过沿着垂直于曲线的切片寻找最大值来获得。

Consider the edge in below figure which has 3 edge points. Assume point (x,y) as point having largest gradient of edge. Check for the edge points in direction perpendicular to the edge and verify if their gradient is less than (x,y) . If the values are less than (x,y) gradient then we can suppress those non maxima points along the curve .

考虑下图中的边缘,该边缘具有3个边缘点。 假设点(x,y)为边缘的最大倾斜点。 检查垂直于边缘方向的边缘点,并验证它们的坡度是否小于(x,y)。 如果值小于(x,y)梯度,则我们可以抑制沿曲线的那些非最大值点。

Hysteresis Thresholding :

磁滞阈值:

If the gradient at a pixel is :

如果一个像素处的渐变为:

- Above “High” declare it as a ‘edge pixel’.

-在“高”上方,将其声明为“边缘像素”。

- Below “Low” declare it as a ‘non-edge pixel’.

-在“低”以下将其声明为“非边缘像素”。

- Between “low” and “high”

-在“低”和“高”之间

  • Consider its neighbours iteratively then declare it an “edge pixel” if its connected to an “edge pixel” or via pixels between “low” and “high”.反复考虑其邻居,然后将其声明为“边缘像素”(如果其连接到“边缘像素”或通过“低”与“高”之间的像素连接)。

Thanks for reading !!

谢谢阅读 !!

Source Reference of Dr Mubarak Shah youtube videos.

Mubarak Shah博士youtube视频的来源参考。

翻译自: https://medium.com/analytics-vidhya/what-is-canny-edge-detection-algorithm-95defef75492

canny边缘检测算法


http://www.taodudu.cc/news/show-5414310.html

相关文章:

  • 【悟空云课堂】第十二期:LDAP注入漏洞(CWE-90: Improper Neutralization of Special Elements used in an LDAP Query)
  • 缺陷检测相关论文继续更新
  • CWE-129: Improper Validation of Array Index(数组索引验证不当)
  • RF踩坑之调用pyautogui鼠标操作报错
  • 软件测试 (三) 界面测试
  • 【悟空云课堂】第二十三期:对XML外部实体引用的不当限制(CWE-611 :Improper Restriction of XML External Entity Reference)
  • 【TestNG】TestNG依赖测试详解
  • CWE-170: Improper Null Termination(NULL终止符错误)
  • 【悟空云课堂】第十期:日志伪造漏洞(CWE-117: Improper Output Neutralization for Logs)
  • maven TestNg 测试框架 not found
  • 实用测试者的想法
  • 记录装禅道XAMPP过程中 遇到的端口问题(1)
  • 软件测试—— 界面测试(三 )
  • PRML5-神经网络(2)
  • Day02-3 常用标签04 列表
  • OSChina 周五乱弹 ——大家好,我叫风油米青
  • 多线程和线程安全 同步代码 lock锁
  • 【Java进阶】多线程(一)
  • 牛客竞赛语法入门班-循环结构习题代码(1)
  • [蓝桥杯]2013年c++ B组题解(上)
  • 一点资讯电影贴片广告以假乱真
  • zzuli OJ 2345: 小新同学参加联谊会
  • 【不看后悔系列—小白手册】超实用Python入门指南!包括学习思维导图
  • XMind——思维导图软件
  • 【图形设计】手把手教会绘制思维导图
  • 如何把思维导图秒变成幻灯?
  • 计算机的发展英语思维导图,国外对思维导图概念图的研究发展
  • 思维导图怎样画又简单又漂亮
  • 手机文字转语音在线转换方法
  • 文字在线转换成语音

canny边缘检测算法_什么是Canny边缘检测算法相关推荐

  1. k均值算法 二分k均值算法_如何获得K均值算法面试问题

    k均值算法 二分k均值算法 数据科学访谈 (Data Science Interviews) KMeans is one of the most common and important cluste ...

  2. java常见的hash算法_常见的哈希算法和用途

    写在前面 哈希算法经常会被用到,比如我们Go里面的map,Java的HashMap,目前最流行的缓存Redis都大量用到了哈希算法.它们支持把很多类型的数据进行哈希计算,我们实际使用的时候并不用考虑哈 ...

  3. 最小径集的算法_机器学习的利器——集成算法

    最近在打算法竞赛的时候用到了集成算法,效果还不错,索性就总结了一篇集成算法的文章,希望能帮到正在转行的数据分析师们. 集成算法核心思想 集成算法的核心思想是通过构建并结合多个学习器来完成学习任务,也就 ...

  4. 标签传播算法_复杂网络社区发现算法汇总

    社区发现 这篇文章汇总了一些常见的社区发现概念和算法,包括 Modularity Q Fast Unfolding(Louvain Algorithm) LPA SLPA KL算法 GN算法 社区: ...

  5. 图像重建算法_基于深度学习图像重建算法(DLIR)对CT图像质量和剂量优化的研究:体模实验...

    编者按:今年Joël Greffier博士等在European Radiology (IF 4.1)上发表了题为<Image quality and dose reduction opportu ...

  6. ios笔试题算法_微软笔试题-Dijkstra算法

    Dijkstra算法是典型的算法.Dijkstra算法是很有代表性的算法.Dijkstra一般的表述通常有两种方式,一种用永久和临时标号方式,一种是用OPEN, CLOSE表的方式,这里均采用永久和临 ...

  7. 高效 遍历 算法_一文学会回溯算法解题技巧

    (给算法爱好者加星标,修炼编程内功) 来源:码海 前言 上文我们学习了深度优先搜索和广度优先搜索,相信大家对这两者的算法有了比较清楚的认识,值得一提的,深度优先算法用到了回溯的算法思想,这个算法虽然相 ...

  8. k近邻算法_图穷匕见:K近邻算法与手写数字识别

    机器学习算法是从数据中产生模型,也就是进行学习的算法.我们把经验提供给算法,它就能够根据经验数据产生模型.在面对新的情况时,模型就会为我们提供判断(预测)结果.例如,我们根据"个子高.腿长. ...

  9. python扫雷 高级算法_扫雷游戏的布雷算法、策略与优化(附Python代码)

    1 布雷算法的应用 在扫雷游戏中,将雷均匀地分布在局面中依靠一种布雷算法.众所周知,在原始版本的Windows扫雷中,由于布雷算法的缺陷,使得其存在Board Cycle(局面循环).而标准扫雷游戏中 ...

最新文章

  1. SEO内部链接优化的技巧
  2. 通过响应式web设计,使本站支持手机浏览
  3. Zookeeper学习总结2
  4. python基础语法有哪些-Python基础语法知识有哪些?
  5. pps+linux版+x64,64位Ubuntu 11.04安装PPS的办法
  6. 谈一个优秀的美工需要掌握哪些技能
  7. Android开源项目发现---ProgressBar 篇(持续更新)
  8. python代码查询_python 查询代码量
  9. 无法连接到 recaptcha_汕头精巧的重载连接器报价行情,靠谱的重载连接器出厂价...
  10. ireport 找不到子报表:Could not load object from location
  11. AAAIT学院JDK15新特性JAVA15版本
  12. ZZULI 1876: 蛤玮的项链 Hash + 二分
  13. linux mint 18.3浏览器,在Linux Mint 19/Ubuntu 18.04中安装Tor Browser浏览器的方法
  14. oracle12178错误,Oracle学习笔记_20080522:Index FS vs Index FFS
  15. linux shell 读取for循环中出现难处理的数据之单引号错误实例
  16. java对象锁的使用
  17. java如何看手机型号,基于JAVA代码 获取手机基本信息(本机号码,SDK版本,系统版本,手机型号)...
  18. 【jzoj5053】【石子游戏】【搜索】
  19. Java基础 - 替罪羊树(Scapegoat Tree)
  20. Julia1.4文档 —— 5. Julia 字符串

热门文章

  1. pc端调起电脑的摄像头进行拍照功能
  2. 向前(向上)、向后(向下)兼容
  3. matlab离散型数据求和,MATLAB程序设计教程(6)---MATLAB数据分析与多项式计算
  4. 网页设计作业成品 HTML+CSS+JS大作业——汽车保险销售综合商城(44页) HTML5网页设计成品_学生DW静态网页设计_web课程设计网页制作
  5. 21cn 世纪龙 二面
  6. selenium_您如何使用Selenium来计算自动化测试的投资回报率?
  7. SpringCloudAlibaba学习-加入Dubbo
  8. 18 | 四通八达:HTTP的重定向和跳转
  9. Pascal游戏开发入门(三):游戏对象管理
  10. 探访机器人伴侣工厂!2050年人会和机器人结婚吗?