Sonar two-dimensional imaging method based on projection method, imaging system and electronic equipment

By employing a projection-based two-dimensional sonar imaging method, invalid data points are eliminated and the interpolation number is dynamically adjusted, thus solving the distortion problem in sonar imaging and enabling the generation of high-resolution underwater images that accurately reconstruct underwater topography.

CN122017855APending Publication Date: 2026-05-12SEA EAGLE DEEP SEA TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SEA EAGLE DEEP SEA TECH CO LTD
Filing Date
2025-12-23
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing sonar imaging methods suffer from distortion in the horizontal and vertical directions of underwater images, making it impossible to accurately reconstruct the underwater topographic contours, and invalid data points affect image quality.

Method used

A two-dimensional sonar imaging method based on projection is adopted. Two frames of sonar data are collected to form a two-dimensional data matrix. Bilinear interpolation is used for data processing to remove invalid data points, optimize data quality, and dynamically adjust the number of interpolation based on the sonar carrier's speed and distance to generate high-resolution underwater images.

Benefits of technology

It eliminates horizontal and vertical distortion in underwater images, ensures the integrity and continuity of the underwater contour, improves imaging resolution, and can accurately reproduce underwater topographic details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017855A_ABST
    Figure CN122017855A_ABST
Patent Text Reader

Abstract

The invention discloses a sonar two-dimensional imaging method based on a projection method, an imaging system and electronic equipment, and the sonar two-dimensional imaging method based on the projection method comprises the following steps: S1, collecting two frames of sonar data, obtaining a one-dimensional sonar data matrix of the two frames of sonar data, and combining the one-dimensional sonar data matrix of the two frames of sonar data, forming a two-dimensional sonar data matrix; s2, interpolating the two-dimensional sonar data matrix by using a bilinear interpolation method according to the real-time speed of the sonar carrier and the data acquisition time of two adjacent frames; s3, generating the pixel size of the sonar background image; and S4, projecting data points in the two-dimensional sonar data matrix to a sonar background image to obtain a high-resolution underwater image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition, and in particular to a two-dimensional sonar imaging method, imaging system, and electronic device based on projection. Background Technology

[0002] Multibeam bathymetry (MBB) sonars, with their advantages of wide coverage and high efficiency, are widely used in scenarios requiring high accuracy of underwater topography, such as underwater engineering exploration, marine surveying, and channel dredging monitoring. At any given time, the underwater topographic data provided by MBB sonars consists of numerous points. The contours represented by these points are treated as lines, and by accumulating them in the time domain, a surface is formed, thus creating a two-dimensional underwater topographic map.

[0003] Existing imaging methods directly map the physical location information of points to image pixel locations, and then color the images based on the intensity or depth information of the points to form an underwater image. In the horizontal direction of the image, because the mapping process does not consider the varying actual distances between adjacent points before filling the image with points one by one, horizontal distortion of the underwater image may occur. In the vertical direction, sonar, constrained by the constantly changing speed of the carrier, fills the image with lines of data collected in a single session, which may also lead to vertical distortion of the underwater image. In other words, the underwater contours in images obtained based on existing imaging methods differ from the actual underwater conditions.

[0004] As the requirements for accuracy in underwater topography reconstruction continue to increase in applications such as marine engineering, the shortcomings of existing direct mapping coloring imaging methods are becoming increasingly apparent, and there is an urgent need for imaging methods that can obtain high-resolution underwater images that are consistent with the underwater contours. Summary of the Invention

[0005] One object of the present invention is to provide a two-dimensional sonar imaging method, imaging system and electronic device based on projection method, which can obtain high-resolution underwater images that are consistent with the underwater topographic contour.

[0006] Another objective of this invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection, wherein the two-dimensional sonar imaging method can eliminate distortion of underwater images in the vertical direction and obtain a high-resolution underwater image that is consistent with the actual underwater topographic contour in the vertical direction.

[0007] Another objective of this invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection, wherein the two-dimensional sonar imaging method can eliminate the distortion of underwater images in the horizontal direction and obtain a high-resolution underwater image that is consistent with the actual underwater topographic contour in the horizontal direction.

[0008] Another objective of this invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection. In the two-dimensional sonar imaging method, invalid data points in the one-dimensional sonar data matrix are eliminated, the quality of the basic data used for imaging is optimized, and interference from invalid data points to subsequent processing is avoided, providing a reliable data foundation for subsequent interpolation and projection imaging.

[0009] Another objective of this invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection. In the two-dimensional sonar imaging method, data at the corresponding positions of deleted invalid data points is supplemented by linear interpolation, which ensures that each pixel position has a corresponding effective depth value during imaging, thus guaranteeing the integrity and continuity of the underwater contour and eliminating imaging defects caused by data gaps.

[0010] Another objective of this invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection. In the two-dimensional sonar imaging method, the one-dimensional sonar data matrix that fills in the positions corresponding to the deleted invalid data points is interpolated, so that the interpolation of the entire detection area follows a unified quantization standard. This not only ensures that the data point density is precisely bound to the imaging pixel size, making the data density compatible with the imaging resolution, but also that the number of interpolations is dynamically adjusted according to the distance between adjacent data points. This results in a uniform distribution of interpolated data points, which can solve the problem of local imaging distortion caused by uneven data point spacing.

[0011] Another objective of this invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection. In the two-dimensional sonar imaging method, the number of interpolation steps is calculated by combining the motion speed and distance of the sonar carrier, so as to achieve precise binding between the motion speed and distance of the sonar carrier and the imaging pixels. The number of interpolation steps can be dynamically adjusted according to the motion speed of the sonar carrier. At the same time, through interpolation processing, the two-dimensional sonar data matrix has high detail density in the time domain, which can eliminate imaging distortion caused by uneven data distribution due to speed fluctuations.

