Side scan sonar file processing method

By using a block tile mechanism and a weighted average fusion of pixel coverage times, the problems of memory overflow and low efficiency in side-scan sonar file processing are solved, achieving efficient and flexible sonar file processing that adapts to different equipment specifications and provides standardized output.

CN122391269APending Publication Date: 2026-07-14GUANGDONG HAIXIN INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG HAIXIN INTELLIGENT TECH CO LTD
Filing Date
2026-05-22
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing side-scan sonar file processing methods have high requirements for computer memory capacity, are prone to memory overflow and program crashes, have low processing efficiency, cannot adapt to sonar files of different sizes, are cumbersome to operate, and are difficult to implement in engineering projects.

Method used

The system employs a tile-based mechanism to divide the side-scan sonar file into multiple small tiles, which are loaded and processed independently. Each tile contains an image data array, an effective region marker array, and a pixel count array to generate a tile image file. Grayscale values ​​are processed through a weighted average fusion mechanism based on the number of pixel coverages. The system supports multi-threaded parallel processing and multi-file stitching.

Benefits of technology

It avoids memory overflow, improves processing efficiency, adapts to different specifications of sonar files and hardware devices, reduces memory consumption and subsequent maintenance costs, improves image quality and processing accuracy, and meets marine surveying and GIS industry standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391269A_ABST
    Figure CN122391269A_ABST
Patent Text Reader

Abstract

The application provides a side scan sonar file processing method, and relates to the technical field of sonar image processing. The method comprises the following steps: acquiring block information according to the global image size of a side scan sonar file, wherein the block information comprises the total number of columns and the total number of rows of tiles; updating the pixel information of each tile based on the geographical range corresponding to the pulse strip and the tile of the side scan sonar file, wherein the pixel information comprises an image data array, an effective area marker array and a pixel count array; and generating an image file corresponding to each tile, wherein the image file comprises the pixel information, and the image file is used to generate a video corresponding to the side scan sonar file. The embodiment of the application can avoid memory overflow caused by loading global data at one time, greatly reduce memory consumption, independently output an image file for each tile, realize multi-thread parallelism, improve overall processing efficiency, and be suitable for different specifications of sonar files and hardware devices, and has strong engineering landing performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sonar image processing technology, and more specifically, to a side-scan sonar file processing method. Background Technology

[0002] In the field of side-scan sonar image processing, as the requirements for marine mapping accuracy continue to increase, the range of sonar data acquisition continues to expand, and its resolution also continues to improve. The data volume of a single side-scan sonar file can often reach hundreds of GB or even TB.

[0003] The current common method for processing side-scan sonar files is to directly write all pixels into a global image array based on the global coordinates of the side-scan sonar file, and then generate the corresponding image file. This processing method has extremely high requirements for computer memory capacity. Once the amount of data exceeds the memory capacity, memory shortage will occur, leading to memory overflow and program crash. At the same time, global rendering requires synchronous calculation of the entire image area, which is inefficient and cannot be adapted to sonar files of different sizes. It requires manual file segmentation, which is cumbersome and prone to data loss or misalignment, making it difficult to implement in engineering. Summary of the Invention

[0004] This application provides a side-scan sonar file processing method, which can solve the problems of existing side-scan sonar files having high computer memory requirements, being prone to memory overflow and program crashes, having low processing efficiency, being unable to adapt to sonar files of different sizes, being cumbersome to operate, and being difficult to implement in engineering. To achieve this objective, this application provides the following solutions.

[0005] According to one aspect of the embodiments of this application, a side-scan sonar file processing method is provided, including: The block information is obtained based on the global image size of the side-scan sonar file, and the block information includes the total number of columns and the total number of rows of the tiles. The pixel information of each tile is updated based on the pulse strips of the side-scan sonar file and the geographical range corresponding to the tile. The pixel information includes an image data array, an effective area marker array, and a pixel count array. An image file corresponding to each tile is generated, the image file including the pixel information, and the image file is used to generate the image corresponding to the side-scan sonar file.

