Print

发布时间: 2016-12-25
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.20161205
2016 | Volumn 21 | Number 12




    图像处理和编码    




  <<上一篇 




  下一篇>> 





广义质心及其在仿射变换参数恢复中的应用
expand article info 云尧, 杨建伟, 张亮
南京信息工程大学数学与统计学院, 南京 210044

摘要

目的 全局的仿射变换配准需估计出仿射变换的参数,现有算法要么效果不佳,要么对二值图像无能为力。本文改造传统质心的定义,提出广义质心的概念。 方法 传统的质心以二重积分定义,所提广义质心利用变形累次积分定义,传统质心只是这种广义质心的特例。本文给出了广义质心保持仿射变换前后对应关系的条件,并提出了一种利用这种广义质心进行仿射变换参数恢复的算法。 结果 该算法对灰度和二值图像的仿射变换参数恢复都适用,实验结果也表明现有的交叉权重矩方法耗时是本文算法耗时的25倍,但它们的恢复效果相差不大,并且本文算法要比现有的图像矩构造非线性方程组方法恢复效果好。 结论 本文提出了广义质心,利用这种广义质心进行仿射变换参数恢复算法,对二值图像和灰度图像均适用,恢复效果较好,并且计算量较小。

关键词

图像配准; 广义质心; 仿射变换; 仿射变换参数恢复; 变形累次积分

Generalized centroids with applications for parametric estimation of affine transformations
expand article info Yun Yao, Yang Jianwei, Zhang Liang
College of Mathematics and Statistics, Nanjing University of Information Science and Technology, Nanjing 210044, China
Supported by: Supported by:National Natural Science Foundation of China(61572015,41375115,11301276)

Abstract

Objective Global image registration aimed at finding a transformation aligning two images can be approximated by estimating parameters of affine deformations. Some of the existing methods are inapplicable to binary images. The burden of computation process in other methods is more expensive. In this paper, we modified the definition of centroid for images and proposed the concept of generalized centroid. By combining the generalized centroid, we proposed an algorithm to achieve the estimation for parameters of affine deformations. Method Unlike the traditional centroid, the generalized centroid is defined by a modified repeated integral. The traditional centroid is only a special case of the proposed generalized centroid. To maintain the affine deformation relation, we present the condition in which the generalized centroid needs to be satisfied. We propose an algorithm to achieve the estimation for parameters of affine deformations. The basic idea of the algorithm is that we should find three sets of corresponding points in the original image and corresponding deformation image using these three pairs of points and establish equations to determine the parameters of affine deformations. Resuls The proposed centroids are applicable not only to gray images but also to binary images. Compared with the cross-weighted moment method to estimate the parameters of affine deformations, the proposed method requires less calculation and the recovery effect of the two methods is not significantly different. Compared with the method of constructing a nonlinear equation group using the image moment, the proposed method has a good ability to estimate the parameters of affine deformations. Conclusion By combining the generalized centroid, we proposed an algorithm to achieve the estimation for parameters of affine deformations. The proposed method is applicable to gray images and binary images. Moreover, the recovery effect is better and the calculation is less.

Key words

image registration; feneralized centroids; affine transformation; parametric estimation of affine transformations; modified repeated integral

0 引 言

当摄像机从不同视点拍摄同一目标时,所得图像存在一定程度的几何形变,如果目标到摄像机的距离远小于目标大小时,图像的几何形变可用仿射变换近似[1]。仿射变换下图像的配准有着广泛的应用前景,现有的仿射变换图像配准算法大体可分为局部和全局两类,它们各有优缺点。本文考虑全局的仿射变换配准,这也就是仿射变换参数的恢复问题:给定两幅图像,估计它们之间仿射变换关系中的参数。而全局算法又分为轮廓和区域两类[2],轮廓类算法计算量小,但对由多部分构成的目标(如汉字“物”等)无能为力,因此区域类算法受到了更多地关注。

最常用的区域类算法是利用图像矩进行的仿射变换参数恢复。文献[3]利用交叉权重矩,然而其计算复杂度高;文献[4]利用高阶矩,其算法对噪声敏感;文献[5-6]对图像函数进行变换以建立关于仿射变换参数的线性方程组,计算量小,但该类算法对二值图像无能为力;文献[7]利用图像矩构造非线性方程组,能较方便地解出仿射变换参数,然而该算法所建立的方程组有多组解,需逐个验证,也可能出现无实数解的情形;近来文献[7]的作者及其合作者们利用与文献[7]类似的方法做了一系列的工作[8-9],但都绕不开非线性方程组多解或无实解的问题。如何设计出计算量小,对灰度、二值图像都适用的参数恢复算法是一个值得研究的问题。

