Region of interest extraction method and system based on contrast box and generalized morphological filtering
By comparing the box and generalized morphological filtering, the problems of noise and reverberation interference in sonar signal processing are solved, and the accurate extraction of the region of interest is achieved, which improves the clarity and applicability of the target boundary.
Patent Information
- Application Number
- CN202411925920.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In existing sonar signal processing, the extraction of the region of interest is susceptible to noise and reverberation interference, and it is difficult to extract accurately.
Using a method based on contrast box and generalized morphological filtering, pre-processing signal data is pre-processed by beamforming and matching, gain processing is performed using contrast box sliding windows, and the region of interest is extracted through generalized morphological operations, protection areas and transition areas are set, and opening and closing operations are combined to enhance local contrast and background estimation.
It effectively suppresses noise, clearly extracts target boundaries, improves the positioning accuracy and robustness of the region of interest, and is suitable for complex backgrounds and blurred boundaries, and has a wide range of applicability.
Smart Images

Figure CN119850917B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sonar array signal processing, and in particular to a method and system for extracting regions of interest based on contrast boxes and generalized morphological filtering. Background Art
[0002] With increasing interest in underwater observation and utilization of marine resources, sonar signal processing and analysis has become a hot research topic. Unlike conventional environments, the marine environment often faces complex conditions such as underwater turbulence and diffusion, severe water absorption and scattering, strong noise, and high reverberation. Mainstream sonar signal processing techniques, including time-frequency analysis methods such as wavelet transform, Wiener filtering, and short-time Fourier transform, have long provided a foundation for echo feature extraction.
[0003] However, after long-distance ocean channel propagation, the separability of fine-structure features extracted using time-frequency analysis decreases, making them less practical. Other methods for extracting regions of interest include extreme value search, which first determines a threshold value and then searches for extreme points in the area above the threshold. However, this method is susceptible to glitches and can result in significant errors under low signal-to-noise ratio conditions. Other researchers have studied the use of machine learning to extract sonar regions of interest, but these methods rely heavily on rich datasets and have certain limitations.
[0004] In summary, during sonar array signal processing, the extraction of regions of interest (ROIs) is difficult due to interference from noise and reverberation. Accurately extracting ROIs from sonar signals remains a crucial and challenging issue. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for extracting a region of interest based on contrast box and generalized morphological filtering, in view of the shortcomings of the existing technology, so as to solve the problem that the extraction of the region of interest is easily affected by noise and reverberation interference.
[0006] To solve the above technical problems, the technical solution adopted by the present invention is: a method for extracting a region of interest based on contrast boxes and generalized morphological filtering, comprising the following steps:
[0007] Import the array signal data to be processed, and obtain the preliminary pre-processed signal matrix data Z1 through beamforming and matched filtering;
[0008] Generate a contrast box according to the preset scale information of the region of interest, where the contrast box is a coefficient matrix Z2 with a length and a width of L;
[0009] Perform sliding window multiplication on the coefficient matrix Z2 on the pre-processed signal matrix data Z1 to obtain the signal matrix Z3 after gain;
[0010] The signal matrix Z3 after gain is subjected to generalized morphological calculation to extract the region of interest Z4.
[0011] After the preprocessed signal matrix data Z1 is calculated by sliding window multiplication of the coefficient matrix Z2, the local peak-to-average ratio of the coefficient matrix will be further improved, and the gained signal matrix Z3 will be obtained. Then, after generalized morphological calculation, the interference information elements outside the target scale range are filtered out.
[0012] The present invention performs sliding window multiplication calculation on the coefficient matrix Z2 on the preprocessed signal matrix data Z1 to obtain the gained signal matrix Z3. The specific implementation process includes:
[0013] Slide the comparison box on the pre-processed signal matrix data Z1;
[0014] For each window position in the preprocessed signal matrix data Z1, each element in the window position is multiplied by the element at the corresponding position in the coefficient matrix Z2, and the product results are formed into a new matrix, that is, the gained signal matrix Z3 is obtained.
[0015] Using the designed coefficient matrix Z2 to process the preprocessed signal matrix data Z1 can make the gain effect of local information smoother and prevent the information elements within the target scale range from being distorted.
[0016] The process of determining the elements in each window position includes:
[0017] The contrast box is divided into a protection area and a transition area with the same centroid as the contrast box, wherein the protection area is a circular area with a diameter of D;
[0018] The coefficient value of the protection area is set to 1, and the coefficient of the transition area is calculated using the formula Assign a value, where the value range of x is
[0019] The coefficients of the protection area and the coefficients of the transition area are elements in the corresponding window positions.
[0020] The designed coefficient matrix takes into account the characteristic that the information element value gradually decreases from the inside to the outside within the target scale range, and uses the length from the centroid as a measure to quickly generate the coefficient matrix; the designed coefficient matrix can maintain the true information element value of the original signal within the protection area, and the information element value slowly decreases in the transition area.
[0021] In the present invention, the process of determining the protection area and the transition area includes:
[0022] For any element position (i, j) in the comparison box, calculate the Euclidean distance from this position to the centroid (L / 2, L / 2); where i and j represent the row and column indices respectively;
[0023] If the Euclidean distance is less than or equal to D / 2, this position belongs to the protected area; if the Euclidean distance is greater than D / 2 and satisfies 0 <= i < L and 0 <= j < L, this position belongs to the transition area.
[0024] In the present invention, the expression of the region of interest Z4 is:
[0025]
[0026] where ° represents the opening operation, · represents the closing operation, b1 represents the structural element b1(k1, k1) constructed using the template size k1 representing the upper limit of filtering, and b2 represents the structural element b2(k2, k2) constructed using the template size k2 representing the lower limit of filtering.
[0027] In sonar signal processing, the opening operation can remove small noise highlights or isolated interference points in the signal matrix, and the closing operation can fill small holes or gaps in the target signal. Through the combined operation, the overall shape and range of the target can be more accurately extracted, effectively handling the problem of blurred target boundaries and accurately obtaining the region of interest.
[0028] As an inventive concept, the present invention also discloses a region of interest extraction system based on a comparison box and generalized morphological filtering, including a memory, a processor, and a computer program stored on the memory; the processor executes the computer program to implement the steps of the above method.
[0029] Compared with the prior art, the beneficial effects of the present invention are: The present invention makes full use of the morphological characteristics of the region of interest, better handles complex backgrounds and blurred target boundaries by enhancing local contrast and background estimation, accurately obtains the region of interest, and has a wider applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flowchart of a method for extracting a region of interest based on a comparison box and generalized morphological filtering according to an embodiment of the present invention;
[0031] Figure 2 is an example of original array signal data (normalized matrix);
[0032] Figure 3 A schematic diagram of a comparison box matrix in an embodiment of the present invention;
[0033] Figure 4: This is the result (normalized matrix) of extracting the region of interest from the example data of an embodiment of the present invention. DETAILED DESCRIPTION
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0035] Example 1
[0036] An embodiment of the present invention provides a method for extracting a region of interest based on contrast boxes and generalized morphological filtering, comprising the following steps:
[0037] Figure 1 This is a flow chart of the method for extracting regions of interest based on contrast boxes and generalized morphological filtering according to an embodiment of the present invention. Figure 1 Describe the method. Figure 1 As shown, the method includes the following steps:
[0038] Step 1: Import the array signal data to be processed and convert it into preliminary pre-processed signal matrix data Z1 through beamforming and matched filtering.
[0039] Figure 2 This is an example of raw array signal data. Data sources and import methods for this embodiment: The array signal data to be processed can originate from a variety of sensor arrays. For example, in sonar signal processing, this can be sound signals collected by an array consisting of multiple microphones. This raw data is typically stored in a specific data format, such as a common binary file format or a data frame format that complies with a communication protocol. During import, the data is read according to the data format specifications using a corresponding software interface or programming library, and then loaded into the memory space of the processing system for subsequent processing.
[0040] Step 2: Generate a contrast box based on the preset ROI scale information, where the contrast box is a coefficient matrix Z2 with a length and width of L. The ROI scale information can be set based on the possible size range of the target (such as the estimated size of the underwater target object) and the detection accuracy requirements.
[0041] Figure 3This is a schematic diagram of the comparison box matrix in an embodiment of the present invention. If the target may be a small-area target region, the value of L can be relatively small; if it is for a large-area target region, L can be set larger. In terms of programming implementation, for the specific operation of generating the comparison box coefficient matrix Z2, taking a common two-dimensional matrix as an example, an array initialization operation in a programming language can be used to create a matrix structure of size L×L. The initial values of the matrix elements can be gradually updated according to the partitioning and assignment rules in the subsequent steps. Here, the basic space allocation and structure construction of the matrix are first completed to make it have the basis for carrying the coefficient information related to the comparison box.
[0042] Step 3: Divide the comparison box into a protection area and a transition area that are the same as the centroid of the comparison box, where the protection area is a circular area with a diameter of D. After determining the centroid, to divide the protection area into a circular area with a diameter D, a common implementation method is to distinguish whether each position belongs to the protection area or the transition area through distance judgment. That is, for any element position (i, j) (i and j represent the row and column indices respectively) in the comparison box matrix, calculate its Euclidean distance to the centroid (L / 2, L / 2). If the distance is less than or equal to D / 2, then this position belongs to the protection area; if the distance is greater than D / 2 and within the range of the comparison box (that is, satisfying the conditions 0 <= i < L and 0 <= j < L), then it belongs to the transition area. By looping through each element position in the comparison box, the division logic judgment of the entire area is completed, preparing for the coefficient assignment of different areas in the subsequent steps.
[0043] Step 4: Set the coefficient value of the protection area of the comparison box to 1, and the coefficient of the transition area is assigned using the formula where the value range of x is Based on the protection area already divided in Step 3, in the program, by looping through the element positions in the comparison box matrix that belong to the protection area (such as those determined by distance judgment before), the value of the corresponding matrix element can be directly assigned to 1. The coefficient assignment of the transition area is based on the given formula where the value range of x here is
[0044] Step 5: Perform sliding window multiplication on the contrast box matrix Z2 on the pre-processed signal matrix data Z1 to obtain the signal matrix Z3 after gain. The purpose of the sliding window multiplication is to use the coefficients of the contrast box matrix Z2 to perform window-by-window weighted processing on the pre-processed signal matrix data Z1, thereby achieving gain adjustment of the signal. In the specific operation, a contrast box (size is L×L) is slid on the pre-processed signal matrix Z1, and the sliding step size can be set according to actual needs (for example, the step size is L / 2, which means moving one unit position each time). For each window position in Z1 (that is, the sub-matrix area corresponding to the contrast box), each element in the sub-matrix area is multiplied with the element at the corresponding position in the contrast box matrix Z2, and then the product results are combined into a new matrix, that is, the signal matrix Z3 after gain is obtained.
[0045] Step 6: Perform a generalized morphological calculation on the signal matrix Z3, where the generalized morphological structuring element is: Define the region of interest template sizes k1 and k2, use the template size k1 representing the upper filter limit to construct the structuring element b1(k1, k1), and use the template size k2 representing the lower filter limit to construct the structuring element b2(k2, k2). Define the region of interest template sizes k1 and k2, use the template size representing the upper filter limit to construct the structuring element, and use the template size representing the lower filter limit to construct the structuring element. In underwater acoustics, the values of k1 and k2 depend on the intensity range of the target signal and the characteristics of the background noise. If the target signal is strong and the background noise is relatively weak, the values can be set larger to retain more target signal features, while the values can be appropriately reduced to remove smaller noise fluctuations. Conversely, more fine-tuning of the values is required to balance target extraction and noise suppression.
[0046] Step 7: Perform generalized morphological operations on the signal matrix Z3 after gain according to the formula to extract the region of interest Z4:
[0047]
[0048] Where ° represents the opening operation and · represents the closing operation.
[0049] Figure 4 This is the result of extracting the region of interest in an embodiment of the present invention.
[0050] Figure 4 This paper demonstrates the effect of ROI extraction based on contrast box and generalized morphological filtering in an embodiment of the present invention. Under complex background noise, this method has the following advantages:
[0051] 1. Significant noise suppression: effectively removes background noise, retains only the main features of the target area, and optimizes the target boundary shape through opening and closing operations.
[0052] 2. Clear boundaries: The extracted target outline is clearer, with significantly improved integrity and accuracy, and the boundary fuzziness problem is reduced.
[0053] 3. Accurate positioning: The region of interest accurately corresponds to the target location, and the sliding window gain and morphological filtering improve the separation effect.
[0054] 4. Strong robustness: Adapts to different target shapes, sizes and background noise intensities, showing good stability and applicability.
[0055] Figure 4 The feasibility and practical value of this method have been verified, and it can accurately extract the target area in the sonar signal.
[0056] In sonar signal processing, the opening operation can remove smaller noise highlights or isolated interference points in the signal matrix, while the closing operation can fill small holes or gaps in the target signal. Through combined operations, the overall shape and range of the target can be extracted more accurately, the problem of blurred target boundaries can be effectively handled, and the area of interest can be accurately obtained.
[0057] Example 2
[0058] Embodiment 2 of the present invention provides a region of interest extraction based on contrast box and generalized morphological filtering corresponding to the above-mentioned embodiment 1, including a memory, a processor and a computer program stored in the memory; the processor executes the computer program in the memory to implement the steps of the method in the above-mentioned embodiment 1.
[0059] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage.
[0060] In other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors, which are not limited herein.
[0061] Example 3
[0062] Embodiment 3 of the present invention provides a computer-readable storage medium corresponding to the above-mentioned embodiment 1, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method of the above-mentioned embodiment 1 are implemented.
[0063] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0064] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal translation scripting language JavaScript, etc.
[0065] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0067] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0068] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A method for extracting regions of interest based on contrast boxes and generalized morphological filtering, characterized in that: It includes the following steps: Import the array signal data to be processed, and obtain the preliminary preprocessed signal matrix data Z1 through beamforming and matched filtering; Generate a comparison box according to the preset scale information of the region of interest, where the comparison box is a coefficient matrix Z2 with both length and width of L; Perform a sliding window multiplication calculation of the coefficient matrix Z2 on the preprocessed signal matrix data Z1 to obtain the gain signal matrix Z3; Perform a generalized morphological calculation on the gain signal matrix Z3 to extract the region of interest Z4; The specific implementation process of performing a sliding window multiplication calculation of the coefficient matrix Z2 on the preprocessed signal matrix data Z1 to obtain the gain signal matrix Z3 includes: Slide the comparison box on the preprocessed signal matrix data Z1; For each window position in the preprocessed signal matrix data Z1, multiply each element in this window position by the element at the corresponding position in the coefficient matrix Z2, and form the product results into a new matrix, that is, obtain the gain signal matrix Z3; The determination process of each element in each said window position includes: Divide the comparison box into a protection area and a transition area with the same position centroid as the comparison box, where the protection area is a circular area with a diameter of D; The coefficient value of the protection area is set to 1, and the coefficient of the transition area is calculated using the formula Assign a value, where the value range of x is Among them, the coefficients of the protection area and the transition area are the elements at the corresponding window positions; The expression of the region of interest Z4 is: Where ° represents the opening operation, · represents the closing operation, b1 represents the structural element b1(k1,k1) constructed using the template size k1 representing the filtering upper limit, and b2 represents the structural element b1(k1,k1) constructed using the template size k2 representing the filtering lower limit.
2. The method for extracting regions of interest based on contrast boxes and generalized morphological filtering according to claim 1, characterized in that: The determination process of the protection area and the transition area includes: For any element position (i,j) in the comparison box, calculate the Euclidean distance from this position to the centroid (L / 2,L / 2); where, i and j respectively represent the row and column indexes; If the Euclidean distance is less than or equal to D / 2, then this position belongs to the protection area; if the Euclidean distance is greater than D / 2 and satisfies 0≤i<L and 0≤j<L, then this position belongs to the transition area.
3. A region of interest extraction system based on contrast box and generalized morphological filtering, comprising a memory, a processor, and a computer program stored in the memory; characterized in that: The processor executes the computer program to implement the steps of the method described in any one of claims 1 to 2 above.
Citation Information
Patent Citations
Region of interest extraction method and device, electronic equipment and storage medium
CN111767920A
Three-dimensional SAR image target-of-interest extraction method based on self-adaptive threshold
CN114022877A