[0006] In one possible implementation, obtaining block information based on the global image size of the side-scan sonar file includes: The global image size is obtained based on the geographical area covered by the side-scan sonar file; The total number of columns and the total number of rows are calculated using the size of the tiles and the size of the global image. Initialize the tiles.

[0007] In one possible implementation, updating the pixel information of each tile based on the pulse stripes of the side-scan sonar file and the geographical range corresponding to the tile includes: Pixel information is obtained from the pulse-by-pulse strips of the side-scan sonar file, and the pixel information includes the global coordinates of the pixel and the calculated gray value; The pixel information is updated based on the information of each pixel in different pulse strips.

[0008] In one possible implementation, updating the image data array includes: Determine the currently read pulse strip, and determine the tile corresponding to the pixel in the pulse strip and the local coordinate of the pixel in the tile based on the global coordinates; The number of times the pixel is covered is determined, a new gray value is determined based on the calculated gray value, the number of times it is covered, and a preset calculation formula, and the image data array is updated using the new gray value; The preset calculation formula is: Gmerge = (Gc*Cn + Gray) / (Cn + 1) In the formula, Gmerge is the new grayscale value, Gc is the current grayscale value of the pixel, Cn is the number of times it is covered, and Gray is the calculated grayscale value.

[0009] In one possible implementation, updating the valid region marker array includes: The effective region marker corresponding to the pixel is updated based on whether the pixel is covered by the pulse stripe. Determine the neighboring pixels of the pixel, and update the valid region marker corresponding to the neighboring pixels according to the correspondence between the neighboring pixels and the tiles.

[0010] In one possible implementation, updating the valid region marker corresponding to the neighboring pixels based on the correspondence between the neighboring pixels and the tiles includes: Detect whether the neighboring pixels correspond to tiles; If so, update the valid region marker corresponding to the neighboring pixel in the corresponding tile; If not, then the neighboring pixels will not be marked as valid regions.

[0011] In one possible implementation, updating the pixel count array includes: If it is determined that the currently read pulse strip covers the pixel, then the pixel count array corresponding to the pixel is updated.

[0012] In one possible implementation, generating the image file corresponding to each tile includes: Pixel optimization processing is performed based on the information of the image data array and the effective region marker array. The pixel optimization processing includes at least one of grayscale value adjustment, noise removal, and effective region marker array update. The image file is generated based on the optimized pixel information.

[0013] In one possible implementation, the grayscale adjustment and the noise removal include: The pixels located in the valid region are determined based on the valid region marker array and the pixel count array; If it is determined that the gray value of the pixel is lower than the preset minimum gray value threshold, then the gray value is set to the preset minimum gray value threshold, and noise reduction processing is performed on the pixels in the effective area.

[0014] In one possible implementation, the display of the image includes: Each tile's corresponding image file is loaded independently, and the image files are then stitched together based on the tile positions corresponding to the image files. The global sonar image of the side-scan sonar file is generated based on the stitching results.

[0015] The beneficial effects of the technical solutions provided in this application are: The side-scan sonar file processing method provided in this application includes: obtaining block information based on the global image size of the side-scan sonar file, the block information including the total number of columns and rows of tiles; updating the pixel information of each tile based on the pulse stripes and the geographical range corresponding to the tile in the side-scan sonar file, the pixel information including an image data array, an effective area marker array, and a pixel count array; generating an image file corresponding to each tile, the image file including the pixel information, and the image file being used to generate the image corresponding to the side-scan sonar file. This application embodiment can divide a large sonar file into multiple small-sized tiles, avoiding memory overflow caused by loading global data at once, significantly reducing memory consumption. The independent output of image files for each tile enables multi-threaded parallel processing, improving overall processing efficiency. Furthermore, the tile size can be flexibly adjusted to adapt to different specifications of sonar files and hardware devices, making it highly feasible for engineering implementation. It also supports multi-file stitching and incremental rendering, reducing subsequent maintenance costs. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0017] Figure 1 A flowchart of a side-scan sonar file processing method provided in an embodiment of this application. Detailed Implementation

