CN109242894A - A kind of image alignment method and system based on Moving Least - Google Patents

A kind of image alignment method and system based on Moving Least Download PDF

Info

Publication number
CN109242894A
CN109242894A CN201810885864.4A CN201810885864A CN109242894A CN 109242894 A CN109242894 A CN 109242894A CN 201810885864 A CN201810885864 A CN 201810885864A CN 109242894 A CN109242894 A CN 109242894A
Authority
CN
China
Prior art keywords
control point
image
initial pictures
region
iterations
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810885864.4A
Other languages
Chinese (zh)
Other versions
CN109242894B (en
Inventor
贺永刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810885864.4A priority Critical patent/CN109242894B/en
Publication of CN109242894A publication Critical patent/CN109242894A/en
Application granted granted Critical
Publication of CN109242894B publication Critical patent/CN109242894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/38Registration of image sequences
    • G06T3/14
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches

Abstract

The image alignment method and system based on Moving Least that the present invention relates to a kind of, wherein the image alignment method on initial pictures the following steps are included: be arranged multiple control points;The local optimal searching region at control point is set;On initial pictures, using Moving Least in the local optimal searching region at control point, the optimal location at control point is found, and convert to the whole image of initial pictures using Moving Least, obtain the deformation pattern in optimization process;Judge whether the control point of setting is all selected, if not, then using the deformation pattern in optimization process as initial pictures, next control point is continued to optimize, until the position at the control point of all settings is all optimised, the deformation pattern in optimization process that the last one control points optimization obtains, the output image as this alignment operation.The image alignment method and system based on Moving Least that the embodiment of the present invention proposes can be improved image alignment precision.

Description

A kind of image alignment method and system based on Moving Least
Technical field
The invention belongs to technical field of computer vision, and in particular to a kind of image alignment based on Moving Least Method and system.
Background technique
Image alignment refers to the two images with regard to Same Scene shooting, and the weight of two images is realized by various conversion process It closes.Traditional image alignment method mainly extracts some key points from each image, carries out feature to each key point and retouches It states, the corresponding relationship of key point in two images is determined by characteristic matching.Wherein, using most often SIFT (Scale-invariant feature transform, scale invariant feature conversion) algorithm, SIFT algorithm is a kind of computer The algorithm of vision, for detecting and describing the locality characteristic in image, it finds extreme point in space scale, and extracts Its position, scale, rotational invariants have many characteristics, such as that good scale, illumination and Space Rotating are constant.In addition, there are also SURF (Speeded Up Robust Features accelerates robust features) algorithm, SURF operator is a kind of improvement to SIFT algorithm, Accelerate the extraction of SIFT feature by integral image.
Later, the algorithm of some more robusts is devised, for example, BRISK (Binary Robust Invariant Scalable Keypoints, the constant expansible key point of binary robust), ORB (ORiented Brief), FREAK (Fast Retina Keypoint, quick retina key point) scheduling algorithm, these algorithms pass through analysis image local area knot More stable key point is found and described to structure.These algorithms utilize the corresponding relationship for the key point extracted from two images, Solve a homography matrix, according to homography matrix wherein piece image converted, to obtain transformed image with The effect that another piece image coincides.
However, this kind of image alignment method is difficult to accurately capture local difference, it is primarily adapted for use in global change.And This kind of image alignment method due in precision by key point number and in terms of influenced, it is generally existing following to lack Fall into: (1) less key point makes the homography matrix solved unreliable;(2) unstable key point can generate the point pair of mistake Relationship.Therefore, high-precision alignment image is hardly resulted in by this kind of image alignment method.
In addition, when, there are when depth of field variation, by single transformation matrix, also can not accurately describe two width figures in image The transformation relation of picture causes image alignment precision lower.
Summary of the invention
In order to solve the low technical problem of above-mentioned image alignment precision, the embodiment of the present invention proposes one kind and is based on movement most The image alignment method and system of small square law.
A kind of image alignment method based on Moving Least, method includes the following steps:
S101, multiple control points are set on initial pictures;
S102, the local optimal searching region that control point is set;Wherein, the local optimal searching region at each control point is the control point The region that can be moved;
S103, on initial pictures, select a control point, sought using Moving Least in the part at the control point In excellent region, the optimal location at the control point is found, and carry out using whole image of the Moving Least to initial pictures Transformation, obtains the deformation pattern in optimization process;
S104, judge setting control point whether all selected, if it is not, then using the deformation pattern in optimization process as Initial pictures, return step S103 continue to execute the placement optimization to other control points, until the control point of all settings all by Selection, the deformation pattern in optimization process that the last one control points optimization obtains, the output image as this alignment operation.
Further, the step S103 includes: to select a control point on initial pictures, using mobile minimum two Multiplication converts the whole image of initial pictures, and calculates the image and target of comparison area in transformed initial pictures In image the absolute difference of the image in region corresponding with the comparison area and;Then, the control point is in the part Optimizing is moved in region, and every movement is primary, is all converted using Moving Least to the whole image of initial pictures, and Calculate the figure in region corresponding with the comparison area in the image with target image of comparison area in transformed initial pictures The absolute difference of picture and, until the control point in the local optimal searching region movement finish;Compare calculated institute of institute Have absolute difference and, find the smallest absolute difference and, the position at corresponding control point, most as the control point Excellent position, and the whole image of initial pictures is converted using Moving Least, it obtains in the optimization process Deformation pattern;
The comparison area is the region as defined by the multiple control points adjacent with selected control point, or if Between selected control point and image boundary be not present other control points, then the comparison area be by with selected control Region defined by point adjacent control point and image boundary.
Further, the interval of the multiple control point in the horizontal direction is equal, and/or, interval phase vertically Deng;Control point is not arranged on the boundary of initial pictures;The local optimal searching region at the control point using control point as regional center, Local optimal searching region is indicated with pixel region.
Further, the method also includes initial pictures generation step S200: carrying out images match to the first image, makes The first image after matching is overlapped with target image as far as possible;Wherein, the first image after matching is as initial pictures, the first figure Picture and target image are the two images shot to Same Scene content;
The initial pictures generation step S200 is carried out before the step S101.
Further, the method also includes the number of iterations setting steps and the number of iterations judgment step;
The step of the step of setting the number of iterations, is arranged the number of iterations, the setting the number of iterations step S101 it Preceding progress;
The number of iterations judgment step carries out after step s 104, the number of iterations judgment step judgement into Whether capable the number of iterations reaches the number of iterations of setting, if the number of iterations carried out is not up to the iteration time being arranged Number, then the output image of this alignment operation is continued to execute as initial pictures, return step S101;If what is carried out changes Generation number reaches the number of iterations of setting, then the output image of current alignment operation is as final deformation pattern.
A kind of image alignment system based on Moving Least, the system include: control point setup module, locally seek Excellent region setup module, deformation module and control point judgment module;
The control point setup module on initial pictures for being arranged multiple control points;
Local optimal searching region setup module is used to be arranged the local optimal searching region at control point;Wherein, each control point Local optimal searching region be the region that can move of the control point;
The deformation module is used to a control point is selected, using Moving Least in the control in initial pictures In the local optimal searching region for making point, the optimal location at the control point is found, and using Moving Least to initial pictures Whole image is converted, and the deformation pattern in optimization process is obtained;
The control point judgment module is used to judge whether the control point of setting all to be selected, if it is not, then by optimizing Deformation pattern in journey notifies the deformation module to continue to execute the placement optimization to other control points, directly as initial pictures It is all selected to the control point of all settings, the deformation pattern in optimization process that the last one control points optimization obtains, as The output image of this alignment operation.
Further, the deformation module selects a control point, using Moving Least pair on initial pictures The whole image of initial pictures is converted, and is calculated in transformed initial pictures in the image and target image of comparison area The absolute difference of the image in region corresponding with the comparison area and;Then, the control point is in the local optimal searching area It is moved in domain, every movement is primary, is all converted using Moving Least to the whole image of initial pictures, and calculate change In initial pictures after changing in the image with target image of comparison area the image in region corresponding with the comparison area difference It is worth absolute value and is finished until the control point is mobile in the local optimal searching region;Compare the calculated all differences of institute Absolute value and, find the smallest absolute difference and, the position at corresponding control point, the optimal position as the control point It sets, and the whole image of initial pictures is converted using Moving Least, obtain the deformation in the optimization process Image;
The comparison area is the region as defined by the multiple control points adjacent with selected control point, or if Between selected control point and image boundary be not present other control points, then the comparison area be by with selected control Region defined by point adjacent control point and image boundary.
Further, the interval of the multiple control point in the horizontal direction is equal, and/or, interval phase vertically Deng;Control point is not arranged on the boundary of initial pictures;The local optimal searching region at the control point using control point as regional center, Local optimal searching region is indicated with pixel region.
Further, the system also includes initial pictures generation module, the initial pictures generation module is used for the One image carries out images match, and the first image after making matching is overlapped with target image as far as possible;Wherein, the first figure after matching As being used as the initial pictures, the first image and target image are the two images shot to Same Scene content.
Further, the system also includes the number of iterations setup module and the number of iterations judgment module, the iteration time Number setup module is used to judge time that control point setup module executes for the number of iterations, the number of iterations judgment module to be arranged Whether number reaches the number of iterations of setting, if the number executed is not up to the number of iterations being arranged, this alignment operation Image is exported as initial pictures, control point setup module is notified to continue to execute;It is set if the number of iterations carried out reaches The number of iterations set, then the output image of current alignment operation is as final deformation pattern.
Beneficial effects of the present invention: image alignment method based on Moving Least that the embodiment of the present invention proposes and System traverses image sky using setting control point, and to the independent optimizing in each control point and by Moving Least Between, to realize the alignment of two images, because Moving Least can capture arbitrary transformation relation by control point, Again because carrying out the partial structurtes information that single optimization is considered that image to each control point, the present invention be can be improved Local alignment effect is not limited by the image scene depth of field, can correct increasingly complex deformation, and applicability is wide, obtained pair The ratio of precision conventional method of neat image is high.
Detailed description of the invention
Fig. 1 a is the flow chart for the image alignment method based on Moving Least that the embodiment of the present invention 1 proposes;
Fig. 1 b is the structural block diagram for the image alignment system based on Moving Least that the embodiment of the present invention 1 proposes;
Fig. 2 a is the flow chart for the image alignment method based on Moving Least that the embodiment of the present invention 2 proposes;
Fig. 2 b is the structural block diagram for the image alignment system based on Moving Least that the embodiment of the present invention 2 proposes;
Fig. 3 a is the flow chart for the image alignment method based on Moving Least that the embodiment of the present invention 3 proposes;
Fig. 3 b is the structural block diagram for the image alignment system based on Moving Least that the embodiment of the present invention 3 proposes.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference Attached drawing, the present invention is described in more detail.But as known to those skilled in the art, the invention is not limited to attached drawings and following reality Apply example.
Embodiment 1:
The embodiment of the present invention proposes a kind of image alignment method based on Moving Least, as shown in Figure 1a, should Method the following steps are included:
S101, multiple control points are set on initial pictures;
The multiple control point regular can be arranged, such as interval in the horizontal direction is equal, and/or, along Vertical Square To interval it is equal.The size at interval voluntarily can be rationally arranged, and in general, the control point that lesser interval generates is more, It will increase the calculation amount of subsequent processing, but can be improved the effect of subsequent processing, initial pictures and target image alignment accuracy are high; The control point that biggish interval generates is less, may be such that image range involved in subsequent processing can not cover initial pictures All areas, to influence the alignment effect of initial pictures and target image.Therefore, it when the size at interval is set, needs simultaneous Care for calculation amount and alignment effect.
The multiple control point can also the irregular setting on entire initial pictures, cover entire initial pictures as far as possible.
Preferably, in order to improve the validity at control point, calculation amount is rationally reduced, control point is generally not arranged in initial graph On the boundary of picture.
S102, the local optimal searching region that control point is set;
The local optimal searching region at the control point is the transportable region in control point, the local optimal searching area at the control point Domain size is generally determined by the difference size between initial pictures and target image, guarantees that the optimal location at control point is located at its office In portion optimizing region.If differed greatly, the local optimal searching region at control point can be set larger;If difference is smaller, control The local optimal searching region of system point can be set smaller.
The size in the local optimal searching region at each control point may be the same or different.
The local optimal searching region at the control point indicates that part is sought with pixel region preferably using control point as regional center Excellent region, for example, the local optimal searching region at the control point can be set to 5*5 pixel region.
S103, on initial pictures, a control point is selected, using Moving Least to the entire figure of initial pictures As being converted, and calculate opposite with the comparison area in the image with target image of comparison area in transformed initial pictures The absolute difference of the image in the region answered and;Then, the control point is moved in the local optimal searching region, every movement one It is secondary, all the whole image of initial pictures is converted using Moving Least, and calculates in transformed initial pictures The image of comparison area and the absolute difference of the image in region corresponding with the comparison area in target image and, Zhi Daosuo Control point movement in the local optimal searching region is stated to finish;Compare the calculated all absolute differences of institute and finds minimum Absolute difference and, the position at corresponding control point, as the optimal location at the control point, and using mobile minimum two Multiplication converts the whole image of initial pictures, obtains the deformation pattern in optimization process;
The comparison area is the region as defined by the control point adjacent with selected control point, or if selected Between the control point selected and image boundary be not present other control points, then the comparison area be by with selected control point phase Region defined by adjacent control point and image boundary.
The control point is moved in the local optimal searching region, the size of the distance moved every time and local optimal searching region It is related with the conditions such as the required precision of image alignment.Preferably, the distance moved every time is a pixel.
S104, judge setting control point whether all selected, if it is not, then using the deformation pattern in optimization process as Initial pictures, return step S103 are continued to execute, until the control point of all settings is all selected, the last one control points optimization The obtained deformation pattern in optimization process, the output image as this alignment operation.
The image alignment method based on Moving Least that the embodiment of the present invention proposes, by the way that control point is arranged, and The optimal location at each control point is solved;After the optimal location for solving a control point, using mobile minimum two Multiplication carries out linear transformation to whole image, obtains the deformation pattern in optimization process, and the deformation pattern in the optimization process is made For the start image at next control point, so as to improve image alignment precision.
Also, in the image alignment method based on Moving Least that the embodiment of the present invention proposes, mobile minimum two Multiplication can accurately capture local difference by control point, can also accurately describe the transformation feelings of various image alignment tasks Condition.
In addition, the image alignment method based on Moving Least that the embodiment of the present invention proposes, by being sought locally Optimizing in excellent region, being capable of Automatic-searching optimum control point.
The image alignment method based on Moving Least that the embodiment of the present invention proposes can be used in image enhancement skill In art.
The embodiment of the present invention proposes a kind of image alignment system based on Moving Least, such as Fig. 1 a and Fig. 1 b institute Show, which includes: control point setup module 11, local optimal searching region setup module 12, deformation module 13 and control point judgement Module 14;
The control point setup module 11 on initial pictures for being arranged multiple control points;
The multiple control point regular can be arranged, such as interval in the horizontal direction is equal, and/or, along Vertical Square To interval it is equal.The size at interval voluntarily can be rationally arranged, and in general, the control point that lesser interval generates is more, It will increase the calculation amount of subsequent processing, but can be improved the effect of subsequent processing, initial pictures and target image alignment accuracy are high; The control point that biggish interval generates is less, may be such that image range involved in subsequent processing can not cover initial pictures All areas, to influence the alignment effect of initial pictures and target image.Therefore, it when the size at interval is set, needs simultaneous Care for calculation amount and alignment effect.
The multiple control point can also the irregular setting on entire initial pictures, cover entire initial pictures as far as possible.
Preferably, in order to improve the validity at control point, calculation amount is rationally reduced, control point is generally not arranged in initial graph On the boundary of picture.
Local optimal searching region setup module 12 is used to be arranged the local optimal searching region at control point;
The local optimal searching region at the control point is the transportable region in control point, the local optimal searching area at the control point Domain size is generally determined by the difference size between initial pictures and target image, guarantees that the optimal location at control point is located at its office In portion optimizing region.If differed greatly, the local optimal searching region at control point can be set larger;If difference is smaller, control The local optimal searching region of system point can be set smaller.
The size in the local optimal searching region at each control point may be the same or different.
The local optimal searching region at the control point indicates that part is sought with pixel region preferably using control point as regional center Excellent region, for example, the local optimal searching region at the control point can be set to 5*5 pixel region.
The deformation module 13 is used to a control point is selected, using Moving Least to first in initial pictures The whole image of beginning image is converted, and calculate in transformed initial pictures in the image and target image of comparison area with The absolute difference of the image in the corresponding region of the comparison area and;Then, the control point is in the local optimal searching region Interior movement, every movement is primary, is all converted using Moving Least to the whole image of initial pictures, and calculate transformation In initial pictures afterwards in the image with target image of comparison area the image in region corresponding with the comparison area difference Absolute value and, until the control point in the local optimal searching region movement finish;It is exhausted to compare the calculated all differences of institute To value and, find the smallest absolute difference and, the position at corresponding control point, as the optimal location at the control point, And the whole image of initial pictures is converted using Moving Least, obtain the deformation pattern in optimization process;
The comparison area is the region as defined by the control point adjacent with selected control point, or if selected Between the control point selected and image boundary be not present other control points, then the comparison area be by with selected control point phase Region defined by adjacent control point and image boundary.
The control point is moved in the local optimal searching region, the size of the distance moved every time and local optimal searching region It is related with the conditions such as the required precision of image alignment.Preferably, the distance moved every time is a pixel.
The control point judgment module 14 is used to judge whether the control point of setting all to be selected, if it is not, then will optimization Deformation pattern in the process notifies the deformation module 13 to continue to execute, until the control point of all settings as initial pictures It is all selected, the deformation pattern in optimization process that the last one control points optimization obtains, the output as this alignment operation Image.
The image alignment system based on Moving Least that the embodiment of the present invention proposes, by the way that control point is arranged, and The optimal location at each control point is solved;After the optimal location for solving a control point, using mobile minimum two Multiplication carries out linear transformation to whole image, obtains the deformation pattern in optimization process, and the deformation pattern in the optimization process is made For the start image at next control point, so as to improve image alignment precision.
Also, in the image alignment system based on Moving Least that the embodiment of the present invention proposes, mobile minimum two Multiplication can accurately capture local difference by control point, can also accurately describe the transformation feelings of various image alignment tasks Condition.
In addition, the image alignment system based on Moving Least that the embodiment of the present invention proposes, by being sought locally Optimizing in excellent region, being capable of Automatic-searching optimum control point.
The image alignment system based on Moving Least that the embodiment of the present invention proposes can be used in image enhancement skill In art.
Embodiment 2:
The image alignment method based on Moving Least that the present embodiment proposes, in the method that embodiment 1 proposes On the basis of, increase initial pictures generation step S200.The initial pictures generation step S200 is before the step S101 It carries out, as shown in Figure 2 a.
The initial pictures generation step S200 includes: to carry out images match to the first image, the first figure after making matching As being overlapped as far as possible with target image, wherein as initial pictures, the first image and target image are the first image after matching To the two images that Same Scene content is shot, the first image and the second image can be clapped using identical camera It takes the photograph, can also be shot using different cameras, when being shot using different cameras, the type of camera can be identical, can also not Together.
Described image matching operation can use SIFT algorithm, by extracting key respectively to the first image and the second image Point is matched, and the transformation matrix H of two images is calculated;The first image is converted using transformation matrix H, so that transformation The first image afterwards is overlapped as much as possible with the second image.Due to extracted by key point precision and the scene depth of field variation etc. because The influence of element, the two images after the matching can't be completely coincident.
Described image matching operation is not limited to SIFT algorithm, is also possible to other Feature Points Matching algorithms, such as SURF, BRISK, ORB, FREAK scheduling algorithm.
In addition, if the image that the first image sources are imaged in fisheye camera, the initial pictures generation step S200 further include the steps that generate the first image, wherein generate the first image the step of include: to fisheye camera at The image that picture obtains is corrected, and the first image is generated.The correction can be using camera calibration algorithm to fisheye camera It is demarcated, according to the calibrating parameters of fisheye camera to original fish eye images F0It is corrected, generates the first image.
The present embodiment content same as Example 1, details are not described herein.
The image alignment system based on Moving Least that the present embodiment proposes, in the system that embodiment 1 proposes On the basis of, initial pictures generation module 20 is increased, as shown in Figure 2 a and 2 b.The initial pictures generation module 20 for pair First image carries out images match, and the first image after making matching is overlapped with target image as far as possible.Wherein, first after matching For image as the initial pictures, the first image and target image are the two width figures shot to Same Scene content Picture, the first image and the second image can be shot using identical camera, can also be shot using different cameras, using difference Camera shooting when, the type of camera may be the same or different.
Described image matching operation can use SIFT algorithm, by extracting key respectively to the first image and the second image Point is matched, and the transformation matrix H of two images is calculated;The first image is converted using transformation matrix H, so that transformation The first image afterwards is overlapped as much as possible with the second image.Due to extracted by key point precision and the scene depth of field variation etc. because The influence of element, the two images after the matching operation can't be completely coincident.
Described image matching operation is not limited to SIFT algorithm, is also possible to other Feature Points Matching algorithms, such as SURF, BRISK, ORB, FREAK scheduling algorithm.
In addition, if the image that the first image sources are imaged in fisheye camera, the initial pictures generation module 20 Before being matched to the first image, also the image that fisheye camera is imaged is corrected, generates the first image. The correction can demarcate fisheye camera using camera calibration algorithm, according to the calibrating parameters of fisheye camera to original fish Eye image F0It is corrected, generates the first image.
The present embodiment content same as Example 1, details are not described herein.
Embodiment 3:
The image alignment method based on Moving Least that the present embodiment proposes is proposed in embodiment 1 and embodiment 2 Method on the basis of, increase the number of iterations setting steps and the number of iterations judgment step.The step of the setting the number of iterations As long as being completed before being iterated suddenly, for the number of iterations to be arranged.
The number of iterations judgment step carries out after this alignment operation, the number of iterations judgment step judgement Whether the number of iterations carried out reaches the number of iterations of setting, if the number of iterations carried out is not up to changing for setting Generation number, then the output image of this alignment operation is continued to execute as initial pictures, return step S101;If carried out The number of iterations reach the number of iterations of setting, then the output image of current alignment operation is as final deformation pattern.
The present embodiment can be further improved image alignment precision by iterative operation.It, can be in each iterative operation The position at control point and the interval at control point are reset, the local optimal searching region at control point can also be reset.
Below with reference to embodiment 1, first technical solution of the present embodiment is described, as shown in Figure 3a, this method packet Include following steps:
S300, setting the number of iterations C, the initial value of the number of iterations counter are 0;
S101, the number of iterations counter value add 1, control point is set on initial pictures;
The control point regular can be arranged, such as interval in the horizontal direction is equal, and/or, vertically It is spaced equal.Interval in the horizontal direction and interval vertically can be equal, can not also wait.The size at interval can be with Voluntarily rationally setting, in general, the control point that lesser interval generates are more, will increase the calculation amount of subsequent processing, but energy The effect of subsequent processing is enough improved, initial pictures and target image alignment accuracy are high;The control point that biggish interval generates is less, It may be such that image range involved in subsequent processing can not cover all areas of initial pictures, to influence initial pictures With the alignment effect of target image.Therefore, it when the size at interval is arranged, needs to take into account calculation amount and alignment effect.
The control point can also the irregular setting on entire initial pictures, cover entire initial pictures as far as possible.
Preferably, in order to improve the validity at control point, calculation amount is rationally reduced, control point is generally not arranged in initial graph On the boundary of picture.
S102, the local optimal searching region that control point is set;
The local optimal searching region at the control point is the transportable region in control point, the local optimal searching area at the control point Domain size is generally determined by the difference size between initial pictures and target image, guarantees that the optimal location at control point is located at its office In portion optimizing region.If differed greatly, the local optimal searching region at control point can be set larger;If difference is smaller, control The local optimal searching region of system point can be set smaller.
The size in the local optimal searching region at each control point may be the same or different.
The local optimal searching region at the control point indicates that part is sought with pixel region preferably using control point as regional center Excellent region, for example, the local optimal searching region at the control point can be set to 5*5 pixel region.
S103, on initial pictures, a control point is selected, using Moving Least to the entire figure of initial pictures As being converted, and calculate opposite with the comparison area in the image with target image of comparison area in transformed initial pictures The absolute difference of the image in the region answered and;Then, the control point is moved in the local optimal searching region, every movement one It is secondary, all the whole image of initial pictures is converted using Moving Least, and calculates in transformed initial pictures The image of comparison area and the absolute difference of the image in region corresponding with the comparison area in target image and, Zhi Daosuo Control point movement in the local optimal searching region is stated to finish;Compare the calculated all absolute differences of institute and finds minimum Absolute difference and, the position at corresponding control point, as the optimal location at the control point, and using mobile minimum two Multiplication converts the whole image of initial pictures, obtains the deformation pattern in optimization process;
The comparison area is the region as defined by the control point adjacent with selected control point, or if selected Between the control point selected and image boundary be not present other control points, then the comparison area be by with selected control point phase Region defined by adjacent control point and image boundary.
The control point is moved in the local optimal searching region, the size of the distance moved every time and local optimal searching region It is related with the conditions such as the required precision of image alignment.Preferably, the distance moved every time is a pixel.
S104, judge setting control point whether all selected, if it is not, then using the deformation pattern in optimization process as Initial pictures, return step S103 are continued to execute, until the control point of all settings is all selected, the last one control points optimization The obtained deformation pattern in optimization process, the output image as this alignment operation.
S305, judge whether the value of the number of iterations counter is less than the number of iterations C, if it is, this alignment operation Image is exported as initial pictures, return step S101 is continued to execute;If it is not, then the output image conduct of this alignment operation Final deformation pattern.
Second technical solution of the present embodiment be on the basis of first technical solution of the present embodiment, step S300 it Before, or after step S300 and before step S101, carry out the initial pictures generation step S200 in embodiment 2.Phase Details are not described herein for same content.
The image alignment system based on Moving Least that the present embodiment proposes is proposed in embodiment 1 and embodiment 2 System on the basis of, increase the number of iterations setup module 30 and the number of iterations judgment module 35.The number of iterations is set It sets and is completed before being iterated, for the number of iterations to be arranged.
The number of iterations judgment module after this alignment operation for carrying out, the number of iterations judgment module Whether the number of iterations (can be calculated with the number that control point setup module executes) for judging to have carried out reaches setting The number of iterations, if the number of iterations carried out be not up to be arranged the number of iterations, the output figure of this alignment operation As being used as initial pictures, notice control point setup module 11 is continued to execute;If the number of iterations carried out reaches setting The number of iterations, then the output image of current alignment operation is as final deformation pattern.
The present embodiment can be further improved image alignment precision by iterative operation.It, can be in each iterative operation The position at control point and the interval at control point are reset, the local optimal searching region at control point can also be reset.
Below with reference to embodiment 1, the third technical solution of the present embodiment is described, it as shown in Figure 3a and Figure 3b shows, should System includes: the number of iterations setup module 30, control point setup module 11, local optimal searching region setup module 12, deformation module 13, control point judgment module 14 and the number of iterations judgment module 35;
The generation number setup module 30 is 0 for the number of iterations C, the initial value of the number of iterations counter to be arranged;
The control point setup module 11 on initial pictures for being arranged control point;
The control point regular can be arranged, such as interval in the horizontal direction is equal, and/or, vertically It is spaced equal.Interval in the horizontal direction and interval vertically can be equal, can not also wait.The size at interval can be with Voluntarily rationally setting, in general, the control point that lesser interval generates are more, will increase the calculation amount of subsequent processing, but energy The effect of subsequent processing is enough improved, initial pictures and target image alignment accuracy are high;The control point that biggish interval generates is less, It may be such that image range involved in subsequent processing can not cover all areas of initial pictures, to influence initial pictures With the alignment effect of target image.Therefore, it when the size at interval is arranged, needs to take into account calculation amount and alignment effect.
The control point can also the irregular setting on entire initial pictures, cover entire initial pictures as far as possible.
Preferably, in order to improve the validity at control point, calculation amount is rationally reduced, control point is generally not arranged in initial graph On the boundary of picture.
Local optimal searching region setup module 12 is used to be arranged the local optimal searching region at control point;
The local optimal searching region at the control point is the transportable region in control point, the local optimal searching area at the control point Domain size is generally determined by the difference size between initial pictures and target image, guarantees that the optimal location at control point is located at its office In portion optimizing region.If differed greatly, the local optimal searching region at control point can be set larger;If difference is smaller, control The local optimal searching region of system point can be set smaller.
The size in the local optimal searching region at each control point may be the same or different.
The local optimal searching region at the control point indicates that part is sought with pixel region preferably using control point as regional center Excellent region, for example, the local optimal searching region at the control point can be set to 5*5 pixel region.
The deformation module 13 is used to a control point is selected, using Moving Least to first in initial pictures The whole image of beginning image is converted, and calculate in transformed initial pictures in the image and target image of comparison area with The absolute difference of the image in the corresponding region of the comparison area and;Then, the control point is in the local optimal searching region Interior movement, every movement is primary, is all converted using Moving Least to the whole image of initial pictures, and calculate transformation In initial pictures afterwards in the image with target image of comparison area the image in region corresponding with the comparison area difference Absolute value and, until the control point in the local optimal searching region movement finish;It is exhausted to compare the calculated all differences of institute To value and, find the smallest absolute difference and, the position at corresponding control point, as the optimal location at the control point, And the whole image of initial pictures is converted using Moving Least, obtain the deformation pattern in optimization process;
The comparison area is the region as defined by the control point adjacent with selected control point, or if selected Between the control point selected and image boundary be not present other control points, then the comparison area be by with selected control point phase Region defined by adjacent control point and image boundary.
The control point is moved in the local optimal searching region, the size of the distance moved every time and local optimal searching region It is related with the conditions such as the required precision of image alignment.Preferably, the distance moved every time is a pixel.
The control point judgment module 14 is used to judge whether the control point of setting all to be selected, if it is not, then will optimization Deformation pattern in the process notifies the deformation module 13 to continue to execute, until the control point of all settings as initial pictures It is all selected, the deformation pattern in optimization process that the last one control points optimization obtains, the output as this alignment operation Image.
The number of iterations judgment module 35 is for judging whether the value of the number of iterations counter is less than the number of iterations C, such as Fruit is that then the output image of this alignment operation notifies control point setup module 11 to continue to execute as initial pictures;If No, then the output image of this alignment operation is as final deformation pattern.
4th technical solution of the present embodiment is to increase embodiment 2 on the basis of the third technical solution of the present embodiment In initial pictures generation module 20.Details are not described herein for identical content.
The embodiment of the present invention also proposes a kind of storage medium, and the computer for executing preceding method is stored in the storage medium Program.
The embodiment of the present invention also proposes a kind of processor, and the processor operation executes the computer journey of method as previously described Sequence.
It will be understood by those skilled in the art that in flow charts indicate or logic described otherwise above herein and/or Step may be embodied in and appoint for example, being considered the order list of the executable instruction for realizing logic function In what computer-readable medium, for instruction execution system, device or equipment (such as computer based system including processor System or other can be from instruction execution system, device or equipment instruction fetch and the system executed instruction) use, or combine this A little instruction execution systems, device or equipment and use.For the purpose of this specification, " computer-readable medium " can be it is any can be with Include, store, communicate, propagate, or transport program is for instruction execution system, device or equipment or in conjunction with these instruction execution systems System, device or equipment and the device used.
The more specific example (non-exhaustive list) of computer-readable medium include the following: there are one or more wirings Electrical connection section (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
More than, embodiments of the present invention are illustrated.But the present invention is not limited to above embodiment.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution, improvement and etc. done should be included in guarantor of the invention Within the scope of shield.

Claims (10)

1. a kind of image alignment method based on Moving Least, which is characterized in that method includes the following steps:
S101, multiple control points are set on initial pictures;
S102, the local optimal searching region that control point is set;Wherein, the local optimal searching region at each control point is that the control point can Mobile region;
S103, on initial pictures, select a control point, using Moving Least the control point local optimal searching area In domain, the optimal location at the control point is found, and convert to the whole image of initial pictures using Moving Least, Obtain the deformation pattern in optimization process;
S104, judge whether the control point of setting is all selected, if it is not, then using the deformation pattern in optimization process as initial Image, return step S103 continue to execute the placement optimization to other control points, until the control point of all settings is all selected, The deformation pattern in optimization process that the last one control points optimization obtains, the output image as this alignment operation.
2. the method according to claim 1, wherein the step S103 includes: to select one on initial pictures A control point is converted using whole image of the Moving Least to initial pictures, and calculates transformed initial graph As in image and the absolute difference of the image in region corresponding with the comparison area in target image of comparison area and;So Afterwards, the control point is moved in the local optimal searching region, and every movement is primary, all using Moving Least to initial graph The whole image of picture is converted, and calculate in transformed initial pictures in the image and target image of comparison area with the ratio Absolute difference to the image in the corresponding region in region and, until the control point is moved in the local optimal searching region It finishes;Compare the calculated all absolute differences of institute and finds the smallest absolute difference and the position at corresponding control point It sets, the whole image of initial pictures is converted as the optimal location at the control point, and using Moving Least, Obtain the deformation pattern in the optimization process;
The comparison area is the region as defined by the multiple control points adjacent with selected control point, or if selected Between the control point selected and image boundary be not present other control points, then the comparison area be by with selected control point phase Region defined by adjacent control point and image boundary.
3. according to the method described in claim 2, it is characterized in that, the interval of the multiple control point in the horizontal direction is equal, And/or interval vertically is equal;Control point is not arranged on the boundary of initial pictures;The part at the control point is sought Excellent region indicates local optimal searching region with pixel region using control point as regional center.
4. the method according to claim 1, wherein the method also includes initial pictures generation step S200: Images match is carried out to the first image, the first image after making matching is overlapped with target image as far as possible;Wherein, after matching For one image as initial pictures, the first image and target image are the two images shot to Same Scene content;
The initial pictures generation step S200 is carried out before the step S101.
5. method according to any of claims 1-4, which is characterized in that the method also includes the number of iterations settings Step and the number of iterations judgment step;
The number of iterations, advance of described the step of the number of iterations is arranged in step S101 is arranged in the step of setting the number of iterations Row;
The number of iterations judgment step carries out after step s 104, what the number of iterations judgment step judgement had carried out Whether the number of iterations reaches the number of iterations of setting, if the number of iterations carried out is not up to the number of iterations being arranged, The output image of this alignment operation is continued to execute as initial pictures, return step S101;If the iteration time carried out Number reaches the number of iterations of setting, then the output image of current alignment operation is as final deformation pattern.
6. a kind of image alignment system based on Moving Least, which is characterized in that the system includes: control point setting mould Block, local optimal searching region setup module, deformation module and control point judgment module;
The control point setup module on initial pictures for being arranged multiple control points;
Local optimal searching region setup module is used to be arranged the local optimal searching region at control point;Wherein, the office at each control point Portion optimizing region is the region that the control point can move;
The deformation module is used to a control point is selected, using Moving Least at the control point in initial pictures Local optimal searching region in, find the optimal location at the control point, and using Moving Least to the entire of initial pictures Image is converted, and the deformation pattern in optimization process is obtained;
The control point judgment module is used to judge whether the control point of setting all to be selected, if it is not, then by optimization process Deformation pattern as initial pictures, notify the deformation module to continue to execute the placement optimization to other control points, Zhi Daosuo There is the control point of setting all to be selected, the deformation pattern in optimization process that the last one control points optimization obtains, as this The output image of alignment operation.
7. system according to claim 6, which is characterized in that the deformation module selects a control on initial pictures It is processed, it is converted using whole image of the Moving Least to initial pictures, and calculate in transformed initial pictures The image of comparison area and the absolute difference of the image in region corresponding with the comparison area in target image and;Then, The control point is moved in the local optimal searching region, and every movement is primary, all using Moving Least to initial pictures Whole image converted, and calculate in transformed initial pictures and compared in the image and target image of comparison area with this The absolute difference of the image in the corresponding region in region and, until the control point has been moved in the local optimal searching region Finish;Compare the calculated all absolute differences of institute and finds the smallest absolute difference and the position at corresponding control point It sets, the whole image of initial pictures is converted as the optimal location at the control point, and using Moving Least, Obtain the deformation pattern in the optimization process;
The comparison area is the region as defined by the multiple control points adjacent with selected control point, or if selected Between the control point selected and image boundary be not present other control points, then the comparison area be by with selected control point phase Region defined by adjacent control point and image boundary.
8. system according to claim 7, which is characterized in that the interval of the multiple control point in the horizontal direction is equal, And/or interval vertically is equal;Control point is not arranged on the boundary of initial pictures;The part at the control point is sought Excellent region indicates local optimal searching region with pixel region using control point as regional center.
9. system according to claim 6, which is characterized in that described the system also includes initial pictures generation module Initial pictures generation module be used for the first image carry out images match, make matching after the first image as far as possible with target image It is overlapped;Wherein, for the first image after matching as the initial pictures, the first image and target image are to Same Scene content The two images shot.
10. the system according to any one of claim 6-9, which is characterized in that the system also includes the number of iterations to set Module and the number of iterations judgment module are set, the number of iterations setup module for the number of iterations to be arranged, sentence by the number of iterations Disconnected module is used to judge whether the number that control point setup module executes to reach the number of iterations of setting, if the number executed is not Reach the number of iterations of setting, then the output image of this alignment operation is as initial pictures, notify control point setup module after It is continuous to execute;If the number of iterations carried out reaches the number of iterations of setting, the output image conduct of current alignment operation Final deformation pattern.
CN201810885864.4A 2018-08-06 2018-08-06 Image alignment method and system based on mobile least square method Active CN109242894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810885864.4A CN109242894B (en) 2018-08-06 2018-08-06 Image alignment method and system based on mobile least square method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810885864.4A CN109242894B (en) 2018-08-06 2018-08-06 Image alignment method and system based on mobile least square method

Publications (2)

Publication Number Publication Date
CN109242894A true CN109242894A (en) 2019-01-18
CN109242894B CN109242894B (en) 2021-04-09

Family

ID=65070595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810885864.4A Active CN109242894B (en) 2018-08-06 2018-08-06 Image alignment method and system based on mobile least square method

Country Status (1)

Country Link
CN (1) CN109242894B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115824573A (en) * 2023-01-06 2023-03-21 中国航空工业集团公司沈阳空气动力研究所 Positioning device and method applied to wind tunnel ice shape three-dimensional measurement

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120026554A1 (en) * 2010-08-02 2012-02-02 Daisuke Genda Image processing apparatus
CN102426712A (en) * 2011-11-03 2012-04-25 中国科学院自动化研究所 Three-dimensional head modeling method based on two images
CN102982537A (en) * 2012-11-05 2013-03-20 安维思电子科技(广州)有限公司 Scene change detection method and scene change detection system
CN103279936A (en) * 2013-06-21 2013-09-04 重庆大学 Human face fake photo automatic combining and modifying method based on portrayal
CN105160684A (en) * 2015-09-30 2015-12-16 中国科学院遥感与数字地球研究所 Online automatic matching method for geometric correction of remote sensing image
CN105678687A (en) * 2015-12-29 2016-06-15 天津大学 Stereo image stitching method based on content of images
US20160292763A1 (en) * 2005-08-22 2016-10-06 Redfin Corporation Discovery method for buyers, sellers of real estate
CN107274423A (en) * 2017-05-26 2017-10-20 中北大学 A kind of point cloud indicatrix extracting method based on covariance matrix and projection mapping
CN107545567A (en) * 2017-07-31 2018-01-05 中国科学院自动化研究所 The method for registering and device of biological tissue's sequence section micro-image
CN108038874A (en) * 2017-12-01 2018-05-15 中国科学院自动化研究所 Towards the real-time registration apparatus of scanning electron microscope image and method of sequence section
CN108154526A (en) * 2016-12-06 2018-06-12 奥多比公司 The image alignment of burst mode image
CN108182699A (en) * 2017-12-28 2018-06-19 北京天睿空间科技股份有限公司 Three-dimensional registration method based on two dimensional image local deformation

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292763A1 (en) * 2005-08-22 2016-10-06 Redfin Corporation Discovery method for buyers, sellers of real estate
US20120026554A1 (en) * 2010-08-02 2012-02-02 Daisuke Genda Image processing apparatus
CN102426712A (en) * 2011-11-03 2012-04-25 中国科学院自动化研究所 Three-dimensional head modeling method based on two images
CN102982537A (en) * 2012-11-05 2013-03-20 安维思电子科技(广州)有限公司 Scene change detection method and scene change detection system
CN103279936A (en) * 2013-06-21 2013-09-04 重庆大学 Human face fake photo automatic combining and modifying method based on portrayal
CN105160684A (en) * 2015-09-30 2015-12-16 中国科学院遥感与数字地球研究所 Online automatic matching method for geometric correction of remote sensing image
CN105678687A (en) * 2015-12-29 2016-06-15 天津大学 Stereo image stitching method based on content of images
CN108154526A (en) * 2016-12-06 2018-06-12 奥多比公司 The image alignment of burst mode image
CN107274423A (en) * 2017-05-26 2017-10-20 中北大学 A kind of point cloud indicatrix extracting method based on covariance matrix and projection mapping
CN107545567A (en) * 2017-07-31 2018-01-05 中国科学院自动化研究所 The method for registering and device of biological tissue's sequence section micro-image
CN108038874A (en) * 2017-12-01 2018-05-15 中国科学院自动化研究所 Towards the real-time registration apparatus of scanning electron microscope image and method of sequence section
CN108182699A (en) * 2017-12-28 2018-06-19 北京天睿空间科技股份有限公司 Three-dimensional registration method based on two dimensional image local deformation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘卓 等: "《数值天气预报新技术讲义》", 31 October 1993 *
李言俊 张科: "《景象匹配与目标识别技术》", 31 August 2009 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115824573A (en) * 2023-01-06 2023-03-21 中国航空工业集团公司沈阳空气动力研究所 Positioning device and method applied to wind tunnel ice shape three-dimensional measurement

Also Published As

Publication number Publication date
CN109242894B (en) 2021-04-09

Similar Documents

Publication Publication Date Title
US11281925B2 (en) Method and terminal for recognizing object node in image, and computer-readable storage medium
US10621729B2 (en) Adaptive focus sweep techniques for foreground/background separation
CN110163193B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
Fan et al. Registration of optical and SAR satellite images by exploring the spatial relationship of the improved SIFT
CN111179419B (en) Three-dimensional key point prediction and deep learning model training method, device and equipment
WO2017167116A1 (en) Automatic-focus method and automatic-focus device
CN103327245B (en) A kind of Atomatic focusing method of infrared imaging system
CN109840884B (en) Image stitching method and device and electronic equipment
WO2016033967A1 (en) Method and device for aligning images
EP3425897B1 (en) Information processing device, method, program, and multi-camera system
EP2293243A2 (en) Image processing apparatus, image capture apparatus, image processing method, and program
CN109035170B (en) Self-adaptive wide-angle image correction method and device based on single grid image segmentation mapping
CN108875505B (en) Pedestrian re-identification method and device based on neural network
CN110288511A (en) Minimum error joining method, device, electronic equipment based on double camera image
CN107564007B (en) Scene segmentation correction method and system fusing global information
CN109242894A (en) A kind of image alignment method and system based on Moving Least
CN102708559B (en) Blur difference estimation using multi-kernel convolution
CN111461196B (en) Rapid robust image identification tracking method and device based on structural features
CN112150529B (en) Depth information determination method and device for image feature points
Wan et al. Boosting image-based localization via randomly geometric data augmentation
JP2009187204A (en) Image processing apparatus
CN111768338B (en) Method and device for splicing test question images, electronic equipment and storage medium
CN113808033A (en) Image document correction method, system, terminal and medium
CN106709942A (en) Panoramic image mistaken matching elimination method based on characteristic azimuth
JP2016162421A (en) Information processor, information processing method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant