Hu moment invariant underwater topographic image matching method and device based on outer spiral search strategy

CN116758316BActive Publication Date: 2026-08-21DALI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310803703.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2026-08-21
Estimated Expiration
2043-07-03

AI Technical Summary

Technical Problem

[0004]本发明的目的是为解决在噪声干扰严重的情况下,采用目前的水下地貌图像匹配方法存在的匹配精度及匹配效率低的问题,而提出了一种基于外螺旋搜索策略的Hu不变矩水下地貌图像匹配方法及设备

Benefits of technology

[0064] This invention proposes a Hu-invariant moment underwater geomorphological image matching method based on an external spiral search strategy. This method acquires a reference sub-image on a reference image through a traversal search and reduces the computational cost of image features by optimizing the search starting point, thereby reducing image matching time. Since the image information is incomplete due to the inconsistent rotation angle between the acquired real-time image and the reference sub-image, a circular template is introduced to perform circular template operation on the image, improving the stability of feature extraction and ensuring matching accuracy. Image features with translation, rotation, and scale invariance are selected to ensure the effectiveness and stability of feature extraction from the real-time image and the reference sub-image. The matching algorithm of this invention can improve image matching accuracy, reduce matching errors, and significantly improve matching efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116758316B_ABST
    Figure CN116758316B_ABST
Patent Text Reader

Abstract

The application discloses a Hu invariant moment underwater topographic image matching method and equipment based on an outer spiral search strategy, and belongs to the technical field of image matching.The application solves the problem of low matching precision and matching efficiency of the current underwater topographic image matching method in the case of serious noise interference.After the feature of a real-time image is extracted, a reference sub-image is acquired on a reference image through a traversal search mode, the feature of the first acquired reference sub-image is extracted, and position matching is performed according to the difference between the feature of the real-time image and the feature of the reference sub-image.Furthermore, the image feature with translation, rotation and scale invariance is selected, so that the effectiveness and stability of the feature extraction of the real-time image and the reference sub-image are ensured, and the image matching precision is ensured.Meanwhile, the calculation amount of the image feature is reduced by optimizing the search starting point, so that the image matching time is reduced.The method can be applied to underwater topographic image matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image matching technology, specifically relating to an underwater terrain image matching method and device. Background Technology

[0002] Inertial navigation (INS) systems are one of the main navigation methods for underwater vehicles, offering advantages such as all-weather capability, autonomy, and stealth. However, due to limitations in component technology, INS navigation and positioning errors accumulate over time, failing to meet precise navigation requirements after extended voyages. Therefore, external information is needed for auxiliary positioning. Underwater terrain matching navigation, due to its passive nature and lack of accumulated time errors, is often used as an auxiliary positioning method for underwater navigation. Underwater terrain matching is a method that uses geophysical information for matching. Real-time measured underwater terrain images are called real-time maps, and pre-stored underwater terrain images are called reference maps. The real-time map and the reference map are matched by sliding an image of the same size as the real-time map onto the reference map (a reference sub-map). The correlation between the reference sub-map and the real-time map is calculated, and the reference sub-map with the highest similarity (i.e., lowest difference) between its feature parameters and the real-time map is found. The position of this reference sub-map within the reference map is the result of the underwater terrain matching. However, under severe noise interference, the current matching methods have low accuracy and timeliness in underwater terrain image matching, and cannot meet the accuracy and real-time requirements of underwater vehicle positioning.

[0003] Therefore, how to accurately perform underwater terrain matching and improve the time efficiency of matching in the case of severe noise interference leading to low-quality images is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of this invention is to solve the problems of low matching accuracy and efficiency of current underwater terrain image matching methods under severe noise interference, and to propose a Hu invariant moment underwater terrain image matching method and device based on an external spiral search strategy.

[0005] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0006] A Hu invariant moment underwater geomorphological image matching method based on an external spiral search strategy, the method specifically includes the following steps:

[0007] Step 1: After preprocessing the acquired real-time image, extract features from the preprocessed real-time image to obtain the features of the real-time image.

[0008] Step 2: By traversing and searching the baseline graph, obtain a baseline subgraph of the same size as the real-time graph.

[0009] After each baseline subgraph is found, step three is executed.

[0010] Step 3: Determine whether the current baseline subgraph is being searched for the first time;

[0011] If the current benchmark subgraph is being searched for the first time, then the current benchmark subgraph is processed and then feature extraction is performed to obtain the features of the current benchmark subgraph, and then step four is executed.

[0012] If the current baseline subgraph is not the first time it has been searched, return to step two to continue the search;

[0013] Step 4: Calculate the difference between the real-time graph features and the current baseline subgraph features;

[0014] Step 5: Determine whether the difference calculated in Step 4 meets the threshold condition;

[0015] If the threshold condition is met, proceed to step six;

[0016] If the threshold condition is not met, it is determined whether the entire baseline map has been traversed and searched. If the entire baseline map has been traversed and searched, the baseline sub-map with the smallest difference from the real-time map is selected as the matching position among all the baseline sub-maps obtained during the traversal and search process; otherwise, if the entire baseline map has not been traversed and searched, it is returned to step two to continue the traversal and search.

[0017] Step 6: Obtain the neighboring benchmark subgraphs of the current benchmark subgraph, extract features from the obtained neighboring benchmark subgraphs, and then calculate the difference between the features of each neighboring benchmark subgraph and the features of the real-time graph.

[0018] Step 7: Select the smallest difference from all the differences calculated in Step 4 and Step 6, and determine whether the reference subgraph corresponding to the smallest difference is the neighborhood reference subgraph obtained in Step 6.

[0019] If the reference subgraph corresponding to the minimum difference is not the neighborhood reference subgraph obtained in step six, then the current reference subgraph position searched in step two will be used as the matching position.

[0020] Otherwise, if the reference subgraph corresponding to the minimum difference is the neighborhood reference subgraph obtained in step six, then the reference subgraph corresponding to the minimum difference is used as the current reference subgraph and step six is ​​returned to be executed.

[0021] Furthermore, the preprocessing of the acquired real-time image refers to performing grayscale transformation and template operations on the acquired real-time image sequentially.

[0022] Furthermore, the template operation uses a circular template.

[0023] Furthermore, the feature is the Hu invariant moment feature, and the Hu invariant moment feature is extracted as follows:

[0024] The p+q order geometric moments m of a two-dimensional image f(x,y) pq for:

[0025]

[0026] Where x is the horizontal coordinate of a pixel in the image, y is the vertical coordinate of a pixel in the image, and f(x,y) is the gray value of pixel (x,y).

[0027] Then the p+q order central moments μ of the two-dimensional image f(x,y) pq for:

[0028]

[0029] in, Let f(x,y) be the centroid coordinates of the two-dimensional image f(x,y).

[0030] The central moments of orders 0 to 3 can be expressed using geometric moments as follows:

[0031]

[0032]

[0033]

[0034]

[0035]

[0036]

[0037]

[0038]

[0039]

[0040]

[0041] Where, μ 00 μ is the 0th order central moment. 01 and μ 10 The first-order central moment, μ 02 μ 11 and μ 20 The second-order central moment, μ 03 μ 12 μ 21and μ 30 It is the third-order central moment;

[0042] Using zero-order center distance μ 00 The center distances of each order are normalized to obtain the normalized center distances η. pq :

[0043]

[0044] Where r = (p + q + 2) / 2;

[0045] According to η pq Construct Hu's invariant moment characteristics I1~I7:

[0046] I1=η 20 +η 02 (14)

[0047]

[0048] I3=(η 30 -3η 12 ) 2 +(η 03 -3η 21 ) 2 (16)

[0049] I4=(η 30 +η 12 ) 2 +(η 03 +η 21 ) 2 (17)