[0018] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0019] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” indicates implementation as “A,” or implementation as “A,” or implementation as “A and B.”

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0021] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0022] The side-scan sonar file processing method provided in this application aims to solve at least one technical problem existing in the prior art.

[0023] Optionally, the side-scan sonar file processing method of this application can be used in computers, servers, host computers of sonar equipment, and other objects that can acquire and load side-scan sonar files.

[0024] Optionally, such as Figure 1 As shown, the side-scan sonar file processing method of this application includes: S101: Obtain block information based on the global image size of the side-scan sonar file.

[0025] Optionally, a side-scan sonar file is a file generated by a side-scan sonar device scanning the underwater environment. A typical side-scan sonar device mainly consists of a data display and recording unit, a data transmission and towed cable, and underwater acoustic wave transmitting and receiving transducers. Its detection principle is to use the differences in backscattering characteristics of seabed surface materials to determine the sedimentary properties or morphological features of the target object. When operating, side-scan sonar sends wide-angle (vertical) acoustic beams to both sides, which can cover a large area of ​​the seabed. Typically, the detection width of each strip on one side can reach tens to hundreds of meters. Then, it receives the backscattered data returned from the seabed to image the seabed. Depending on the different detection objectives, different frequency transmission beams can be selected, ranging from 1 kHz to 1 MHz. For example, for the detection of the benthic environment, a higher frequency (>50 kHz) side-scan sonar is generally selected to obtain seabed surface features, such as sedimentary types, exposed rocks, seabed morphology (sand slopes, gullies, etc.), and other seabed surface structures. The side-scan sonar files generated by the side-scan sonar can be in XTF format, Qmips format, or other common side-scan sonar raw data formats. The specific format can be determined according to actual needs.

[0026] Optionally, the block information includes the total number of columns and rows of the tiles. Obtaining the block information based on the global image size of the side-scan sonar file includes: obtaining the global image size based on the geographical area covered by the side-scan sonar file; calculating the total number of columns and rows using the tile size and the global image size; and initializing the tiles.

[0027] Optionally, the geographical range can be represented as the latitude and longitude extreme values ​​of the area covered by the side-scan sonar file. The geographical range covered by the side-scan sonar file can be obtained through global calculation (the sonar file generated during the side-scan sonar processing is an image file with geographical information description. Each pulse strip and point on the pulse strip corresponds precisely to latitude and longitude information. Corresponding to all pulse data, the geographical range of the entire image can be obtained, which corresponds to the geographical range of the final processed GEOTIFF file).

[0028] Optionally, after obtaining the location information (such as latitude and longitude) of the geographic area, the information can be converted to the UTM coordinate system (or other coordinate systems that are convenient for data processing), and the global image size of the side-scan sonar file can be calculated based on the markers corresponding to the geographic area in the UTM coordinate system.

[0029] In one embodiment, the side-scan sonar file can be an XTF file. After obtaining the side-scan sonar file, the Stats.geoExtent parameter of the XTF file can be read. Based on the Stats.geoExtent parameter, the boundary coordinates corresponding to the geographic range (such as the minimum and maximum values ​​of the XY axis coordinates: minX, maxX, minY, maxY) can be obtained. The latitude and longitude of the center point (centerLon, centerLat) can be calculated. By obtaining the UTM partition information, the coordinates of the geographic range can be transformed into the UTM coordinate system based on the partition information.

[0030] Optionally, the tile size can be a preset value, and the tile size can be set and adjusted according to user needs. Furthermore, when obtaining the tile size, the corresponding target resolution can also be obtained so that the image corresponding to the tile can be displayed according to the target resolution during subsequent display.

[0031] Optionally, the size of the tile may include length and width, which can be represented by the number of pixels. The total number of columns and the total number of rows of the tile are obtained based on the ratio of the total image size to the length and width.

[0032] In one embodiment, the tile size is determined to be 8192 pixels * 8192 pixels, and the target resolution is 0.5m / pixel, based on the tile setting information. The global image width (fullImageW) and global image height (fullImageH) are determined based on the global image size; for example, if fullImageW = 32768 and fullImageH = 24576, then the total number of columns (totalCols) of the tile is 32768 / 8192 = 4, and the total number of rows (totalRows) of the tile is 24576 / 8192 = 3.

