python椭圆特征识别_opencv python中的椭圆检测

本文介绍了如何利用skimage库在Python中进行椭圆检测。通过使用Canny边缘检测和Hough变换,实现了从咖啡杯图像中找出椭圆的示例,展示了在图像处理中的椭圆特征识别技术。
摘要由CSDN通过智能技术生成

Xie,Yonghong和Qiang Ji制作的skimage中有另一种替代方法,并出版为…

“A new efficient ellipse detection method.” Pattern Recognition, 2002.

Proceedings. 16th International Conference on. Vol. 2. IEEE, 2002.

他们的椭圆检测代码相对较慢,此示例大约需要70秒;相比网站声称“ 28秒”.

如果您有conda或pip:“名称”,请安装scikit-image并试一试…

可以找到here或下面的副本/粘贴其代码:

import matplotlib.pyplot as plt

from skimage import data, color, img_as_ubyte

from skimage.feature import canny

from skimage.transform import hough_ellipse

from skimage.draw import ellipse_perimeter

# Load picture, convert to grayscale and detect edges

image_rgb = data.coffee()[0:220, 160:420]

image_gray = color.rgb2gray(image_rgb)

edges = canny(image_gray, sigma=2.0,

low_threshold=0.55, high_threshold=0.8)

# Perform a Hough Transform

# The accuracy corresponds to the bin size

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值