[0012] Another object of the present invention is to provide a two-dimensional sonar imaging method, imaging system, and electronic device based on projection, wherein in the two-dimensional sonar imaging method, when interpolating using a defined sonar data matrix, "one pixel represents the side length as..." The standard pixel size of the sonar background map is generated based on the "square detection area as interpolation requirement". This ensures that all data points in the two-dimensional sonar data matrix can be matched with the pixels in the sonar background map, avoiding the situation where the data points in the two-dimensional sonar data matrix appear as small areas or cannot be fully displayed after being projected onto the sonar background map.

[0013] According to a first aspect of the present invention, the present invention provides a two-dimensional sonar imaging method based on projection, comprising: S1. Acquire two frames of sonar data, obtain a one-dimensional sonar data matrix of the two frames of sonar data, and combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix. S2. Based on the real-time velocity of the sonar carrier and the acquisition time of two adjacent frames of sonar data, the two-dimensional sonar data matrix is ​​interpolated using the bilinear interpolation method; S3. Pixel size of the generated sonar background image; S4. Project the data points in the two-dimensional sonar data matrix onto the sonar background map to obtain a high-resolution underwater image.

[0014] According to an embodiment of the present invention, step S1 includes the following steps: S1.1. Acquire sonar data, obtain a one-dimensional sonar data matrix for each frame of sonar data, preprocess the one-dimensional sonar data matrix, and remove invalid data points in the horizontal direction in a single acquisition of data. S1.2. Use linear interpolation to interpolate the one-dimensional sonar data matrix after removing invalid data points, and fill in the data at the corresponding positions of the invalid data points; S1.3. Use linear interpolation to interpolate the one-dimensional sonar data matrix after data completion to increase the data detail of the one-dimensional sonar data matrix; S1.4. Combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix.

[0015] According to an embodiment of the present invention, in step S1.2, the one-dimensional sonar data matrix is ​​interpolated using the following formula: ; in, The ordinate of the interpolated point is... The ordinate of the point preceding the interpolated point. The ordinate of the point following the interpolated point. The x-coordinate of the interpolated point. The x-coordinate of the point preceding the interpolated point. Let x be the x-coordinate of the point following the interpolated point.

[0016] According to one embodiment of the present invention, in S1.3, a side length of 1 pixel is represented. Interpolation requirements for the square detection area, and the distance between two adjacent data points Calculate the number of interpolations And interpolate the one-dimensional sonar data matrix, the number of interpolations is... Satisfy the following formula: .

[0017] According to an embodiment of the present invention, step S2 further includes the following steps: S2.1. Based on the real-time velocity of the sonar carrier Acquisition time between two adjacent frames of sonar data Calculate the distance the sonar carrier moves during the acquisition of two adjacent frames of sonar data. ,in ; S2.2. The side length is represented by one pixel. Requirements for a square detection area and the distance the sonar carrier moves. Sonar acquisition frame rate Calculate the cumulative number of times the data was collected in the time domain. : ; S2.3. Cumulative number in the time domain As the interpolation order, bilinear interpolation is used to perform row interpolation on the two-dimensional sonar data matrix.

[0018] According to an embodiment of the present invention, in step S2, interpolation is performed using the following formula: , in, Let Q be the coordinates of the interpolated point. 11 Q 12 Q 21 Q 22 Let Q be one of the four known points adjacent to the point being interpolated. 11 The corresponding coordinates are Click Q 12 The corresponding coordinates are Click Q 21 The corresponding coordinates are Click Q 22 The corresponding coordinates are , The ordinate of the interpolated point is... The x-coordinate of the interpolated point. For point Q 11 and point Q 21 The ordinate, For point Q 12 and point Q 22 The ordinate, For point Q 11 and point Q 21 x-coordinate For point Q 12 and point Q 22 The x-coordinate.

[0019] According to an embodiment of the present invention, in step S3, a side length of 1 pixel is used to represent the side length. The requirement is a square detection area, and the pixel size of the sonar background image is generated based on the maximum horizontal detection distance of the sonar and the custom imaging range.

[0020] According to an embodiment of the present invention, step S4 further includes the following steps: S4.1. Based on the row numbers of the data points in the two-dimensional sonar data matrix The maximum number of rows in a two-dimensional sonar data matrix Imaging range Calculate the ordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : ; S4.2. Based on the horizontal distance of the target relative to the sonar corresponding to the data points in the two-dimensional sonar data matrix. Maximum horizontal detection range of sonar Width of the sonar background image Calculate the x-coordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : ; S4.3. Based on the data points in the two-dimensional sonar data matrix, the target's depth relative to the sonar... Detecting the maximum depth of water bodies The maximum value of the grayscale range of the image Calculate the grayscale value that corresponds to the depth of the target relative to the sonar for each data point in the two-dimensional sonar data matrix. : .

[0021] According to a second aspect of the present invention, the present invention provides a two-dimensional sonar imaging system, comprising: The basic data processing unit is used to acquire two frames of sonar data, obtain a one-dimensional sonar data matrix of the two frames of sonar data, and combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix. The imaging data processing unit is used to interpolate the two-dimensional sonar data matrix using bilinear interpolation based on the real-time velocity of the sonar carrier and the acquisition time of two adjacent frames of sonar data. Pixel generation unit, which is used to generate the pixel size of the sonar background image; The projection unit is used to project data points from the two-dimensional sonar data matrix onto the sonar background map to obtain a high-resolution underwater image.

