Adaptive splicing method of multi-beam foresight sonar image

Through threshold segmentation, ORB feature point matching and weighted fusion technology, the problems of poor real-time performance and low image quality in sonar image stitching are solved, achieving higher stitching success rate and image quality, and is suitable for underwater environments.

CN118747708APending Publication Date: 2024-10-08HARBIN INST OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410752976.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

Traditional sonar image stitching methods have poor real-time performance and low quality of the stitched images. Especially in underwater environments with noise and complex scenes, the number of matching feature points is reduced, resulting in stitching failure or a decrease in success rate, and there is a lack of seam optimization.

Method used

Threshold segmentation and median filtering are used for preprocessing, ORB feature points are extracted and KNN algorithm is used for feature matching, feature points are screened with RANSAC algorithm, and the splicing seams are optimized through weighted fusion.

Benefits of technology

It improves the splicing success rate and image quality, reduces the computing resources and time consumption of feature extraction and matching, achieves higher real-time performance and adaptability, and is suitable for the high real-time and high-quality surveying and mapping requirements of underwater robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747708A_ABST
    Figure CN118747708A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive splicing method of a multi-beam foresight sonar image, and belongs to the technical field of sonar image processing. The problems that an existing sonar image splicing method is poor in real-time performance, and the quality of a spliced image is poor are solved. Comprising the steps of obtaining an image region-of-interest; carrying out ORB feature extraction to obtain a plurality of ORB feature points described by the FAST angular points and the BRIEF descriptors; a KNN algorithm is adopted to determine a plurality of neighbor matching ORB feature points of each ORB feature point in the reference image in the to-be-registered image, an Euclidean distance is calculated based on a binary code string, and an initial feature point pair is obtained; performing screening by adopting an RANSAC algorithm to obtain a final feature point pair; and based on the coordinates of the final feature point pair in the reference image, performing weighted fusion on the reference image and the to-be-registered image to complete image adaptive splicing. The method is used for self-adaptive splicing of sonar images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an adaptive splicing method for multi-beam forward-looking sonar images, and belongs to the technical field of sonar image processing. Background Art

[0002] In recent years, with the gradual deepening of the development and exploration of the marine environment, humans have higher demands for underwater target detection, underwater environment mapping, hull inspection, fish detection and other tasks. However, due to the large changes in underwater lighting and the extremely low visibility of most underwater scenes, traditional optical imaging equipment cannot be used normally in underwater environments. Sonar, as a sensor for underwater environments, has a good performance in underwater operations. However, traditional sonar equipment has a small visual range and a single sonar image has limited information, which limits the application of sonar. In order to obtain a wider range of underwater environment information, sonar images need to be spliced.

[0003] Sonar sensors are often installed on underwater robots such as ROVs to collect acoustic images. Due to the influence of the hydrological environment and the characteristics of the sonar equipment itself, the acoustic images collected by sonar sensors often have a lot of noise, which is different from traditional optical images. At the same time, the underwater environment is complex and changeable, and the number of features will also vary greatly. The operations of underwater robots, such as navigation and mapping, require high real-time performance, which makes the stitching of sonar images very different from traditional optical images. In the past research on sonar image stitching, people often use feature detection operators such as SIFT and SURF, and use fixed distance thresholds as the screening criteria for feature point descriptors for image registration. As a result, the extraction and matching of image features have high computing resource consumption and computing time consumption, and cannot meet high real-time requirements; and the use of fixed distance thresholds to screen feature point pairs will cause some single features and degraded scenes to cause the number of feature point matches to decay too much, resulting in stitching failure or a decrease in the success rate of stitching. At the same time, there is no optimization of the stitching seams in the fusion step of image stitching, which results in excessive unnatural image joints after sonar image stitching, reducing image quality. Summary of the invention

[0004] Aiming at the problem that the existing sonar image stitching method has poor real-time performance and poor image quality after stitching, the present invention provides an adaptive stitching method for multi-beam forward-looking sonar images.

[0005] The invention discloses an adaptive stitching method for multi-beam forward-looking sonar images, which pre-processes the collected sonar images by using threshold segmentation and median filtering to obtain image regions of interest;

[0006] ORB feature extraction is performed on all image regions of interest to obtain multiple ORB feature points described by FAST corner points and BRIEF descriptors; the FAST corner points have directional attributes, and the BRIEF descriptors are binary code strings corresponding to the FAST corner points;

[0007] For the regions of interest of two adjacent images, the region of interest of the first image is used as the reference image, and the region of interest of the other image is used as the image to be registered. The KNN algorithm is used to determine multiple neighbor matching ORB feature points of each ORB feature point in the reference image in the image to be registered, and then the Euclidean distance is calculated based on the binary code string to determine the final matching point of each ORB feature point in the reference image in the image to be registered, and multiple initial feature point pairs are obtained;

[0008] Then, the RANSAC algorithm is used to screen the determined initial feature point pairs based on the homography matrix to obtain the final feature point pairs; the coordinates of the final feature points in the image to be registered are transformed relative to the reference image to obtain the coordinates of the final feature points in the image to be registered in the reference image;

[0009] Based on the coordinates of the final feature point pair in the reference image, the reference image and the image to be registered are weighted fused to complete the image adaptive stitching.

[0010] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method for obtaining the image region of interest is:

[0011] A grayscale threshold is set, and the target area of ​​the sonar image is obtained based on the grayscale threshold. Then, a median filter is performed on the target area to filter out the salt and pepper noise, and the image region of interest based on the target area is obtained.

[0012] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method for obtaining the FAST corner points of the ORB feature points is:

[0013] Take any pixel point in the image's region of interest as the target pixel point P, and calculate the pixel points on the circumference with the target pixel point P as the center and the set distance r as the radius:

