python 椭圆检测_cv2检测椭圆,检测出来的都是极小的点,检测不出来大一些的椭圆,是canny的参数问题吗?...

方法有问题,canny是检测边缘的。检测圆形一般用Hough Transform。椭圆的话复杂一些,取决于实际问题,应该尝试先简化。

比如只限定大小而不限定椭圆的几何参数,可以用blob detection算法代替,用LoG, DoG 或 DoH 之类。

如果确定椭圆的大小,形状和或朝向,可以用给定参数的Hough Transform。OpenCV里没有现成的,建议用scikit-image。文档和示例代码页面我直接复制粘贴在下面了:

Circular and Elliptical Hough Transforms

The Hough transform in its simplest form is a method to detect straight lines but it can also be used to detect circles or ellipses. The algorithm assumes that the edge is detected and it is robust against noise or missing points.

Circle detection

In the following example, the Hough transform is used to detect coin positions and match their edges. We provide a range of plausible radii. For each radius, two circles are extracted and we finally keep the five most prominent candidates. The result shows that coin positions are well-detected.

Algorithm overview

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值