萍聚社区-德国热线-德国实用信息网

 找回密码
 注册

微信登录

微信扫一扫,快速登录

查看: 3516|回复: 0

[电子] 高斯法求像素中心及椭圆拟合

[复制链接]
发表于 2006-6-12 13:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册 微信登录

x
首先用生成一个象素图,然后用高斯分布算法求出象素点的中心
m=customgauss ([50,50],2,4,0,0,1,[5,10]);
然后进行边缘化
a=fspecial('disk',8)*10000;
b=edge(a,'sobel')
最后进行椭圆拟合
[x,y]=find(b>0)
        ergebnis=fitellip(x,y)

拟合公式如下:
% fitellip gives the 6 parameter vector of the algebraic circle fit
% to a(1)x^2 + a(2)xy + a(3)y^2 + a(4)x + a(5)y + a = 0
% X & Y are lists of point coordinates and must be column vectors.
function a = fitellip(X,Y)

   % normalize data
   mx = mean;
   my = mean;
   sx = (max-min)/2;
   sy = (max-min)/2;
   x = (X-mx)/sx;
   y = (Y-my)/sy;
   

得到了一组数据
ergebnis =

  1.0e+003 *

   -0.0391
0.0000

这组数据估计是拟合的椭圆方程的系数,但如何根据这组数据写一个椭圆矩阵呢?

已知这个椭圆方程了,把它转化为矩阵岂不是很简单?。。。。

还有个奇怪的问题,要求用fspecial来重新建立这个椭圆矩阵,可fspecial是一个FILTER阿,怎么用来建立矩阵呢。。

[ 本帖最后由 eisenstange 于 2006-12-8 15:49 编辑 ]
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
您需要登录后才可以回帖 登录 | 注册 微信登录

本版积分规则

手机版|Archiver|AGB|Impressum|Datenschutzerklärung|萍聚社区-德国热线-德国实用信息网 |网站地图

GMT+2, 2024-5-4 02:36 , Processed in 3.277880 second(s), 19 queries , MemCached On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表