[0014]

[0015] Where I P is the pixel value of the target pixel, I K is the pixel value of the pixel point on the circumference, and T is the set gray value difference threshold;

[0016] For each target pixel point P, if the number of CRF=1 is greater than the set number, the target pixel point P is taken as the FAST corner point.

[0017] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the direction of the FAST corner point is calculated as follows:

[0018] Set the neighborhood of the current FAST corner point to S and calculate the p+q order moment M of the neighborhood S p,q , p,q={0,1}:

[0019]

[0020] x ω is the X-axis coordinate of the pixel point in the neighborhood S, y ω is the Y-axis coordinate of the pixel point in the neighborhood S, f(x ω ,y ω ) is the gray value of the pixel;

[0021] The centroid position C of the neighborhood S is:

[0022]

[0023] Then the direction θ of the current FAST corner point is:

[0024]

[0025] Where C y is the Y-axis coordinate of the center of mass position C, C x is the X-axis coordinate of the center of mass position C.

[0026] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method for obtaining the binary code string of the FAST corner point is:

[0027] With the FAST corner point as the center, a w×w-sized neighborhood W after Gaussian smoothing is selected, and n pairs of pixel points x are randomly selected in the neighborhood W. c1 and x c2 , set the binary comparison criteria:

[0028]

[0029] Where τ(W; x c1 ,x c2 ) is the binary comparison result, W(x c1 ) is the gray value of the pixel xc1 in the neighborhood W, W(x c2 ) is the pixel x in the neighborhood W c2 Gray value of

[0030] Then the binary code string f of the FAST corner point n (W) is:

[0031]

[0032] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method of using the KNN algorithm to determine the final matching point of each ORB feature point in the reference image in the image to be registered is:

[0033] The KNN algorithm is used to first obtain multiple nearest neighbor matching ORB feature points in the image to be registered, and then the nearest neighbor matching ORB feature points and the second nearest neighbor matching ORB feature points among the multiple nearest neighbor matching ORB feature points are determined based on the BRIEF descriptor. The Euclidean distance des1 between the ORB feature point in the reference image and the nearest neighbor matching ORB feature point, and the Euclidean distance des2 between the ORB feature point in the reference image and the second nearest neighbor matching ORB feature point are calculated based on the binary code string. If des1 / des2<α, the nearest neighbor matching ORB feature point is used as the final matching point in the image to be registered to obtain the initial feature point pair; α is the weight factor, α∈[α1,α2], α1 is the lower limit of the weight factor, and α2 is the upper limit of the weight factor.

[0034] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, a method for obtaining multiple initial feature point pairs is:

[0035] If after completing a feature point matching for all ORB feature points in the reference image, the number of initial feature point pairs currently obtained does not reach the set number of feature point pairs, then a set step size is added to the current weight factor α to obtain a new weight factor, and the iteration is continued to further determine the initial feature point pairs;

[0036] If the number of feature point pairs obtained within the set interval of the weight factor α reaches the set number of feature point pairs, the initial feature point pair matching is successful; otherwise, it is determined that the two adjacent image regions of interest do not meet the stitching standard and the stitching is exited.

[0037] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method for obtaining the final feature point pair is:

[0038] Using the RANSAC algorithm, four pairs of non-collinear initial feature point pairs are randomly selected from the initial feature point pairs as four pairs of inner point pairs, and the other initial feature point pairs are used as outer point pairs;

[0039] Calculate the homography matrix of the four pairs of inner point pairs, test the matching degree between the homography matrix and each pair of outer point pairs, if the matching degree meets the preset matching threshold, add the corresponding outer point pair as the inner point pair; otherwise, remove the current outer point pair; finally, take all the inner point pairs obtained as the final feature point pairs, and obtain the optimal homography matrix from all the final feature point pairs.

[0040] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method for obtaining the coordinates of the final feature points in the image to be registered in the reference image is:

[0041] The optimal homography matrix is ​​denoted as H:

[0042]

[0043] where h ab represents the element in the ath row and bth column of the homography matrix H, where a=1, 2, 3; b=1, 2, 3; A 2×2 represents the affine transformation parameters, T 2×1 represents the translation transformation parameter, s0 represents the normalization parameter;

[0044] The coordinates of the final feature points in the image to be registered in the reference image are:

[0045]

[0046] Where (x, y) is the two-dimensional pixel coordinates of the final feature point in the image to be registered in the image to be registered, and (x', y') is the two-dimensional pixel coordinates of the final feature point in the image to be registered in the reference image.

[0047] According to the adaptive stitching method of multi-beam forward-looking sonar images of the present invention, the method of weighted fusion of the reference image and the image to be registered is:

[0048] First, based on the coordinates of the final feature point pair in the reference image, determine the overlapping area of ​​the reference image and the image to be registered after splicing, and calculate the pixel weight value α of each pixel in the overlapping area after splicing i :

[0049]

[0050] Where ω i is the column coordinate value of the pixel point in the overlapping area after splicing, ω l is the column coordinate value of the left boundary of the overlapping area after splicing, ω r The column coordinate value of the right boundary of the overlapping area after splicing;

[0051] Set the pixel value of the overlapping area after stitching to f(x0,y0), and the pixel value of the overlapping area corresponding to the reference image before stitching to f1(x i ,y i ), the pixel value of the pixel point in the overlapping area corresponding to the image to be registered before stitching is f2(x i ,y i ), then:

[0052] f(x0,y0)=f1(x i ,y i )*(1-α i )+f2(x i ,yi )*α i ,

[0053] Based on the pixel values ​​of the pixels in the overlapping area after stitching, if the current pixel in the overlapping area after stitching is an edge pixel, the current pixel is downsampled to obtain the secondary edge pixel as the edge point of the overlapping area for weighted fusion; otherwise, the current pixel is weighted fused until the stitching result image is obtained;