[0022] According to a third aspect of the invention, the invention provides an electronic device including a processor and a memory; The memory stores program instructions; The processor is used to execute the program instructions stored in the memory, causing the electronic device to perform a projection-based two-dimensional sonar imaging method, wherein the projection-based two-dimensional sonar imaging method includes the following steps: S1. Acquire two frames of sonar data, obtain a one-dimensional sonar data matrix of the two frames of sonar data, and combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix. S2. Based on the real-time velocity of the sonar carrier and the acquisition time of two adjacent frames of sonar data, the two-dimensional sonar data matrix is ​​interpolated using the bilinear interpolation method; S3. Pixel size of the generated sonar background image; S4. Project the data points in the two-dimensional sonar data matrix onto the sonar background map to obtain a high-resolution underwater image. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating a preferred embodiment of a two-dimensional sonar imaging method based on projection according to the present invention.

[0024] Figure 2 This is a schematic diagram of a one-dimensional sonar data matrix acquired in the projection-based two-dimensional sonar imaging method according to the above-described preferred embodiment of the present invention.

[0025] Figure 3 This is a schematic diagram of a one-dimensional sonar data matrix after removing invalid data points in the sonar two-dimensional imaging method based on projection method according to the above-described preferred embodiment of the present invention.

[0026] Figure 4 This is a schematic diagram of a one-dimensional sonar data matrix after supplementing the data at the corresponding positions of deleted invalid data points in the two-dimensional sonar imaging method based on projection method according to the above-described preferred embodiment of the present invention.

[0027] Figure 5 This is a schematic diagram of a one-dimensional sonar data matrix obtained by further interpolating the one-dimensional sonar data matrix after data completion in the two-dimensional sonar imaging method based on projection method according to the above-described preferred embodiment of the present invention.

[0028] Figure 6 This is a schematic diagram of underwater images obtained using existing imaging methods.

[0029] Figure 7 This is a schematic diagram of an underwater image obtained using the projection-based two-dimensional sonar imaging method described in this invention.

[0030] Figure 8 This is a schematic diagram of a sonar two-dimensional imaging system according to another preferred embodiment of the present invention.

[0031] Figure 9 This is a schematic diagram of an electronic device according to another preferred embodiment of the present invention. Detailed Implementation

[0032] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0033] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be used as a basis for interpretation. Limitations of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.

[0034] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0035] Please refer to the appendix to the specification of this application. Figure 1A preferred embodiment of the present invention, a two-dimensional sonar imaging method based on projection, will be described below. The two-dimensional sonar imaging method includes the following steps: S1, acquiring two frames of sonar data, obtaining a one-dimensional sonar data matrix of the two frames of sonar data, and combining the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix; S2, interpolating the two-dimensional sonar data matrix using bilinear interpolation based on the real-time velocity of the sonar carrier and the acquisition time of two adjacent frames of data to increase the detail of the target object; S3, generating the pixel size of the sonar background image; S4, projecting the data points in the two-dimensional sonar data matrix onto the sonar background image to obtain a high-resolution image consistent with the underwater contour.

[0036] Specifically, step S1 includes the following steps: S1.1, acquiring sonar data, obtaining a one-dimensional sonar data matrix for each frame of sonar data, and preprocessing the one-dimensional sonar data matrix to remove invalid data points in the horizontal direction of a single acquisition. In this invention, invalid data points refer to points in the one-dimensional sonar data that are inconsistent with the overall trend of the data; points that are consistent with the overall trend of the data are valid data points. For example, refer to the accompanying drawings of this invention. Figure 2 The diagram illustrates a one-dimensional sonar data matrix of the acquired sonar data. Data points in the red section deviate significantly from the overall data trend and are considered invalid. The remaining blue data points exhibit a generally consistent trend and are considered valid. Valid data points are used for subsequent imaging. Invalid data points are deleted after identification, as shown in the accompanying drawings. Figure 3 It illustrates the one-dimensional sonar data matrix after deleting invalid data points, and it can be seen that the overall trend of the remaining data changes is basically the same.

[0037] Invalid data points are mainly caused by factors such as sonar signal interference and environmental clutter. The changing trends of invalid data points are disconnected from those of valid data points, disrupting the continuity and consistency of the fragmented one-dimensional sonar data. If invalid data points are directly applied to subsequent imaging, they will also be mapped into background pixels, causing artifacts on the underwater contours that do not actually correspond to them, failing to accurately reflect the underwater topography and interfering with the user's judgment of the terrain. Furthermore, if invalid data points are not removed, the interpolation algorithm will include them in the calculation basis during the subsequent interpolation stage, generating erroneous data and affecting the accuracy of interpolation, thus introducing potential errors into subsequent imaging. Therefore, removing invalid data points can optimize the quality of the original data, avoid interference from invalid data points in subsequent processing, and provide a reliable data foundation for subsequent interpolation and projection imaging.

[0038] In one specific embodiment of the present invention, individual data points that deviate significantly from the overall data trend are identified as invalid data points based on the KNN algorithm, and these invalid data points are then deleted from the one-dimensional sonar data matrix. Those skilled in the art can also identify invalid data points using the mean-standard deviation method or other known techniques, and delete them after identification.

[0039] Following step S1.1, the system further includes step S1.2, which involves interpolating the one-dimensional sonar data matrix using linear interpolation to fill in the data at the positions corresponding to the removed invalid data points. The interpolation formula is as follows: ; in, The ordinate of the interpolated point is... The ordinate of the point preceding the interpolated point. The ordinate of the point following the interpolated point. The x-coordinate of the interpolated point. The x-coordinate of the point preceding the interpolated point. Let be the x-coordinate of the point following the interpolated point. Applying the above interpolation formula results in low computational requirements, low computational costs, and fast calculation speed.