[0033] Optionally, after determining the total number of rows and columns of the tiles, a tile initialization operation can be performed. Specifically, each tile can be allocated independent storage space and its pixel information (image data array, valid area marker array, pixel count array) can be initialized.

[0034] Optionally, each tile can be allocated independent storage space. The pixel information of each tile includes an image data array, a valid area marker array, and a pixel count array, all of which have the same length and correspond one-to-one. The image data array is initialized to all zeros and is used to store the grayscale values ​​of pixels in the corresponding region of the tile. The valid area marker array is initialized to all zeros, where 0 represents an invalid region and 1 represents a valid region, and is used to mark the pixels corresponding to the valid mapping area within the tile. The pixel count array is initialized to all zeros and is used to record the number of times each pixel within the tile is covered by different pulse stripes.

[0035] Optionally, each tile can be iterated through to perform initialization, and in addition to initializing the array in the pixel information, the row and column information corresponding to the tile (the row and column where the tile is located) can also be stored.

[0036] In one embodiment, the tile initialization steps are as follows: loop through each tile, initialize an image data array (the array type can be Uint8Array, length tw*th, initial value 0), an effective region marker array (the array type can be Uint8Array, length tw*th, initial value 0), and a pixel count array (the array type can be Uint16Array, length tw*th, initial value 0) for each tile, and store the tile's row and column information (tr, tc).

[0037] S102: Update the pixel information of each tile based on the pulse strips and the geographical range corresponding to the tile in the side-scan sonar file.

[0038] Optionally, the pixel information includes an image data array, an effective area marker array, and a pixel count array. The pixel information of each tile is updated based on the pulse strips and the geographical range corresponding to the tile in the side-scan sonar file. This includes: obtaining pixel information from the pulse strips of the side-scan sonar file, whereby the pixel information includes the pixel's global coordinates and calculated grayscale values; and updating the pixel information according to the information of each pixel in different pulse strips. All pulse strips are processed in this way to update the image data array, effective area marker array, and pixel count array for all tiles.

[0039] Optionally, pixel information can be updated once when reading each pulse strip. Specifically, the sonar data of each pulse strip can be read sequentially according to the pulse order.

[0040] Optionally, after obtaining the grayscale value, the grayscale value can be quantized to a preset range for subsequent processing. Specifically, the preset range can be 0-255.

[0041] In one embodiment, PingPacket data of the side-scan sonar file can be read in pulse order, and the pixels of the port and starboard strips of each pulse strip can be calculated based on the read data. Each pixel contains global coordinates (gx, gy) and a gray value (gray). The gray value is quantized to the range of 0-255 by a dedicated function.

[0042] Optionally, the grayscale values ​​in the image data array can be updated using a multi-pulse weighted average fusion method. The update of the image data array includes: determining the currently read pulse strip; determining the tile corresponding to the pixel in the pulse strip and the local coordinates of the pixel within the tile based on global coordinates; determining the number of times the pixel is covered; determining a new grayscale value based on the calculated grayscale value, the number of times covered, and a preset calculation formula; and updating the image data array using the new grayscale value. The preset calculation formula is: Gmerge = (Gc*Cn + Gray) / (Cn + 1) In the formula, Gmerge is the new gray value, Gc is the current gray value of the pixel, Cn is the number of times it is covered, and Gray is the calculated gray value (i.e., the gray value of the pixel in the currently read pulse strip).

[0043] Optionally, after obtaining the global coordinates of a pixel, the tile corresponding to that pixel and its local coordinates within that tile can be calculated based on the position of each tile and the global coordinates of the pixel. The grayscale values ​​in the image data array are then updated based on these local coordinates.

[0044] In one embodiment, the tile corresponding to each pixel and its local coordinates (lx, ly) in the tile are calculated, and the index idx of the pixel in the image data array of the tile is calculated based on the local coordinates; the current grayscale value currentGray and the current number of times the pixel is covered are obtained; and the new grayscale value Gmerge after covering new pulse data is calculated according to a preset calculation formula.