[0054] For the pixel point q0 on the stitching seam of the stitching result image, the pixel average value within the preset centered neighborhood of the adjacent left pixel points of the pixel point q0 and the pixel average value within the preset centered neighborhood of the adjacent right pixel points of the pixel point q0 are calculated, and then the final average value is further calculated for the two calculated pixel average values, and assigned to the pixel point q0 to optimize the stitching seam; finally, an adaptive stitching image is obtained.

[0055] The beneficial effects of the present invention are as follows: the method of the present invention can adaptively reach the feature matching threshold for image stitching in different scenarios, thereby improving the stitching success rate, reducing the computational loss and time of image feature extraction and matching, improving the real-time performance of the system, and at the same time improving the image quality of the stitched image.

[0056] The method of the present invention optimizes the fusion part of feature point pair acquisition and image stitching. Experiments show that compared with other mainstream methods, the method of the present invention has higher feature extraction and matching speed and higher image stitching quality. At the same time, it has good adaptability to different scenes, improves the stitching success rate, and can meet the needs of high real-time operation of underwater robots and provide high-quality underwater mapping scenes.

[0057] The method of the present invention extracts the ORB feature operator and designs an adaptive matching feature screening method based on the Euclidean distance of the weight interval. The method can realize the adaptive matching of feature point pairs in various scenarios by adjusting the weight factor. At the same time, it ensures the high-quality feature point matching in the feature-intensive environment, and can also reach a certain feature point matching threshold in the relatively sparse feature environment, thereby improving the success rate of splicing in different scenarios. At the same time, an improved weighted fusion method is designed to improve the quality of the spliced ​​image. Experiments show that the method of the present invention has a higher running speed, and the sonar spliced ​​image obtained by subjective observation and objective evaluation criteria has better image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a flowchart of the adaptive stitching method of multi-beam forward-looking sonar images of the present invention;

[0059] Figure 2 It is a flow chart of the adaptive matching feature screening method of the initial feature point pair;

[0060] Figure 3 It is a flow chart for weighted fusion of the reference image and the image to be registered;

[0061] Figure 4 is the image 1 to be stitched of the gate scene of the experimental pool collected by sonar in time sequence;

[0062] Figure 5 is the second image to be stitched of the gate scene of the experimental pool collected by sonar in time sequence;

[0063] Figure 6 is the image to be stitched of the gangway scene of the experimental pool collected by sonar in time sequence;

[0064] Figure 7 is the second image to be stitched of the gangway scene of the experimental pool collected by sonar in time sequence;

[0065] Figure 8 is the image to be stitched of the outer wall scene of the experimental pool collected by sonar in time sequence;

[0066] Fig. 9 is the second image to be stitched of the outer wall scene of the experimental pool collected by sonar in time sequence;

[0067] Fig.10 The experimental pool gate scene image is obtained by image stitching using the method of the present invention;

[0068] Fig.11 This is the experimental pool gate scene image obtained by image stitching using the existing weighted fusion method;

[0069] Fig.12 This is the experimental pool gate scene image obtained by using the direct alignment and stitching method to stitch images;

[0070] Fig.13 The experimental pool gangway scene image is obtained by image stitching using the method of the present invention;

[0071] Fig.14 This is the experimental pool gangway scene image obtained by image stitching using the existing weighted fusion method;

[0072] Fig.15 This is the experimental pool gangway scene image obtained by using the direct alignment and stitching method to stitch images;

[0073] Fig.16 The scene image of the outer wall of the experimental pool is obtained by image stitching using the method of the present invention;

[0074] Fig.17 It is a scene image of the outer wall of the experimental pool obtained by image stitching using the existing weighted fusion method;

[0075] Fig.18 This is a scene image of the outer wall of the experimental pool obtained by stitching images using the direct alignment and stitching method. DETAILED DESCRIPTION

[0076] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0077] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0078] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0079] Specific implementation method 1. Combination Figures 1 to 3 As shown, the present invention provides an adaptive stitching method for multi-beam forward-looking sonar images, including pre-processing the collected sonar images by using threshold segmentation and median filtering to obtain image regions of interest;

[0080] ORB feature extraction is performed on all image regions of interest to obtain multiple ORB feature points described by FAST corner points and BRIEF descriptors; the FAST corner points have directional attributes, and the BRIEF descriptors are binary code strings corresponding to the FAST corner points;

[0081] For the regions of interest of two adjacent images, the region of interest of the first image is used as the reference image, and the region of interest of the other image is used as the image to be registered. The KNN algorithm is used to determine multiple neighbor matching ORB feature points of each ORB feature point in the reference image in the image to be registered, and then the Euclidean distance is calculated based on the binary code string to determine the final matching point of each ORB feature point in the reference image in the image to be registered, and multiple initial feature point pairs are obtained;

[0082] Then, the RANSAC algorithm is used to screen the determined initial feature point pairs based on the homography matrix to obtain the final feature point pairs; the coordinates of the final feature points in the image to be registered are transformed relative to the reference image to obtain the coordinates of the final feature points in the image to be registered in the reference image;

[0083] Based on the coordinates of the final feature point pair in the reference image, the reference image and the image to be registered are weighted fused to complete the image adaptive stitching.

[0084] Combination Figure 1 As shown in the figure, the method of the present invention is divided into three parts: image preprocessing, image registration and image fusion. First, the region of interest is obtained in the image preprocessing part; secondly, in the image registration part, an adaptive ORB feature point matching method is proposed, so that the feature point matching threshold can be reached in different scenes, and the feature extraction speed and the success rate of sonar image splicing are improved. Finally, in the image fusion part, an improved weighted average sonar image fusion method is established to improve the quality of the spliced ​​image.