[0040] It is worth noting that in step S1.1, after removing invalid data points, the one-dimensional sonar data matrix will have local data gaps. If these gaps are not filled, in the final projection imaging stage, the gap locations will correspond to blank areas or random noise in the image, causing artifacts such as broken or discontinuous underwater contours. Filling in the data at the locations corresponding to the deleted invalid data points using linear interpolation ensures that each pixel location has a corresponding effective depth value during imaging, guaranteeing the integrity and continuity of the underwater contour and eliminating imaging defects caused by data gaps. (Refer to the accompanying drawings in the specification.) Figure 3 and Figure 4 ,from Figure 3 It can be seen that after deleting invalid data points, there are gaps at the positions corresponding to the invalid data points in the one-dimensional sonar data matrix. Figure 4 The schematic diagram of the one-dimensional sonar data matrix after filling in the data at the corresponding positions of the deleted invalid data points shows that, after interpolation, the missing data points at the corresponding positions of the invalid data points have been filled in, and the filled data points are basically consistent with the overall trend of data change.

[0041] Following step S1.2, the method further includes the step S1.3, where linear interpolation is used to interpolate the one-dimensional sonar data after filling in invalid data points, thereby increasing the data detail of the one-dimensional sonar data matrix. Specifically, in step S1.3, a side length of 1 pixel is represented... Interpolation requirements for the square detection area, and the distance between two adjacent data points Calculate the number of interpolations And interpolate the one-dimensional sonar data matrix, the number of interpolations is... Satisfy the following formula: .

[0042] Continue to refer to the attached diagrams in the instruction manual. Figure 4 and Figure 5 ,from Figure 4 It can be seen that even after the data points are filled in, the one-dimensional data matrix still exhibits uneven distribution of data points. Figure 5 The diagram illustrates the one-dimensional sonar data matrix after interpolating the one-dimensional sonar data again after supplementing invalid data points. It can be seen that the one-dimensional sonar data matrix after the second interpolation optimization process not only supplements more details, but also the data points are continuous, evenly distributed, and the trend of change is basically consistent, providing a high-quality data foundation for subsequent imaging.

[0043] It is worth noting that, since the distance between adjacent data points in the one-dimensional sonar data matrix is ​​not directly related to the pixel size of the final image, the distance between adjacent data points in the one-dimensional sonar data matrix obtained in the long-range detection area is large, resulting in sparse data points. Direct imaging may lead to one data point corresponding to multiple pixels, causing blurry images. Conversely, the distance between adjacent points in the one-dimensional sonar data matrix obtained in the short-range detection area is small, causing data redundancy, wasting computational resources, and easily leading to pixel stacking. In this invention, by setting the number of interpolation operations and performing interpolation processing on the one-dimensional sonar data matrix, the interpolation of the entire detection area follows a unified quantization standard. This not only accurately binds the data point density to the imaging pixel size, making the data density compatible with the imaging resolution, but also dynamically adjusts the number of interpolation operations according to the distance between adjacent data points. Larger distances require more interpolation operations, and smaller distances require fewer interpolation operations. This results in a uniform horizontal distribution of interpolated data points, which can solve the problem of local image distortion caused by uneven spacing of data points in the horizontal direction. Furthermore, interpolation based on the distance between imaging pixels and adjacent data points can increase data density, even upgrading it from decimeter or meter-level to centimeter-level, which is beneficial for reproducing subtle underwater topography such as gentle slopes, trench sidewalls, and sand dune textures. Taking the sidewall of a seabed trench as an example: for instance, the distance between two adjacent data points in the original data... At a depth of 20cm, direct imaging may produce a jagged, broken line, failing to capture the actual centimeter-level gradual slope of the sidewall. If the depth is 2cm, 10 interpolation points will be generated. The depth of each point changes according to a linear law, which can restore the smooth transition texture of the sidewall of the seabed trench.

[0044] Following step S1.3, the system further includes step S1.4, which combines the one-dimensional sonar data matrices of two adjacent frames of sonar data to form the two-dimensional sonar data matrix. For example, the one-dimensional sonar data matrix of the first frame of sonar data is combined with the one-dimensional sonar data matrix of the second frame of sonar data to form the first two-dimensional sonar data matrix; the one-dimensional sonar data matrix of the second frame of sonar data is combined with the one-dimensional sonar data matrix of the third frame of sonar data to form the second two-dimensional sonar data matrix, and so on. Those skilled in the art should understand that each data point in the two-dimensional sonar data matrix contains four pieces of information: the row number of the data point in the matrix. The column number of the data point in the matrix The data points correspond to the horizontal distance of the target relative to the sonar. The data points correspond to the depth of the target relative to the sonar. .

[0045] In a specific embodiment of the projection-based two-dimensional sonar imaging method of the present invention, step S2 includes the following steps: S2.1, based on the real-time velocity of the sonar carrier... Acquisition time between two adjacent frames of sonar data Calculate the distance the sonar carrier moves during the acquisition of two adjacent frames of sonar data. ,in S2.2, representing a side length based on 1 pixel. Requirements for a square detection area and the distance the sonar carrier moves. Sonar acquisition frame rate Calculate the cumulative number of times the data was collected in the time domain. : S2.3, the cumulative number of times in the time domain As the number of interpolation iterations, bilinear interpolation is used to perform row interpolation on the two-dimensional sonar data matrix to increase the detailed data of the target object.