仿射变换的参数恢复问题可通过确定仿射变换前后对应的点来求解。不久前,陈涛等人[10]提出扩展质心的概念,这种质心与普通质心类似,可保持仿射变换前后的对应关系,结合扩展质心和普通质心可进行图像的规范化、图像识别和仿射变换参数恢复等工作,文献[10-11]的实验结果也验证了这一点。然而扩展质心利用图像函数的幂来构造,对二值图像无能为力。如何构造对灰度和二值图像都适用、计算量小且能保持仿射变换前后对应关系的类质心点是一个值得研究的问题。

1 广义质心

1.1 扩展质心

仿射变换的关系式描述为

$\left[ \begin{matrix} {\tilde{x}} \\ {\tilde{y}} \\ \end{matrix} \right]=\left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} \right]\left[ \begin{matrix} x \\ y \\ \end{matrix} \right]+\left[ \begin{matrix} e \\ f \\ \end{matrix} \right]$ (1)

式中,A=$\left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} \right]$是非奇异矩阵,B=$\left[ \begin{matrix} e \\ f \\ \end{matrix} \right]$为平移参数。对矩阵A可进行(奇异值)分解:A=UWV,U、V为正交阵,W为对角阵,因此仿射变换包括旋转、伸缩、平移和斜切变换。

陈涛等人[10]提出的扩展质心定义为

$\begin{align} & EC{{x}_{\alpha }}=\frac{\iint{{}}x{{I}^{\alpha }}\left( x,y \right)dxdy}{\iint{{}}{{I}^{\alpha }}\left( x,y \right)dxdy} \\ & EC{{y}_{\alpha }}=\frac{\iint{{}}y{{I}^{\alpha }}\left( x,y \right)dxdy}{\iint{{}}{{I}^{\alpha }}\left( x,y \right)dxdy} \\ \end{align}$ (2)

扩展质心Eα(ECxα,ECyα)实际上是通过图像函数的幂Iα计算得到的。当α=1时,扩展质心Eα即为普通质心,当α≠1时,Eα为不同于普通质心的扩展质心点,这些扩展质心点与普通质心有类似性质,可保持仿射变换的对应关系,利用扩展质心这一性质可提取仿射不变特征[10-11]。然而这种扩展质心对二值图像却无能为力(无论α取何值,(ECxα,ECyα)都是图像的普通质心),为此提出一种广义质心,这种质心对二值图像同样适用。

1.2 广义质心的定义

为构造广义质心,将图像原点移至质心,并将直角坐标系转化为极坐标系,极坐标与直角坐标系的变换关系为

$\begin{align} & x=rcos~\theta ,y=rsin~\theta \\ & \tilde{x}=\tilde{r}cos\tilde{\theta },\tilde{y}=\tilde{r}sin\tilde{\theta } \\ \end{align}$

式中,r=$\sqrt{{{x}^{2}}+{{y}^{2}}}$$\tilde{r}=\sqrt{{{{\tilde{x}}}^{2}}+{{{\tilde{y}}}^{2}}}$,tanθ=$\frac{y}{x}$$\tan \tilde{\theta }=\frac{{\tilde{y}}}{{\tilde{x}}}$,θ,${\tilde{\theta }}$∈[0,2π)。

定义 对于s,t≥0,令

$\begin{align} & Gx_{s}^{t}=\frac{\int {{\left[ \int {{r}^{s}}f\left( r,\theta \right)dr \right]}^{t}}cos~\theta ~d\theta }{\iint{{}}rf\left( r,\theta \right)drd~\theta }, \\ & Gy_{s}^{t}=\frac{\int {{\left[ \int {{r}^{s}}f\left( r,\theta \right)dr \right]}^{t}}sin~\theta ~d\theta }{\iint{{}}rf\left( r,\theta \right)drd\theta }, \\ \end{align}$ (3)

称点Ps(Gxst,Gyst)为图像的广义质心。

1) 上述广义质心利用变形累次积分计算。图像普通质心利用二重积分定义(如式(2) 中α=1的情形),通过累次积分计算。而上面的广义质心直接利用变形的累次积分定义(见式(3) ),在对极径方向积分后取幂,然后再对极角积分。