[0085] In order to improve the quality of image stitching, the image needs to be preprocessed. Due to the inherent characteristics of the collected sonar images, there are useless black backgrounds and salt and pepper noises. Therefore, the preprocessing is mainly to extract the region of interest in the entire image and filter out the useless salt and pepper noise. Threshold segmentation is a very effective and simple method. It segments the grayscale value with a certain threshold. According to the set threshold, the objects in the image are segmented at the pixel level, which is conducive to the further processing of the image, making the image simpler, and reducing the amount of data. It can highlight the outline of the target of interest, which is conducive to the subsequent improvement of image fusion quality and stitching success rate.

[0086] Further, the method for obtaining the region of interest of the image is:

[0087] A grayscale threshold is set, and the target area of ​​the sonar image is obtained based on the grayscale threshold, so that the useful image is separated from the background; then a median filter is performed on the target area to filter out the salt and pepper noise, and the image region of interest based on the target area is obtained to improve the image fusion quality and stitching success rate.

[0088] Since the common noise in sonar images is salt and pepper noise, median filtering is a nonlinear smoothing technology that sets the grayscale value of each pixel to the median of all the pixel grayscale values ​​in a certain neighborhood window of the point, which has a good suppression effect on salt and pepper noise. Therefore, threshold segmentation and median filtering are used to preprocess the sonar images.

[0089] Image registration includes three steps: feature extraction, feature matching, secondary screening of matching feature points using the RANSAC algorithm, and transformation of the image to be registered. In the existing methods, SIFT and SURF are used as feature operators for image registration. However, their disadvantages are that the extraction time and matching time are long and the computing resources are consumed a lot. This embodiment aims to complete a fast and highly real-time stitching method. Therefore, the ORB feature extraction operator is selected. The ORB operator is a feature detection and description algorithm that combines the FAST key point detector and the BRIEF descriptor. Compared with SIFT and SURF, it has a higher speed, a smaller amount of calculation, and rotational invariance. It is more robust to noise and perspective changes and is more suitable for application in real-time systems. The ORB operator feature point consists of two parts: the key point and the descriptor. Its key point is an improved FAST corner point, and the descriptor is called BRIEF. The FAST corner point mainly detects the part where the local pixel grayscale changes significantly.

[0090] In this implementation, the method for obtaining the FAST corner points of the ORB feature points is:

[0091] Take any pixel point in the image's region of interest as the target pixel point P, and calculate the pixel points on the circumference with the target pixel point P as the center and the set distance r as the radius:

[0092]

[0093] Where I P is the pixel value of the target pixel, I K is the pixel value of the pixel point on the circumference, and T is the set gray value difference threshold;

[0094] For each target pixel point P, if the number of CRF=1 is greater than the set number, the target pixel point P is taken as the FAST corner point.

[0095] In order to make the ORB operator rotationally invariant, it is necessary to assign a direction to each ORB feature point in advance. To this end, the feature point is taken as the center and also as the coordinate origin, and the centroid position is calculated within its neighborhood S. Then, a vector is constructed with the feature point as the starting point and the centroid as the end point, and the direction of this vector is used as the direction of the feature point.

[0096] The direction of the FAST corner point is calculated as follows:

[0097] Set the neighborhood of the current FAST corner point to S and calculate the p+q order moment M of the neighborhood S p,q , p,q={0,1}:

[0098]

[0099] x ωis the X-axis coordinate of the pixel point in the neighborhood S, y ω is the Y-axis coordinate of the pixel point in the neighborhood S, f(x ω ,y ω ) is the gray value of the pixel;

[0100] The centroid position C of the neighborhood S is:

[0101]

[0102] Then the direction θ of the current FAST corner point is:

[0103]

[0104] Where C y is the Y-axis coordinate of the center of mass position C, C x is the X-axis coordinate of the center of mass position C.

[0105] Therefore, the ORB feature points have a description of rotation, and the scale invariance of the feature points can be achieved by constructing an image pyramid.

[0106] The BRIEF descriptor defines the direction θ of the ORB feature point. The main direction can be defined according to the direction value to extract the BRIEF descriptor, which is used to generate an ORB descriptor with rotation invariance. The BRIEF descriptor is formed by randomly selecting several point pairs near the feature point in the neighborhood, binarizing the grayscale values ​​of these point pairs, and using the binary strings they form.

[0107] Furthermore, the binary code string of FAST corner points is obtained as follows:

[0108] With the FAST corner point as the center, a w×w-sized neighborhood W after Gaussian smoothing is selected, and n pairs of pixel points x are randomly selected in the neighborhood W. c1 and x c2 , set the binary comparison criteria:

[0109]

[0110] Where τ(W; x c1 ,x c2 ) is the binary comparison result, W(x c1 ) is the gray value of the pixel xc1 in the neighborhood W, W(x c2 ) is the pixel x in the neighborhood W c2 Gray value of

[0111] When n pairs of pixels are selected, a unique binary criterion is defined, then the binary code string f of the FAST corner point n (W) is:

[0112]

[0113] At this time, the value of θ is used to add the main direction to the BRIEF descriptor to make it rotation invariant, thereby obtaining the ORB descriptor.

[0114] After ORB feature points are extracted, feature point matching is required. Since sonar images are affected by noise, and the KNN algorithm has high accuracy and robustness to noise, after comprehensive consideration, this implementation uses the KNN algorithm to match feature points.

[0115] The KNN method will find the k nearest neighbor matches for each query point, so it is necessary to screen the matching points. The matching screening of ORB feature points uses the Euclidean distance to measure the similarity between two feature descriptors. The principle is as follows:

[0116] Euclidean distance belongs to the L2 norm. For two points A(x1,y1) and B(x2,y2) in two-dimensional space, the Euclidean distance is defined as If the Euclidean distance between two feature descriptors is small, it can be considered that the similarity between the two points is high. If the distance is greater than the minimum distance, they will be discarded, thereby filtering out some feature point pairs that do not meet the conditions.

[0117] In existing methods, a fixed distance is generally defined for screening feature point pairs. However, the drawback of such a design is that the diversity of underwater environments determines that the number of feature points in different scenarios is not the same, and sonar images lack the elevation information of underwater obstacles, so they lack many surface texture features of obstacles. Therefore, compared with general optical images, the feature points are relatively sparse. If a fixed distance parameter is set to screen feature point pairs, the number of feature point matches in some single features and degraded scenarios will be attenuated too much, resulting in splicing failure or a decrease in the success rate of splicing. This embodiment designs a method for selecting adaptive matching features based on Euclidean distance selection based on weight intervals. The algorithm flow is as follows: Figure 2 As shown. Define a weight factor and multiply it with the Euclidean distance within a range. When performing feature point matching, if the number of feature point matches obtained is less than the required minimum number of feature point matching pairs, iterate and increase the weight factor by one step. If the number of feature point matches obtained after iteration reaches the required number, exit the iteration and perform subsequent image registration operations; if the weight factor reaches the maximum boundary value after iteration but the number of feature point matches still does not reach the required number, it is considered that the two images do not meet the stitching standard and exit the stitching. The above method can be used to adaptively match feature point pairs in a variety of scenarios. While ensuring high-quality feature point matching in a feature-dense environment, a certain feature point matching threshold can be achieved in a relatively sparse feature environment, thereby improving the success rate of stitching in different scenarios. The details are as follows:

[0118] Combination Figure 2As shown in FIG. 1 , the method of using the KNN algorithm to determine the final matching point of each ORB feature point in the reference image in the image to be registered is:

[0119] The KNN algorithm is first used to obtain multiple nearest neighbor matching ORB feature points in the image to be registered based on the BRIEF descriptor, and then the nearest neighbor matching ORB feature points and the second nearest neighbor matching ORB feature points among the multiple nearest neighbor matching ORB feature points are determined based on the BRIEF descriptor. The Euclidean distance des1 between the ORB feature point in the reference image and the nearest neighbor matching ORB feature point, and the Euclidean distance des2 between the ORB feature point in the reference image and the second nearest neighbor matching ORB feature point are calculated based on the binary code string. If des1 / des2<α, the current match is considered reliable, and the nearest neighbor matching ORB feature point is used as the final matching point in the image to be registered to obtain the initial feature point pair; α is the weight factor, α∈[α1,α2], α1 is the lower limit of the weight factor, and α2 is the upper limit of the weight factor.

[0120] In this implementation, the method for obtaining multiple initial feature point pairs is:

[0121] If after completing a feature point matching for all ORB feature points in the reference image, the number of initial feature point pairs currently obtained does not reach the set number of feature point pairs, then a set step size is added to the current weight factor α to obtain a new weight factor, and the iteration is continued to further determine the initial feature point pairs;

[0122] If the number of feature point pairs obtained within the set interval of the weight factor α reaches the set number of feature point pairs, the initial feature point pair matching is successful; otherwise, it is determined that the two adjacent image regions of interest do not meet the stitching standard and the stitching is exited.

[0123] In the existing method, the weight factor is a set fixed value; the method of the present invention sets an interval range for the weight factor, and when the number of feature point pairs obtained is less than the set number of feature point pairs, iterative selection is performed. Each time an iteration is performed, the weight factor increases by one step; if the number of feature point matches obtained after the iteration reaches the required number, the iteration is exited for subsequent operations; if the weight factor α reaches the maximum boundary value after the iteration but the number of feature point matches still does not reach the required number, it is considered that the two images do not meet the splicing standard and the splicing is exited.

[0124] After the initial feature point matching, further feature point screening is required to obtain the mapping relationship between the image to be spliced ​​and the reference image. The RANSAC algorithm is used to perform secondary screening of matching feature points and estimate the homography matrix of the image to be spliced, completing the geometric transformation of the image to be spliced.

[0125] Going further, the method to obtain the final feature point pair is:

[0126] Using the RANSAC algorithm, four pairs of non-collinear initial feature point pairs are randomly selected from the initial feature point pairs as four pairs of inner point pairs, and the other initial feature point pairs are used as outer point pairs;

[0127] Calculate the homography matrix of the four pairs of inner point pairs, test the matching degree between the homography matrix and each pair of outer point pairs, if the matching degree meets the preset matching threshold, add the corresponding outer point pair as the inner point pair; otherwise, remove the current outer point pair; finally, take all the inner point pairs obtained as the final feature point pairs, and obtain the optimal homography matrix from all the final feature point pairs.

[0128] In this embodiment, the method for obtaining the coordinates of the final feature point in the image to be registered in the reference image is:

[0129] The optimal homography matrix is ​​denoted as H, which is a 3x3 transformation matrix with 8 degrees of freedom:

[0130]

[0131] where h ab represents the element in the ath row and bth column of the homography matrix H, where a=1, 2, 3; b=1, 2, 3; A 2×2 represents the affine transformation parameters, T 2×1 represents the translation transformation parameter, s0 represents the normalization parameter;

[0132] The coordinates of the final feature points in the image to be registered in the reference image are:

[0133]

[0134] Where (x, y) is the two-dimensional pixel coordinates of the final feature point in the image to be registered in the image to be registered, and (x', y') is the two-dimensional pixel coordinates of the final feature point in the image to be registered in the reference image.