[0046] In the above steps, the number of interpolation operations is calculated by combining the movement speed and distance of the sonar carrier, achieving precise binding between the sonar carrier's movement speed, distance, and imaging pixels. The number of interpolation operations can be dynamically adjusted according to the movement speed of the sonar carrier. When the speed is high, the vertical distance interval between two frames of sonar data is large, and the number of interpolation operations increases synchronously to supplement sufficient data points. When the speed is slow, the number of interpolation operations decreases accordingly to avoid data redundancy. At the same time, through interpolation processing, the two-dimensional sonar data matrix has high detail density in the time domain, which can eliminate imaging distortion caused by uneven distribution of data in the vertical direction due to speed fluctuations.

[0047] In step S2.3, the two-dimensional sonar data matrix is ​​interpolated using the following formula: ; in, Let Q be the coordinates of the interpolated point. 11 Q 12 Q 21 Q 22 Let Q be one of the four known points adjacent to the point being interpolated. 11 The corresponding coordinates are Click Q 12 The corresponding coordinates are Click Q 21 The corresponding coordinates are Click Q 22 The corresponding coordinates are , The ordinate of the interpolated point is... The x-coordinate of the interpolated point. For point Q 11 and point Q 21 The ordinate, For point Q 12 and point Q 22 The ordinate, For point Q 11 and point Q 21 x-coordinate For point Q 12 and point Q 22 The x-coordinate.

[0048] In a specific embodiment of the present invention, a single pixel is used to represent a side length of... The requirement is a square detection area. The pixel size of the sonar background image is generated based on the maximum horizontal detection range of the sonar and a custom distance the sonar moves. In other words, when interpolating using a limited sonar data matrix, "one pixel represents a side length..." The standard pixel size of the sonar background image is generated based on the "square detection area as interpolation requirement". This ensures that all data points in the two-dimensional sonar data matrix can be matched with the pixels in the sonar background image, resulting in a higher degree of image standardization and preventing the data points in the two-dimensional sonar data matrix from appearing as small areas or not being fully represented after being projected onto the sonar background image.

[0049] In a specific embodiment of the present invention, step S4 includes the following steps: S4.1, based on the row number in the data point Maximum number of rows in a matrix Imaging range The imaging range To determine the distance to the detected water area that the user expects to view, calculate the ordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : ; For example, if a user wants to view underwater images detected by a sonar that has moved 50 meters, they can set the imaging range. The maximum range is 50. To view the distance to other detected water areas, you can customize the imaging range. For other values.

[0050] S4.2, based on the data points in the two-dimensional sonar data matrix, the horizontal distance of the target relative to the sonar. Maximum horizontal detection range of sonar Width of the sonar background image Calculate the x-coordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : ; S4.3, based on the data points in the two-dimensional sonar data matrix, the depth of the target relative to the sonar. Detecting the maximum depth of water bodies The maximum value of the grayscale range of the image Calculate the grayscale value that corresponds to the depth of the target relative to the sonar for each data point in the two-dimensional sonar data matrix. : .

[0051] The grayscale range of the image depends on the device used by the user and the detection accuracy. In a specific embodiment of the present invention, an 8-bit grayscale image is used, with a grayscale range of 0-255. The value is 255. In other embodiments, 4-bit, 12-bit, or 16-bit grayscale images can also be used, and smaller or larger grayscale ranges can be selected.

[0052] Compared to existing imaging methods, the projection-based two-dimensional sonar imaging method described in this invention achieves better imaging results, obtaining high-resolution images that are essentially consistent with the underwater contours in both the horizontal and vertical directions. Specifically, refer to the accompanying drawings in the specification. Figure 6 The illustration shows an underwater image obtained using existing sonar imaging methods. It exhibits significant distortion with dense vertical stripes, resulting in a cluttered image fragmented by numerous vertical lines, jagged textures, blurred and fragmented details, and substantial noise. The overall image is not only noticeably distorted and blurry but also fails to accurately represent the true contours and continuous changes of the underwater topography, clearly demonstrating significant deficiencies in the data foundation used in the image generation process. Further reference is made to the accompanying drawings in the specification. Figure 7The illustration shows an underwater image obtained using the projection-based two-dimensional sonar imaging method of the present invention. The vertical stripe distortion is basically eliminated, the overall texture is more coherent and smooth, the imaging distortion in the horizontal and vertical directions is significantly eliminated, and the details are richer, the outline is clearer, the noise is greatly reduced, the resolution is higher, the image is cleaner, the image information is expressed more accurately, and the user has less difficulty in identifying the image.

[0053] According to another aspect of the present invention, the present invention further provides a two-dimensional sonar imaging system 10, the two-dimensional sonar imaging system 10 including a basic data processing unit 11, an imaging data processing unit 12, a pixel generation unit 13 and a projection unit 14, wherein the basic data processing unit 11, the imaging data processing unit 12, the pixel generation unit 13 and the projection unit 14 cooperate with each other to obtain a high-resolution image of the underwater contour.

[0054] Specifically, the basic data processing unit 11 acquires two frames of sonar data, obtains a one-dimensional sonar data matrix of the two frames of sonar data, and combines the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix. The imaging data processing unit 12 interpolates the two-dimensional sonar data matrix using bilinear interpolation based on the real-time speed of the sonar carrier and the acquisition time of two adjacent frames of data to increase the details of the target object. The pixel generation unit 13 generates the pixel size of the sonar background image. The projection unit 14 is used to project the data points in the two-dimensional sonar data matrix onto the sonar background image to obtain a high-resolution image consistent with the underwater contour.