2) 上面定义的广义质心是普通质心的推广。普通质心(式(2) 中α=1的情形)在极坐标系下的形式为

$\begin{align} & EC{{x}_{1}}=\frac{\iint{{}}xf\left( x,y \right)dxdy}{\iint{{}}f\left( x,y \right)dxdy}=\frac{\int [\int {{r}^{2}}f\left( r,\theta \right)dr]cos~\theta d\theta }{\iint{{}}rf\left( r,\theta \right)drd\theta } \\ & EC{{y}_{1}}=\frac{\iint{{}}yf\left( x,y \right)dxdy}{\iint{{}}f\left( x,y \right)dxdy}=\frac{\int [\int {{r}^{2}}f\left( r,\theta \right)dr]sin~\theta d\theta }{\iint{{}}rf\left( r,\theta \right)drd\theta } \\ \end{align}$

也就是说,在式(3) 中s=2,t=1,广义质心对应的就是图像的普通质心,也就是普通质心仅是广义质心的特殊情形。

1.3 广义质心的性质

先将坐标原点移至质心以消除平移,则式(1) 可化为

$\left[ \begin{matrix} {\tilde{x}} \\ {\tilde{y}} \\ \end{matrix} \right]=\left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} \right]\left[ \begin{matrix} x \\ y \\ \end{matrix} \right]$ (4)

此时有如下的定理:

定理 对于s≥0,取t=$\frac{3}{s+1}$,设原图像的广义质心为Ps(Gxst,Gyst),而经仿射变换后图像的广义质心为${{\tilde P}_s}\left( {G\tilde x_s^t,G\tilde y_s^t} \right)$,则广义质心满足

$\left[ \begin{matrix} G{{{\tilde{x}}}^{t}}_{s} \\ G{{{\tilde{y}}}^{t}}_{s} \\ \end{matrix} \right]=\left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} \right]\left[ \begin{matrix} G{{x}^{t}}_{s} \\ G{{y}^{t}}_{s} \\ \end{matrix} \right].$ (5)

证明 由式(3) 知

