Canny边缘检测

本文介绍了Canny边缘检测方法,包括其在OpenCV中的使用。虽然OpenCV要求输入图像为单通道灰度图,但作者发现即使输入三通道彩色图像也能得到正确结果。文章提供了简单的Canny边缘检测实现,并附带了输入图像和检测结果的展示。后续计划深入探讨Canny算法的实现原理。
摘要由CSDN通过智能技术生成

原本今天想看霍夫变换的,opencv文档给出了霍夫变换的例子,但是用到了Canny进行边缘检测,所以就查了一些与Canny有关的资料,部分内容是摘抄自其他博客,同时也有一些自己的总结:


先给出opencv文档中对Canny的定义:

void Canny(InputArray image, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false )

Parameters: 

image – Single-channel 8-bit input image.
edges – Output edge map. It has the same size and type as image .
threshold1 – First threshold for the hysteresis procedure.
threshold2 – Second threshold for the hysteresis procedure.
apertureSize – Aperture size for the Sobel() operator.
L2gradient – Flag indicating whether a more accurate  L_2 norm  &
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值