[0055] The basic data processing unit 11 of the sonar two-dimensional imaging system 10 further includes an acquisition unit 111, a preprocessing unit 112, a first interpolation unit 113, a second interpolation unit 114, and a two-dimensional matrix generation unit 115. The acquisition unit 111 acquires sonar data and obtains a one-dimensional sonar data matrix. The preprocessing unit 112 preprocesses the one-dimensional sonar data matrix of the sonar data, removing invalid data points in the horizontal direction from the single acquisition data. The first interpolation unit 113 uses linear interpolation to interpolate the one-dimensional sonar data matrix of the sonar data, filling in the data at the corresponding positions of the deleted invalid data points. The second interpolation unit 114 uses linear interpolation to interpolate the one-dimensional sonar data after filling in the invalid data points, increasing the data detail of the one-dimensional sonar data matrix of the sonar data. The two-dimensional matrix generation unit 115 combines the one-dimensional sonar data matrices of two frames of sonar data to form a two-dimensional sonar data matrix, wherein each data point in the two-dimensional sonar data matrix contains four pieces of information: the row number of the data point in the matrix. The column number of the data point in the matrix The data points correspond to the horizontal distance of the target relative to the sonar. The data points correspond to the depth of the target relative to the sonar. .

[0056] In this invention, invalid data points refer to points in the one-dimensional sonar data that are inconsistent with the overall trend of the data. Points with the consistent trend are considered valid data points. Invalid data points are mainly caused by factors such as sonar signal interference and environmental clutter. The disconnect between invalid and valid data points disrupts the continuity and consistency of the one-dimensional sonar data. If invalid data points are directly applied to subsequent imaging, they will also be mapped into background pixels, causing artifacts on the underwater contours that do not actually correspond to them, failing to accurately reflect the underwater topography and interfering with the user's judgment of the terrain. Furthermore, if invalid data points are not removed, the interpolation algorithm will include them in the calculation basis during the subsequent interpolation stage, generating erroneous data and affecting the accuracy of interpolation, thus creating potential errors for subsequent imaging. Therefore, removing invalid data points can optimize the quality of the original data, avoid interference from invalid data points in subsequent processing, and provide a reliable data foundation for subsequent interpolation and projection imaging.

[0057] In one specific embodiment of the present invention, the preprocessing unit 112 uses the KNN algorithm to filter out individual data points that deviate from the overall data trend as invalid data points, and deletes invalid data points from the one-dimensional sonar data matrix. Those skilled in the art can also identify invalid data points using the mean-standard deviation method or other known techniques, and delete them after identification.

[0058] The first interpolation unit 113 uses linear interpolation to interpolate the one-dimensional sonar data matrix of the sonar data, filling in the data at the corresponding positions of the deleted invalid data points. The interpolation formula is as follows: ; in, The ordinate of the interpolated point is... The ordinate of the point preceding the interpolated point. The ordinate of the point following the interpolated point. The x-coordinate of the interpolated point. The x-coordinate of the point preceding the interpolated point. Let be the x-coordinate of the point following the interpolated point. Applying the above interpolation formula results in low computational requirements, low computational costs, and fast calculation speed.

[0059] It is worth mentioning that after the preprocessing unit 112 removes invalid data points, local data gaps will appear in the one-dimensional sonar data matrix. If these gaps are not filled, they will correspond to blank areas or random noise in the final projection imaging stage, causing artifacts such as breaks and discontinuities in the underwater contour. The first interpolation unit 113 fills in the data at the corresponding positions of the deleted invalid data points using linear interpolation, ensuring that each pixel position has a corresponding effective depth value during imaging, guaranteeing the integrity and continuity of the underwater contour, and eliminating imaging defects caused by data gaps.

[0060] In a specific embodiment of the present invention, the second interpolation unit 114 represents a side length based on one pixel. Interpolation requirements for the square detection area, and the distance between two adjacent data points Calculate the number of interpolations And interpolate the one-dimensional sonar data matrix, the number of interpolations is... Satisfy the following formula: .

[0061] Since the distance between adjacent data points in a one-dimensional sonar data matrix is ​​not directly related to the pixel size of the final image, the distance between adjacent data points in the one-dimensional sonar data matrix obtained in the long-range detection area is large, resulting in sparse data points. Direct imaging may lead to one data point corresponding to multiple pixels, causing blurry images. Conversely, the distance between adjacent points in the one-dimensional sonar data matrix obtained in the short-range detection area is small, causing data redundancy, wasting computational resources, and easily leading to pixel stacking. In this invention, by setting the number of interpolation operations and performing interpolation processing on the one-dimensional sonar data matrix, the interpolation of the entire detection area follows a unified quantization standard. This not only precisely binds the data point density to the imaging pixel size, making the data density compatible with the imaging resolution, but also dynamically adjusts the number of interpolation operations according to the distance between adjacent data points. Larger distances require more interpolation operations, and smaller distances require fewer interpolation operations. This results in a uniform distribution of interpolated data points, which can solve the problem of local image distortion caused by uneven data point spacing. Furthermore, interpolation based on the distance between imaging pixels and adjacent data points can increase data density, even upgrading it from decimeter or meter-level to centimeter-level, which is beneficial for reproducing subtle underwater topography such as gentle slopes, trench sidewalls, and sand dune textures. Taking the sidewall of a seabed trench as an example: for instance, the distance between two adjacent data points in the original data... At a depth of 20cm, direct imaging may produce a jagged, broken line, failing to capture the actual centimeter-level gradual slope of the sidewall. If the depth is 2cm, 10 interpolation points will be generated. The depth of each point changes according to a linear law, which can restore the smooth transition texture of the sidewall of the seabed trench.