$\left\{ \begin{align} & \tilde{r}cos\tilde{\theta }~=arcos~\theta +brsin~\theta \\ & \tilde{r}sin~\tilde{\theta }=crcos~\theta +drsin~\theta \\ \end{align} \right.$

一方面,tan θ=$\frac{y}{x}$$\tan \tilde{\theta }=\frac{{\tilde{y}}}{{\tilde{x}}}$。因此,$\tan \tilde{\theta }=\frac{ccos~\theta +dsin~\theta }{acos~\theta +bsin~\theta }$,令

$\begin{align} & \alpha \left( \theta \right)=\sqrt{{{(acos~\theta +bsin~\theta )}^{2}}+{{(ccos~\theta +dsin~\theta )}^{2}}}, \\ & \beta \left( \theta \right)=\frac{ccos~\theta +dsin~\theta }{acos~\theta +bsin~\theta } \\ \end{align}$

$\tilde{r}=\alpha \left( \theta \right)r,tan~\tilde{\theta }=\beta \left( \theta \right)$ (6)

另一方面

${{(sin\tilde{\theta })}^{2}}=\frac{{{(tan\tilde{\theta })}^{2}}}{1+{{(tan\tilde{\theta })}^{2}}}=\frac{{{(ccos~\theta +dsin~\theta )}^{2}}}{{{\alpha }^{2}}\left( \theta \right)}$

cos${\tilde{\theta }}$acos θ+bsin θ,sin ${\tilde{\theta }}$ccos θ+dsin θ同号,从而

$cos\tilde{\theta }=\frac{acos~\theta +bsin~\theta }{\alpha \left( \theta \right)},sin\tilde{\theta }=\frac{ccos~\theta +dsin~\theta }{\alpha \left( \theta \right)}$

再由式(6) 得${\tilde \theta }$=arctan$\frac{ccos~\theta +dsin~\theta }{acos~\theta +bsin~\theta }$,从而

$\begin{align} & d\tilde{\theta }=\frac{d\left( \beta \left( \theta \right) \right)}{1+{{\left( \frac{ccos~\theta +dsin~\theta }{acos~\theta +bsin~\theta } \right)}^{2}}}= \\ & \frac{adco{{s}^{2}}\theta +adsi{{n}^{2}}\theta -bcsi{{n}^{2}}\theta -bcco{{s}^{2}}\theta }{{{\alpha }^{2}}\left( \theta \right)}d\theta = \\ & \frac{ad-bc}{{{\alpha }^{2}}\left( \theta \right)}d\theta =\frac{\left| A \right|}{{{\alpha }^{2}}\left( \theta \right)}d\theta . \\ \end{align}$

再由${\tilde{r}}$=α(θ)r得到d${\tilde{r}}$=α(θ)dr,因此

$\begin{align} & G{{{\tilde{x}}}^{t}}_{s}=\frac{\int {{[\int {{{\tilde{r}}}^{s}}\tilde{f}\left( \tilde{r},\tilde{\theta } \right)d\tilde{r}]}^{t}}cos(\tilde{\theta })d\tilde{\theta }}{\iint{{}}{{{\tilde{r}}}^{s}}\tilde{f}\left( \tilde{r},\tilde{\theta } \right)d\tilde{r}d\tilde{\theta }}= \\ & \frac{\left| A \right|\int {{[\int {{r}^{s}}{{\alpha }^{s+1}}\left( \theta \right)f\left( r,\theta \right)]}^{t}}(acos~\theta +bsin~\theta ){{\alpha }^{-3}}\left( \theta \right)d\theta }{\left| A \right|\iint{{}}rf\left( r,\theta \right)drd\theta }= \\ & \frac{\int {{\alpha }^{t\left( s+1 \right)-3}}\left( \theta \right){{[\int {{r}^{s}}f\left( r,\theta \right)dr]}^{t}}(acos~\theta +bsin~\theta )d\theta }{\iint{{}}rf\left( r,\theta \right)drd\theta } \\ \end{align}$

t=$\frac{3}{s+1}$,则有G${\tilde{x}}$st=aGxst+bGyst

同理有G${\tilde{y}}$st=cGxst+dGyst,命题得证。

该定理说明广义质心与普通质心类似,能够保持仿射变换关系,以一个二值图像的例子说明该定理。图 1(a)(b)分别是仿射变换前后的二值汉字“扬”,图中用圆代表图像的普通质心,三角形代表图像的广义质心(这里s=0.1,从而t=$\frac{30}{11}$),可以看出,类似于图像普通质心,广义质心可保持仿射变换关系。

图 1 仿射变换关系图
Fig. 1 Affine transformation relationship ((a) original image centroid and generalized centroid; (b) transformation image centroid and generalized centroid)

2 基于广义质心的仿射变换参数恢复

仿射变换参数的恢复就是利用两幅满足仿射变换关系的图像f(x,y)与$\tilde{f}(\tilde{x},\tilde{y})$来确定式(1) 中6个参数a,b,c,d,e,f,需要6个独立的条件,只需确定3组满足式(1) 关系的对应点,与扩展质心类似,选择不同参数的广义质心可能在同一直线上,用以下方式确定这3组点:

1) 确定图像的普通质心对P0(x0,y0)和${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{0}},{{{\tilde{y}}}_{0}})$,选择参数s≥0,确定广义质心Ps(x0,y0)和${{{\tilde{P}}}_{s}}({{{\tilde{x}}}_{0}},{{{\tilde{y}}}_{0}})$

2) 以P0(x0,y0)和Ps(x0,y0)、${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{0}},{{{\tilde{y}}}_{0}})$${{{\tilde{P}}}_{s}}({{{\tilde{x}}}_{0}},{{{\tilde{y}}}_{0}})$的连线将图像分割成两部分,确定各部分的质心P0(x1,y1)和P0(x2,y2)、${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{1}},{{{\tilde{y}}}_{1}})$${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{2}},{{{\tilde{y}}}_{2}})$

3) 以P0(x0,y0)和P0(x1,y1)、${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{0}},{{{\tilde{y}}}_{0}})$${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{1}},{{{\tilde{y}}}_{1}})$的连线将图像分割成两部分,确定各部分的质心P0(x3,y3)和P0(x4,y4)、${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{3}},{{{\tilde{y}}}_{3}})$${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{4}},{{{\tilde{y}}}_{4}})$

以3组对应点P0(x1,y1)和${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{1}},{{{\tilde{y}}}_{1}})$P0(x2,y2)和${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{2}},{{{\tilde{y}}}_{2}})$P0(x3,y3)和${{{\tilde{P}}}_{0}}({{{\tilde{x}}}_{3}},{{{\tilde{y}}}_{3}})$建立方程组确定仿射变换参数。