[0045] Optionally, updating the effective region marker array includes: updating the effective region marker corresponding to the pixel based on whether the pixel is covered by the pulse strip; determining the neighboring pixels of the pixel, and updating the effective region marker corresponding to the neighboring pixels according to the correspondence between the neighboring pixels and the tiles.

[0046] Optionally, it can be determined whether there is a valid echo signal corresponding to a pixel in the pulse strip. If so, it is determined that the pixel is covered by the pulse strip, and the valid region marker corresponding to the pixel is updated. If not, the valid region marker is not updated. The method for updating the valid region marker can be set to 1, thereby identifying all pixels covered by the pulse strip.

[0047] Optionally, updating the valid region label corresponding to the neighboring pixel based on the correspondence between the neighboring pixel and the tile includes: detecting whether the neighboring pixel corresponds to a tile; if so, updating the valid region label corresponding to the neighboring pixel in the corresponding tile; if not, not marking the neighboring pixel as a valid region.

[0048] Optionally, the neighboring pixels can be the pixels corresponding to the 3×3 neighborhood of the current pixel, or they can be 2×2 or other sizes. The specific size can be determined according to actual needs.

[0049] Optionally, if a neighboring pixel is within the area corresponding to the tile, the valid area marker corresponding to that neighboring pixel can also be set to 1; if it is not within the area corresponding to the tile, it can be ignored.

[0050] In one embodiment, when a pixel is covered by a pulse strip (meaning a valid echo signal exists), the valid region marker corresponding to that pixel is set to 1. Simultaneously, the markers of the 3×3 neighboring pixels of that pixel are expanded. If a neighboring pixel is within the tile range, its valid region marker is also set to 1 to avoid isolated marking. If a neighboring pixel is not within the tile range, the tile corresponding to the neighboring pixel needs to be found, and the valid region marker corresponding to that tile is set to 1. If a neighboring pixel exceeds the calculation range corresponding to the side-scan sonar file, it is directly ignored and no further calculation is performed. Specifically, the mask marker (valid region marker) of the current pixel (lx, ly) can be set to 1 based on the pulse strip coverage information. Simultaneously, the 3×3 neighborhood of that pixel (dx from -1 to 1, dy from -1 to 1) is traversed, and valid region markers are performed based on whether each pixel in the neighborhood corresponds to a tile.

[0051] Optionally, updating the pixel count array includes: if it is determined that the currently read pulse strip covers a pixel, then updating the pixel count array corresponding to the pixel. Specifically, when a pixel is covered by the currently read pulse strip, the value corresponding to that pixel in the pixel count array can be incremented by 1, and the number of times each pixel is covered by each pulse strip can be recorded using the data in the pixel count array.

[0052] S103: Generate the image file corresponding to each tile.

[0053] Optionally, the image file includes pixel information and is used to generate the image corresponding to the side-scan sonar file. Generating the image file for each tile includes: performing pixel optimization processing based on information from the image data array and the effective region marker array, wherein the pixel optimization processing includes at least one of grayscale adjustment, noise removal, and effective region marker array update; and generating the image file based on the optimized pixel information.

[0054] Optionally, grayscale adjustment and noise removal include: determining pixels located in the effective area based on the effective area marker array and the pixel count array; if the grayscale value of the determined pixel is lower than the preset minimum grayscale threshold, then setting the grayscale value to the preset minimum grayscale threshold and performing noise removal processing on the pixels in the effective area.

[0055] Optionally, effective area protection can be achieved by adjusting grayscale values. This involves iterating through the effective area marker array and image data array for each tile. For pixels corresponding to effective areas (with the effective area marker for each pixel being 1), if their grayscale value is lower than a preset minimum grayscale threshold (e.g., 1), it is forcibly set to that threshold to prevent effective areas from being mistakenly identified as invalid areas. For pixels corresponding to invalid areas (with the effective area marker for each pixel being 0), their grayscale value is kept at 0, and no intervention is performed.