[0062] In a specific embodiment of the present invention, the imaging data processing unit 12 includes a calculation unit 121 and a third interpolation unit 122. The calculation unit 121 first calculates the real-time velocity of the sonar carrier. Acquisition time between two adjacent frames of sonar data Calculate the distance the sonar carrier moves during the acquisition of two adjacent frames of sonar data. ,in Then, based on one pixel, the side length is represented as... Requirements for a square detection area and the distance the sonar carrier moves. Sonar acquisition frame rate Calculate the cumulative number of times the data was collected in the time domain. : The third interpolation unit 122 uses the cumulative number of times in the time domain. As the number of interpolation iterations, bilinear interpolation is used to perform row interpolation on the two-dimensional sonar data matrix to increase the detailed data of the target object.

[0063] The imaging data processing unit 12 calculates the number of interpolations based on the sonar carrier's movement speed and distance, achieving precise binding between the sonar carrier's movement speed, distance, and imaging pixels. The number of interpolations can be dynamically adjusted according to the sonar carrier's movement speed; when the speed is high, the number of interpolations increases synchronously to supplement sufficient data points, and when the speed decreases, the number of interpolations decreases accordingly to avoid data redundancy. Simultaneously, through interpolation processing, the two-dimensional sonar data matrix possesses high detail density in the time domain, eliminating imaging distortion caused by uneven data distribution due to speed fluctuations.

[0064] In a preferred embodiment of the present invention, the third interpolation unit 122 performs interpolation processing on the two-dimensional sonar data matrix using the following formula: ; in, Let Q be the coordinates of the interpolated point. 11 Q 12 Q 21 Q 22 Let Q be one of the four known points adjacent to the point being interpolated. 11 The corresponding coordinates are Click Q 12 The corresponding coordinates are Click Q 21 The corresponding coordinates are Click Q 22 The corresponding coordinates are , The ordinate of the interpolated point is... The x-coordinate of the interpolated point. For point Q11 and point Q 21 The ordinate, For point Q 12 and point Q 22 The ordinate, For point Q 11 and point Q 21 x-coordinate For point Q 12 and point Q 22 The x-coordinate.

[0065] In a specific embodiment of the present invention, the pixel generation unit 13 represents a side length of 1 pixel. The requirement is a square detection area. The pixel size of the sonar background image is generated based on the maximum horizontal detection range of the sonar and a custom distance the sonar moves. In other words, when the pixel generation unit 13 uses the defined sonar data matrix interpolation process, "one pixel represents a side length of..." The standard pixel size of the sonar background map is generated based on the "square detection area as interpolation requirement". This ensures that all data points in the two-dimensional sonar data matrix can be matched with the pixels in the sonar background map, avoiding the situation where the data points in the two-dimensional sonar data matrix appear as small areas or cannot be fully displayed after being projected onto the sonar background map.

[0066] In a specific embodiment of the sonar two-dimensional imaging system 10 of the present invention, the sonar two-dimensional imaging system 10 includes a coordinate calculation unit 15 and a grayscale value calculation unit 16, wherein the coordinate calculation unit 15 is used to calculate the vertical and horizontal coordinates of the data points in the two-dimensional sonar data matrix in the sonar background image, and the grayscale value calculation unit 16 calculates the grayscale value that the data points in the two-dimensional sonar data matrix should represent relative to the depth of the target with respect to the sonar.

[0067] Specifically, the coordinate calculation unit 15 calculates the coordinates based on the row numbers of the data points in the two-dimensional sonar data matrix. Maximum number of rows in a matrix Custom distance for sonar movement Calculate the ordinate of the pixel in the sonar background image of the data point in the two-dimensional sonar data matrix. : For example, if a user wants to view underwater images detected by a sonar that has moved 50 meters, they can set the imaging range. The maximum range is 50. To view the distance to other detected water areas, you can customize the imaging range. For other values Furthermore, the coordinate calculation unit 15 calculates the horizontal distance between the target and the sonar based on the data points in the two-dimensional sonar data matrix. Maximum horizontal detection range of sonar , width of the background image Calculate the x-coordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : .

[0068] The grayscale value calculation unit 16 calculates the depth of the target relative to the sonar based on the data points in the two-dimensional sonar data matrix. Detecting the maximum depth of water bodies The maximum value of the grayscale range of the image Calculate the grayscale value that corresponds to the depth of the target relative to the sonar for each data point in the two-dimensional sonar data matrix. : .

[0069] The grayscale range of the image depends on the device used by the user and the detection accuracy. In a specific embodiment of the present invention, an 8-bit grayscale image is used, with a grayscale range of 0-255. The value is 255. In other embodiments, 4-bit, 12-bit, or 16-bit grayscale images can also be used, and smaller or larger grayscale ranges can be selected.

[0070] According to another aspect of the present invention, the present invention further provides an electronic device 20, wherein the electronic device 20 includes a processor 21 and a memory 22, wherein the memory 22 stores computer program instructions, which, when executed in the processor 21, cause the processor 21 to perform the above-described projection-based two-dimensional sonar imaging method. In one embodiment of the electronic device 20 of the present invention, the memory 22 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 21 may execute the program instructions to implement the function of the projection-based sonar imaging method of the present invention.

[0071] In one embodiment of the electronic device 20 of the present invention, the processor 21 may be a central processing unit (CPU) or other form of processing unit with data processing capability and / or instruction execution function, which can run the program instructions stored on the computer-readable storage medium to realize the function of the projection-based sonar imaging method of the present invention.

[0072] In one embodiment of the electronic device 20 of the present invention, the electronic device 20 may further include an input device 23 and an output device 24. The input device 23 may be, but is not limited to, a keyboard or a mouse, and the output device 24 may be, but is not limited to, a display, a speaker or a printer. The input device 23 and the output device 24 may be connected to the processor 21 via a bus system.