图 2图 1中图像经质心与广义质心连线将原图像切片,各切片的质心也标注在图上,由图中可以看出图像经质心与广义质心连线所得切片的质心也保持仿射变换关系,这里只显示一次切片,另一次结果类似。利用这些切片所得质心可将图像恢复,如图 3所示,图 3(a)是利用本文方法恢复的图像,图 3(b)是恢复后图像与原图的差,可看出,恢复的图像与原图像相差不大。

图 2 质心与广义质心连线对图像的切片及各切片质心
Fig. 2 The line of the centroid and the generalized centroid to the slice of the image and the centroid of each slice
((a) the original image slice of upper part and its centroid; (b) the original image slice of lower part and its centroid; (c) the transformation image slice of upper part and its centroid; (d) the transformation image slice of lower part and its centroid)
图 3 参数恢复的效果图
Fig. 3 The effect image of parameter recovery ((a) recovery Chinese characters “Yang”; (b) the difference between recovery image and original image)

3 实验结果

由于计算广义质心时已将坐标原点移至质心,从而平移已消除,因此实验中仅测试式(4) 中矩阵A=$\left[ \begin{matrix} a & b \\ c & d \\ \end{matrix} \right]$的恢复。衡量仿射变换参数恢复效果的公式为

${{e}_{1}}=\frac{\left\| \bar{A}-A \right\|}{\left\| A \right\|},{{e}_{2}}=\frac{\left\| \bar{f}-f \right\|}{\left\| f \right\|}$ (7)

式中,${\bar{A}}$表示恢复的矩阵A${\bar{f}}$表示恢复的图像f

3.1 仿射变换参数的恢复

图 1中的二值汉字图像“扬”为例进行仿射变换参数的恢复,图 1(b)图 1(a)中汉字的仿射变换,仿射变换矩阵为A=$\left[ \begin{matrix} 2.3635 & 1.2860 \\ -0.4168 & 0.3825 \\ \end{matrix} \right]$,选s=0.1,t=$\frac{30}{11}$,利用上述广义质心算法恢复的矩阵为$\bar{A}=\left[ \begin{matrix} 2.3658 & 1.2856 \\ -0.4112 & 0.3857 \\ \end{matrix} \right]$图 3(a)是利用本文方法恢复的图像,图 3(b)是恢复后图像与原图的差,可以看出,恢复的图像与原图像相差不大,还原后的仿射变换矩阵${\bar{A}}$与正确的A也很相近。

3.2 与文献[3]、文献[7]算法的对比

与3.1类似,以图 1中的二值汉字图像“扬”为例,选取相同的仿射变换矩阵A=$\left[ \begin{matrix} 2.3635 & 1.2860 \\ -0.4168 & 0.3825 \\ \end{matrix} \right]$图 4图 5分别为文献[3],文献[7]方法对二值汉字“扬”,在相同的变换矩阵下恢复的效果图和恢复图与原图差效果图。

图 4 文献[3]恢复效果图
Fig. 4 The recovery effect image of reference[3]
((a) recovery image; (b) the difference between recovery image and original image)
图 5 文献[7]恢复效果图
Fig. 5 The recovery effect image of reference[7]
((a) recovery image; (b) the difference between recovery image and original image)

使用文献[3]所提方法的恢复矩阵为R1=$\left[ \begin{matrix} 2.2275 & 1.2014 \\ -0.3667 & 0.39717 \\ \end{matrix} \right]$,这与仿射变换矩阵A也很接近,但没有本文算法恢复出的矩阵${\bar{A}}$更接近A,而文献[7]中方法对应的恢复矩阵为R2=$\left[ \begin{matrix} 6.1555 & -2.0612 \\ -4.1727 & 3.6806 \\ \end{matrix} \right]$,这与矩阵A相差很大,同时可以从每个算法恢复出的图像与原图像差的效果图看出,本文算法对汉字“扬”的恢复效果要好于文献[3]和文献[7]方法。

选用图 6中大小为128×128像素的二值汉字图“扬”作为测试对象,在PC环境( 2.40 GHz CPU,4 GB RAM),软件Matlab7.0下,对本文算法与文献[3]和文献[7]各做一次仿射变换参数恢复耗时比较,结果如表 1 所示,文献[3]算法的耗时较大,文献[7] 算法与本文算法耗时相差不大。

图 6 10个二值图像及Coil-20库中20个灰度图像
Fig. 6 Ten binary images and twenty gray images in Coil-20 Library

表 1 耗时比较
Table 1 Comparison of time using