[0135] After the image registration, the image is fused through the corresponding transformation projection. Directly aligning and stitching the images will cause the pixels in the overlapping areas of the images to be added, resulting in excessive brightness in the overlapping areas. Weighted average fusion is a very simple and effective image fusion method that can be used to solve such problems, but traditional weighted fusion will cause unnatural transitions at the seams of sonar images and interference from black edge pixels, affecting the quality of image stitching. In response to the above problems, this embodiment proposes an improved weighted fusion method that can effectively solve the above problems. Weighted fusion is to transform the overlapping areas according to certain weights, convert the average calculated grayscale value into a weighted sum, and then perform a fusion operation.

[0136] Going a step further, combined Figure 3 As shown in FIG. 1 , the method for weighted fusion of the reference image and the image to be registered is:

[0137] First, based on the coordinates of the final feature point pair in the reference image, determine the overlapping area of ​​the reference image and the image to be registered after splicing, and calculate the pixel weight value α of each pixel in the overlapping area after splicing i :

[0138]

[0139] Where ω i is the column coordinate value of the pixel point in the overlapping area after splicing, ω l is the column coordinate value of the left boundary of the overlapping area after splicing, ω r It is the right boundary column coordinate value of the overlapping area after stitching; the left boundary column coordinate value and the right boundary column coordinate value are obtained by calculating the pixels of the overlapping area based on the width of the overlapping area;

[0140] After obtaining the weight of each pixel in the overlapping area after stitching, the overlapping area is fused at the pixel level, and the pixel value of the pixel point in the overlapping area after stitching is set to f(x0, y0), and the pixel value of the pixel point in the overlapping area corresponding to the reference image before stitching is set to f1(x i ,y i ), the pixel value of the pixel point in the overlapping area corresponding to the image to be registered before stitching is f2(x i ,y i ), then:

[0141] f(x0,y0)=f1(x i ,y i )*(1-α i )+f2(x i ,y i )*α i ,

[0142] In view of the unnatural transition at the seam and the interference of black edge pixels, when performing weighted fusion, it is determined whether the pixel at this time is the edge pixel of the overlapping area, and the judgment is made based on the pixel value of the pixel point in the overlapping area after stitching. If the current pixel point in the overlapping area after stitching is an edge pixel point, the current pixel point is downsampled to obtain the secondary edge pixel point as the edge point of the overlapping area for weighted fusion; otherwise, the current pixel point is weightedly fused until the stitching result image is obtained;

[0143] After completing all weighted fusion operations, the overlapping area boundaries of the result image are detected, and for the pixel point q0 on the stitching seam of the stitching result image, the pixel average value within the preset centered neighborhood of the adjacent left pixel points of the pixel point q0 and the pixel average value within the preset centered neighborhood of the adjacent right pixel points of the pixel point q0 are calculated, and then the final average value of the two calculated pixel average values ​​is further calculated and assigned to the pixel point q0 to optimize the stitching seam; using the above method, the removal of black edge pixels and the transition at the seam are completed, and finally an adaptive stitching image is obtained. Specific embodiment:

[0145] 1) The oculus M750d multi-beam forward-looking sonar model is selected and installed on the ROV. The sonar sensor is connected to the computer through the RJ40 network cable interface for communication.

[0146] 2) Start the sonar image acquisition module in the computer, set the host IP and sonar sensor to communicate normally, set the sonar sensor working frequency, sampling frequency and detection distance, and start the ROV to collect underwater acoustic images.

[0147] 3) After the sonar image is collected, the program used by the method of the present invention is started, the image path to be spliced ​​is added to the program, the required minimum number of matching feature point pairs and the threshold of the Euclidean distance weight factor are set, and the program is started.

[0148] 4) First, preprocess the sonar image. Use the threshold segmentation method to extract the region of interest of the image and separate the useful image from the background. The specific method is to set a grayscale threshold, and regard the pixels above the threshold as the target area, and the pixels below the threshold as the background. Use the median filtering method to denoise the image. Median filtering can effectively filter out salt and pepper noise in the image, improve image quality, and thus improve the success rate of subsequent image stitching.

[0149] 5) Image registration: Use the ORB (Oriented FAST and Rotated BRIEF) feature extraction algorithm for feature extraction. The ORB algorithm combines the FAST key point detector and the BRIEF descriptor, has the advantages of fast calculation speed, small calculation amount, and rotation invariance, and is suitable for real-time systems.

[0150] 6) Use KNN (k-Nearest Neighbor) algorithm for feature point matching. KNN algorithm can find the k nearest neighbor matching points of each query point and measure the similarity between feature descriptors through Euclidean distance.

[0151] 7) The adaptive matching method based on weight interval designed by the method of the present invention is performed to dynamically adjust the Euclidean distance weight factor to adapt to the feature point matching requirements in different scenarios, ensuring that the matching threshold can be reached even when the feature points change.

[0152] 8) Use the RANSAC (Random Sample Consensus) algorithm to perform secondary screening on the initially matched feature points, calculate the homography matrix between the image to be stitched and the reference image, and realize the geometric transformation.

[0153] 9) Image fusion: After completing the image registration, the improved weighted average fusion method proposed in the present invention is used to fuse the images. By calculating the left and right boundary coordinate values ​​of the overlapping area, the weight of each pixel is determined, and the weighted sum of the overlapping area is performed to achieve a smooth transition of the image. In order to solve the problems of unnatural transition at the seams and interference from black edge pixels, the edge pixels of the overlapping area are downsampled and fused using secondary edge pixels; at the seams, the boundary pixel values ​​are replaced by calculating the average pixel value in the neighborhood to ensure a natural transition at the seams.