[0073] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functions and structural principles of the present invention have been demonstrated and explained in the embodiments, and any variations or modifications may be made to the implementation of the present invention without departing from the stated principles.

Claims

1. A two-dimensional sonar imaging method based on projection, characterized in that, include: S1. Acquire two frames of sonar data, obtain a one-dimensional sonar data matrix of the two frames of sonar data, and combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix. S2. Based on the real-time velocity of the sonar carrier and the acquisition time of two adjacent frames of sonar data, the two-dimensional sonar data matrix is ​​interpolated using the bilinear interpolation method; S3. Pixel size of the generated sonar background image; S4. Project the data points in the two-dimensional sonar data matrix onto the sonar background map to obtain a high-resolution underwater image.

2. The sonar two-dimensional imaging method based on projection method according to claim 1, characterized in that, Step S1 includes the following steps: S1.

1. Acquire sonar data, obtain a one-dimensional sonar data matrix for each frame of sonar data, preprocess the one-dimensional sonar data matrix, and remove invalid data points in the horizontal direction in a single acquisition of data. S1.

2. Use linear interpolation to interpolate the one-dimensional sonar data matrix after removing invalid data points, and fill in the data at the corresponding positions of the invalid data points; S1.

3. Use linear interpolation to interpolate the one-dimensional sonar data matrix after data completion to increase the data detail of the one-dimensional sonar data matrix; S1.

4. Combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix.

3. The two-dimensional sonar imaging method based on projection method according to claim 2, characterized in that, In step S1.2, the one-dimensional sonar data matrix is ​​interpolated using the following formula: ; in, The ordinate of the interpolated point is... The ordinate of the point preceding the interpolated point. The ordinate of the point following the interpolated point. The x-coordinate of the interpolated point. The x-coordinate of the point preceding the interpolated point. Let x be the x-coordinate of the point following the interpolated point.

4. The two-dimensional sonar imaging method based on projection method according to claim 2, characterized in that, In S1.3, a side length is represented based on a single pixel. Interpolation requirements for the square detection area, and the distance between two adjacent data points Calculate the number of interpolations And interpolate the one-dimensional sonar data matrix, the number of interpolations is... Satisfy the following formula: .

5. The two-dimensional sonar imaging method based on projection method according to claim 1, characterized in that, Step S2 further includes the following steps: S2.

1. Based on the real-time velocity of the sonar carrier Acquisition time between two adjacent frames of sonar data Calculate the distance the sonar carrier moves during the acquisition of two adjacent frames of sonar data. ,in ; S2.

2. The side length is represented by one pixel. Requirements for a square detection area and the distance the sonar carrier moves. Sonar acquisition frame rate Calculate the cumulative number of times the data was collected in the time domain. : ; S2.

3. Cumulative number in the time domain As the interpolation order, bilinear interpolation is used to perform row interpolation on the two-dimensional sonar data matrix.

6. The two-dimensional sonar imaging method based on projection method according to claim 1, characterized in that, In step S2, interpolation is performed using the following formula: , in, Let Q be the coordinates of the interpolated point. 11 Q 12 Q 21 Q 22 Let Q be one of the four known points adjacent to the point being interpolated. 11 The corresponding coordinates are Click Q 12 The corresponding coordinates are Click Q 21 The corresponding coordinates are Click Q 22 The corresponding coordinates are , The ordinate of the interpolated point is... The x-coordinate of the interpolated point. For point Q 11 and point Q 21 The ordinate, For point Q 12 and point Q 22 The ordinate, For point Q 11 and point Q 21 x-coordinate For point Q 12 and point Q 22 The x-coordinate.

7. The two-dimensional sonar imaging method based on projection method according to claim 1, characterized in that, In step S3, a single pixel represents the side length. The requirement is a square detection area, and the pixel size of the sonar background image is generated based on the maximum horizontal detection distance of the sonar and the custom imaging range.

8. The two-dimensional sonar imaging method based on projection method according to claim 1, characterized in that, Step S4 further includes the following steps: S4.

1. Based on the row numbers of the data points in the two-dimensional sonar data matrix The maximum number of rows in a two-dimensional sonar data matrix Imaging range Calculate the ordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : ; S4.

2. Based on the horizontal distance of the target relative to the sonar corresponding to the data points in the two-dimensional sonar data matrix. Maximum horizontal detection range of sonar Width of the sonar background image Calculate the x-coordinate of the pixel in the sonar background image corresponding to the data point in the two-dimensional sonar data matrix. : ; S4.

3. Based on the data points in the two-dimensional sonar data matrix, the target's depth relative to the sonar... Detect the maximum depth of the water area The maximum value of the grayscale range of the image Calculate the grayscale value that corresponds to the depth of the target relative to the sonar for each data point in the two-dimensional sonar data matrix. : .

9. A two-dimensional sonar imaging system, characterized in that, include: A basic data processing unit is used to acquire two frames of sonar data, obtain a one-dimensional sonar data matrix of the two frames of sonar data, and combine the one-dimensional sonar data matrix of the two frames of sonar data to form a two-dimensional sonar data matrix. An imaging data processing unit is used to interpolate the two-dimensional sonar data matrix using bilinear interpolation based on the real-time velocity of the sonar carrier and the acquisition time of two adjacent frames of sonar data. A one-pixel generation unit, which is used to generate the pixel size of the sonar background image; A projection unit is used to project data points in a two-dimensional sonar data matrix onto a sonar background map to obtain a high-resolution underwater image.

10. An electronic device, characterized in that it includes a processor and a memory; The memory stores program instructions; The processor is used to run the program instructions stored in the memory, causing the electronic device to perform the projection-based two-dimensional sonar imaging method as described in any one of claims 1 to 8.