下载CSV
算法耗时/s
文献[3]25.88
文献[7]0.91
本文1.02

为了测试本文算法,与文献[1]类似以矩阵

$A=l\left[ \begin{matrix} cos~\theta & -sin~\theta \\ sin~\theta & cos~\theta \\ \end{matrix} \right]~\left[ \begin{matrix} a & b \\ 0 & 1/a \\ \end{matrix} \right]$ (8)

来生成仿射变换。仿射变换参数随机选取,选取l∈{0.8,1.2},a∈{1,2},θ∈{00,720,1440,2160,2880,2880},b∈{-1.5,-1,-0.5,0,0.5,1,1.5}因此实验中将每幅图像进行168次变换,并用上面所提算法进行参数恢复。

使用本文算法所得的参数恢复结果与文献[3]和文献[7]中的方法所得的参数恢复结果进行比较。表 2表 3分别给出了实验选取图 6 中的10个二值汉字图像及Coil-20库中20个灰度图像,利用式(8) 对每幅图像各做168种仿射变换,恢复的误差取平均值。由于文献[7]中利用方程组求解仿射变换参数,会存在方程组无解的情况,本文实验是在剔除无解的情况下对误差取平均值。

表 2 选择不同参数对选取的二值图像变换168次恢复的平均误差率
Table 2 The average error of the 168 times estimation for different parameters of affine deformations to the binary image

下载CSV
图 6s 文献[3]文献[7]
0.010.020.050.100.501.005.0010.020.0
e10.098 40.099 10.099 20.101 20.122 70.160 40.039 80.046 60.073 70.049 01.121 0
e20.263 90.265 70.260 70.260 70.227 00.202 80.173 50.224 20.346 60.210 91.021 7
e10.068 70.068 50.068 60.069 20.068 70.089 90.066 80.050 90.055 90.096 02.307 2
e20.239 00.237 90.237 00.237 80.227 40.278 60.208 60.191 70.231 60.388 91.278 1
e10.122 50.114 90.099 00.084 00.079 20.106 80.074 80.039 40.056 80.087 91.167 2
e20.505 80.468 10.391 20.324 30.291 70.308 80.315 80.171 90.258 50.428 81.026 0
e10.043 60.043 50.045 70.048 60.109 10.675 40.323 80.425 40.532 40.081 71.096 4
e20.271 90.270 90.289 90.308 10.626 21.471 61.146 91.185 91.188 10.383 91.052 6
e10.138 30.137 20.142 20.146 30.235 40.589 20.695 30.343 10.316 60.109 32.322 9
e20.663 50.659 60.681 00.698 90.969 31.321 81.518 21.093 61.013 70.494 21.223 5
e10.028 00.027 80.027 40.026 40.028 60.049 90.151 70.140 00.145 50.525 03.727 9
e20.162 70.161 50.158 20.151 50.168 70.316 90.441 20.467 20.580 00.611 10.945 1
e10.042 10.041 70.041 20.042 10.104 80.098 60.079 20.055 40.059 90.103 91.750 8
e20.261 00.257 40.256 00.268 90.594 40.304 60.267 70.258 00.330 80.879 91.256 1
e10.097 30.097 90.098 00.096 90.105 70.117 20.067 30.046 20.055 80.083 21.455 7
e20.593 90.595 70.594 80.593 80.621 70.516 40.301 10.265 80.328 10.529 31.199 2
e10.033 70.033 70.033 90.032 80.040 00.106 60.154 10.206 00.230 90.174 35.655 3
e20.209 40.214 80.209 40.205 40.257 50.600 70.607 40.867 11.045 41.109 11.067 0
e10.030 40.031 70.030 50.031 10.033 80.146 51.830 51.875 11.906 60.334 33.599 0
e20.180 90.192 40.183 40.187 60.200 40.901 31.452 71.403 31.365 80.776 51.114 4

表 3 不同参数对灰度图像的168次仿射变换参数恢复的平均误差
Table 3 The average error of the 168 times estimation for different parameters of affine deformations to the gray image

