A kind of reference mark homogenization method that is used for images match
Technical field the present invention relates to image processing techniques, specifically, is to add reference mark homogenising step in the images match flow process, and the reference mark is evenly distributed, and reduces mistake and mates the reference mark, improves matching precision.
Background technology image geometry method for fine correcting commonly used at present is based on the geometric exact correction at reference mark, promptly earlier image is mated to generate the reference mark, corrects function parameter with the reference mark coordinate fitting again and corrects.Matching process commonly used is based on the automatic matching method of template matches, the general flow of this method is: at first use characteristic point extract operator on image extract minutiae as the reference mark, be the center again with the reference mark, in two width of cloth images, extract template window and search window respectively, with certain matching criterior two width of cloth images are mated at last, to reach the matching precision of picture dot level.Template window is meant the template of extracting that is used for carrying out template matches from benchmark image, search window is meant the zone to be matched that extracts from original image, the process of template matches moves with template window pointwise in search window exactly, utilize the matching degree of similarity criterion calculation template and its overlapping region, find the position of matching degree maximum, if greater than preset threshold, just thinking, matching degree found a match point.The characteristic distribution of image but the reference mark that this method obtains places one's entire reliance upon, to the reference mark that extracts mate, when screening, usually with matching degree as unique screening foundation, thereby can cause the reference mark skewness of last generation for the image of some characteristic distribution inequality.And when correcting, each all has identical weight to the reference mark, closeer zone distributes at the reference mark, the precision height, then precision is relatively poor in the sparse zone of distribution, reference mark, and characteristics of image can be subjected to the influence of noise etc., makes matching result have the mistake match point of some, thereby has influenced matching precision.
Therefore need in matching process or after the coupling, handle, the reference mark is evenly distributed, reduce the mistake match point, improve matching precision the reference mark.At present, certain methods is to use the consistent subclass of stochastic sampling coherence method (RANSAC method) iteration screening performance in the coupling flow process, eliminates the influence of mistake match point; Certain methods uses the Hough conversion to eliminate the mistake match point in the coupling flow process; Some propose to eliminate the method for mistake match point in conjunction with practical application.Though these methods have effectively been eliminated the mistake match point, not carry out the reference mark homogenising and handle, the reference mark of matching result distributes still inhomogeneous.Document " Zhang Yi, Ceng Qingye, the Ping of Tang. obtain the automatic space of the remote sensing image matching process [J] at even reference mark. Chinese image graphics journal; 2009; 14 (8): 1475-1479. ", the reference mark homogenising is studied, proposed two kinds of homogenization methods: homogenising, coupling back homogenising when extract at the reference mark, its coupling back homogenising has just kept the reference mark of matching degree maximum after dividing grid.This method can not be eliminated the mistake match point, does not also handle for the grid that does not have the reference mark.In the matching process,, may cause regional area not have the reference mark, so the reference mark homogenising need guarantee that the reference mark is evenly distributed to the processing of adding some points of these zones owing to be subjected to the influence of noise, matching process itself etc.The present invention is directed to reference mark, coupling back homogenising proposed one rationally, solution efficiently, can effectively eliminate the mistake match point, can handle the grid that does not have the reference mark again, guarantee that as much as possible each grid all has the reference mark, improved the matching precision of general image, had good actual application and be worth.
Summary of the invention the present invention discloses a kind of technical scheme, uses multiple image processing techniques, and homogenising is carried out at the reference mark after the coupling, and the reference mark is more evenly distributed, and reduces the mistake match point, improves the whole matching precision of image.Prerequisite of the invention process is that coupling has found the higher reference mark of more matching degree automatically.
Basic ideas of the present invention are: at first carry out traditional image and mate automatically, generate the reference mark; Use the RANSAC method that the reference mark that generates is screened then, the corresponding relation between two width of cloth images is set up at the reference mark after the utilization screening; Again original image is carried out grid dividing, sizing grid is M * M, after the grid dividing, all reference mark according to coordinate assignment in different grids; At last, for the reference mark being arranged and not having the processing of sieving respectively a little and add some points of the grid at reference mark, guarantee that as far as possible each grid all has a reference mark.
The technical scheme flow process that realizes thinking of the present invention as shown in Figure 1, its advantage is: use RANSAC method screening reference mark, effectively reduced the mistake match point; According to grid inner control point distribution situation, take to add some points, delete point, three kinds of strategies of retention point, guarantee that as much as possible each grid all has the reference mark.Final reference mark as a result is more evenly distributed, and precision is higher; Computation complexity is low, and computing velocity is fast, is easy to realize.Specifically describe as follows:
A. image mates automatically: image is mated automatically, generate the reference mark;
B.RANSAC method screening reference mark: use the RANSAC method to filter out matching degree reference mark preferably, reduce the reference mark of mistake coupling;
C. set up the corresponding relation between image: after filtering out the reference mark, the use least square method is set up the corresponding relation between two width of cloth images;
D. divide grid, distribute the reference mark: original image is carried out grid dividing, and sizing grid is M * M, after the grid dividing, all original image reference mark according to coordinate assignment in different grids;
E. reference mark homogenising: for the reference mark being arranged and not having the grid at reference mark to handle respectively: (1) gets the reference mark of the reference mark of matching degree γ maximum as this grid for the grid that the reference mark is arranged; (2) for the grid that does not have the reference mark, on original image, get the grid element center point as original image point to be matched, in a little regional extent, carry out image then and mate automatically, screen the reference mark on the qualified benchmark image.If it fails to match automatically for image, utilize the corresponding relation between two width of cloth images of having set up, the reference mark on the benchmark image of estimation correspondence.
Wherein, setting up of step C carried out after corresponding relation between image also can be transferred to step D.
The automatic coupling of image can be selected different image matching methods according to actual conditions, and purpose is found out abundant, and has the higher reference mark of some precision, thereby makes the reference mark homogenising reach good effect.Automatic coupling and the automatic coupling in the step e in the steps A can be same procedure, also can be different.
The size of grid is that experience is selected in the grid dividing, but can not be too little, otherwise will cause that computing velocity reduces, the reference mark is too much.Sizing grid can be fixed, such as 200 * 200, and perhaps 300 * 300, also can dynamically adjust according to the image size.
Compare with direct matching result, after the homogenising of reference mark, the reference mark distributes more even, has also reduced mistake simultaneously and has mated the reference mark, has improved the images match precision.
Description of drawings Fig. 1 is the technical scheme schematic flow sheet
Fig. 2 divides reference mark distribution situation synoptic diagram behind grid, the distribution reference mark
Fig. 3 is the intensive relatively grid reference mark distribution situation synoptic diagram in reference mark
Fig. 4 is the grid synoptic diagram that has only a reference mark
Fig. 5 is the grid synoptic diagram that does not have the reference mark
Fig. 6 template matches synoptic diagram
Embodiment is described a kind of embodiment of the present invention now in conjunction with the accompanying drawings.
According to the specific descriptions in technical scheme schematic flow sheet Fig. 1 and " summary of the invention ", the process of reference mark homogenising mainly comprises: image mates automatically, and RANSAC method screening reference mark is divided grid, distributed reference mark, reference mark homogenising.
The first step is that image mates automatically.Image coupling automatically is exactly in conjunction with real image, selects a kind of matching process of suitable real image, generates initial control point.No matter adopt what matching process, the general reference mark of generation that requires is many as much as possible, and has the higher reference mark of some precision, if will influence the effect of reference mark homogenising very little.
Second step was RANSAC method screening reference mark.The RANSAC method is from an observed data set, the alternative manner of estimation model parameter (model fitting).It is a kind of random algorithm, and the result that each computing is obtained is incomplete same, but repeatedly can provide the subclass of a little concentrated general performance unanimity after the iteration, screens out with block mold and differs point far away, must improve iterations in order to improve precision.Adopt general RANSAC method among the present invention, the reference mark of point remained in the RANSAC method was thought, other reference mark is screened out.
The 3rd step was the corresponding relation of setting up between image.The purpose of this step is to use least square method to set up corresponding relation between original image and the benchmark image according to the reference mark after the screening, the restriction relation and the basis of estimating reference mark of this corresponding relation as reference mark homogenising step, model of fit uses the single order polynomial expression in this step then.
The 4th step was to divide grid, distribution reference mark.Original image is carried out grid dividing, and sizing grid is M * M, and original image is divided into equal-sized plurality of grids.According to the reference mark coordinate of original image and the coordinate range of grid, the reference mark of original image is assigned in the different grids then, and writes down the reference mark of corresponding benchmark image.Sizing grid can be selected according to wide, the height of image, guarantees that as much as possible most of grid all has the reference mark.
The 5th step was the reference mark homogenising.The reference mark homogenising is meant by different processing modes, guarantees that as much as possible each grid all has a reference mark.To the reference mark being arranged and not having the grid at reference mark to handle respectively, the reference mark of having found in the coupling can be fully used in processing like this, can also add some points to the grid that does not have the reference mark, makes the reference mark of image distribute more even.
Reference mark homogenising strategy: after dividing grid, distribution reference mark, reference mark overall distribution situation as shown in Figure 2, grid inner control point distributes and generally is divided into three kinds of situations: the intensive relatively grid in (1) reference mark, as shown in Figure 3, only keep a highest reference mark of matching degree, play " deleting a little " effect; (2) have only the grid at a reference mark, as shown in Figure 4, keep only reference mark; (3) do not have the grid at reference mark, as shown in Figure 5, then in the zonule, mate automatically again,, then estimate the reference mark, play " adding some points " effect if it fails to match.
Concrete disposal route is as follows:
(1) grid at reference mark is arranged: sorted from big to small according to matching degree in the reference mark in the grid, get the reference mark of a reference mark of matching degree maximum then as this grid.
(2) there is not the grid at reference mark: no longer carry out feature point extraction, but the central point of getting each grid is as unique point, carries out template matches at one of an image among a small circle then, the point that the match is successful reference mark as relevant grid.Do not find the grid at reference mark for automatic coupling,, utilize the reference mark on the original image on benchmark image, to estimate a point according to the corresponding relation between the image of having set up, the point of reference mark and estimation as the pair of control point.
Owing to just in a little grid, mate, and carried out automatic coupling and set up corresponding relation between two width of cloth images with the higher reference mark of matching degree, so simplify and improved general template matches step, method is as follows: directly the central point of grid as unique point, be the center again with the unique point, in two width of cloth images, extract very little template window and search window respectively according to the corresponding relation between image, with certain matching degree decision criteria two width of cloth images are carried out template matches then.Generally speaking, in order to find best reference mark, it is bigger that template window and search window can be got, and speed is slow.Among the present invention, because the corresponding relation between the image has more accurately been arranged, so get very little template forms and search forms, be 5 * 5 such as the template forms, the search forms are 10 * 10.This value is experience selection, can get forr a short time, but does not need too big.The benefit of doing like this is both can improve matching speed and precision, can prevent that again template matches from departing from the tram, the mistake match point occurs.Template matches process synoptic diagram as shown in Figure 6, the template window of extracting from benchmark image and original image is at the search window of extraction respectively, template window pointwise in search window is moved, calculate the matching degree after each the moving, the position of matching degree maximal value correspondence is exactly the position at the reference mark found in the search forms.
In this step, is the corresponding relation between image rational as the foundation of extraction template window in mating automatically and search window and the foundation at estimation reference mark, because behind RANSAC screening reference mark, the reference mark matching degree that keeps is higher, is more accurately according to the corresponding relation between the image of these reference mark foundation.
The present invention takes to add some points, deletes point, three kinds of strategies of retention point carrying out the reference mark homogenising after the coupling automatically, guarantees that as much as possible each grid all has a reference mark.One embodiment of the present of invention can make the reference mark be more evenly distributed in the PC Platform Implementation, and the images match precision is higher, and computation complexity is low, and computing velocity is fast, are easy to realize.