Summary of the invention:
The invention is intended to overcome the shortcoming of said method, propose a kind of the method for registering images of Fourier plum forests (Fourier-Mellin) conversion and the theoretical combination of maximum mutual information.
For achieving the above object, specific implementation step of the present invention is:
(1) two image one width reference picture one width floating images subject to registration of input
(2) by Fourier transform displacement theory, obtain the relative translation amount of floating image and reference picture
3a) calculate the discrete Fourier transform (DFT) of two width images;
3b) again by the cross-power spectrum calculating phase differential of two width images;
3c) ask the inverse transformation of cross-power spectrum, obtain an impulse function, peak value of pulse position is relative translation amount Xtran and Ytran.
(3) by Fourier-mellin transform, estimate that floating image is with respect to the anglec of rotation of reference picture
2a) by two dimension discrete fourier transform, obtaining picture amplitude composes;
2b) in logarithm-utmost point (Log-Polar) space application Fourier-mellin transform, obtain anglec of rotation theta and zoom factor delta.
(4) two width original images are carried out to pre-service by low-pass filter
(5) initial point and initial search direction are set, initial point is set to relative translation amount and the anglec of rotation that (2) (3) step is estimated, the direction of search is unit direction
(6) according to above-mentioned parameter, floating image is carried out to space geometry conversion (affine)
(7) calculate former reference picture and the mutual information value that converts rear image
7a) use the joint histogram of PV (Partial Volume) interpolation calculation two width images;
7b) obtain joint probability distribution function and the marginal distribution function of two width images;
7c) utilize probability distribution function and marginal distribution function to try to achieve entropy, thereby obtain normalized mutual information value.
(8) because mutual information does not have concrete expression formula about these three parameters, so cannot utilize traditional optimized algorithm, use Directional acceleration (Powell) to move three transformation parameter values at iteration point maximizing place by direct relatively normalized mutual information numerical values recited here
(9) if reach maximal value, export registration parameter, if do not return to step (6)
(10) image and former reference picture after optimum registration parameter conversion are carried out to image co-registration, obtain registration fused images
First the present invention utilizes the anti-Fourier of two width image power spectrums to convert the relative displacement that corresponding peak is asked for two width images, by picture amplitude spectrum is carried out to logarithm-utmost point (Log-Polar) coordinate transform, in logarithm-utmost point space, by the method that is similar to calculating relative translation, ask and obtain the anglec of rotation, then utilize the anglec of rotation and the translational shifting in-migration of trying to achieve to set up spatial alternation model, using maximum mutual information as similarity measurement, by Powell algorithm, carry out optimizing, obtain optimal registration parameter, floating image is carried out to spatial inverse transform, finally floating image and former reference picture after conversion are carried out to image co-registration, just can obtain registration fused images.Compared with prior art, the present invention has the following advantages:
First: the Powell optimized algorithm that the present invention applies based on maximum mutual information theory after image registration is carried out in application Fourier plum forests (Fourier-Mellin) conversion again carries out Accuracy Matching, registration accuracy is improved greatly, overcome Fourier-mellin transform and for the registration of high-precision requirement, do not there is the shortcoming of robustness.
Second: the present invention is when application Powell algorithm, due to each in the Powell algorithm basic, all can the new direction of search of unconditional use replace the original old direction of search, and the present invention can consider the problem of linear independence when replacing the direction of search, when direction of search linear independence, can guarantee every take turns in iteration, take the direction of search as the row formula of row non-vanishing, therefore these directions are linear independences, and along with the conjugated degree of the increase direction of search of iteration strengthens gradually.
The the 3rd: the present invention has applied the result parameter of Fourier plum forests (Fourier-Mellin) conversion registration as the initial value of Powell search, overcome the shortcoming of Powell algorithm to initial value sensitivity, the shortcoming of registration poor effect, improves registration accuracy greatly.
Embodiment:
Below in conjunction with 1 pair of step of the present invention of accompanying drawing, be described further.
Step 1, input two width images, a width reference picture and a width floating image, this two width image is the two width images with affine transformation relationship.
Step 2, carries out respectively low-pass filtering pre-service to this two width image.
Low-pass filtering treatment is intended to image to carry out simple denoising.
Step 3, obtains the relative translation amount of floating image and reference picture with Fourier transform displacement.
If f
2(x, y), f
1(x, y) is two width images, f
2(x, y) is f
1(x, y) is at x and y direction difference translation x
0and y
0after image,
f
2(x,y)=f
1(x-x
0,y-y
0) (1)
If f
1and f
2corresponding Fourier transform is respectively F
1(u, v) and F
2(u, v), has following relation between them:
F
1(x, y) and f
2the cross-power spectrum of (x, y) is made as G (u, v),
F wherein
2 *represent F
2complex conjugate.
Can find out, the phase place of cross-power spectrum is equivalent to the phase differential between image, by formula (3) is carried out to inverse fourier transform, at (x, y) space will form an impulse function, this impulse function is zero at other functional values everywhere, and only non-vanishing at the functional value at peak value of pulse place, peak value of pulse position is the translational movement x between reference picture and floating image
0and y
0.
Therefore, the present invention can will form an impulse function in (x, y) space by formula (3) is carried out to inverse fourier transform, find peak value of pulse position, and this peak value of pulse position is the relative translation amount x of floating image and reference picture
0and y
0.
Step 4, with the anglec of rotation and the zoom factor of Fourier-mellin transform estimation floating image.
Consider the two width image s (x, y) and the r (x, y) that are registered, wherein r (x, y) represent floating image, s (x, y) represents reference picture, wherein s (x, y) be the image of r (x, y) after translation, rotation and yardstick scale transformation, that is:
s(x,y)=r[(σ(xcosα+ysinα)-x
0,σ(-xsinα+ycosα)-y0)] (4)
In formula, x
0and y
0for the translational movement of floating image relative reference image, α is the anglec of rotation of floating image relative reference image, and σ is zoom factor.
Between the Fourier Fourier conversion S (u, v) that s (x, y) and r (x, y) are corresponding so and R (u, v), meet:
|S(u,v)|=σ
-2R[σ
-1(ucosα+vsinα),σ
-1(ucosα+vsinα)]| (5)
Wherein || represent to ask amplitude spectrum, as can be seen from the above equation, anglec of rotation α and zoom factor σ can carry out decouples computation with translational movement, spectrum amplitude is only relevant with the anglec of rotation and zoom factor, and irrelevant with translational movement, therefore, can compose and obtain the anglec of rotation and zoom factor by picture amplitude.
Definition: r
p1(θ, log ρ)=r
p(θ, ρ) (6)
s
p1(θ,logρ)=s
p(θ,ρ) (7)
R wherein
pand s
pbeing respectively r (x, y) and the amplitude spectrum of s (x, y) in polar coordinate system (θ, ρ), is r
p=| R (u, v) |, s
p=| S (u, v) |, wherein
θ=arctan (v/u), α is the anglec of rotation, σ is zoom factor, draws so easily
s
p1(θ,logρ)=r
p1(θ-α,logρ-logσ) (8)
Or s
p1(θ, λ)=r
p1(θ-α, λ-κ) (9)
λ=log ρ wherein, κ=log σ
Can find out, by above-mentioned conversion, formula (9) is transformed to the form identical with formula (1), so just, in logarithm-utmost point (Log-Polar) space application Fourier conversion displacement, according to formula (2) and formula (3), tries to achieve α and κ.If the end of logarithm, is taken as e, so
σ=e
κ (10)
So just obtained anglec of rotation α and scale factor σ, according to the α obtaining and σ, image s (x, y) has been carried out to inverse transformation and obtain image s
1(x, y), then through type (2) and formula (3) calculate s at image space
1translational movement x between (x, y) and r (x, y)
0and y
0.Formula (9) is called as Fourier plum forests (Fourier-Mellin) conversion.
Step 5, arranges initial point and inceptive direction, and inceptive direction is the relative translation amount x obtaining by Fourier transform in above-mentioned steps
0and y
0with anglec of rotation α.These three parameters are initial registration parameter.
Step 6, carries out space geometry conversion to floating image.
In process of image registration, spatial alternation model adopts affined transformation to describe.For two width images, the coordinate system that model is unified, the center of definition image is true origin, this is that true origin is different from the upper left corner of the image conventionally defining, so need to carry out coordinate translation to floating image, floating image will go to mate with reference picture through the conversion that moves horizontally, vertically moves and rotate around initial point, so the arbitrfary point O of floating image
fcoordinate points O to reference picture
raffined transformation can be described as:
O
R=t
1(c,d)×t
2(θ)×t
3(a,b)×t
4(tx,ty)×O
F (11)
Wherein, O
ffor any point coordinate in floating image, O
rit is any point coordinate in reference picture.O
fprocess affined transformation is in R coordinate system.T
1(c, d), t
2(θ), t
3(a, b), t
4(tx, ty) is all 3 * 3 matrix.T
1(c, d) moves to picture centre by floating image initial point from the image upper left corner, and moving displacement is (c, d); t
2(θ) floating image is rotated around new initial point (picture centre), the anglec of rotation is θ; t
3(a, b) goes back to postrotational image to the upper left corner by true origin translation again, and moving displacement is (a, b); t
4(tx, ty) is that floating image is made respectively tx along level, vertical direction, ty translation.Because floating image is identical with reference picture resolution, so t
1(c, d) and t
3true origin translation parameters in (a, b) is identical, once and picture size determine, the value of translation parameters is also determined.
Tx, ty, θ tri-parameters, that is: f when therefore just remaining searching makes normalization information reach maximal value
max=maxf (tx, ty, θ), belongs to multi-parameters optimization problem.
According to the initial parameter arranging, floating image is done to space geometry variation and obtain converting rear image.
Step 7, is used PV (Partial Volume) interpolation calculation joint histogram, thus the mutual information value of image after calculating former reference picture and converting.
The probability distribution function of reference image R and floating image F is to add up the frequency that gray-scale value separately occurs in entire image, and joint probability distribution function is the statistics two width images frequencies that a pair of gray-scale value occurs in same position.Adopt PV (Partial Volume) method of interpolation to ask normalized joint histogram herein, then obtain joint probability distribution function.
If the coordinate b (i, j) of the upper any point of floating image F in the coordinate system of reference picture, obtains newly putting T through reciprocal transformation
r(b), its vicinity points is respectively n
1, n
2, n
3, n
4.For fear of reference picture, introduce non-existent gray-scale value originally, so adopt PV interpolation to utilize T
r(b) four contiguous points calculate associating grey level histogram, revise four gray-scale values pair in joint histogram:
h(F(b),R(n
1))、h(F(b),R(n
2))、h(F(b),R(n
3))、h(F(b),R(n
4))。Each correction ω in Fig. 1
1to ω
4shown area definition, and 4 increment sums are that 1, PV method of interpolation more important point is, the value that in joint histogram, each gray scale is right be many decimals that change by a small margin and, no longer with 1 increase, thereby obtain smooth objective function, be conducive to Optimizing Search.
When floating image and the complete registration of reference picture, without any translation or rotation, the point of the joint histogram of image concentrates on diagonal line, and now normalized mutual information value is maximum; Mobile successively along vertical direction when floating image, the point of its joint histogram more and more departs from diagonal line, being distributed in around diagonal line of dispersion.
The maximum mutual information computing formula of two width images is: I (R, F)=H (R)+H (F)-H (R, F), the people's such as Studholme research shows that maximum mutual information is more responsive to the overlap ratio between two width images subject to registration, therefore maximum mutual information formula is carried out to simple extension, obtains normalized mutual information computing formula:
Normalized mutual information can better reflect the variation of registration as the similarity measure of two width images, reduces the susceptibility to doubling of the image region, improves registration accuracy.H in above formula (R) is the entropy of reference picture, and H (F) is the entropy of floating image; H (R, F) be reference picture and floating image combination entropy, need to first obtain joint probability distribution function, and then obtain respectively about R the marginal distribution function of F, finally obtain again entropy separately, bring into and in normalized mutual information formula, try to achieve normalized mutual information value.
Step 8, utilizes the optimizing of Powell algorithm according to maximum mutual information theory.
(1) given permissible error ε > 0 initial point X
0direction with n linear independence
D
(1,1), d
(1,2)d
(1, n)put k=1.
(2) put x
(k, 0)=x
(k-1), from x
(k, 0)set out, successively along direction d
(k, 1), d
(k, 2)d
(k, n) carry out linear search, obtain an x
(k, 1), x
(k, 2)..., x
(k, n), ask m, make f (x
(k, m-1))-f (x
(k, m))=max{f (x
(k, j-1))-f (x
(k, j)) make d
(k, n+1)=x
(k, n)-x
(k, 0)if || x
(k, n)-x
(k, 0)||≤ε stops calculating; Otherwise, carry out (3) step.
(3) ask λ
n+1make f (x
(k, 0))+λ
n+1d
(k, n+1)=minf (x
(k, 0)+ λ d
(k, n+1)) make x
(k+1,0)=x
(k)=x
(k, 0)+ λ
n+1d
(k, n+1if) || x
(k)-x
(k-1)||≤ε stops calculating, and obtains x
(k)otherwise carry out step (4)
(4) if
Order
d
(k+1,j)=d
(k,j),j=1,…,m-1
d
(k+1,j)=d
(k,j+1),j=m,…,n
k=k+1
Otherwise, order
Forward step (2) to
Because mutual information does not have concrete function expression about these three parameters, so cannot utilize traditional optimized algorithm, therefore, adopt Directional acceleration (Powell) by the direct relatively mobile iteration point of size of normalized mutual information numerical value, to obtain three parameter values at maximal value place herein.Utilize above-mentioned Powell optimization method to carry out iteration optimizing to registration parameter, wherein Fibonacci method is used in linear search.
Step 9, if reach maximal value, exports registration parameter, if do not return to step 6.
Step 10, carries out image co-registration to floating image and the former reference picture applied after optimum registration parameter conversion, obtains registration fused images.
In image co-registration process, in order to see clearly result and the error of registration.We adopt and the gray scale in registration results figure to be re-started to assignment process, and it is original 30 percent that the overall assignment of gray-scale value of reference picture becomes, and the gray-scale value assignment of the floating image after conversion becomes original 70 percent.If gray-scale value is 255 or 0, indirect assignment is former gray-scale value.So, can so that the result of registration obviously show clearly, registration error also can intuitively be found out.
Effect of the present invention can illustrate by following further emulation:
Method for registering images of the present invention is combined into aperture radar SAR image to two and one group of medical image carries out registration emulation, can intuitively find out raising and and the good effect of registration accuracy from registration results.
The simulation result of Technologies Against Synthetic Aperture Radar SAR image as shown in Figures 2 and 3, can intuitively find out that the floating image that affined transformation is crossed has passed through after rotation and translation and reference picture registration accurately, and complete fusion.
To one group of medical image simulation result as shown in Figure 4, can intuitively find out, the perfect registration of its registering images and reference picture has also merged.
By above-mentioned experimental result emulation, feasibility of the present invention and accuracy have been verified.