计算机工程与应用 ›› 2016, Vol. 52 ›› Issue (18): 188-191.

• 图形图像处理 • 上一篇    下一篇

基于惯量矩的椭圆拟合方法

丁业兵   

  1. 安徽邮电职业技术学院 通信工程系,合肥 230031
  • 出版日期:2016-09-15 发布日期:2016-09-14

Ellipse fitting method based on moment of inertia

DING Yebing   

  1. Department of Communication Engineering, Anhui Post and Telecommunication College, Hefei 230031, China
  • Online:2016-09-15 Published:2016-09-14

摘要: 数字图像中,Hough变换或最小二乘法无法对图像中物体直接进行椭圆拟合,需要边缘检测等预处理,过程复杂且计算量大,为此,提出一种直接用图像惯量矩来拟合椭圆的方法。选定图像中要拟合的目标物体,将彩色图像转换为概率密度灰度图;计算目标的质心和主轴转动惯量,并运用形心主轴惯量积为零的条件推导出椭圆旋转角度和形心主轴惯量矩的大小;由形心主轴惯量矩的大小得出椭圆长半轴和短半轴大小,从而得到拟合后椭圆的各项参数。彩色图像实验,验证了该方法拟合目标椭圆的有效性和鲁棒性。

关键词: 椭圆拟合, 惯量矩, 概率密度, 形心主轴

Abstract: In digital image, Hough transform and least square method are unable to deal with ellipse fitting directly, need edge detection and so on, and the process is complex and needs large amount of calculation. Aiming at this problem, this paper puts forward a method of ellipse fitting by image inertia moment. Firstly, it selects the target in the image, converts color image to probability density grayscale; then, the center and inertia moments of principal axis are calculated, and it derives the angle of rotation and inertia moments of centroidal principal axis in the condition that inertia product is zero; finally, it acquires the ellipse parameters of semi-major axis and semi-minor axis according to the centroidal principal axis. Experiments in color image verify the effectiveness and robustness of the proposed method in fitting target ellipse.

Key words: ellipse fitting, moment of inertia, probability density, centroidal principal axis