[0056] In one embodiment, for noise removal, a denoising function can be called to process the noise of pixels corresponding to the effective area, skipping the invalid area, reducing the amount of computation, and further improving the smoothness of the image.

[0057] Optionally, if the sonar image is further optimized, stitched, or incrementally updated, the effective area marker array of the corresponding tile can be adjusted simultaneously to ensure that the effectiveness of the effective area marker array and the image data array remains consistent.

[0058] In one embodiment, if new sonar Ping data is subsequently added, incremental rendering is performed using this data. Only the effective region marker array of the tile corresponding to the incremental rendering is updated, and the effective region marker of the newly added effective pixels is set to 1. There is no need to reinitialize the global effective region marker array.

[0059] Optionally, when outputting image files, each tile can be independently output as a GeoTIFF file with georeferencing information (such as the number of rows and columns of the tile) based on the UTM coordinate range of each tile (or other formats can be used depending on the image display requirements), supporting LZW compression and tile storage.

[0060] Optionally, the display of the image includes: independently loading the image file corresponding to each tile, stitching the image file together according to the position of the tile corresponding to the image file, and generating a global sonar image of the side-scan sonar file based on the stitching result.

[0061] Optionally, all output GeoTIFF files can be stitched together according to their spatial location based on the row and column positions of the tiles to generate a complete global sonar image. This image can be directly imported into a GIS system for subsequent analysis (such as terrain interpretation and analysis), achieving seamless file embedding and efficient processing.

[0062] In one embodiment, the file can be divided into 12 8192×8192 tiles based on the tile size and the global image coordinates of the side-scan sonar file. Each tile occupies no more than 256MB of memory, avoiding memory overflow issues. Multi-Ping weighted average fusion effectively eliminates the seams between adjacent stripes, improving image grayscale consistency by more than 70% compared to existing simple averaging methods. Through effective area management, more than 98% of the effective mapping areas can be accurately marked, improving the efficiency of subsequent noise removal by more than 50%. The output global sonar image conforms to GIS industry standards and can be directly integrated into existing processing workflows, meeting the practical application needs of marine surveying.

[0063] Compared with the prior art, this application has the following beneficial effects: 1. Overcoming the bottleneck of large file processing: By adopting a tile-based mechanism, large side-scan sonar files are divided into multiple small tiles, each of which is loaded and processed independently, avoiding memory overflow caused by loading global data at once and significantly reducing memory consumption; block-based parallel processing reduces redundant calculations, and independent tile output enables multi-threaded parallelism, improving overall processing efficiency; the tile size can be flexibly adjusted to adapt to different specifications of sonar files and hardware devices, making it highly feasible for engineering implementation, and supporting multi-file stitching and incremental rendering, reducing subsequent maintenance costs.

[0064] 2. Achieve smooth fusion of overlapping strip regions: Based on a weighted average fusion mechanism of pixel coverage times, pixels with more coverage times have more stable gray values ​​after fusion, effectively eliminating gray value abrupt changes and seams between adjacent pulse strips, and improving the visual consistency of images; multi-pulse data fusion can effectively suppress noise interference from single pulses and improve image quality; no fixed weights need to be preset, it can adapt to different sea conditions and different pulse intervals, has high fusion accuracy, takes into account detail performance and stability, and the algorithm logic is simple, with low computational load, and can be seamlessly compatible with block rendering architecture.

[0065] 3. Achieve precise management of effective areas: The effective area marker array clearly marks effective and invalid areas, resolving the confusion between invalid blank areas and underwater shadow areas, and improving the accuracy of subsequent processing; the effective area protection method can avoid the loss of effective mapping information due to optimization processing, and preserve underwater topographic details; subsequent processing only targets effective areas, skipping invalid areas, which greatly improves processing efficiency; the array is stored synchronously by tile, compatible with block rendering and weighted fusion mechanisms, adaptable to large file processing, and the marking rules can be adjusted according to actual needs, with good scalability.

