1 内容介绍
Hough变换在图像处理中占有重要地位,是一种检测曲线的有效方法.但使用传统的Hough变换来检测椭圆具有存储空间大计算时间长的缺点.为此提出了一种新的基于Hough变换的椭圆轮廓检测方法,利用椭圆的斜率特性,降低了Hough参数空间的维度,提高了运算运效率,并能良好地对图像中多个椭圆进行检测.
2 仿真代码
function [ellipses, L, posi] = ellipseDetectionByArcSupportLSs(I, Tac, Tr, specified_polarity)
%input:
% I: input image
% Tac: elliptic angular coverage (completeness degree)
% Tr: ratio of support inliers on an ellipse
%output:
% ellipses: N by 5. (center_x, center_y, a, b, phi)
% reference:
% 1、von Gioi R Grompone, Jeremie Jakubowicz, Jean-
% Michel Morel, and Gregory Randall, “Lsd: a fast line
% segment detector with a false detection control.,” IEEE
% transactions on pattern analysis and machine intelligence,
% vol. 32, no. 4, pp. 722–732, 2010.
angleCoverage = Tac;%default 165°
Tmin = Tr;%default 0.6
unit_dis_tolerance = 2; %max([2, 0.005 * min