Complex background infrared image background motion compensation method based on image registration
By adopting an image registration-based method in infrared image processing, combined with FAST feature point detection, quadtree algorithm and LGB descriptor, the feature point matching error problem of infrared image background motion compensation under complex background is solved, and the background motion is improved The compensation effect provides better conditions for infrared weak target detection.
Patent Information
- Application Number
- CN202411077704.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-07
AI Technical Summary
In complex backgrounds, existing infrared image background motion compensation algorithms are difficult to accurately detect targets with significantly lower energy, especially due to large feature point matching errors and serious background clutter interference.
Using an image registration-based method, redundant feature points are eliminated through FAST feature point detection and quad-tree algorithm, LGB descriptors are generated, and the coordinates of feature points are mapped using hash function, combined with a random sampling consensus algorithm to match feature points, and calculate Background motion parameters are used to compensate background motion.
The accuracy and distinction ability of feature point matching are improved, the probability of mismatch is reduced, the effect of background motion compensation is improved, and better conditions are provided for subsequent infrared weak target detection.
Smart Images

Figure CN118967762A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a complex background infrared image background motion compensation method based on image registration, and belongs to the field of image processing. Background Art
[0002] Infrared small target detection under complex background has shown vital application value in key areas such as military defense, but there are endless challenges on the road to application. The most obvious one is how to accurately distinguish targets with significantly lower energy in complex backgrounds (such as clouds, terrain, buildings, etc.). In some complex infrared scenes, the target size is small, the signal strength is weak, and the background clutter interference is serious. The classic spatial domain infrared small target detection algorithm often has poor detection effect in such scenes, and background motion compensation can make up for the shortcomings of these algorithms in processing complex background images. Background motion compensation is generally achieved by calculating the parameters of background motion. Differentiating the current frame image with the previous frame image after background motion compensation can effectively eliminate the background, providing better conditions for subsequent infrared small target detection.
[0003] Among many background motion compensation technologies, image registration methods are widely used due to their high accuracy. The core of image registration is to detect feature points in the image and generate descriptors for these feature points. The most commonly used image registration algorithm in engineering is the ORB (oriented fast and rotated BRIEF) algorithm, which combines the FAST (Features from Accelerated Segment Test) feature point detection algorithm and the BRIEF (Binary Robust Independent Elementary Features) descriptor. By adding the directional information of the feature points, the invariance to rotation is improved. The algorithm is favored for its low computational complexity and high accuracy. However, the ORB algorithm still has poor matching effect in environments with complex contrast changes and dense feature points, and there are problems such as large feature matching errors.
[0004] In addition to the BRIEF descriptor, FREAK (Fast Retina Keypoint) and BEBLID (Binary Enhanced BRIEF with Linear Iterative Detection) are also commonly used descriptors, both of which have the advantages of efficient computing and storage. The FREAK descriptor imitates the sampling pattern of the human retina to more effectively capture and compare image feature points; the BEBLID descriptor is trained using the AdaBoost algorithm and an unbalanced data set to improve its accuracy and efficiency. However, the above descriptors mainly form feature vectors based on the grayscale distribution of feature points. For complex backgrounds with repeated textures in infrared images, the grayscale distribution around the feature points is highly similar, so the generated descriptors are also similar. This similarity may make it difficult to clearly distinguish feature points during the matching process, which may cause mismatching, which in turn has a significant impact on the calculation of the transformation matrix, and ultimately affects the background motion compensation effect. Summary of the invention
[0005] The technical problem solved by the present invention is: to overcome the deficiencies of the prior art, to provide a background motion compensation method for complex background infrared images based on image registration, to improve the effect and efficiency of background motion compensation, and to provide better conditions for subsequent infrared weak and small target detection.
[0006] The technical solution of the present invention is: a background motion compensation method for complex background infrared images based on image registration, comprising:
[0007] Load two adjacent frames of infrared images, use the FAST feature point detection algorithm to detect feature points on the images, and then use the quadtree algorithm to remove redundant feature points to obtain pre-processed feature points after removing redundant feature points;
[0008] Generate a position descriptor and a grayscale descriptor, and combine the position descriptor, the grayscale descriptor and the BEBLID descriptor in series to generate an LGB descriptor; use the LGB descriptor to describe the features of all preprocessed feature points in the two images;
[0009] Each image is divided into four quadrants, and the hash key value of each feature point in the two images is calculated. The coordinates of the feature points in different quadrants are mapped to different key values through a hash function, and the coordinates of the feature points in the same quadrant are mapped to the same key value through a hash function. The feature points in the two images are matched according to the hash key values to obtain the matching feature point pairs in the two images. The random sampling consensus algorithm is used to further screen the matching feature point pairs, and the final background motion parameters are calculated using the matching feature point pairs determined by the screening. According to the final background motion parameters, an affine transformation is performed on the previous frame of the two images to realize background motion compensation.
[0010] Preferably, the method of removing redundant feature points using the quadtree algorithm is as follows:
[0011] S1-1 first creates a parent node, which is the entire image area of a frame image. The feature point set of the parent node is the set of all feature points obtained by the FAST feature point detection algorithm on the entire image;
[0012] S1-2 divides the parent node into four child nodes according to four quadrants, and each child node is an area corresponding to one of the quadrants; according to the coordinate quadrant area, the feature points in the feature point set of the parent node are assigned to the feature point set of the corresponding child node;
[0013] S1-3 creates a variable COUNT, and counts the number of child nodes whose feature point sets are not empty. If COUNT does not reach the expected value or the number of feature points in each child node is greater than 1, then for child nodes whose number of feature points is less than or equal to 1, mark them as not requiring further segmentation and stop processing; for child nodes whose number of feature points is greater than 1, take them as new parent nodes, return to S1-2 and continue iterating for each new parent node;
[0014] S1-4 When COUNT reaches the expected value or the number of feature points in each child node is less than or equal to 1, the feature point with the largest response value in each child node is extracted and the quadtree algorithm ends; the response value of the feature point is defined as: the sum of the absolute values of the differences between the grayscale values of each pixel in a circle with a radius of 3 pixels and the grayscale value of the feature point with the position of the feature point as the center.
[0015] Preferably, the attributes of the parent node include the coordinates of the upper left corner, the coordinates of the upper right corner, the coordinates of the lower left corner, the coordinates of the lower right corner, and a set of included feature points.
[0016] Preferably, the attributes of each child node include the coordinates of the upper left corner, the upper right corner, the lower left corner, the lower right corner of the corresponding quadrant and a set of feature points of the quadrant area.
[0017] Preferably, the location descriptor D L (p) is:
[0018]
[0019] Among them, a means dividing the entire image into grids of size a×a, and the size of a is half of the number of binary bits of the descriptor; m and n represent the row and column numbers of the grid respectively; := means "defined as", that is, the expression on the right is defined as the name on the left.
[0020] Preferably, the grayscale descriptor D g (p) is:
[0021]
[0022] in, Indicates rounding down; G(p) represents the grayscale value of the feature point P, := means "defined as", that is, the expression on the right is defined as the name on the left.
[0023] Preferably, the calculation method of the hash key value H(P) of each feature point is:
[0024]
[0025] in, Indicates rounding down; (x, y) represents the coordinate value of the feature point P; W and H represent the width and height of the image respectively.
[0026] Preferably, when the coordinates of feature points in the same quadrant area are mapped to the same key value through a hash function, a unique hash key value is assigned to the feature points in the quadrant boundary area, and the size of the quadrant boundary area is determined based on the difference in the field of view of the two frames of images.
[0027] Preferably, the feature points in the two images are matched according to the hash key value to obtain the feature point pairs that can match in the two images, specifically:
[0028] Based on each feature point in the first image, feature points with the same hash key are found in the second image, and the matching similarity is evaluated by calculating the Hamming distance of the LGB binary descriptors of the two feature points. Finally, the feature point corresponding to the descriptor with the smallest Hamming distance is selected as the matching pair.
[0029] Preferably, a random sampling consensus algorithm is used to screen matching feature point pairs, and the final background motion parameters are calculated using the matching feature point pairs determined by the screening, specifically:
[0030] The random sampling consensus algorithm is used for iteration. Four matching feature point pairs are randomly selected as subsets in each iteration to estimate the background motion parameters. The number of matching pairs that meet the background motion parameters obtained in this iteration is evaluated among all matching feature point pairs. The subset with the largest number of matching pairs that meet the estimated background motion parameters is selected to calculate the final background motion parameters.
[0031] Compared with the prior art, the present invention has the following advantages:
[0032] (1) The background motion compensation algorithm proposed in the present invention adds position and grayscale information to the construction method of the descriptor, which can achieve better matching effect in an environment with complex contrast changes, dense feature points, and repeated textures, improves the accuracy and discrimination ability of feature point matching, reduces the probability of mismatching, improves the effect of background motion compensation, and provides better conditions for subsequent infrared weak target detection;
[0033] (2) The present invention maps the coordinates of feature points in different areas to corresponding key values through a hash function, and only queries feature points within the same key value during matching, thereby reducing the search range and time during matching and saving calculation complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of the method of the present invention;
[0035] Figure 2 This is a schematic diagram of the quadtree algorithm of the present invention for removing redundant feature points;
[0036] Figure 3 A schematic diagram for generating a position descriptor of the present invention;
[0037] Figure 4 A schematic diagram for generating a grayscale descriptor of the present invention;
[0038] Figure 5 This is a feature point distribution diagram before using the quadtree algorithm in the present invention;
[0039] Figure 6 This is a feature point distribution diagram after using the quadtree algorithm in the present invention;
[0040] Figure 7 The infrared image after background motion compensation of the previous frame in the present invention;
[0041] Figure 8 It is a difference image between the current frame image and the previous frame image after background motion compensation in the present invention. DETAILED DESCRIPTION
[0042] The purpose of the present invention is to propose a background motion compensation method for complex background infrared images based on image registration, which improves the effect and efficiency of background motion compensation and provides better conditions for subsequent infrared dim small target detection.
[0043] The purpose of the present invention is achieved through the following technical solutions: first, a quadtree algorithm is used to solve the dense problem of feature points, and a LGB (Location-Gray-BEBLID) descriptor is proposed, which integrates the location information and grayscale information of the feature points as key distinguishing features into the process of constructing a binary descriptor. When matching feature points, the present invention adopts a block matching strategy, maps the coordinates of feature points in different areas of the image to corresponding key values by constructing a hash function, and only searches for feature points in the corresponding key values during the search, avoiding point-by-point matching of feature points in one image with all feature points in another image, so as to reduce the amount of calculation.
[0044] The flow chart of the present invention is as follows Figure 1 As shown, the details are as follows:
[0045] Step 1: Load two adjacent infrared images, use the FAST feature point detection algorithm to detect feature points, and then use the quadtree algorithm to remove redundant feature points to obtain pre-processed feature points after removing redundant feature points; see the removal diagram Figure 2 The specific steps are as follows:
[0046] S1-1 first creates a parent node, which corresponds to the entire image area of a frame of image. For the parent node, its attributes include the coordinates of the upper left corner, the upper right corner, the lower left corner, the lower right corner, and the set of feature points contained. Assuming that the width of the image is W and the height is H, the coordinates of the upper left corner of the parent node are (0, 0), the coordinates of the upper right corner are (W-1, 0), the coordinates of the lower left corner are (0, H-1), and the coordinates of the lower right corner are (W-1, H-1); all coordinates mentioned below are coordinate positions in the entire image. The set of feature points contained in the parent node is the set of all feature points obtained on the entire image through the FAST feature point detection algorithm. Perform S-2 operation on the parent node;
[0047] S1-2 divides the parent node into four child nodes according to four quadrants, and each child node is the area corresponding to one of the quadrants; each child node attribute includes the coordinates of the upper left corner, upper right corner, lower left corner, lower right corner of the corresponding quadrant and the feature point set of the area. For each feature point in the parent node, it is assigned to the corresponding child node according to the coordinate position of the feature point (the quadrant it is in).
[0048] S1-3 creates a variable COUNT to count the number of child nodes whose feature point sets are not empty. If COUNT does not reach the expected value or the number of feature points in each child node is greater than 1, then for child nodes whose number of feature points is less than or equal to 1, mark them as not requiring further segmentation and stop processing. For child nodes whose number of feature points is greater than 1, use them as new parent nodes and return to S1-2 to continue iterating for each new parent node.
[0049] S1-4 When COUNT reaches the expected value or the number of feature points in each child node is less than or equal to 1, the feature point with the largest response value in each child node is extracted and the quadtree algorithm ends; the response value of the feature point is defined as: the sum of the absolute values of the differences between the grayscale values of each pixel in a circle with a radius of 3 pixels and the grayscale value of the feature point with the position of the feature point as the center.
[0050] The preprocessed feature points are obtained after removing redundant feature points.
[0051] Step 2: Based on the BEBLID descriptor, the location and grayscale information of the feature points are fused to generate the LGB descriptor. Use the LGB descriptor to describe the features of all preprocessed feature points obtained in step 1. The specific steps to generate the LGB descriptor are as follows:
[0052] 1) Generate location descriptor:
[0053]
[0054] Where a means dividing the whole image into grids of size a×a (the present invention constructs a 16-bit binary descriptor, so a is taken as 8); m and n represent the position of the grid where the feature point is located: that is, the grid located in the mth row and the nth column; := means "defined as", that is, the expression on the right is defined as the name on the left. The schematic diagram is as follows Figure 3 shown.
[0055] 2) Generate grayscale descriptor:
[0056]
[0057] in, represents rounding down; G(p) represents the gray value of feature point P. Figure 4 shown.
[0058] 3) The 16-bit position descriptor, the 16-bit grayscale descriptor and the 32-bit BEBLID descriptor are combined in series to form a 64-bit LGB binary descriptor.
[0059] Step 3: Divide each image into four regions according to four quadrants, calculate the hash key value of each feature point in the two images, map the coordinates of feature points in different regions to different key values through hash functions, and map the coordinates of feature points in the same quadrant region to the same key value through hash functions; match the feature points in the two images based on the hash key values and LGB descriptors to obtain matching feature point pairs in the two images, and use the random sampling consensus algorithm to further screen and optimize the matching feature point pairs, calculate the final background motion parameters using the position information of the pixel points of the selected matching feature point pairs in the corresponding images, and perform affine transformation on the previous frame of the two images according to the final background motion parameters to achieve background motion compensation. The specific steps are as follows:
[0060] 1) Divide each image into four regions according to four quadrants, map the coordinates of feature points in different quadrants to different key values through hash functions, map feature points in the same region to the same key value through hash functions, and calculate the hash key value H(P) corresponding to the feature point P:
[0061]
[0062] in, Indicates rounding down; (x, y) indicates the coordinate value of feature point P; W and H indicate the width and height of the entire image, respectively. This formula can calculate the same key value for feature points at different positions in the same area. In order to avoid feature points near the boundary line of the region matching feature points that may be in the adjacent area of the quadrant, thus causing the matching failure or matching error of these feature points, a unique hash key value is assigned to the feature points in the quadrant boundary area. The size of the quadrant boundary area is determined based on the difference in the field of view of the two frames of images.
[0063] 2) Matching feature points in the two images: During the matching process, based on each feature point in the first image, feature points with the same hash key value are searched in the second image, and the matching similarity is evaluated by calculating the Hamming distance of the LGB binary descriptors of the two feature points. Finally, the feature point corresponding to the descriptor with the smallest Hamming distance is selected as the matching feature point pair.
[0064] 3) Use the Random Sample Consensus (RANSAC) algorithm to iteratively randomly select four matching feature point pairs as subsets to estimate the background motion parameters, and evaluate the number of matching pairs among all matching feature point pairs that meet the background motion parameters obtained in this iteration, and select a subset with the largest number of matching pairs to calculate the final background motion parameters.
[0065] 4) Performing affine transformation on the previous frame of the two frames according to the background motion parameters to achieve background motion compensation.
[0066] The present invention first uses a quadtree algorithm to remove redundant feature points to solve the problem of dense feature points. In addition, the position information of the feature points in the whole image is used as a key distinguishing feature to construct a 16-bit binary descriptor; in order to preserve the grayscale information of the feature points and use it as a key distinguishing feature, the present invention converts the grayscale value of each feature point into a 16-bit binary descriptor to enhance the uniqueness of the feature points; the position descriptor, grayscale descriptor and 32-bit BEBLID descriptor are combined in series to form a 64-bit LGB binary descriptor.
[0067] At the same time, the present invention maps the coordinates of feature points in different areas to corresponding key values through a hash function, and only queries feature points within the same key value during matching, thereby reducing the search range and time during matching.
[0068] The existing descriptors only consider the grayscale distribution around the feature points. However, in an image, if there are repeated or periodic structures, the feature points at the same position of these structures are likely to have similar or even identical descriptors. The similarity of such descriptors may lead to misjudgment when matching feature points, which in turn has a significant impact on the calculation of the transformation matrix. The background motion compensation algorithm proposed in the present invention adds position and grayscale information to the construction process of the descriptor, improves the accuracy and distinguishing ability of feature point matching, thereby improving the effect of background motion compensation and providing better conditions for subsequent infrared dim small target detection.
[0069] The specific implementation of the present invention is described below in conjunction with two adjacent frames of complex background infrared images:
[0070] Execute step 1: load two adjacent infrared images, use the FAST feature point detection algorithm to detect feature points, and then use the quadtree algorithm to remove redundant feature points. The distribution of feature points before using the quadtree algorithm is as follows: Figure 5 As shown in Figure 2, the distribution of feature points after using the quadtree algorithm is as follows: Figure 6 As shown,
[0071] Execute step 2: perform feature description on the processed feature points, fuse the position and grayscale information of the feature points based on the BEBLID descriptor, and generate the LGB descriptor.
[0072] Execute step three: map the feature point coordinates of different areas to different key values through hash functions, and only query the feature points with the same key value during matching to reduce the search range and time during matching. Use the Random Sample Consensus (RANSAC) algorithm to further screen and optimize the matching results, and calculate the background motion parameters through the obtained feature point information to achieve background motion compensation. The previous frame of infrared image after background motion compensation is shown in Figure 2. Figure 7 As shown, the difference between the current frame image and the previous frame image after background motion compensation is as follows Figure 8 shown.
[0073] The contents not described in detail in the specification of the present invention belong to the prior art known to the professional and technical personnel in this field.
Claims
1. A background motion compensation method for infrared images with complex backgrounds based on image registration, characterized in that include: Load two adjacent frames of infrared images, perform feature point detection on the images, and then remove redundant feature points to obtain pre-processed feature points; Generate a position descriptor and a grayscale descriptor, and combine the position descriptor, the grayscale descriptor and the BEBLID descriptor in series to generate an LGB descriptor; use the LGB descriptor to describe the features of all preprocessed feature points in the two images; Each image is divided into four quadrants, and the hash key value of each feature point in the two images is calculated. The coordinates of feature points in different quadrants are mapped to different key values through a hash function, and the coordinates of feature points in the same quadrant are mapped to the same key value through a hash function. The feature points in the two images are matched according to the hash key values and the LGB descriptors to obtain the matching feature point pairs in the two images. The random sampling consensus algorithm is used to further screen the matching feature point pairs, and the final background motion parameters are calculated using the screened matching feature point pairs. According to the final background motion parameters, an affine transformation is performed on the previous frame of the two images to realize background motion compensation.
2. The method for background motion compensation of infrared images with complex backgrounds based on image registration according to claim 1, characterized in that: The quadtree algorithm is used to remove redundant feature points, specifically: S1-1 first creates a parent node, which is the entire image area of a frame image. The feature point set of the parent node is the set of all feature points detected on the entire image. The feature point detection here uses the FAST feature point detection algorithm. S1-2 divides the parent node into four child nodes according to four quadrants, and each child node is an area corresponding to one of the quadrants; according to the coordinate quadrant area, the feature points in the feature point set of the parent node are assigned to the feature point set of the corresponding child node; S1-3 creates a variable COUNT, and counts the number of child nodes whose feature point sets are not empty. If COUNT does not reach the expected value or the number of feature points in each child node is greater than 1, then for child nodes whose number of feature points is less than or equal to 1, mark them as not requiring further segmentation and stop processing; for child nodes whose number of feature points is greater than 1, take them as new parent nodes, return to S1-2 and continue iterating for each new parent node; S1-4 When COUNT reaches the expected value or the number of feature points in each child node is less than or equal to 1, the feature point with the largest response value in each child node is extracted, and the quadtree algorithm ends; the response value of the feature point is defined as: the sum of the absolute values of the differences between the grayscale values of each pixel in a circle with the position of the feature point as the center and the radius as the set number of pixels and the grayscale value of the feature point.
3. The method for background motion compensation of infrared images with complex backgrounds based on image registration according to claim 2, characterized in that: The attributes of the parent node include the coordinates of the upper left corner, the upper right corner, the lower left corner, the lower right corner, and the set of feature points contained.
4. The method for background motion compensation of complex background infrared images based on image registration according to claim 2, characterized in that: The attributes of each child node include the coordinates of the upper left corner, upper right corner, lower left corner, lower right corner of the corresponding quadrant and the set of feature points in the quadrant area.
5. The method for background motion compensation of infrared images with complex backgrounds based on image registration according to claim 1, characterized in that: Location Descriptor D L (p) is: Among them, a means dividing the entire image into grids of size a×a, and the size of a is half of the number of binary bits of the descriptor; m and n represent the row and column numbers of the grid respectively; := means "defined as", that is, the expression on the right is defined as the name on the left.
6. The method for background motion compensation of complex background infrared images based on image registration according to claim 1, characterized in that: Grayscale descriptor D g (p) is: in, Indicates rounding down; G(p) represents the grayscale value of the feature point P, and := means "defined as", that is, the expression on the right is defined as the name on the left.
7. The method for background motion compensation of complex background infrared images based on image registration according to claim 1, characterized in that: The calculation method of the hash key value H(P) of each feature point is: in, Indicates rounding down; (x, y) represents the coordinate value of the feature point P; W and H represent the width and height of the image respectively.
8. The method for background motion compensation of infrared images with complex backgrounds based on image registration according to claim 1, characterized in that: When the coordinates of feature points in the same quadrant area are mapped to the same key value through a hash function, the feature points in the quadrant boundary area are assigned a unique hash key value, and the size of the quadrant boundary area is determined according to the difference in the field of view of the two frames of images.
9. The method for background motion compensation of complex background infrared images based on image registration according to claim 1, characterized in that: The feature points in the two images are matched according to the hash key value and the LGB descriptor to obtain the matching feature point pairs in the two images, specifically: Based on each feature point in the first image, feature points with the same hash key are found in the second image, and the matching similarity is evaluated by calculating the Hamming distance of the LGB descriptors of the two feature points. Finally, the feature point corresponding to the descriptor with the smallest Hamming distance is selected as the matching pair.
10. The method for background motion compensation of complex background infrared images based on image registration according to claim 1, characterized in that: Use the random sampling consensus algorithm to screen the matching feature point pairs, and use the screened matching feature point pairs to calculate the final background motion parameters, specifically: The random sampling consensus algorithm is used for iteration. Four matching feature point pairs are randomly selected as subsets in each iteration to estimate the background motion parameters. The number of matching pairs that meet the background motion parameters obtained in this iteration is evaluated among all matching feature point pairs. The subset with the largest number of matching pairs that meet the estimated background motion parameters is selected to calculate the final background motion parameters.
Citation Information
Patent Citations
Quick detecting method for moving objects in dynamic scene
CN103325112A
Video global motion compensation method based on affine inverse transformation model
CN114519832A
Priori driving bidirectional compensation panoramic image registration method for virtual reality
CN114842058A
Background motion estimation method and apparatus for infrared image sequence, and storage medium
WO2021057455A1
Cited By
A method and system for tracking image regions of interest
CN123032764A
