A kind of improved KAZE image matching algorithms
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of improved KAZE image matching algorithms.
Background technology
Image characteristics extraction and one of the study hotspot for matching always computer vision field, and vision guided navigation,
The fields such as remote sensing image processing, target positioning, image retrieval, target recognition and tracking, stereoscopy passive ranging and three-dimensional reconstruction are obtained
To being widely applied.Feature detection is the basis of images match, and how image characteristics extraction effect directly determines image
The effect matched somebody with somebody.How stability is extracted from original image good, unique high characteristics of image is further to obtain strong robustness
And meet the matching algorithm of real-time and turn into a study hotspot of image procossing.
2004, Lowe proposed efficient Scale invariant features transform (Scale Invariant Feature
Transform, SIFT) algorithm, extracts characteristic point, the algorithm not only has by setting up Gaussian difference scale space pyramid
Scale invariability also has certain affine-invariant features, unchanged view angle, rotational invariance and illumination invariant, in characteristics of image
It is widely used in terms of extraction.But the costly and time consuming length of computation complexity of the algorithm, it is impossible to meet the requirement of real-time.
, the thinking of Bay and Ess et al. based on SIFT algorithms in 2006, it is proposed that accelerate robust features (Speeded-Up Robust
Features, SURF) algorithm, and be subject in 2008 perfect.The algorithm is not only provided with good robustness, and calculates speed
Degree improves 3 times or so than SIFT algorithm, but actual match performance is but not so good as SIFT algorithms.SIFT algorithms and SURF algorithm are all
It is the progress detection characteristic point on linear gaussian pyramid, this linear Gauss Decomposition can cause loss of significance, high in generation
Loss in detail and edge blurry are easily caused during this pyramid.2012, Alcantarilla et al. proposed KAZE algorithms, should
Algorithm is effectively solved by additive operator splitting algorithm (AOS) and the Nonlinear Scale Space Theory of variable propagation function construction of stable
Linear Gauss Decomposition can cause loss of significance problem, and its robustness, matching performance are also superior to traditional detection algorithm, but
Be KAZE algorithms real-time it is relatively low.
The content of the invention
In view of the drawbacks described above of prior art, the technical problems to be solved by the invention are to provide a kind of improved KAZE
Image matching algorithm, to solve the deficiencies in the prior art.
To achieve the above object, the invention provides a kind of improved KAZE image matching algorithms, it is characterised in that including
Following steps:
(1) original image is inputted, corresponding original gradation figure L is obtained0, pass through AOS algorithms and variable conduction method of diffusion
To construct Nonlinear Scale Space Theory;
(2) the feature of interest point on the image in the Nonlinear Scale Space Theory of original image and its generation is detected, these
Hessian matrix determinant of the characteristic point on the Nonlinear Scale Space Theory after dimension normalization is local maximum;
(3) on gradient image, if scale parameter where characteristic point is σ, the radius is taken to be centered on characteristic point
12 σ circular neighborhood, is classified as 3 sub-regions, and carry out the Gauss weighting that core is 2.5 σ;
(4) for each characteristic point, 3*8 24 dimensional feature vectors are generated;
(5) after the 24 dimensional feature vectors generation of two images, measured by approximate Euclidean distance special in two images
Levy similitude a little;
(6) key point of some in template image is taken, all characteristic points in image to be matched are traveled through, to all features
Point is screened to obtain thick matching pair according to ratio;
(7) again by RANSAC algorithms further to thick matching to removing error hiding and repeated matching, final is obtained
Pairing;
(8) according to final matching pair is obtained, made marks respectively in Prototype drawing and figure to be matched, connect corresponding matching
Point.
Further, the Nonlinear Scale Space Theory is to carry out Nonlinear Diffusion filter using additive operator splitting algorithm
Ripple, is constructed using any step-length, wherein, Nonlinear diffusion filtering method is the change on different scale by brightness of image F
Change the divergence for being considered as some form of flow function, can be described by nonlinear partial differential equation:
By setting suitable propagation functionWherein F refers to brightness of image, what x referred to
It is horizontally oriented, y refers to vertical direction, t refers to the time, and diffusion is adaptive to the partial structurtes of image.
Further, the Hessian matrixes on the Nonlinear Scale Space Theory after dimension normalization in the step (2)
Determinant is:
Wherein σ is the integer value for the scale parameter for being calculated pixel, after Lx, Ly, Lxx, Lyy are respectively gaussian filtering
The L of image, in the second-order differential in x directions, is finding extreme value in the first differential in x and y directions, L in the second-order differential in y directions, L
During point, each pixel and its all consecutive points compare, when it is more than its image area and all consecutive points of scale domain
When, as Local modulus maxima.
Further, subneighborhood division is comprised the steps of in the step (3):
Step 1:The circular neighborhood for being taken a radius to be 12 σ centered on characteristic point, the Gauss that core is 2.5 σ is carried out to it and is added
Power;
Step 2:The circle shaped neighborhood region is divided into the annulus that 3 width are 5 σ, i.e. 3 sub-regions, adjacent subregion has 2
σ overlap.
Further, 24 dimensional feature vectors are generated by following steps in the step (4):
Step 1:Obtain 3 annulus subneighborhoods;
Step 2:Calculate the description vectors d in each subneighborhood:
D=(∑ Lx, ∑ Ly, ∑ | Lx|, ∑ | Ly|, ∑ Lxx, ∑ Lyy, ∑ | Lxx|, ∑ | Lyy|)
Wherein, Lx, Ly, Lxx, LyyIt is single order and second-order differential of the L in x and y directions of image after gaussian filtering respectively;|
Lx|, | Ly|, | Lxx|, | Lyy| the absolute value for being respectively;
Step 3:Dimension normalization is carried out, the feature description vectors of a 3*8=24 dimension are ultimately generated.
Further, the approximate Euclidean distance of the step 5 is the linear combination of chessboard distance and city block distance, i.e.,:
L2=α (L1+L∞)
Wherein:
City block distance L1:
Chessboard distance L∞:L∞(x, y)=max | xi-yi|, 1≤i≤n;
Euclidean distance L2:
Wherein, x and y represents two dimension identical vectors respectively, and i refers to the i-th dimension in vector.
Wherein α is a real number for needing to select to determine, goes to approach suprasphere using corresponding hyperpolyhedron to determine α,
Description vectors are 24 dimensions,
Its expression formula of α is as follows:
In formula:N is characterized the dimension of descriptor.
Further, ratio is minimum distance and time closely ratio in the step (6), when two characteristic points
Ratio determines that it is match point when being less than some threshold value.
The beneficial effects of the invention are as follows:
(1) feature detection algorithm such as traditional SIFT, SURF is all based on linear gaussian pyramid and carries out multiple dimensioned point
Solution come eliminate noise and extract remarkable characteristic.But Gauss Decomposition sacrifices local accuracy for cost, easily causes border
Fuzzy and loss in detail.Although nonlinear Scale Decomposition can solve this problem, conventional method is based on positive Euler method
The step of iteration convergence when (forward Euler scheme) solves Nonlinear Diffusion (Non-linear diffusion) equation
Length is too short, and time-consuming, computation complexity high.Thus, the author of KAZE algorithms proposes to use additive operator splitting algorithm
(Additive Operator Splitting, AOS) is carried out Nonlinear diffusion filtering, can constructed using any step-length
Stable Nonlinear Scale Space Theory.
(2) this algorithm divides subneighborhood using round rotational invariance, reduces in former KAZE algorithms and determines principal direction
The step of, improve arithmetic speed.
(3) this algorithm adds the two of image when generating feature description vectors on original First-order Gradient Information base
Rank gradient information.Second order Grad reflects the detailed information on image texture, and image border and details can be retained well
Feature, and image can retain edge, details in Nonlinear Scale Space Theory, second order gradient information is added feature and described by this algorithm
Fu Zhong, makes better use of the edge and detailed information of image.Below with reference to accompanying drawing to the present invention design, concrete structure and
The technique effect of generation is described further, to be fully understood from the purpose of the present invention, feature and effect.
(4) similitude of this algorithm using approximate Euclidean distance come measures characteristic between vectorial.Utilize block and chessboard distance
Linear combination α (L1+L∞) carry out approximate Euclidean distance, α optimal solution ensure that single Y-factor method Y as similarity measurement and Euclidean
There is distance identical to match accuracy.
(5) this algorithm is improved to KAZE feature descriptors, be with the addition of the second order gradient information of image, be make use of simultaneously
Circle rotational invariance, is down to 24 dimensions, and replace Euclidean distance conduct using approximate Euclidean distance by descriptor dimension by 64 dimensions
The similarity measurement of characteristic vector, arithmetic speed is improved in terms of feature point detection and method for measuring similarity two.In matching
In method, the screening of characteristic matching pair is first carried out with secondary judgment threshold closely as minimum distance using ratio=0.8,
Obtain thick matching pair.Recycle RANSAC algorithms further to remove erroneous matching and repeated matching, obtain final matching pair, effectively
It ensure that correct matching rate.Therefore this algorithm reduces the run time of algorithm on the premise of correct matching rate is ensured, improves
The real-time of algorithm.
Brief description of the drawings
Fig. 1 is the flow chart of the present invention.
Embodiment
As shown in figure 1, a kind of improved KAZE image matching algorithms, it is characterised in that comprise the following steps:
(1) original image is inputted, corresponding original gradation figure L is obtained0, pass through AOS algorithms and variable conduction method of diffusion
To construct Nonlinear Scale Space Theory;
(2) the feature of interest point on the image in the Nonlinear Scale Space Theory of original image and its generation is detected, these
Hessian matrix determinant of the characteristic point on the Nonlinear Scale Space Theory after dimension normalization is local maximum;
(3) on gradient image, if scale parameter where characteristic point is σ, the radius is taken to be centered on characteristic point
12 σ circular neighborhood, is classified as 3 sub-regions, and carry out the Gauss weighting that core is 2.5 σ;
(4) for each characteristic point, 3*8 24 dimensional feature vectors are generated;
(5) after the 24 dimensional feature vectors generation of two images, measured by approximate Euclidean distance special in two images
Levy similitude a little;
(6) key point of some in template image is taken, all characteristic points in image to be matched are traveled through, to all features
Point is screened to obtain thick matching pair according to ratio;
(7) again by RANSAC algorithms further to thick matching to removing error hiding and repeated matching, final is obtained
Pairing;
(8) according to final matching pair is obtained, made marks respectively in Prototype drawing and figure to be matched, connect corresponding matching
Point.
In the present embodiment, the Nonlinear Scale Space Theory is to carry out Nonlinear Diffusion filter using additive operator splitting algorithm
Ripple, is constructed using any step-length, wherein, Nonlinear diffusion filtering method is the change on different scale by brightness of image F
Change the divergence for being considered as some form of flow function, can be described by nonlinear partial differential equation:
By setting suitable propagation functionWherein F refers to brightness of image, what x referred to
It is horizontally oriented, y refers to vertical direction, t refers to the time, and diffusion is adaptive to the partial structurtes of image.
In the present embodiment, the Hessian squares on the Nonlinear Scale Space Theory after dimension normalization in the step (2)
Battle array determinant be:
Wherein σ is the integer value for the scale parameter for being calculated pixel, after Lx, Ly, Lxx, Lyy are respectively gaussian filtering
The L of image, in the second-order differential in x directions, is finding extreme value in the first differential in x and y directions, L in the second-order differential in y directions, L
During point, each pixel and its all consecutive points compare, when it is more than its image area and all consecutive points of scale domain
When, as Local modulus maxima.
In the present embodiment, subneighborhood is divided and comprised the steps of in the step (3):
Step 1:The circular neighborhood for being taken a radius to be 12 σ centered on characteristic point, the Gauss that core is 2.5 σ is carried out to it and is added
Power;
Step 2:The circle shaped neighborhood region is divided into the annulus that 3 width are 5 σ, i.e. 3 sub-regions, adjacent subregion has 2
σ overlap.
In the present embodiment, 24 dimensional feature vectors are generated by following steps in the step (4):
Step 1:Obtain 3 annulus subneighborhoods;
Step 2:Calculate the description vectors d in each subneighborhood:
D=(∑ Lx, ∑ Ly, ∑ | Lx|, ∑ | Ly|, ∑ Lxx, ∑ Lyy, ∑ | Lxx|, ∑ | Lyy|)
Wherein, Lx, Ly, Lxx, LyyIt is single order and second-order differential of the L in x and y directions of image after gaussian filtering respectively;|
Lx|, | Ly|, | Lxx|, | Lyy| the absolute value for being respectively;
Step 3:Dimension normalization is carried out, the feature description vectors of a 3*8=24 dimension are ultimately generated.
In the present embodiment, the approximate Euclidean distance of the step 5 is the linear combination of chessboard distance and city block distance, i.e.,:
L2=α (L1+L∞)
Wherein:
City block distance L1:
Chessboard distance L∞:L∞(x, y)=max | xi-yi|, 1≤i≤n;
Euclidean distance L2:
Wherein, x and y represents two dimension identical vectors respectively, and i refers to the i-th dimension in vector.
Wherein α is a real number for needing to select to determine, goes to approach suprasphere using corresponding hyperpolyhedron to determine α,
Description vectors are 24 dimensions,
Its expression formula of α is as follows:
In formula:N is characterized the dimension of descriptor.
In the present embodiment, ratio is minimum distance and time closely ratio in the step (6), when two characteristic points
Ratio determines that it is match point when being less than some threshold value.
Table 1- tables 5 are respectively from the feature points detected, matching points, detection time, 5 sides of match time and matching rate
Surface analysis compares the performance of algorithm.
The feature of table 1 is counted
The matching points of table 2
The detection time (s) of table 3
The match time (s) of table 4
The matching rate of table 5
Although as can be seen that this algorithm this algorithmic match rate in (a) (d) (f) three groups of experiments is slightly below from above-mentioned table
Former algorithm, but still meet and be actually needed, this algorithmic match rate is higher than former algorithm in (c) (e) (g) three groups of experiments, and
This algorithm is in detection time and less than former algorithm on match time.Therefore, this algorithm ensure that the premise of correct matching rate
Under, the run time of algorithm is reduced, the real-time of algorithm is improved, is conducive to application of this algorithm in Practical Project.
Preferred embodiment of the invention described in detail above.It should be appreciated that one of ordinary skill in the art without
Need creative work just can make many modifications and variations according to the design of the present invention.Therefore, all technologies in the art
Personnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea
Technical scheme, all should be in the protection domain being defined in the patent claims.