Real-time obstacle sensing method for sonar image
By performing frame alignment and signal-to-noise ratio filtering on sonar images, extracting multi-dimensional features and combining them with a dynamic tracking mechanism, the problems of frame misalignment and noise interference in obstacle perception of sonar images were solved, achieving high-precision obstacle recognition and real-time perception.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-10
AI Technical Summary
Existing sonar image obstacle perception methods are easily affected by carrier swaying and water flow fluctuations during underwater operations, resulting in time-series image frame misalignment and noise interference, affecting the accuracy of feature extraction and making it difficult to adapt to complex aquatic environments.
By performing inter-frame alignment and signal-to-noise ratio filtering on time-series sonar image streams, multi-dimensional features of suspected obstacle regions are extracted. Similarity matching is performed in conjunction with an obstacle feature database, and a dynamic tracking mechanism is activated in the medium confidence level region. Secondary feature optimization matching is performed in conjunction with aquatic environmental parameters to generate a real-time obstacle distribution map.
It significantly improves the accuracy of obstacle recognition, reduces the risk of misjudgment and missed judgment, and provides timely and comprehensive obstacle information support to ensure the safety and efficiency of underwater operations.
Smart Images

Figure CN121640260A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sonar image processing, more particularly, it relates to a sonar image obstacle real-time perception method. BACKGROUND
[0002] In the fields of underwater navigation, ocean resource exploration, port channel monitoring, etc., the sonar image obstacle real-time perception technology plays a vital role. It generates images by receiving sonar signals reflected by underwater targets, providing underwater environment information for operators to ensure operation safety and efficiency. With the continuous expansion of underwater operation scenarios, problems such as silt interference in shallow sea estuaries, signal attenuation in deep sea complex terrain, and random motion of dynamic obstacles have become increasingly prominent, posing higher requirements for the real-time, accuracy and environmental adaptability of sonar image obstacle perception.
[0003] However, existing sonar image obstacle perception methods mostly rely on static feature extraction and matching of single images. Due to the influence of carrier sway and water flow fluctuation during underwater operation of sonar equipment, time-series images have frame misalignment problems. Meanwhile, water scattering effects produce a large amount of noise, reducing the image signal-to-noise ratio and directly affecting the accuracy of feature extraction, which further leads to deviations in subsequent recognition. Although some methods introduce simple noise filtering mechanisms, they lack systematic preprocessing procedures for time-series images, which cannot improve data quality from the source and are difficult to adapt to complex water image acquisition environments. SUMMARY
[0004] In view of the deficiencies in the prior art, the purpose of the present application is to provide a sonar image obstacle real-time perception method.
[0005] To achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0006] A sonar image obstacle real-time perception method, the method comprising the following steps:
[0007] Collecting a time-series sonar image stream of the target water area, performing inter-frame alignment processing on the time-series sonar image stream, and screening out effective sonar images with a signal-to-noise ratio meeting a preset threshold;
[0008] Extracting suspected obstacle regions in the effective sonar images, obtaining morphological features, gray distribution features and texture features of the suspected obstacle regions to form a suspected feature database;
[0009] Performing similarity matching between the suspected feature database and standard features in the obstacle feature database to obtain a feature matching degree, and judging an obstacle confidence level of the suspected obstacle region according to the feature matching degree to obtain an obstacle confidence level one;
[0010] If the obstacle confidence level is higher than the first confidence threshold, the confirmed obstacle region is directly marked, and the real-time position coordinates and characteristic parameters thereof are recorded;
[0011] If the obstacle confidence level is less than the second confidence threshold, the non-obstacle region is determined and eliminated;
[0012] If the obstacle confidence level is between the second confidence threshold and the first confidence threshold, a dynamic tracking mechanism is started, the trajectory fitting of the suspected obstacle region in the continuous frames of the time-series sonar image stream is performed to obtain the motion trend parameters;
[0013] The suspected obstacle region is matched for secondary feature optimization in combination with the motion trend parameters and the water environment parameters to obtain the second obstacle confidence level, and the confirmed obstacle region is obtained according to the second obstacle confidence level;
[0014] The real-time distribution map of the water obstacle is output in combination with the real-time position coordinates, the characteristic parameters and the motion trend parameters of the confirmed obstacle region, and the real-time perception of the obstacle in the sonar image is performed according to the real-time distribution map of the water obstacle.
[0015] Preferably, the time-series sonar image stream of the target water area is collected, the time-series sonar image stream is processed for inter-frame alignment, and the effective sonar image with a signal-to-noise ratio satisfying a preset threshold is screened out, specifically including:
[0016] The real-time detection angle, the detection depth and the transmission power of the sonar detection device are obtained as dynamic detection parameters, and the spatial offset of the adjacent frame sonar images is calculated according to the dynamic detection parameters;
[0017] The time-series sonar image stream is aligned between frames based on the spatial offset, the image misalignment caused by the change of the detection angle is eliminated, the signal-to-noise ratio of each sonar image after alignment is calculated, if the signal-to-noise ratio is greater than or equal to the preset threshold, the effective sonar image is determined, if the signal-to-noise ratio is less than the preset threshold, the signal-to-noise ratio is recalculated until the preset threshold is satisfied or the maximum processing number is reached to obtain the effective sonar image.
[0018] Preferably, the suspected obstacle region in the effective sonar image is extracted, the morphological features, the gray distribution features and the texture features of the suspected obstacle region are obtained to form a suspected feature database, specifically including:
[0019] The effective sonar image is binarized to determine the foreground region and the background region;
[0020] The isolated noise points in the foreground region are eliminated, and the connected region with an area greater than a preset area threshold is extracted, and the connected region is marked as the suspected obstacle region;
[0021] Multi-scale sampling is performed on the suspected obstacle region, and morphological features, gray distribution features and texture features are extracted at each scale respectively;
[0022] The morphological features include area, perimeter, circularity, rectangularity and boundary complexity of the region;
[0023] The gray distribution features include mean, variance, histogram peak and entropy of the gray value;
[0024] The texture features include energy, contrast, correlation and homogeneity based on the gray level co-occurrence matrix;
[0025] The morphological features, texture features and gray distribution features are fused to obtain a suspected feature database.
[0026] Preferably, the features of the suspected obstacle region are matched with the standard features in the obstacle feature database to obtain a feature matching degree, and the obstacle confidence level is determined according to the feature matching degree to obtain an obstacle confidence level I, which specifically includes:
[0027] The single feature similarity between the morphological features, gray distribution features and texture features of the suspected obstacle region and each standard feature in the obstacle feature database is calculated to obtain a similarity feature set;
[0028] The weight coefficients are set according to the contribution of each feature to obstacle recognition, and the comprehensive feature matching degree is obtained by weighting the similarity feature set and the corresponding weight coefficients;
[0029] If the comprehensive feature matching degree is greater than a first confidence threshold, the obstacle confidence level is determined as a high confidence level;
[0030] If the first confidence threshold is greater than or equal to the comprehensive feature matching degree and less than or equal to a second confidence threshold, the obstacle confidence level is determined as a medium confidence level;
[0031] If the comprehensive feature matching degree is less than the second confidence threshold, the obstacle confidence level is determined as a low confidence level;
[0032] The high confidence level, medium confidence level and low confidence level are fused to obtain the obstacle confidence level I.
[0033] Preferably, the obstacle feature database includes standard morphological feature sets, standard gray distribution feature sets and standard texture feature sets of typical obstacles in different water environments.
[0034] Preferably, if the obstacle confidence level I is between the second confidence threshold and the first confidence threshold, a dynamic tracking mechanism is started, and the motion trend parameters are obtained by trajectory fitting on the suspected obstacle region in the continuous frames of the time-series sonar image stream, which specifically includes:
[0035] taking the center coordinates of the suspected obstacle region as a tracking state quantity; in successive frames of the time-series sonar image stream, tracking the position change of the suspected obstacle region through a tracking model, recording the center coordinates of each frame to obtain coordinate nodes;
[0036] performing trajectory fitting on the coordinate nodes to obtain a motion trajectory dataset, and calculating a velocity vector and an acceleration vector based on the motion trajectory dataset, the velocity vector, the acceleration vector, and a trajectory curvature being taken as motion trend parameters.
[0037] Preferably, the suspected obstacle region is subjected to secondary feature optimization matching to obtain an obstacle confidence level two in combination with the motion trend parameters and water area environment parameters, specifically including:
[0038] collecting the flow velocity, flow direction, and water temperature of the target water area as the water area environment parameters, and correcting the velocity vector in the motion trend parameters according to the flow velocity and flow direction to obtain an actual motion vector;
[0039] inputting the actual motion vector, the acceleration vector, the trajectory curvature, and the water area environment parameters into a preset feature optimization model to correct the original features of the suspected obstacle region to obtain optimized features;
[0040] re-performing similarity matching of the optimized features and standard features in an obstacle feature database to calculate an optimized comprehensive feature matching degree to obtain the obstacle confidence level two.
[0041] Preferably, a confirmed obstacle region is obtained according to the obstacle confidence level two, specifically including:
[0042] if the obstacle confidence level two is higher than or equal to a second confidence threshold, the region is marked as a confirmed obstacle region;
[0043] if the obstacle confidence level two is lower than the second confidence threshold, the region is determined as a false obstacle region and is eliminated.
[0044] Preferably, an obstacle real-time distribution map is generated in combination with the real-time position coordinates, feature parameters, and motion trend parameters of the confirmed obstacle region, specifically including:
[0045] establishing a three-dimensional coordinate system with the position of the sonar detection device as the origin, and converting the real-time position coordinates of all the confirmed obstacle regions into spatial coordinates in the three-dimensional coordinate system;
[0046] determining the obstacle types according to the feature parameters of the confirmed obstacle regions, and giving different visual identifiers, and combining the spatial coordinates, the obstacle types, and the motion trend parameters to draw the real-time positions, contours, and motion trajectories of the obstacles in the three-dimensional coordinate system to generate a water area obstacle real-time distribution map;
[0047] If the spatial distance of any two obstacles is less than the safety distance threshold, a pre-warning prompt is triggered, and real-time obstacle perception is completed.
[0048] Compared with the prior art, the present application has the following beneficial effects: by performing inter-frame alignment and signal-to-noise ratio screening on the time-series sonar image stream, the quality of the input data is effectively improved, laying a solid foundation for subsequent accurate identification; by extracting multi-dimensional features of the shape, gray distribution and texture of the suspected obstacle region, and constructing a perfect obstacle feature database for similarity matching, the comprehensiveness of feature description and the reliability of matching are greatly enhanced; by starting a dynamic tracking mechanism for the medium confidence level suspected region, and combining with the water environment parameters for secondary feature optimization matching, the deep fusion of static features and dynamic features, image information and environmental information is realized, the misjudgment and omission risk of single frame image recognition is significantly reduced, and the accuracy of obstacle recognition is improved; by constructing a real-time obstacle distribution atlas in a three-dimensional coordinate system, the position, type and motion trajectory of the obstacle are intuitively presented, and the safety distance pre-warning mechanism is integrated, which can provide timely and comprehensive obstacle information support for underwater operation or navigation, and ensure operation safety and efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0049] Fig. 1 A step schematic diagram of a sonar image obstacle real-time perception method is proposed for the present application;
[0050] Fig. 2 A step schematic diagram of forming a suspected feature database in a sonar image obstacle real-time perception method is proposed for the present application;
[0051] Fig. 3 A step schematic diagram of obtaining obstacle confidence level two in a sonar image obstacle real-time perception method is proposed for the present application. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0053] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from the description, and those skilled in the art can make similar generalizations without departing from the concept of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0054] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an embodiment that is separate or selectively excluded from other embodiments.
[0055] Referring to Figs. 1-3 as shown.
[0056] Embodiment one further illustrates a method for real-time obstacle perception of sonar images according to the present application.
[0057] A method for real-time obstacle perception of sonar images, the method comprising the following steps:
[0058] Collecting a time-series sonar image stream of a target water area, performing inter-frame alignment processing on the time-series sonar image stream, and screening out effective sonar images with a signal-to-noise ratio meeting a preset threshold;
[0059] Extracting a suspected obstacle region in the effective sonar image, obtaining morphological features, gray distribution features and texture features of the suspected obstacle region to form a suspected feature database;
[0060] Performing similarity matching between the suspected feature database and standard features in an obstacle feature database to obtain a feature matching degree, and judging an obstacle confidence level of the suspected obstacle region according to the feature matching degree to obtain an obstacle confidence level one;
[0061] If the obstacle confidence level one is higher than a first confidence threshold, the suspected obstacle region is directly marked as a confirmed obstacle region, and its real-time position coordinates and feature parameters are recorded;
[0062] If the obstacle confidence level one is less than a second confidence threshold, the suspected obstacle region is determined as a non-obstacle region and is eliminated;
[0063] If the obstacle confidence level one is between the second confidence threshold and the first confidence threshold, a dynamic tracking mechanism is started, trajectory fitting is performed on the suspected obstacle region in consecutive frames of the time-series sonar image stream to obtain motion trend parameters;
[0064] Combined with the motion trend parameters and water environment parameters, secondary feature optimization matching is performed on the suspected obstacle region to obtain an obstacle confidence level two, and a confirmed obstacle region is obtained according to the obstacle confidence level two;
[0065] Combined with the real-time position coordinates, feature parameters and motion trend parameters of the confirmed obstacle region, a real-time distribution map of water area obstacles is output, and real-time perception of obstacles in the sonar image is performed according to the real-time distribution map of water area obstacles.
[0066] Collecting a time-series sonar image stream of a target water area, performing inter-frame alignment processing on the time-series sonar image stream, and screening out effective sonar images with a signal-to-noise ratio meeting a preset threshold, specifically comprising:
[0067] By obtaining real-time detection angles, detection depths and transmission powers of a sonar detection device as dynamic detection parameters, spatial offsets of adjacent frame sonar images are calculated according to the dynamic detection parameters;
[0068] The time-series sonar image stream is aligned frame by frame based on the spatial offset, the image misalignment caused by the change of the detection angle is eliminated, the signal-to-noise ratio of each sonar image after alignment is calculated, if the signal-to-noise ratio is greater than or equal to a preset threshold, it is determined as an effective sonar image; if the signal-to-noise ratio is less than the preset threshold, the signal-to-noise ratio is recalculated until the preset threshold is met or the maximum processing number is reached to obtain an effective sonar image.
[0069] The target water area is continuously detected by the sonar detection device, and the key dynamic detection parameters of the device are captured in real time, including the detection angle, the detection depth and the transmission power. The detection angle determines the horizontal and vertical direction of the sonar beam in the water area. For example, when the sonar device moves with the underwater robot, its detection angle may deviate from the north direction to the northeast direction due to the turning of the robot. The detection depth reflects the underwater level of the sonar beam focus, for example, the depth may be maintained at 10 meters when detecting in shallow water area, and adjusted to 500 meters when detecting in deep water. The transmission power affects the propagation distance and intensity of the sonar signal, and usually increases the power to enhance the signal penetration when facing turbid water, providing a key physical basis for subsequent calculation of image offset.
[0070] Since the detection angle, depth and other parameters of the sonar detection device change in real time during the work process, the water area covered by adjacent frame images deviates, and if direct subsequent analysis is performed, it will seriously affect the recognition accuracy. For example, the detection angle of the current frame sonar device is 30 degrees, and the detection depth is 20 meters. The next frame changes the detection angle to 32 degrees due to the shaking of the carrier, and the detection depth remains 20 meters. At this time, according to the angle difference of the two frames, combined with the detection distance parameter of the sonar, the horizontal direction pixel value of the two frames is calculated by geometric operation, and the pixel value is the spatial offset of adjacent frames. Then, the time-series image stream is aligned frame by frame through the image registration algorithm, the next frame image is translated and rotated according to the calculated offset for geometric correction, so that the positions of the same water area targets in adjacent frame images remain consistent, thereby completely eliminating the image misalignment problem caused by the change of the detection angle and other factors, and ensuring the spatial continuity of the image sequence.
[0071] After inter-frame alignment, the signal-to-noise ratio (SNR) of each sonar image is calculated and filtered to retain high-quality, valid images. SNR is a key indicator of sonar image quality, reflecting the ratio of target signal to background noise in the image. The higher the SNR, the clearer the target features in the image, which is more conducive to subsequent obstacle recognition. Conversely, a large amount of noise in a low SNR image will mask the target features, leading to recognition errors. At this point, a pre-set SNR threshold is set and adjusted according to the environmental complexity of the detected water area. For example, in clear nearshore waters with less noise interference, the threshold can be set to 20 dB, while in estuary areas with high sediment content and stronger noise, the threshold can be reduced to 15 dB. After calculating the SNR of each aligned image, it is compared with the preset threshold. If the image SNR is greater than or equal to the preset threshold, it indicates that the image quality meets the standard and is directly determined as a valid sonar image and enters the subsequent processing flow.
[0072] If the signal-to-noise ratio (SNR) of an image is less than a preset threshold, a repetitive processing mechanism is initiated to obtain valid images. Since some low SNR images may be caused by instantaneous noise interference, recalculating or optimizing the calculation method may improve their SNR. The SNR calculation algorithm is then called again to perform secondary or even multiple calculations on the image. Different noise suppression strategies may be used during the calculation process, such as smoothing the image before recalculating the SNR. After each recalculation, the new SNR result is compared with the preset threshold. If it reaches the threshold, it is marked as a valid image. If, after multiple recalculations, the SNR still does not reach the preset threshold, and the number of processing times has reached the maximum number of processing times set by the system, the processing of the image will stop, and it will be judged as an invalid image and discarded. Through a rigorous screening process, it is ensured that the sonar images entering the subsequent feature extraction stage all have high quality, providing a solid guarantee for the accuracy of the entire obstacle perception method.
[0073] Extract suspected obstacle regions from valid sonar images, and obtain their morphological features, grayscale distribution features, and texture features, specifically including:
[0074] Binarization of the effective sonar image is used to determine the foreground and background regions;
[0075] By eliminating isolated noise points in the foreground region and extracting connected regions with an area greater than a preset area threshold, the connected regions are marked as suspected obstacle regions.
[0076] Multi-scale sampling is performed on suspected obstacle areas, and morphological features, grayscale distribution features, and texture features are extracted at each scale.
[0077] The morphological features include region area, perimeter, circularity, rectangularity, and boundary complexity;
[0078] The gray-level distribution features include gray-level mean, gray-level variance, gray-level histogram peak value, and gray-level entropy.
[0079] The texture features include energy, contrast, correlation, and homogeneity based on the gray-level co-occurrence matrix;
[0080] A database of suspected features is obtained by fusing morphological features, texture features, and grayscale distribution features.
[0081] Because there is a significant difference in grayscale between obstacles and the water background in sonar images, by setting a grayscale threshold, pixels with grayscale values higher than the threshold are marked as foreground pixels, and those lower than the threshold are marked as background pixels. This results in an image containing only black and white values, clearly separating the foreground and background regions. For example, in a sonar image of a shipwreck, the grayscale value of the shipwreck area is relatively high. After setting a threshold of 120, all pixels with grayscale values ≥120 constitute the foreground area, intuitively presenting the approximate outline of the shipwreck.
[0082] The binarized foreground region often contains isolated noise points, which are mostly generated by sonar signal interference. If left untreated, this can lead to subsequent recognition errors. Therefore, morphological filtering algorithms are used to eliminate isolated noise points. First, the foreground region is eroded to remove small noise points, and then dilated to restore the complete shape of the foreground region. After processing, connected component analysis algorithms are used to extract connected regions in the foreground, which are continuous regions connected by pixels through specific neighborhood relationships. A preset area threshold is set, such as 50 pixels based on the size of common small obstacles. Connected regions with an area greater than this threshold are marked as suspected obstacle regions, while regions with too small an area are judged as residual noise and removed. Taking a reef sonar image as an example, after processing, continuous regions with an area of 80 pixels are marked, while scattered regions with an area of 30 pixels are filtered out.
[0083] To comprehensively capture the features of suspected obstacle areas, a multi-scale sampling strategy was adopted, extracting features at the original scale, a 0.8x reduced scale, and a 1.2x magnified scale to avoid missing key information at a single scale. At each scale, morphological features were first extracted, including region area, perimeter, circularity, rectangularity, and boundary complexity. The region area is the total number of pixels within the region, and the perimeter is the length of the region's boundary pixels. Circularity is calculated using 4π × area / perimeter², with a value closer to 1 indicating a more rounded region. For example, the circularity of a buoy is close to 0.9, while that of a reef is as low as 0.3. Rectangularity is the ratio of the region area to the area of the smallest bounding rectangle, reflecting the degree to which the region fits the rectangle. Boundary complexity is measured by the sum of the curvature changes of the boundary pixels, with the boundary complexity of shipwreck debris being much higher than that of regular buoys.
[0084] Gray-scale distribution characteristics describe regional features from the perspective of pixel gray-scale statistics, including gray-scale mean, variance, histogram peak value, and entropy. The gray-scale mean is the average gray-scale value of all pixels in the region, reflecting the overall brightness of the region. Variance reflects the dispersion of gray-scale values; the variance is smaller in uniform areas inside obstacles and larger in boundary areas. The gray-scale histogram peak value is the gray-scale value that appears most frequently in the histogram, which can distinguish between metal and rock obstacles. Gray-scale entropy reflects the degree of disorder in gray-scale distribution; the higher the entropy value, the more complex the gray-scale changes in the region. For example, the entropy value of a reef covered with algae is higher than that of a smooth metal shipwreck.
[0085] Texture features are extracted using a gray-level co-occurrence matrix (GLCM), which reflects the gray-level relationship between two pixels at specific distances and angles in an image. Energy, contrast, correlation, and homogeneity are calculated from this matrix. Energy reflects the uniformity of the texture; the more regular the texture, the higher the energy, such as the surface energy of a buoy being higher than that of a reef. Contrast reflects the clarity of the texture; the higher the value, the more obvious the texture. Correlation measures the degree of association between the gray levels of adjacent pixels; continuous regions have high correlation. Homogeneity reflects the fineness of the texture; a higher value indicates a more uniform texture. The three types of features at each scale are summarized, and the average value of each scale is taken as the final result for the same feature. For example, the roundness in the morphological feature is the average of the results calculated at the three scales, ensuring the stability of the features.
[0086] The processed morphological features, grayscale distribution features, and texture features are fused to form a suspected feature database. During the fusion process, each feature is normalized to eliminate the influence of differences in the dimensions of different features. Each suspected obstacle region corresponds to a feature vector and is stored in the database, laying a solid foundation for subsequent matching and comparison with standard obstacle features. This ensures that the target feature information can be fully utilized in subsequent identification steps, thereby improving the accuracy of obstacle judgment.
[0087] The feature matching score is obtained by comparing the features of the suspected obstacle region with the standard features in the obstacle feature database. Based on the feature matching score, the obstacle confidence level of the suspected obstacle region is determined, resulting in obstacle confidence level one. Specifically, this includes:
[0088] The similarity feature set is obtained by calculating the morphological features, gray-scale distribution features, and texture features of the suspected obstacle region and the single feature similarity of each standard feature in the obstacle feature database;
[0089] Weighting coefficients are set according to the contribution of each feature to obstacle recognition, and the similarity feature set is weighted and judged with the corresponding weighting coefficients to obtain the comprehensive feature matching degree.
[0090] If the overall feature matching degree is greater than the first confidence threshold, the obstacle confidence level is determined to be high confidence level;
[0091] If the first confidence threshold is greater than or equal to the comprehensive feature matching degree and less than or equal to the second confidence threshold, the obstacle confidence level is determined to be medium confidence level;
[0092] If the overall feature matching degree is less than the second confidence threshold, the obstacle confidence level is determined to be low confidence level;
[0093] The obstacle confidence level 1 is obtained by fusing the high confidence level, medium confidence level, and low confidence level.
[0094] Feature matching and confidence level determination are the core steps connecting the extraction of suspected obstacle regions and the final identification results. The core logic is to output an accurate confidence evaluation by quantifying the similarity between suspected features and standard features, combined with the differences in feature importance. Before matching, a standard feature database containing typical water obstacles such as reefs, shipwrecks, and abandoned fishing nets is constructed. Each obstacle type in the standard feature database corresponds to a set of morphological, gray-scale distribution, and texture feature benchmark values that have been trained and optimized with a large number of samples, providing a reliable reference for similarity calculation. Matching is carried out from a single feature dimension, calculating the single feature similarity between the three types of features of the suspected obstacle region and each standard feature in the database, forming a comprehensive similarity feature set.
[0095] Single feature similarity calculation selects the appropriate method based on the attributes of different features. For numerical features such as region area and grayscale mean, the absolute difference between the suspected feature and the standard feature is calculated, and then the difference value is converted into a similarity between 0 and 1. The closer the value is to 1, the higher the matching degree. For dimensionless features such as roundness and contrast, the cosine similarity method is used to measure the directional consistency of the feature vectors, and the standardized similarity result is obtained in the same way. Taking the suspected reef area as an example, its morphological features have an area of 820 pixels and a roundness of 0.72, which is similar to the numerical similarity between the suspected and standard features. Compared to the standard features of the reef in the reservoir, which have an area of 800 pixels and a roundness of 0.75, the calculated area similarity is 0.97 and the roundness similarity is 0.96. In terms of grayscale distribution features, the mean grayscale value is 135 and the variance is 42, with similarities of 0.98 and 0.95 respectively compared to the standard values of 132 and 45. In terms of texture features, the energy is 0.08 and the correlation is 0.82, with similarities of 0.94 and 0.97 respectively compared to the standard values of 0.09 and 0.80. These single feature similarities together constitute the similarity feature set of this region.
[0096] Because different features contribute significantly to obstacle recognition, directly averaging the similarity of a single feature can weaken key information. By training on historical recognition data, the role of various features in distinguishing between obstacles and non-obstacles, and between different obstacle types, is analyzed. Weight coefficients are assigned to the three categories of features and their sub-features. Among the morphological features, roundness and rectangularity effectively distinguish the irregular shapes of reefs from the regular shapes of buoys, with a weight coefficient of 0.35. Among the grayscale distribution features, grayscale entropy and histogram peak value are crucial for distinguishing between metal shipwrecks and rocks, with a weight coefficient of 0.3. Among the texture features, contrast and homogeneity play a prominent role in identifying flexible obstacles such as abandoned fishing nets, with a weight coefficient of 0.35. Sub-features are further weighted under the category weights; for example, roundness accounts for 0.4 of the weight in the morphological features.
[0097] The comprehensive feature matching degree is calculated by weighting the similarity feature set with its corresponding weight coefficients. The formula is the sum of the products of the similarity of each individual feature and its corresponding weight. Taking a suspected reef area as an example, its circularity similarity is 0.96 multiplied by a weight of 0.14, its grayscale entropy similarity is 0.95 multiplied by a weight of 0.09, and its contrast similarity is 0.94 multiplied by a weight of 0.105. The sum of all sub-feature calculation results yields a comprehensive feature matching degree of 0.96. The level is determined based on a preset two-level confidence threshold. The first confidence threshold is typically set to 0.9, and the second confidence threshold is set to 0.7. The system is divided into three confidence levels: high, medium, and low. A suspected reef area with a match score of 0.96 (greater than 0.9) is classified as high confidence. If the overall match score of a suspected area is 0.82 (between 0.7 and 0.9), it is classified as medium confidence. An area with a match score of 0.65 is classified as low confidence. The quantitative evaluations corresponding to each confidence level are integrated to form an obstacle confidence level 1, which includes a level label and a match score value. This provides a clear basis for subsequent accurate identification or dynamic tracking decisions, avoiding misjudgments in high confidence areas and reserving space for further verification in medium confidence areas.
[0098] The obstacle feature database includes standard morphological feature sets, standard grayscale distribution feature sets, and standard texture feature sets of typical obstacles in different aquatic environments.
[0099] If the obstacle confidence level is between the second confidence threshold and the first confidence threshold, a dynamic tracking mechanism is activated to perform trajectory fitting on the suspected obstacle region in consecutive frames of the time-series sonar image stream to obtain motion trend parameters, specifically including:
[0100] The center coordinates of the suspected obstacle area are used as the tracking state variable; in the continuous frames of the time-series sonar image stream, the position change of the suspected obstacle area is tracked by the tracking model, and the center coordinates of each frame are recorded to obtain the coordinate nodes;
[0101] A motion trajectory dataset is obtained by fitting the coordinate nodes. Based on the motion trajectory dataset, the velocity vector and acceleration vector are calculated, and the velocity vector, acceleration vector and trajectory curvature are used as motion trend parameters.
[0102] When the confidence level of a suspected obstacle region falls between the second confidence threshold and the first confidence threshold, it indicates that the static features of a single frame image cannot achieve accurate identification. At this point, a dynamic tracking mechanism is activated. By analyzing the motion characteristics of the target in consecutive frames, the judgment basis is supplemented, improving the accuracy of blurry region identification. Dynamic tracking treats the suspected region as a moving target and continuously locks its position in the time-series image stream, extracting motion patterns and providing dynamic parameter support for secondary feature optimization matching. Based on the accurate tracking of the target position, through trajectory fitting and parameter calculation, the final output is a trend parameter that reflects the essence of the target's motion, forming a fusion judgment system of static and dynamic features.
[0103] Determining the tracking state variables is the initial step in dynamic tracking, providing a clear benchmark for subsequent location positioning. The center coordinates of the suspected obstacle area are used as the core tracking state variables. The center coordinates are calculated by determining the pixel distribution of the area. For a marked connected area of a suspected obstacle, the x and y coordinates of all pixels in the area are counted, and the average of the x and y coordinates is calculated. The two are combined to form the center coordinates of the area, which are expressed in the form of pixel coordinates (x, y).
[0104] In a time-series sonar image stream, a mature tracking model is used to achieve continuous localization of suspected regions, recording coordinate nodes to form a position sequence. Commonly used tracking models include Kalman filtering, which achieves dynamic tracking through two steps: prediction and updating. First, based on the center coordinates and motion state of the previous frame, the possible position of the target in the current frame is predicted. Then, combined with the image detection results of the current frame, the predicted position is corrected to obtain accurate center coordinates. Taking a time-series image stream of 10 frames per second as an example, the center coordinates of the suspected region are locked in the first frame (55, 85). The coordinates of the second frame are predicted to be (56, 86) by Kalman filtering. Combined with the image detection results of the second frame, the coordinates are corrected to (56.2, 85.8). The coordinate recording of consecutive frames is completed in sequence, and finally a dataset of coordinate nodes containing multiple sets (frame number, x coordinate, y coordinate) is obtained.
[0105] Trajectory fitting is a crucial step in transforming discrete coordinate nodes into continuous motion trajectories, providing a foundation for parameter calculation. Polynomial fitting is employed to process the coordinate nodes, eliminating minor fluctuations in single-frame coordinates and resulting in a smooth motion trajectory dataset. Polynomial fitting constructs a polynomial function with frame number as the independent variable and coordinate values as the dependent variable, ensuring the function curve closely approximates all coordinate nodes. For example, performing quadratic polynomial fitting on the coordinate nodes of 10 consecutive frames yields the x-direction coordinate function x(t) = 0.2t + 55 and the y-direction coordinate function y(t) = 0.1t + 85, where t is the frame number. These two functions together constitute the motion trajectory model of the suspected region. The fitted trajectory not only visually presents the target's motion path but also allows for precise extraction of motion feature parameters through functions such as differentiation.
[0106] Based on the fitted motion trajectory dataset, three core motion trend parameters—velocity vector, acceleration vector, and trajectory curvature—are calculated. The velocity vector, obtained from the first derivative of the trajectory function with respect to time, reflects the speed and direction of the target's motion. Combined with the frame interval, pixel velocity can be converted to actual water velocity. For example, in the above trajectory, the x-direction velocity is 0.2 pixels / frame. Using the mapping relationship between sonar image pixels and actual distance (1 pixel = 0.5 meters) and a frame interval of 0.1 seconds, the actual velocity is calculated to be 1 meter / second, with the direction aligned with the positive x-axis, forming a velocity vector of (1, 0) meters / second. The acceleration vector, calculated from the second derivative of the trajectory function, reflects the rate of change of velocity. If the velocity is constant, the acceleration vector is (0, 0). The trajectory curvature is obtained by calculating the curvature value at each point on the trajectory, reflecting the degree of change in the direction of motion. The curvature is 0 for straight-line motion, while a larger curvature value indicates a more pronounced turn during curved motion. These motion trend parameters characterize the motion characteristics of suspected areas from different dimensions, providing crucial dynamic basis for subsequent secondary matching with environmental parameters, effectively improving the accuracy of blurry area identification.
[0107] Combining motion trend parameters and aquatic environment parameters, a secondary feature optimization matching is performed on the suspected obstacle area to obtain obstacle confidence level two, specifically including:
[0108] The water flow velocity, flow direction, and water temperature of the target water area are collected as water environment parameters. The velocity vector in the motion trend parameter is corrected according to the water flow velocity and flow direction to obtain the actual motion vector.
[0109] The actual motion vector, acceleration vector, trajectory curvature and aquatic environment parameters are input into a preset feature optimization model to correct the original features of the suspected obstacle area and obtain optimized features.
[0110] The optimized features are re-matched with the standard features in the obstacle feature database to calculate the similarity, and the optimized comprehensive feature matching degree is used to obtain the obstacle confidence level two.
[0111] When the suspected obstacle area is at the medium confidence level, a single static feature and preliminary dynamic features are insufficient for accurate judgment. It is necessary to combine aquatic environmental parameters for secondary feature optimization and matching. By correcting feature deviations through the correlation between environment and motion, the recognition credibility is improved. Incorporating underwater environmental factors into the judgment system makes the feature description more in line with the actual scenario, providing a more accurate basis for the final recognition.
[0112] The three core indicators that affect the movement of obstacles by collecting aquatic environmental parameters are water flow velocity, water flow direction, and water temperature. These three core indicators are captured in real time by environmental sensors mounted on sonar equipment. Among them, water flow velocity and direction directly determine the movement state of floating obstacles, while water temperature indirectly affects the propagation of sonar signals by affecting water density, thereby affecting the accuracy of feature extraction.
[0113] The core of correcting motion trend parameters is to eliminate water flow interference to obtain the actual motion vector of the obstacle. The velocity vector obtained by dynamic tracking is the resultant velocity of the obstacle's own motion and the water flow. The true motion state is separated by vector decomposition. Vector subtraction is used to subtract the water flow velocity vector from the resultant velocity vector obtained by tracking, and the correction is completed by combining the directional difference. For example, the tracking velocity vector of a suspected floating object is 1.2 meters per second due east, while the water flow velocity vector is 0.5 meters per second due east. After calculation, the actual motion vector is 0.7 meters per second due east. This result accurately reflects the motion characteristics of the floating object itself and avoids the problem of misjudging the influence of water flow as the motion of the obstacle itself.
[0114] The feature optimization model has been trained with a large number of samples to establish the correlation between motion parameters, environmental parameters and feature deviations. The corrected actual motion vector, acceleration vector, trajectory curvature, and collected water flow velocity, direction and water temperature parameters are simultaneously input into the feature optimization model to make targeted corrections to deviations in the original features. For example, the gray-scale distribution unevenness caused by water flow disturbance will be adjusted in combination with the water flow direction; the morphological feature deformation caused by motion blur will be corrected based on the actual motion vector to adjust the boundary complexity parameters.
[0115] After feature optimization, a secondary similarity matching process is initiated. The corrected optimized features are compared with standard features in the corresponding aquatic environment in the obstacle feature database. Using the same weighted calculation method as the initial matching, the optimized comprehensive feature matching degree is obtained by combining the weights of each feature, and then converted into obstacle confidence level two. If the initial matching confidence level of the suspected area is medium confidence level, the optimized comprehensive matching degree increases from 0.82 to 0.93, exceeding the first confidence threshold, and is judged as high confidence level. If the optimized matching degree drops to 0.65, it is judged as low confidence level. By optimizing and improving the recognition accuracy of areas upgraded to medium confidence level, the misjudgment and missed judgment are effectively reduced, providing a reliable guarantee for the final obstacle confirmation.
[0116] The obstacle area is confirmed based on obstacle confidence level 2, specifically including:
[0117] If the obstacle confidence level 2 is higher than or equal to the second confidence threshold, it is marked as an area with a confirmed obstacle.
[0118] If the obstacle confidence level 2 is lower than the second confidence threshold, it is determined to be a false obstacle area and is removed.
[0119] The obstacle confidence level 2 is the core judgment criterion after static feature optimization and dynamic feature fusion. Through clear threshold comparison rules, the suspected area after secondary optimization is accurately divided into confirmed obstacle area and false obstacle area. This ensures that no real obstacles are missed and effectively eliminates false targets formed by various interferences, providing accurate target data for the subsequent output of water obstacle distribution map.
[0120] The core role and setting logic of the second confidence threshold are clearly defined. This threshold is the critical standard for distinguishing between real obstacles and false targets. Its value is dynamically adjusted in combination with the environmental complexity of the target water area, the detection accuracy of the sonar equipment, and the actual application requirements. For example, in the scenario of waterway monitoring where safety requirements are high, the second confidence threshold is 0.65 to avoid the risk of missed detection. In the scenario of marine resource exploration, the second confidence threshold is 0.7 to reduce subsequent investigation costs and ensure that the marked obstacle area has a high degree of authenticity.
[0121] When the obstacle confidence level 2 is higher than or equal to the second confidence threshold, the suspected area is directly marked as a confirmed obstacle area. The confirmed obstacle area is supported by high confidence through multiple verifications. From the initial static feature extraction and preliminary matching, to dynamic tracking to obtain motion trend parameters, and then to secondary feature optimization by combining water environment parameters, each step continuously corrects feature deviations and improves matching accuracy. Taking a suspected area in a port area as an example, its initial matching confidence level 1 is 0.78, which is in the medium confidence range. After starting dynamic tracking, parameters such as velocity vector and trajectory curvature are obtained. Combined with the water flow speed of 0.3 meters per second in the water area to complete feature optimization, the final confidence level 2 is 0.83, which is higher than the set threshold of 0.7. At this time, it is determined to be a confirmed obstacle area. After on-site verification, the area was confirmed to be an abandoned small cargo ship.
[0122] While marking and confirming obstacle areas, the attribute information of these areas is archived simultaneously. The attribute information includes complete feature parameters after secondary optimization, such as corrected circularity, grayscale entropy, and texture contrast; motion trend parameters recorded during dynamic tracking; for stationary obstacles such as reefs, the acceleration vector is zero and the trajectory curvature remains constant; and precise location information obtained by mapping sonar image coordinates to actual geographic coordinates, presented as a combination of latitude, longitude, and water depth data. The attribute information archive not only provides data for the subsequent construction of obstacle distribution maps, but also lays the foundation for subsequent extended applications such as obstacle type identification and risk assessment.
[0123] If the obstacle confidence level is lower than the second confidence threshold, the area is determined to be a false obstacle area and is removed. The formation of such areas can be due to various reasons, such as artifacts caused by sonar signals encountering water turbulence, temporary targets formed by the gathering of fish and aquatic organisms, or interference areas that remain after multiple rounds of equipment noise processing. This effectively filters out invalid targets, ensuring that system resources are concentrated on the subsequent processing of real obstacles and improving the overall operating efficiency of the sensing system.
[0124] By combining the real-time location coordinates, feature parameters, and motion trend parameters of the confirmed obstacle area, a real-time obstacle distribution map is generated, specifically including:
[0125] A three-dimensional coordinate system is established with the location of the sonar detection equipment as the origin, and the real-time position coordinates of all confirmed obstacle areas are converted into spatial coordinates in the three-dimensional coordinate system.
[0126] Based on the characteristic parameters of the confirmed obstacle area, the obstacle type is determined and different visual identifiers are assigned. Combining spatial coordinates, obstacle type and motion trend parameters, the real-time position, outline and motion trajectory of each obstacle are drawn in the three-dimensional coordinate system to generate a real-time distribution map of water obstacles.
[0127] If the spatial distance between any two obstacles is less than the safe distance threshold, an early warning will be triggered, thus completing real-time obstacle detection.
[0128] By combining multi-dimensional information on the identified obstacle area, a real-time distribution map is generated, thereby transforming scattered obstacle data into intuitive and usable spatial visualization results and enabling risk warning. Using a three-dimensional coordinate system as a spatial carrier, key information on the location, type, and movement status of obstacles is integrated, which not only meets the needs of real-time monitoring but also provides accurate decision-making basis for underwater navigation or operations.
[0129] The establishment of a three-dimensional coordinate system is the foundation for achieving spatial positioning of obstacles. Taking the real-time position of the sonar detection device as the origin, a three-dimensional spatial system conforming to the right-hand coordinate system rule is constructed. The X-axis and Y-axis form a horizontal plane, corresponding to the east-west and north-south directions of the water area, respectively. The Z-axis is perpendicular to the horizontal plane and represents the underwater depth, with the unit being meters. The coordinate system centered on the detection device can quickly calculate the spatial position of obstacles relative to the device, facilitating real-time adjustment of the detection strategy.
[0130] Obstacle type determination and visual identification are based on the characteristic parameters of the identified obstacle area and compared with the type characteristics in the obstacle feature database. Each type of obstacle is assigned a unique visual identifier, such as a red spherical icon for buoys, a gray irregular polygon for reefs, and a brown ship-shaped icon for shipwrecks. The differences in color and shape enable rapid differentiation.
[0131] Obstacle information is plotted in a three-dimensional coordinate system to generate a real-time distribution map. During the plotting process, the icons of each obstacle are first positioned according to their spatial coordinates. Then, the morphological data in the feature parameters are combined to outline the general contours of the obstacles, with the contour size scaled proportionally to the actual dimensions. For moving obstacles, the predicted trajectory within the next 5 seconds is plotted using dashed lines based on the velocity vector and trajectory curvature in the motion trend parameters, and the direction of motion is marked. For example, if the spatial coordinates of the sunken ship are (30, 22, 10) and the velocity vector is 0.1 m / s northwest, a brown ship-shaped icon is plotted at the corresponding position in the map, its size and contour are marked, and its trajectory is presented as a dashed line in the northwest direction, making it easy for operators to clearly understand its dynamics.
[0132] The risk warning mechanism is an important extension to ensure the practicality of perception. A safe distance threshold is set in advance, which is determined according to the sonar detection range and underwater operation requirements. For example, in the underwater robot navigation scenario, the safe distance threshold is set to 5 meters. During the map generation process, the spatial straight-line distance between any two obstacles is calculated in real time. The actual distance is obtained by taking the square root of the sum of the squares of the coordinate differences using the spatial distance formula. If the spatial distance between the reef and the sunken ship is detected to be 3.2 meters, which is less than the safe distance threshold of 5 meters, an early warning is immediately triggered. The two obstacles are highlighted with a flashing red border in the map, accompanied by an audible and visual alarm signal, reminding the operator to take timely obstacle avoidance or course adjustment measures.
[0133] The real-time distribution map is dynamically refreshed as the sequential sonar image stream is updated, and the processing results of each frame of the image are synchronously updated in the map to ensure that the position and movement status information of obstacles are consistent with the actual situation. By combining dynamic updates with real-time early warning, operators can have a comprehensive and timely grasp of the distribution of obstacles and the risk status in the target water area, and finally achieve real-time and accurate perception of obstacles in sonar images, providing strong support for the safe conduct of various underwater activities.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of real-time obstacle perception for sonar images, characterized in that, The method comprises the following steps: Collecting a time-series sonar image stream of a target water area, performing inter-frame alignment processing on the time-series sonar image stream, and screening effective sonar images with a signal-to-noise ratio meeting a preset threshold; Extracting a suspected obstacle region in the effective sonar image, obtaining morphological features, gray distribution features and texture features of the suspected obstacle region to form a suspected feature database; Performing similarity matching on the suspected feature database and standard features in an obstacle feature database to obtain a feature matching degree, judging an obstacle confidence level of the suspected obstacle region according to the feature matching degree to obtain an obstacle confidence level one; If the obstacle confidence level one is higher than a first confidence threshold, the suspected obstacle region is directly marked as a confirmed obstacle region, and real-time position coordinates and feature parameters thereof are recorded; If the obstacle confidence level one is less than a second confidence threshold, the suspected obstacle region is determined as a non-obstacle region and is eliminated; If the obstacle confidence level one is between the second confidence threshold and the first confidence threshold, a dynamic tracking mechanism is started, trajectory fitting is performed on the suspected obstacle region in continuous frames of the time-series sonar image stream to obtain motion trend parameters; Combining the motion trend parameters and water environment parameters, secondary feature optimization matching is performed on the suspected obstacle region to obtain an obstacle confidence level two, and a confirmed obstacle region is obtained according to the obstacle confidence level two; Real-time distribution map of water area obstacles is output by combining real-time position coordinates, feature parameters and motion trend parameters of the confirmed obstacle region, and real-time sensing of obstacles in the sonar image is performed according to the real-time distribution map of the water area obstacles. 2.The method according to claim 1, wherein, Collecting a time-series sonar image stream of a target water area, performing inter-frame alignment processing on the time-series sonar image stream, and screening effective sonar images with a signal-to-noise ratio meeting a preset threshold, specifically comprising: Obtaining real-time detection angle, detection depth and transmission power of a sonar detection device as dynamic detection parameters, and calculating spatial offset of adjacent frames of sonar images according to the dynamic detection parameters; Performing inter-frame alignment on the time-series sonar image stream based on the spatial offset, eliminating image misplacement caused by changes in the detection angle, calculating signal-to-noise ratio of each sonar image after alignment, and determining that the sonar image is an effective sonar image if the signal-to-noise ratio is greater than or equal to a preset threshold; If the signal-to-noise ratio is less than the preset threshold, the signal-to-noise ratio is recalculated until the preset threshold is met or the maximum number of processing times is reached to obtain the effective sonar image. 3.The method according to claim 2, wherein, Extracting a suspected obstacle region in the effective sonar image, obtaining morphological features, gray distribution features and texture features of the suspected obstacle region to form a suspected feature database, specifically comprising: Performing binary judgment on the effective sonar image to obtain a foreground region and a background region; Eliminating isolated noise points in the foreground region, and extracting connected regions with an area greater than a preset area threshold, and marking the connected regions as suspected obstacle regions; Performing multi-scale sampling on the suspected obstacle region, and extracting morphological features, gray distribution features and texture features at each scale; The morphological features include region area, perimeter, circularity, rectangularity and boundary complexity; The gray distribution features include gray mean value, gray variance, gray histogram peak value and gray entropy; The texture features include energy, contrast, correlation and homogeneity based on a gray level co-occurrence matrix; Fuse the morphological features, texture features and gray distribution features to obtain a suspected feature database.
4. The method of claim 3, wherein, Match the features of the suspected obstacle region with the standard features in the obstacle feature database to obtain a feature matching degree, and determine the obstacle confidence level of the suspected obstacle region according to the feature matching degree to obtain an obstacle confidence level one, specifically including: Calculate the single feature similarity of the morphological features, gray distribution features and texture features of the suspected obstacle region and each standard feature in the obstacle feature database to obtain a similarity feature set; Set a weight coefficient according to the contribution of each feature to obstacle recognition, and judge the similarity feature set and the corresponding weight coefficient to obtain a comprehensive feature matching degree; If the comprehensive feature matching degree is greater than a first confidence threshold, the obstacle confidence level is determined as a high confidence level; If the first confidence threshold is greater than or equal to the comprehensive feature matching degree and less than or equal to a second confidence threshold, the obstacle confidence level is determined as a medium confidence level; If the comprehensive feature matching degree is less than the second confidence threshold, the obstacle confidence level is determined as a low confidence level; Fuse the high confidence level, the medium confidence level and the low confidence level to obtain the obstacle confidence level one. The obstacle feature database includes a standard morphological feature set, a standard gray distribution feature set and a standard texture feature set of typical obstacles in different water environments.
5. The method of claim 4, wherein, If the obstacle confidence level one is between the second confidence threshold and the first confidence threshold, a dynamic tracking mechanism is started, trajectory fitting is performed on the suspected obstacle region in the continuous frames of the time-series sonar image stream to obtain motion trend parameters, specifically including:
6. The method of claim 5, wherein, Taking the center coordinates of the suspected obstacle region as the tracking state quantity, the position change of the suspected obstacle region is tracked through a tracking model in the continuous frames of the time-series sonar image stream, and the center coordinates of each frame are recorded to obtain coordinate nodes; Trajectory fitting is performed on the coordinate nodes to obtain a motion trajectory data set, and a velocity vector and an acceleration vector are calculated based on the motion trajectory data set, and the velocity vector, the acceleration vector and the trajectory curvature are taken as the motion trend parameters. Combine the motion trend parameters and the water environment parameters to perform secondary feature optimization matching on the suspected obstacle region to obtain an obstacle confidence level two, specifically including:
7. The method of claim 6, wherein, Collect the flow velocity, flow direction and water temperature of the target water area as the water environment parameters, correct the velocity vector in the motion trend parameters according to the flow velocity and the flow direction to obtain an actual motion vector; Input the actual motion vector, the acceleration vector, the trajectory curvature and the water environment parameters into a preset feature optimization model to correct the original features of the suspected obstacle region to obtain optimized features; Re-perform similarity matching of the optimized features and the standard features in the obstacle feature database to calculate an optimized comprehensive feature matching degree to obtain the obstacle confidence level two. According to the obstacle confidence level two, a confirmed obstacle region is obtained, specifically including:
8. The method of claim 7, wherein, If the obstacle confidence level two is higher than or equal to the second confidence threshold, it is marked as a confirmed obstacle region; If the obstacle confidence level two is lower than the second confidence threshold, it is determined as a false obstacle region and is eliminated. Combine the real-time position coordinates, feature parameters and motion trend parameters of the confirmed obstacle region to generate an obstacle real-time distribution map, specifically including:
9. The method of claim 8, wherein, A three-dimensional coordinate system is established with the position of the sonar detection device as the origin, and the real-time position coordinates of all confirmed obstacle areas are converted into spatial coordinates in the three-dimensional coordinate system; According to the characteristic parameters of the confirmed obstacle areas, the type of the obstacle is determined, and different visual identifiers are assigned. In combination with the spatial coordinates, the type of the obstacle, and the motion trend parameters, the real-time position, the contour, and the motion trajectory of each obstacle are plotted in the three-dimensional coordinate system to generate a real-time distribution map of the water area obstacles. If the spatial distance between any two obstacles is less than a safety distance threshold, a pre-warning prompt is triggered, and real-time perception of the obstacles is completed.
Citation Information
Cited By
Beidou eye global perception safety warning base large model system
CN122313672A