[0066] 4. Adapted to GIS industry standards: The output tile image is a GeoTIFF file with georegistration, which supports standardized compression and storage. It can be directly connected to GIS systems, meeting the standardization needs of industries such as marine surveying and underwater engineering inspection. The overall technical solution can be directly integrated into the existing sonar data processing system without additional hardware upgrades, making it highly practical.

[0067] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.

[0068] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0069] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A method for processing side-scan sonar files, characterized in that, include: The block information is obtained based on the global image size of the side-scan sonar file, and the block information includes the total number of columns and the total number of rows of the tiles. The pixel information of each tile is updated based on the pulse strips of the side-scan sonar file and the geographical range corresponding to the tile. The pixel information includes an image data array, an effective area marker array, and a pixel count array. An image file corresponding to each tile is generated, the image file including the pixel information, and the image file is used to generate the image corresponding to the side-scan sonar file.

2. The side-scan sonar file processing method according to claim 1, characterized in that, The step of obtaining block information based on the global image size of the side-scan sonar file includes: The global image size is obtained based on the geographical area covered by the side-scan sonar file; The total number of columns and the total number of rows are calculated using the size of the tiles and the size of the global image. Initialize the tiles.

3. The side-scan sonar file processing method according to claim 1, characterized in that, Based on the pulse stripes of the side-scan sonar file and the geographical range corresponding to the tile, the pixel information of each tile is updated, including: Pixel information is obtained from the pulse-by-pulse strips of the side-scan sonar file, and the pixel information includes the global coordinates of the pixel and the calculated gray value; The pixel information is updated based on the information of each pixel in different pulse strips.

4. The side-scan sonar file processing method according to claim 3, characterized in that, The update of the image data array includes: Determine the currently read pulse strip, and determine the tile corresponding to the pixel in the pulse strip and the local coordinate of the pixel in the tile based on the global coordinates; The number of times the pixel is covered is determined, a new gray value is determined based on the calculated gray value, the number of times it is covered, and a preset calculation formula, and the image data array is updated using the new gray value; The preset calculation formula is: Gmerge = (Gc*Cn + Gray) / (Cn + 1) In the formula, Gmerge is the new grayscale value, Gc is the current grayscale value of the pixel, Cn is the number of times it is covered, and Gray is the calculated grayscale value.

5. The side-scan sonar file processing method according to claim 3, characterized in that, The update of the valid region marker array includes: The effective region marker corresponding to the pixel is updated based on whether the pixel is covered by the pulse stripe. Determine the neighboring pixels of the pixel, and update the valid region marker corresponding to the neighboring pixels according to the correspondence between the neighboring pixels and the tiles.

6. The side-scan sonar file processing method according to claim 5, characterized in that, Update the valid region marker corresponding to the neighboring pixels according to the correspondence between the neighboring pixels and the tiles, including: Detect whether the neighboring pixels correspond to tiles; If so, update the valid region marker corresponding to the neighboring pixel in the corresponding tile; If not, then the neighboring pixels will not be marked as valid regions.

7. The side-scan sonar file processing method according to claim 5, characterized in that, The update of the pixel count array includes: If it is determined that the currently read pulse strip covers the pixel, then the pixel count array corresponding to the pixel is updated.

8. The side-scan sonar file processing method according to claim 1, characterized in that, The process of generating an image file corresponding to each tile includes: Pixel optimization processing is performed based on the information of the image data array and the effective region marker array. The pixel optimization processing includes at least one of grayscale value adjustment, noise removal, and effective region marker array update. The image file is generated based on the optimized pixel information.

9. The side-scan sonar file processing method according to claim 8, characterized in that, The grayscale adjustment and the noise removal include: The pixels located in the valid region are determined based on the valid region marker array and the pixel count array; If it is determined that the gray value of the pixel is lower than the preset minimum gray value threshold, then the gray value is set to the preset minimum gray value threshold, and noise reduction processing is performed on the pixels in the effective area.

10. The side-scan sonar file processing method according to claim 8, characterized in that, The display of the image includes: Each tile's corresponding image file is loaded independently, and the image files are then stitched together based on the tile positions corresponding to the image files. The global sonar image of the side-scan sonar file is generated based on the stitching results.