[0154] 10) Experimental results: The sonar equipment used in the experiment is the oculus M750d multi-beam forward-looking sonar, which is installed on the ROV. The sonar images are collected by the M750d at a working frequency of 1200MHz, with a maximum range of 10m and a sampling frequency of 10Hz. The sonar images used in this experiment are the gate, gangway, and outer wall scenes in the experimental pool environment, such as Figures 4 to 9As shown. The experimental computing platform is configured as 13th Gen Intel(R)Core(TM)i5-13400F, memory 2.50GHz, built-in 16.00GB RAM. The operating system is Ubuntu18.04, based on python 3.7.4 and OpenCV4.7.0.68. The minimum required feature point matching pairs are set to 75, and the time for feature point extraction and matching with SIFT, SURF, the method of the present invention + SIFT, and the method of the present invention + SURF is compared. In terms of image fusion, the peak signal-to-noise ratio (PSNR), structural similarity (SSIM), and information entropy are selected for objective evaluation to objectively evaluate the processing results. The PSNR calculation is based on the mean square error (MSE), that is, the average square error of the pixel values ​​between the original signal and the reconstructed signal. It represents the quality of the image after fusion processing, usually in decibels (dB). The higher the PSNR value, the smaller the difference between the fused image and the original image, and the higher the image quality. SSIM is also an indicator for measuring image quality. It takes into account the structural information of the image and is more in line with the perception of the human visual system to the image. The value range of SSIM is usually between -1 and 1. The closer to 1, the more similar the two images are, and the closer to -1, the less similar the two images are. Information entropy is used to measure the information richness after image fusion. After the image fusion process, image blocks with high information entropy may contain more image information. The higher the value of these three objective indicators, the better. The results of the splicing fusion and contrast weighted fusion and direct splicing of the method of the present invention are as follows: Figures 10 to 18 shown.

[0155] Combination Figures 10 to 18 As shown in the figure, the method of the present invention has more advantages than other methods in terms of matching point pairs and time. SIFT and SURF alone may fail to match in some scenes, but the method of the present invention can significantly improve the matching success rate when combined with the above methods. In addition, the method combined with the ORB feature operator proposed by the present invention has a significant reduction in the time of extraction and matching compared with the combination with SIFT and SURF methods, and can better achieve the real-time performance of the system.

[0156] From the subjective observation of the image fusion results, the directly stitched image has extremely high brightness in the overlapping part, and there is no transition at the edge of the stitching overlapping area, which makes the image extremely poor in subjective perception; compared with the direct stitching result, the weighted fusion method has smoothed the brightness of the overlapping area, and the subjective perception is greatly improved, but there is black pixel interference at the edge of the image overlapping area, and the transition at the stitching seam is unnatural; the method proposed in the present invention solves the above problems compared with the weighted fusion method, so that the subjective perception of the image is greatly improved.

[0157] Judging from the objective indicators of the image fusion results, the PSNR and SSIM indicators of the method of the present invention are better than the other two methods; the information entropy is the same as or slightly better than the weighted fusion method, but both are lower than the direct stitching method. This is because the method of the present invention extracts and fuses the pixels in the overlapping area of ​​the two images to be fused by weight, while the direct stitching method directly adds the overlapping areas of the two images to be fused. This results in more pixel information in the overlapping area of ​​the direct stitching method than the method of the present invention to a certain extent, but the subjective perception of the image obtained by direct stitching is extremely poor as described above, and no useful information can be obtained. At the same time, the other objective evaluation indicators are lower than those of the method of the present invention. Therefore, on the whole, the method of the present invention is better than other solutions.

[0158] In summary, the method of the present invention has greatly improved real-time performance, success rate, and result image quality compared with other methods, and can be applied to acoustic mapping of underwater robots and other aspects.

[0159] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that the features described in conjunction with a single embodiment may be used in other described embodiments.

Claims

1. An adaptive stitching method for multi-beam forward-looking sonar images, characterized in that: The collected sonar images are preprocessed by using threshold segmentation and median filtering to obtain the image region of interest; ORB feature extraction is performed on all image regions of interest to obtain multiple ORB feature points described by FAST corner points and BRIEF descriptors; the FAST corner points have directional attributes, and the BRIEF descriptors are binary code strings corresponding to the FAST corner points; For the regions of interest of two adjacent images, the region of interest of the first image is used as the reference image, and the region of interest of the other image is used as the image to be registered. The KNN algorithm is used to determine multiple neighbor matching ORB feature points of each ORB feature point in the reference image in the image to be registered, and then the Euclidean distance is calculated based on the binary code string to determine the final matching point of each ORB feature point in the reference image in the image to be registered, and multiple initial feature point pairs are obtained; Then, the RANSAC algorithm is used to screen the determined initial feature point pairs based on the homography matrix to obtain the final feature point pairs; The coordinates of the final feature point in the image to be registered are transformed relative to the reference image to obtain the coordinates of the final feature point in the image to be registered in the reference image; Based on the coordinates of the final feature point pair in the reference image, the reference image and the image to be registered are weighted fused to complete the image adaptive stitching.

2. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 1, characterized in that: The method to obtain the region of interest of an image is: A grayscale threshold is set, and the target area of ​​the sonar image is obtained based on the grayscale threshold. Then, a median filter is performed on the target area to filter out the salt and pepper noise, and the image region of interest based on the target area is obtained.

3. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 2, characterized in that: The method for obtaining the FAST corner points of the ORB feature points is as follows: Take any pixel point in the image's region of interest as the target pixel point P, and calculate the pixel points on the circumference with the target pixel point P as the center and the set distance r as the radius: Where I P is the pixel value of the target pixel, I K is the pixel value of the pixel point on the circumference, and T is the set gray value difference threshold; For each target pixel point P, if the number of CRF=1 is greater than the set number, the target pixel point P is taken as the FAST corner point.

4. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 3, characterized in that: The direction of the FAST corner point is calculated as: Set the neighborhood of the current FAST corner point to S and calculate the p+q order moment M of the neighborhood S p,q , p,q={0,1}: x ω is the X-axis coordinate of the pixel point in the neighborhood S, y ω is the Y-axis coordinate of the pixel point in the neighborhood S, f(x ω ,y ω ) is the gray value of the pixel; The centroid position C of the neighborhood S is: Then the direction θ of the current FAST corner point is: Where C y is the Y-axis coordinate of the center of mass position C, C x is the X-axis coordinate of the center of mass position C.

5. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 4, characterized in that: The method for obtaining the binary code string of FAST corner points is: With the FAST corner point as the center, a w×w-sized neighborhood W after Gaussian smoothing is selected, and n pairs of pixel points x are randomly selected in the neighborhood W. c1 and x c2 , set the binary comparison criterion: Where τ(W; x c1 ,x c2 ) is the binary comparison result, W(x c1 ) is the gray value of the pixel xc1 in the neighborhood W, W(x c2 ) is the pixel x in the neighborhood W c2 Gray value of Then the binary code string f of the FAST corner point n (W) is:

6. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 5, characterized in that: The method of using the KNN algorithm to determine the final matching point of each ORB feature point in the reference image in the image to be registered is: The KNN algorithm is used to first obtain multiple nearest neighbor matching ORB feature points in the image to be registered, and then the nearest neighbor matching ORB feature points and the second nearest neighbor matching ORB feature points among the multiple nearest neighbor matching ORB feature points are determined based on the BRIEF descriptor. The Euclidean distance des1 between the ORB feature point in the reference image and the nearest neighbor matching ORB feature point, and the Euclidean distance des2 between the ORB feature point in the reference image and the second nearest neighbor matching ORB feature point are calculated based on the binary code string. If des1 / des2<α, the nearest neighbor matching ORB feature point is used as the final matching point in the image to be registered to obtain the initial feature point pair; α is the weight factor, α∈[α1,α2], α1 is the lower limit of the weight factor, and α2 is the upper limit of the weight factor.

7. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 6, characterized in that: The method to obtain multiple initial feature point pairs is: If after completing a feature point matching for all ORB feature points in the reference image, the number of initial feature point pairs currently obtained does not reach the set number of feature point pairs, then a set step size is added to the current weight factor α to obtain a new weight factor, and the iteration is continued to further determine the initial feature point pairs; If the number of feature point pairs obtained within the set interval of the weight factor α reaches the set number of feature point pairs, the initial feature point pair matching is successful; otherwise, it is determined that the two adjacent image regions of interest do not meet the stitching standard and the stitching is exited.

8. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 7, characterized in that: The method to obtain the final feature point pair is: Using the RANSAC algorithm, four pairs of non-collinear initial feature point pairs are randomly selected from the initial feature point pairs as four pairs of inner point pairs, and the other initial feature point pairs are used as outer point pairs; Calculate the homography matrix of the four pairs of inner point pairs, test the matching degree between the homography matrix and each pair of outer point pairs, if the matching degree meets the preset matching threshold, add the corresponding outer point pair as the inner point pair; otherwise, remove the current outer point pair; finally, take all the inner point pairs obtained as the final feature point pairs, and obtain the optimal homography matrix from all the final feature point pairs.

9. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 8, characterized in that: The method to obtain the coordinates of the final feature points in the image to be registered in the reference image is: The optimal homography matrix is ​​denoted as H: where h ab represents the element in the ath row and bth column of the homography matrix H, where a=1, 2, 3; b=1, 2, 3; A 2×2 represents the affine transformation parameters, T 2×1 represents the translation transformation parameter, s0 represents the normalization parameter; The coordinates of the final feature points in the image to be registered in the reference image are: Where (x, y) is the two-dimensional pixel coordinates of the final feature point in the image to be registered in the image to be registered, and (x', y') is the two-dimensional pixel coordinates of the final feature point in the image to be registered in the reference image.

10. The method for adaptive stitching of multi-beam forward-looking sonar images according to claim 9, characterized in that: The method for weighted fusion of the reference image and the image to be registered is: First, based on the coordinates of the final feature point pair in the reference image, determine the overlapping area of ​​the reference image and the image to be registered after splicing, and calculate the pixel weight value α of each pixel in the overlapping area after splicing i : Where ω i is the column coordinate value of the pixel point in the overlapping area after splicing, ω l is the column coordinate value of the left boundary of the overlapping area after splicing, ω r The column coordinate value of the right boundary of the overlapping area after splicing; Set the pixel value of the overlapping area after stitching to f(x0,y0), and the pixel value of the overlapping area corresponding to the reference image before stitching to f1(x i ,y i ), the pixel value of the pixel point in the overlapping area corresponding to the image to be registered before stitching is f2(x i ,y i ), then: f(x0,y0)=f1(x i ,y i )*(1-α i )+f2(x i ,y i )*α i , Based on the pixel values ​​of the pixels in the overlapping area after stitching, if the current pixel in the overlapping area after stitching is an edge pixel, the current pixel is downsampled to obtain the secondary edge pixel as the edge point of the overlapping area for weighted fusion; otherwise, the current pixel is weighted fused until the stitching result image is obtained; For the pixel point q0 on the stitching seam of the stitching result image, the pixel average value within the preset centered neighborhood of the adjacent left pixel points of the pixel point q0 and the pixel average value within the preset centered neighborhood of the adjacent right pixel points of the pixel point q0 are calculated, and then the final average value is further calculated for the two calculated pixel average values, and assigned to the pixel point q0 to optimize the stitching seam; finally, an adaptive stitching image is obtained.

Citation Information

Cited By

  • Intelligent inspection system based on multi-modal image fusion

    CN121438041A

  • Intelligent inspection system based on multi-modal image fusion

    CN121438041B