下载CSV
图 6s 文献[3]文献[7]
0.010.020.050.100.501.005.0010.020.0
gray1e10.024 60.024 00.022 50.021 10.018 50.023 20.014 60.014 00.016 30.020 7582.774
e20.027 50.026 90.025 10.023 40.020 60.025 10.018 40.018 20.020 20.027 80.949 5
gray2 e10.013 70.013 40.013 40.013 20.014 20.018 40.051 60.039 50.035 00.111 03.984 6
e20.056 20.055 90.056 00.055 90.058 30.066 20.097 10.087 80.087 00.201 30.926 4
gray3e10.039 00.038 60.037 60.036 20.036 70.046 70.166 40.135 30.126 10.028 31.951 8
e20.051 10.050 60.049 20.047 50.048 20.058 70.079 90.069 30.064 70.041 50.624 0
gray4e10.027 00.025 70.027 80.022 40.015 00.014 50.016 30.020 00.022 70.058 62.419 7
e20.065 30.062 20.066 60.055 80.044 50.044 80.047 70.054 70.059 20.129 00.749 8
gray5e10.017 80.017 60.017 20.016 90.019 40.021 60.104 80.080 50.058 00.654 82.098 9
e20.033 30.033 20.032 90.032 70.035 40.038 30.063 60.056 80.053 90.197 80.795 2
gray6e10.044 20.047 40.046 30.049 00.066 30.104 30.118 80.084 10.078 40.088 11.677 4
e20.074 00.078 90.077 20.080 70.106 80.160 70.182 90.135 60.127 50.127 60.750 5
gray7e10.032 20.032 00.032 00.031 70.036 90.051 20.052 60.044 30.047 50.092 41.786 4
e20.048 50.048 20.047 90.047 00.052 40.066 30.064 40.057 00.062 10.152 70.537 5
gray8e10.224 10.223 10.232 50.252 90.290 30.435 20.402 70.216 70.137 80.899 22.247 4
e20.183 50.183 00.186 10.192 80.212 30.259 80.227 20.172 50.130 90.194 50.636 9
gray9e10.023 30.023 50.022 50.023 20.021 90.032 50.089 60.050 30.022 31.002 22.124 4
e20.105 90.106 20.104 20.105 20.103 20.114 80.168 20.144 50.104 90.255 50.756 8
gray10e10.034 80.035 40.035 10.035 50.059 10.128 30.167 50.097 50.066 90.112 71.889 8
e20.137 30.138 10.138 00.140 00.178 30.219 20.240 30.206 70.182 10.577 70.903 8
gray11e10.031 70.031 10.029 40.026 50.025 70.025 60.022 20.021 90.025 20.032 76.359 8
e20.050 00.048 40.045 60.041 70.039 10.037 40.037 60.036 30.039 50.055 60.904 3
gray12e10.299 10.299 70.313 30.332 80.484 60.794 01.664 62.135 42.384 50.649 46.290 2
e20.322 80.323 60.332 80.345 80.433 30.546 90.634 90.655 80.736 50.422 60.882 4
gray13e10.030 20.029 20.028 50.027 20.025 70.049 10.047 90.024 70.021 80.773 419.842 6
e20.103 80.102 10.100 40.097 70.091 30.115 40.105 60.086 60.083 70.330 80.970 7
gray14e10.098 00.100 00.101 40.118 40.171 80.292 40.386 00.374 50.530 10.155 24.303 5
e20.180 20.181 80.182 60.199 60.244 60.340 20.393 70.374 00.479 10.248 20.967 1
gray15e10.020 60.019 90.019 40.019 30.022 70.031 40.033 20.026 20.025 10.293 83.246 7
e20.025 30.024 50.024 40.024 40.027 70.034 10.036 40.029 90.028 80.238 50.504 8
gray16e10.018 10.018 10.017 60.017 80.021 60.032 10.043 70.032 90.030 80.032 92.507 7
e20.023 20.023 30.023 20.023 40.026 20.031 60.037 30.032 20.031 30.044 10.631 6
gray17e10.035 50.035 70.036 10.037 10.051 50.085 40.143 20.103 90.089 20.850 22.329 3
e20.042 10.042 10.042 40.043 00.049 70.060 50.077 50.071 20.068 50.158 50.549 0
gray18e10.029 90.028 60.029 30.028 70.027 90.039 10.087 00.086 80.078 10.507 00.594 2
e20.070 60.069 20.069 80.069 50.071 90.086 70.102 60.115 00.103 30.319 30.432 5
gray19e10.203 90.204 60.219 10.227 10.254 40.211 90.082 50.065 60.067 10.754 00.931 4
e20.183 30.183 50.192 30.197 70.214 90.214 40.128 20.118 40.118 70.490 60.749 7
gray20e10.024 60.024 90.024 90.025 80.031 40.043 40.074 70.063 40.060 70.031 21.736 9
e20.049 90.050 10.049 80.050 70.054 10.063 50.058 40.055 10.056 00.069 80.560 4