[0050] I5=(η 30 -3η 12 )(η 30 +η 12 )[(η 30 +η 12 ) 2 -3(η 03 +η 21 ) 2 ]+(3η 21 -η 03 )(η 21 +η 03 )[3(η 30 +η 21 ) 2 -(η 03 +η 21 ) 2 (18)

[0051] I6=(η 20 -η 02)[(η 30 +η 12 ) 2 -(η 03 +η 21 ) 2 ]+4η 11 (η 30 +η 12 )(η 03 +η 21 (19)

[0052] I7=(3η 21 -η 03 )(η 30 +η 12 )[(η 30 +η 12 ) 2 -3(η 03 +η 21 ) 2 ]+(3η 12 -η 30 )(η 21 +η 03 )[3(η 30 +η 12 ) 2 -(η 03 +η 21 ) 2 (20)

[0053] The Hu invariant moment characteristic matrix H of the image is constructed based on the invariant moments I1 to I7. m :

[0054] H m =(I1,I2,I3,I4,I5,I6,I7) (21)

[0055] Furthermore, the method of traversing and searching the reference map is an external spiral search, which starts from the selected initial reference submap position and searches outward in a clockwise or counterclockwise direction.

[0056] Furthermore, in step four, Euclidean distance is used to calculate the degree of difference.

[0057] Furthermore, the specific process of step four is as follows:

[0058]

[0059] Where d is the difference between the real-time graph features and the baseline subgraph features, I″1~I″7 are the Hu invariant moment features of the real-time graph, and I′1~I′7 are the Hu invariant moment features of the baseline subgraph.

[0060] Furthermore, the determination of whether the difference calculated in step four meets the threshold condition means determining whether the calculated difference is less than the set threshold Q. If the difference is less than the threshold Q, the condition is met; otherwise, the condition is not met.

[0061] A computer storage medium, characterized in that the storage medium stores at least one instruction, which is loaded and executed by a processor to implement the Hu invariant moment underwater terrain image matching method based on an external spiral search strategy.

[0062] The underwater geomorphic image matching device based on the external spiral search strategy includes a processor and a memory. The memory stores at least one instruction, which is loaded and executed by the processor to implement the underwater geomorphic image matching method based on the external spiral search strategy.

[0063] The beneficial effects of this invention are:

[0064] This invention proposes a Hu-invariant moment underwater geomorphological image matching method based on an external spiral search strategy. This method acquires a reference sub-image on a reference image through a traversal search and reduces the computational cost of image features by optimizing the search starting point, thereby reducing image matching time. Since the image information is incomplete due to the inconsistent rotation angle between the acquired real-time image and the reference sub-image, a circular template is introduced to perform circular template operation on the image, improving the stability of feature extraction and ensuring matching accuracy. Image features with translation, rotation, and scale invariance are selected to ensure the effectiveness and stability of feature extraction from the real-time image and the reference sub-image. The matching algorithm of this invention can improve image matching accuracy, reduce matching errors, and significantly improve matching efficiency. Attached Figure Description

[0065] Figure 1 This is a flowchart of the Hu invariant moment underwater landform image matching method based on the external spiral search strategy of the present invention;

[0066] Figure 2 As a baseline diagram;

[0067] Figure 3 For real-time graphs;

[0068] Figure 4 Image matching results;

[0069] Figure 5 This is a comparison chart before and after the template operation. Detailed Implementation

[0070] Specific Implementation Method 1: Combination Figure 1This embodiment describes a Hu invariant moment underwater geomorphological image matching method based on an external spiral search strategy. The method specifically includes the following steps:

[0071] Step 1: After preprocessing the acquired real-time image, extract features from the preprocessed real-time image to obtain the features of the real-time image.

[0072] Step 2: By traversing and searching the baseline graph, obtain a baseline subgraph of the same size as the real-time graph.

[0073] After each baseline subgraph is found, step three is executed.

[0074] Step 3: Determine whether the current baseline subgraph is being searched for the first time;

[0075] If the current benchmark subgraph is being searched for the first time, then the current benchmark subgraph is processed (templated) before feature extraction is performed to obtain the features of the current benchmark subgraph, and then step four is executed.

[0076] If the current baseline subgraph is not the first time it has been searched, return to step two to continue the search;

[0077] Step 4: Calculate the difference between the real-time graph features and the current baseline subgraph features;

[0078] Step 5: Determine whether the difference calculated in Step 4 meets the threshold condition;

[0079] If the threshold condition is met, proceed to step six;

[0080] If the threshold condition is not met, it is determined whether the entire baseline map has been traversed and searched. If the entire baseline map has been traversed and searched, the baseline sub-map with the smallest difference from the real-time map is selected as the matching position among all the baseline sub-maps obtained during the traversal and search process; otherwise, if the entire baseline map has not been traversed and searched, it is returned to step two to continue the traversal and search.

[0081] Step 6: Obtain the neighboring benchmark subgraphs of the current benchmark subgraph, extract features from the obtained neighboring benchmark subgraphs, and then calculate the difference between the features of each neighboring benchmark subgraph and the features of the real-time graph.

[0082] Step 7: Select the smallest difference from all the differences calculated in Step 4 and Step 6, and determine whether the reference subgraph corresponding to the smallest difference is the neighborhood reference subgraph obtained in Step 6.

[0083] If the reference subgraph corresponding to the minimum difference is not the neighborhood reference subgraph obtained in step six, then the current reference subgraph position searched in step two will be used as the matching position.

[0084] Otherwise, if the reference subgraph corresponding to the minimum difference is the neighboring reference subgraph obtained in step six, then the reference subgraph corresponding to the minimum difference is used as the current reference subgraph and step six is ​​executed again until the difference between the current reference subgraph and its neighboring reference subgraph is the minimum.

[0085] The matching target in this embodiment is underwater sonar images. Moreover, this invention can achieve good matching results even when the image is heavily contaminated with noise.

[0086] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that the preprocessing of the acquired real-time image refers to performing grayscale transformation and template operations on the acquired real-time image sequentially.

[0087] The other steps and parameters are the same as in Specific Implementation Method 1.

[0088] Specific Implementation Method Three: Combination Figure 5 This embodiment is described below. The difference between this embodiment and specific embodiments one or two is that the template operation uses a circular template.

[0089] Because the real-time image and the reference image were acquired at different times and angles, an angular difference exists between them, affecting the image feature extraction results. Therefore, a circular template is introduced to process the real-time image. The grayscale values ​​of pixels within the circular template are retained, and only pixels inside the inscribed circle of the square image are extracted. The grayscale values ​​of the remaining pixels in the real-time image are set to zero (i.e., completely black), effectively converting the real-time image into a circular template. The same processing is applied to the reference sub-image in step three. Pixels with zero grayscale values ​​do not affect the results when calculating image features, thus reducing the impact of image rotation on image feature extraction and improving the stability of feature extraction.

[0090] Other steps and parameters are the same as in specific implementation method one or two.

[0091] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that the feature described is the Hu invariant moment feature, and the extraction method of the Hu invariant moment feature is as follows:

[0092] The p+q order geometric moments m of a two-dimensional image f(x,y) pq for:

[0093]

[0094] Where x is the horizontal coordinate of a pixel in the image, y is the vertical coordinate of a pixel in the image, and f(x,y) is the gray value of pixel (x,y).

[0095] Zeroth order geometric moment m 00The mass of the target region is represented by the first moment m. 10 m 01 Denotes the centroid of the target region, and the second moment m. 20 m 11 m 02 The radius of rotation of the target region, and the third moment m 30 m 21 m 12 m 03 It indicates the orientation and inclination of the target area, reflecting the distortion of the target.

[0096] If the graph function f(x,y) is a piecewise continuous bounded function, then there exist moments of all orders, and the sequence of moments {m} is such that... pq The matrix {m} is uniquely determined by f(x,y), and the corresponding f(x,y) is also determined by the moment sequence {m}. pq It is uniquely determined.

[0097] When the image f(x,y) changes through translation, rotation or scaling, the geometric moments in equation (1) may change. Therefore, it is necessary to construct Hu moments with invariance based on the geometric moments. The invariant feature can be achieved through the central moment.

[0098] Then the p+q order central moments μ of the two-dimensional image f(x,y) pq for:

[0099]

[0100] in, Let f(x,y) be the centroid coordinates of the two-dimensional image f(x,y).

[0101] The distribution of image gray levels relative to the gray level centroid can be determined by the central moment μ. pq To reflect this. The 0th to 3rd order central moments are expressed using geometric moments as follows:

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108]

[0109]

[0110]

[0111]

[0112] Where, μ 00 μ is the 0th order central moment. 01 and μ 10 The first-order central moment, μ 02 μ 11 and μ 20 The second-order central moment, μ 03 μ 12 μ 21 and μ 30 It is the third-order central moment;

[0113] The center distance μ is calculated using the centroid of the target region in the image. pq , equivalent to m pq The center of the centroid is shifted to the centroid of the image, regardless of the location of the target region. Therefore, the center distance is invariant to image translation.

[0114] To address the scale invariance of the center distance, the zero-order center distance μ is used. 00 The center distances of each order are normalized to obtain the normalized center distances η. pq :

[0115]

[0116] Where r = (p + q + 2) / 2;

[0117] As can be seen from the above, the zeroth moment represents the mass of the target region. Therefore, if the scale of the target region changes, its zeroth central moment will obviously change accordingly, making the moment scale invariant.

[0118] By using second- and third-order normalized center distances, seven invariant moments are derived, maintaining translation and scale invariance while also possessing rotational invariance, i.e., according to η pq Construct Hu's invariant moment characteristics I1~I7:

[0119] I1=η 20 +η 02 (14)

[0120] I2=(η 20 -η 02 ) 2 +4η1 2 1 (15)

[0121] I3=(η 30 -3η 12 ) 2+(the 03 -3rd 21 ) 2 (16)

[0122] I4=(η 30 +n 12 ) 2 +(the 03 +n 21 ) 2 (17)

[0123] I5=(η 30 -3rd 12 )(or 30 +n 12 )[(or 30 +n 12 ) 2 -3(h 03 +n 21 ) 2 ]+(3rd 21 -or 03 )(or 21 +n 03 )[3(h 30 +n 21 ) 2 -(or 03 +n 21 ) 2 ] (18)

[0124] I6=(η 20 -or 02 )[(or 30 +n 12 ) 2 -(or 03 +n 21 ) 2 ]+4th 11 (or 30 +n 12 )(or 03 +n 21 ) (19)

[0125] I7=(3rd 21 -or 03 )(or 30 +n 12 )[(or 30 +n 12 ) 2 -3(h 03 +n 21 ) 2 ]+(3rd 12 -or 30 )(or 21 +n 03)[3(η 30 +η 12 ) 2 -(η 03 +η 21 ) 2 (20)

[0126] The seven invariant moments remain unchanged during image scaling, translation, and rotation. The Hu invariant moment characteristic matrix H of the image is constructed based on the invariant moments I1 to I7. m :

[0127] H m =(I1,I2,I3,I4,I5,I6,I7) (21)

[0128] The other steps and parameters are the same as those in one of the specific implementation methods one to three.

[0129] Specific Implementation Method Five: This implementation method differs from Specific Implementation Methods One to Four in that the method of traversing and searching the reference map is an external spiral search. The external spiral search starts from the selected initial reference sub-map position and searches outward in a clockwise or counterclockwise direction.

[0130] The method of searching outwards in a clockwise direction is as follows:

[0131] Step 1: Shift the entire reference sub-image to the right. After shifting the reference sub-image to the right by one pixel, determine whether the reference sub-image obtained by shifting the right-shifted reference sub-image down by one pixel has been searched.

[0132] If it has been searched, then determine whether the right-shifted reference subgraph has reached the right boundary. If it has not reached the right boundary, continue to move to the right. Otherwise, if it has reached the right boundary or has not been searched (either of the two conditions must be met), then shift the current right-shifted reference subgraph downwards as a whole.

[0133] Step 2: Whenever the reference sub-image is shifted down by one pixel, determine whether the resulting reference sub-image, obtained by shifting the shifted reference sub-image down by one pixel to the left, has been searched.

[0134] If it has been searched, determine whether the current downward-shifted reference subgraph has reached the lower boundary. If it has not reached the lower boundary, continue to move downward. Otherwise, if it has reached the lower boundary or has not been searched, shift the entire current downward-shifted reference subgraph to the left.

[0135] Step 3: Whenever the reference sub-image is shifted one pixel to the left, determine whether the reference sub-image obtained by shifting the left-shifted reference sub-image upward by one pixel has been searched.

[0136] If it has been searched, determine whether the left-shifted reference subgraph has reached the left boundary. If it has not reached the left boundary, continue to shift left. Otherwise, if it has reached the left boundary or has not been searched, shift the entire left-shifted reference subgraph upwards.

[0137] Step 4: Whenever the reference sub-image is shifted upward by one pixel, determine whether the resulting reference sub-image, obtained by shifting the shifted reference sub-image upward by one pixel to the right, has been searched.

[0138] If it has been searched, determine whether the current upward-shifted reference subgraph has reached the upper boundary. If it has not reached the upper boundary, continue to move upward. Otherwise, if it has reached the upper boundary or has not been searched, shift the entire upward-shifted reference subgraph to the right.

[0139] Step 5: Repeat steps 1 to 4 until the baseline is reached. Figure 4 The search is complete when all the pixels at the top corners have been visited.

[0140] During the first iteration, steps 1 through 4 are executed. Step 1 involves moving right from the starting point. Starting from the second iteration, the subsequent iteration continues the search from the position of the baseline subgraph at the end of the previous iteration.

[0141] During the iteration process, after each translation step, a reference subgraph is obtained, and step three is performed using the obtained reference subgraph.

[0142] The method of searching outwards in a counter-clockwise direction is as follows:

[0143] Step 1: Shift the entire reference sub-image to the right. After shifting the reference sub-image to the right by one pixel, determine whether the resulting reference sub-image, after shifting the right-shifted reference sub-image upward by one pixel, has been searched.

[0144] If it has been searched, determine whether the right-shifted reference subgraph has reached the right boundary. If it has not reached the right boundary, continue to move to the right. Otherwise, if it has reached the right boundary or has not been searched, shift the entire right-shifted reference subgraph upwards.

[0145] Step 2: Whenever the reference sub-image is shifted upward by one pixel, determine whether the resulting reference sub-image, after shifting the shifted reference sub-image upward by one pixel to the left, has been searched.

[0146] If it has been searched, determine whether the current upward-shifted reference subgraph has reached the upper boundary. If it has not reached the upper boundary, continue to move upward. Otherwise, if it has reached the upper boundary or has not been searched, shift the entire upward-shifted reference subgraph to the left.

[0147] Step 3: Whenever the reference sub-image is shifted one pixel to the left, determine whether the reference sub-image obtained by shifting the left-shifted reference sub-image down one pixel has been searched.

[0148] If it has been searched, determine whether the left-shifted reference subgraph has reached the left boundary. If it has not reached the left boundary, continue to shift left. Otherwise, if it has reached the left boundary or has not been searched, shift the entire left-shifted reference subgraph downwards.

[0149] Step 4: Whenever the reference sub-image is shifted down by one pixel, determine whether the resulting reference sub-image, after shifting down by one pixel to the right, has been searched.

[0150] If it has been searched, determine whether the lower boundary has been reached. If the lower boundary has not been reached, continue to move down. Otherwise, if the lower boundary has been reached or it has not been searched, shift the entire baseline subgraph that has been shifted down to the right.

[0151] Step 5: Repeat steps 1 to 4 until the baseline is reached. Figure 4 The search is complete when all the pixels at the top corners have been visited.

[0152] During the first iteration, steps 1 through 4 are executed. Step 1 involves moving right from the starting point. Starting from the second iteration, the subsequent iteration continues the search from the position of the baseline subgraph at the end of the previous iteration.

[0153] During the iteration process, after each translation step, a reference subgraph is obtained, and step three is performed using the obtained reference subgraph.

[0154] The search starting point is selected by the user. If the real-time image is close to the center of the reference image, the center point of the reference image is selected as the search starting point; if the real-time image is close to the upper left of the reference image, the upper left vertex of the reference image is selected as the search starting point (i.e., the upper left corner vertex of the reference sub-image of the starting point coincides with the upper left corner vertex of the reference image), and so on for other vertices. Since the real-time images are acquired sequentially, this invention assumes that the distance between two consecutively acquired real-time images is the shortest. Therefore, the search starting point for matching other than the initial matching is the position output by the previous matching. By optimizing the search starting point, the computational load of image features is reduced, thereby reducing the image matching time.

[0155] The other steps and parameters are the same as those in one of the specific implementation methods one to four.

[0156] Alternatively, the present invention can use the following traversal search method:

[0157] Select an initial position for the reference subimage, where the top-left corner of the reference subimage coincides with the top-left corner of the reference image. Starting from this initial position, shift the entire reference subimage to the right until it reaches the right boundary of the reference image. Then, shift the entire reference subimage downwards one pixel from its initial position. Next, shift the shifted reference subimage to the right again until it reaches the right boundary of the reference image. Repeat this downward and rightward shifting process until the reference subimage reaches its right boundary. Figure 4 The search ends when all the pixels at the top corners have been visited.

[0158] Specific Implementation Method Six: This implementation method differs from Specific Implementation Methods One to Five in that Euclidean distance is used to calculate the difference in step four.

[0159] The other steps and parameters are the same as those in one of the specific implementation methods one to five.

[0160] Specific Implementation Method Seven: This implementation method differs from Specific Implementation Methods One through Six in that the specific process of step four is as follows:

[0161]

[0162] Where d is the difference between the real-time graph features and the baseline subgraph features, I1″~I7″ are the Hu invariant moment features of the real-time graph, and I1′~I7′ are the Hu invariant moment features of the baseline subgraph.

[0163] The other steps and parameters are the same as those in one of the specific implementation methods one to six.

[0164] Specific Implementation Method Eight: This implementation method differs from Specific Implementation Methods One through Seven in that, in the judgment step four, whether the calculated difference degree meets the threshold condition refers to judging whether the calculated difference degree is less than a set threshold Q. If the difference degree is less than the threshold Q, the condition is met; otherwise, the condition is not met. The threshold Q can be set according to actual circumstances.

[0165] Specific Implementation Method Nine: This implementation method is a computer storage medium that stores at least one instruction. The at least one instruction is loaded and executed by a processor to implement the Hu invariant moment underwater landform image matching method based on the external spiral search strategy.

[0166] It should be understood that the instructions include computer program products, software, or computerized methods corresponding to any method described in this invention; the instructions can be used to program computer systems or other electronic devices. Computer storage media may include readable media on which instructions are stored, and may include, but are not limited to, magnetic storage media, optical storage media; magneto-optical storage media include read-only memory (ROM), random access memory (RAM), erasable programmable memory (e.g., EPROM and EEPROM), and flash memory layers, or other types of media suitable for storing electronic instructions.

[0167] Specific Implementation Method 10: This implementation method is a Hu invariant moment underwater terrain image matching device based on an external spiral search strategy. The device includes a processor and a memory. It should be understood that this includes any device described in this invention that includes a processor and a memory. The device may also include other units and modules that perform display, interaction, processing, control, and other functions through signals or instructions.

[0168] The memory stores at least one instruction, which is loaded and executed by the processor to implement the Hu invariant moment underwater geomorphological image matching method based on the external spiral search strategy.

[0169] Example

[0170] This embodiment presents a Hu invariant moment underwater geomorphological image matching method based on an external spiral search strategy, comprising: preprocessing the acquired real-time image by grayscale conversion and circular template operation, and extracting image features. While searching the reference image, the reference sub-image is simultaneously subjected to circular template operation and image features are extracted. Euclidean distance is used to measure the difference between the real-time image and the reference sub-image. If the difference meets a threshold, the traversal is temporarily stopped. Then, using the matching result as the center, the Hu invariant moment features are calculated for the eight neighboring reference sub-images. It is determined whether the minimum Euclidean distance is at the center point. If it is at the center point, the matching condition is met and the matching is completed; otherwise, the minimum value is updated as the center point, and the difference between the eight neighboring reference sub-images and the real-time image is calculated again until the minimum value is at the center point, at which point the matching position is confirmed.

[0171] The method for obtaining the eight neighboring reference sub-images is as follows: taking the searched reference sub-image as the center, shift the entire searched reference sub-image one pixel to the right to obtain the first neighboring reference sub-image. Shift the entire first neighboring reference sub-image one pixel upward to obtain the second neighboring reference sub-image. Shift the entire searched reference sub-image one pixel upward to obtain the third neighboring reference sub-image. Shift the entire third neighboring reference sub-image one pixel to the left to obtain the fourth neighboring reference sub-image. Shift the entire searched reference sub-image one pixel to the left to obtain the fifth neighboring reference sub-image. Shift the entire fifth neighboring reference sub-image one pixel downward to obtain the sixth neighboring reference sub-image. Shift the entire searched reference sub-image one pixel downward to obtain the seventh neighboring reference sub-image. Shift the entire seventh neighboring reference sub-image one pixel to the right to obtain the eighth neighboring reference sub-image.

[0172] A matching experiment was conducted using underwater terrain sonar images as an example. Real-time images acquired at different times exhibited different features and angle variations, and the images also suffered from severe noise. This embodiment addresses this issue by employing a Hu invariant moment underwater terrain image matching method based on an external spiral search strategy. The specific process is as follows:

[0173] Step 1: Preprocess the acquired real-time image, including grayscale transformation, circular template operation, and extraction of Hu invariant moment features.

[0174] Step 2: Perform an external spiral search on the baseline map to obtain a baseline sub-map of the same size as the real-time map.

[0175] Step 3: Perform circular template processing on the baseline subgraph and extract Hu invariant moment features;

[0176] Step 4: Calculate the difference between the real-time graph features and the baseline subgraph features using Euclidean distance;

[0177] Step 5: Determine if the difference meets the threshold. If it does, proceed to Step 6; otherwise, determine if the baseline image has been fully traversed. If so, select the position with the smallest difference between the real-time image feature and the baseline subimage from the global traversal results as the matching result; otherwise, proceed to Step 2 to continue traversing.

[0178] Step 6: Extract the Hu invariant moment features of the neighborhood subgraphs of the baseline subgraph and calculate the difference between them and the Hu invariant moment features of the real-time graph;

[0179] Step 7: Determine if the point of minimum difference is located at the reference subgraph. If it is, use the reference subgraph location as the matching location; otherwise, update the subgraph with the minimum difference as the new reference subgraph and proceed to Step 6.

[0180] This invention performs underwater terrain image matching, ensuring accurate image matching while improving time efficiency. The reference image is as follows: Figure 2 As shown, the real-time graph is as follows Figure 3 As shown, the matched image is as follows Figure 4 As shown.

[0181] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A Hu invariant moment underwater geomorphological image matching method based on an external spiral search strategy, characterized in that, The method specifically includes the following steps: Step 1: After preprocessing the acquired real-time image, feature extraction is performed on the preprocessed real-time image to obtain the features of the real-time image, which are Hu invariant moment features. Step 2: Obtain a reference sub-map of the same size as the real-time map by traversing and searching the reference map; the traversal and search method of the reference map is an external spiral search, which starts from the selected initial reference sub-map position and searches outward in a clockwise or counterclockwise direction; After each baseline subgraph is found, step three is executed. Step 3: Determine whether the current baseline subgraph is being searched for the first time; If the current benchmark subgraph is being searched for the first time, then the current benchmark subgraph is processed and then feature extraction is performed to obtain the features of the current benchmark subgraph, and then step four is executed. If the current baseline subgraph is not the first time it has been searched, return to step two to continue the search; Step 4: Calculate the difference between the real-time graph features and the current baseline subgraph features; Step 5: Determine whether the difference calculated in Step 4 meets the threshold condition; If the threshold condition is met, proceed to step six; If the threshold condition is not met, it is determined whether the entire baseline map has been traversed and searched. If the entire baseline map has been traversed and searched, the baseline sub-map with the smallest difference from the real-time map is selected as the matching position among all the baseline sub-maps obtained during the traversal and search process; otherwise, if the entire baseline map has not been traversed and searched, it is returned to step two to continue the traversal and search. Step 6: Obtain the neighboring benchmark subgraphs of the current benchmark subgraph, extract features from the obtained neighboring benchmark subgraphs, and then calculate the difference between the features of each neighboring benchmark subgraph and the features of the real-time graph. Step 7: Select the smallest difference from all the differences calculated in Step 4 and Step 6, and determine whether the reference subgraph corresponding to the smallest difference is the neighborhood reference subgraph obtained in Step 6. If the reference subgraph corresponding to the minimum difference is not the neighborhood reference subgraph obtained in step six, then the current reference subgraph position searched in step two will be used as the matching position. Otherwise, if the reference subgraph corresponding to the minimum difference is the neighborhood reference subgraph obtained in step six, then the reference subgraph corresponding to the minimum difference is used as the current reference subgraph and step six is ​​returned to be executed.

2. The underwater geomorphological image matching method based on an external spiral search strategy according to claim 1, characterized in that, The preprocessing of the acquired real-time image refers to performing grayscale transformation and template operations on the acquired real-time image sequentially.

3. The underwater geomorphological image matching method based on an external spiral search strategy according to claim 2, characterized in that, The template operation uses a circular template.

4. The underwater geomorphological image matching method based on an external spiral search strategy according to claim 3, characterized in that, The method for extracting Hu invariant moment features is as follows: Two-dimensional image of Order geometric moments for: (1) in, The x-coordinate of a pixel in the image. y is the ordinate of a pixel in the image. It is a pixel grayscale value; Two-dimensional image of order central moments for: (2) in, Represented as a two-dimensional image The coordinates of the centroid, , ; Will The first central moment can be expressed using geometric moments as follows: (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) in, The central moment is of order 0. and The first-order central moment, , and The central moment is second order. , , and It is the third-order central moment; Using zero-order center distance The center distances of each order are normalized to obtain the normalized center distances of each order. : (13) in, ; according to Constructing Hu invariant moment characteristics : (14) (15) (16) (17) (18) (19) (20) According to invariant moments Constructing the Hu invariant moment eigenma matrix of the image : (21)。 5. The underwater geomorphological image matching method based on an external spiral search strategy according to claim 4, characterized in that, In step four, Euclidean distance is used to calculate the difference.

6. The underwater geomorphological image matching method based on an external spiral search strategy according to claim 5, characterized in that, The specific process of step four is as follows: in, It is the degree of difference between the features of the real-time graph and the features of the baseline subgraph. It is the Hu invariant moment feature of the real-time graph. It is the Hu invariant moment feature of the baseline subgraph.

7. The underwater geomorphological image matching method based on an external spiral search strategy according to claim 6, characterized in that, The determination step four, whether the calculated difference meets the threshold condition, means determining whether the calculated difference is less than the set threshold Q. If the difference is less than the threshold Q, the condition is met; otherwise, the condition is not met.

8. A computer storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the Hu invariant moment underwater geomorphological image matching method based on an external spiral search strategy as described in any one of claims 1 to 7.

9. A Hu invariant moment underwater terrain image matching device based on an external spiral search strategy, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction, which is loaded and executed by the processor to implement a Hu invariant moment underwater geomorphological image matching method based on an external spiral search strategy as described in any one of claims 1 to 7.