表 2表 3可以看出,本文算法参数恢复的结果优于文献[7],而与文献[3]的结果相当。文献[7]利用图像矩构造非线性方程组以求解仿射变换参数,然而该算法所建立的方程组可能有多组解,也可能无实数解,并且所用的矩包括三阶的,然而高阶矩计算不稳定,从而利用该算法不仅有无法实现参数恢复的,即使能恢复的其结果也不佳(文献[7]所提供的结果都是在大尺寸图像上的实验结果);文献[3]基于交叉权重矩进行参数恢复,所用的一阶矩其实就是图像的质心,然而该算法为计算交叉权重矩需要计算图像中每一点的权重,尽管该文算法与本文算法实验结果类似,但其计算量偏大。因此本文算法对二值图像和灰度图像均适用,并且计算量较小。

4 结 论

本文将图像质心推广,提出广义质心的概念,给出了广义质心保持仿射变换前后对应关系的条件,利用广义质心给出了仿射变换参数恢复的算法,该算法对灰度和二值图像均适用,实验结果也表明所提算法优于文献[3]与文献[7]所提的算法,但本文考虑全局的仿射变换配准是基于全局的方法,由于利用图像中所有像素点,故计算复杂度比较高,另外基于全局的方法对背景上的噪声点是比较敏感的。由于本文算法是在理想状况下的研究,例如图像背景是比较干净的,但在实际情况中不是这样的,接下来的工作,考虑将该方法运用到实际中的目标。

参考文献

  • [1] Khalil M I, Bayoumi M M. A dyadic wavelet affine invariant function for 2D shape Recognition[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence , 2001, 23 (10) : 1152–1164. DOI:10.1109/34.954605]
  • [2] Mai F, Chang C Q, Hung Y S. A subspace approach for matching 2D shapes under affine distortions[J]. Pattern Recognition , 2011, 44 (2) : 210–221. DOI:10.1016/j.patcog.2010.08.032]
  • [3] Yang Z W, Cohen F S. Cross-weighted moments and affine invariants for image registration and matching[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence , 1999, 21 (8) : 804–814. DOI:10.1109/34.784312]
  • [4] Heikkilä J. Pattern matching with affine moment descriptors[J]. Pattern Recognition , 2004, 37 (9) : 1825–1834. DOI:10.1016/j.patcog.2004.03.005]
  • [5] Hagege R, Francos J M. Parametric estimation of affine transformations:an exact linear solution[J]. Journal of Mathematical Imaging and Vision , 2010, 37 (1) : 1–16. DOI:10.1007/s10851-009-0188-4]
  • [6] Bentolila J, Francos J M. Combined affine geometric transformations and spatially dependent radiometric deformations:a decoupled linear estimation framework[J]. IEEE Transactions on Image Processing , 2011, 20 (10) : 2886–2895. DOI:10.1109/TIP.2011.2136353]
  • [7] Domokos C, Kato Z. Parametric estimation of affine deformations of planar shapes[J]. Pattern Recognition , 2010, 43 (1) : 69–85. DOI:10.1016/j.patcog.2009.08.013]
  • [8] Domokos C, Kato Z. Simultaneous affine registration of multiple shapes[C]//Proceedings of the 21st International Conference on Pattern Recognition. Tsukuba, Japan:IEEE, 2012:9-12.
  • [9] Domokos C, Nemeth J, Kato Z. Nonlinear shape registration without correspondences[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence , 2012, 34 (5) : 943–958. DOI:10.1109/TPAMI.2011.200]
  • [10] Chen T, Su Y, Jiang Y M, et al. Affine invariant feature extraction based on affine geometry[J]. Journal of Image and Graphics , 2007, 12 (9) : 1633–1641. [ 陈涛, 粟毅, 蒋咏梅, 等. 利用仿射几何特性提取图像中的仿射不变特征[J]. 中国图象图形学报 , 2007, 12 (9) : 1633–1641. DOI:10.11834/jig.20070923 ]
  • [11] Gao F, Wen G J. A new method for affine invariants extraction based on affine geometry[J]. Journal of Image and Graphics , 2011, 16 (3) : 389–397. [ 高峰, 文贡坚. 利用仿射几何的仿射不变特征提取方法[J]. 中国图象图形学报 , 2011, 16 (3) : 389–397. DOI:10.11834/jig.20110315 ]