Image target detection and recognition method, system and medium
By combining second-order normalization operator and Gaussian filtering smoothing with OTSU threshold segmentation, the problem of low mine identification accuracy in underwater target detection is solved, and accurate mine detection in high-noise environments is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2023-12-20
- Publication Date
- 2026-07-24
AI Technical Summary
Existing underwater target detection methods have poor accuracy in mine detection, especially since autonomous underwater vehicles equipped with imaging sonar cannot provide sufficient computing power, resulting in poor performance of traditional methods on high-noise sonar images.
Gradient detection is performed using a second-order normalization operator, combined with Gaussian filtering smoothing and OTSU threshold segmentation to filter out regions that meet the requirements for gradient and brightness, and then a classifier is used for mine identification.
It improves the accuracy of mine detection, effectively suppresses noise interference, preserves true edges, and enhances the recognition effect of target areas.
Smart Images

Figure CN117809165B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing, and more specifically, relates to a method, system, and medium for target detection and recognition in images. Background Technology
[0002] Mines play a crucial role in naval warfare due to their small size, low noise, good stealth capabilities, flexible use, high destructive power, and low cost. Mine-hunting equipment needs to be able to detect underwater mines quickly and accurately. With the advent of high-resolution imaging sonar and autonomous underwater vehicles (AUVs), sonar images are increasingly being used for mine detection.
[0003] A sonar image consists of three parts: the target highlight area, the target shadow area, and the background area. The target highlight area is mainly the region caused by sound waves reflecting off the target surface; the shadow area is the region where sound waves have difficulty reaching due to the obstruction of the target. The purpose of underwater target detection is to extract the target highlight area and shadow area from the complex background area while preserving as much of the original image information as possible.
[0004] Mines target detection methods can be categorized into deep learning methods and traditional methods. With the development of end-to-end detection networks, deep learning methods are increasingly being applied to target detection of specific categories. For example, transfer learning within deep learning is used to study underwater target recognition technology. However, in minehunting operations, autonomous underwater vehicles (AUVs) equipped with imaging sonar generally lack sufficient computing power to support target detection networks. Therefore, traditional methods must be employed, which involve first selecting potential target areas, extracting corresponding features, and then classifying and recognizing them based on prior information and a knowledge base, resulting in poor recognition accuracy. Alternatively, a detection tool could be developed to process sonar data captured by AUVs, applying preprocessing steps to locate regions of interest, and then extracting features for classification and recognition. However, existing detection tools perform poorly on noisy sonar images. Summary of the Invention
[0005] In view of the shortcomings of the existing technology and the need for improvement, the present invention provides a method, system and medium for target detection and recognition in images, with the aim of improving the accuracy of target detection and recognition in images, especially the accuracy of mine detection and recognition in sonar images.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for target detection and recognition in an image is provided, comprising: calculating the gradient G in the horizontal direction of the image. x and the gradient G in the vertical direction y ; For G x The values at each position are squared and normalized to obtain the second-order normalized gradient in the horizontal direction. For G y The values at each position are squared and normalized to obtain the second-order normalized gradient in the vertical direction. calculate absolute value and The sum of the absolute values is used as the second-order normalization operator of the image; the second-order normalization operator is used to perform gradient detection on the image to identify target edges and suppress noise-induced interference edges, and the target in the image is identified based on the target edges.
[0007] Furthermore, G x G y They are respectively:
[0008]
[0009]
[0010] Wherein, I represents the image.
[0011] Furthermore, They are respectively:
[0012]
[0013]
[0014] Where x is G x Each position in x min x max G x The minimum and maximum values in G, where y is G y Each position in the text, y min y max G y The minimum and maximum values in the range.
[0015] Furthermore, the image is a sonar image, the target is a mine, and the gradient detection of the image using the second-order normalization operator specifically includes: converting the sonar image into a grayscale sonar image, performing gradient detection on the grayscale sonar image using the second-order normalization operator, and filtering out regions where the gradient change is greater than a set threshold, wherein the target edge is the edge of the region.
[0016] Furthermore, the method further includes: performing Gaussian filtering smoothing on the grayscale sonar image to remove outliers in the grayscale sonar image; segmenting the grayscale sonar image with outliers removed using an OTSU threshold to segment foreground and background regions, and removing interference regions in the foreground region whose connected area is greater than the connectivity threshold.
[0017] Furthermore, the step of identifying the target in the image based on the target edge specifically includes: inputting the intersection of the region formed by the target edge and the foreground region after removing interference regions into a classifier for classification and identification, so as to identify the mine in the sonar image.
[0018] According to another aspect of the present invention, an image target detection and recognition system is provided, comprising: a processor; and a memory storing a computer-executable program, which, when executed by the processor, causes the processor to perform the image target detection and recognition method as described above.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the target detection and recognition method in an image as described above.
[0020] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects:
[0021] (1) Provides a method for object detection and recognition in images, wherein the square term is normalized. It can be decomposed into a first-order normalized gradient and a linear decay coefficient between 0 and 1 that is related to the gradient itself. This linear decay coefficient has a significant effect on small gradients but has almost no effect on large gradients. It plays the role of suppressing small gradients and highlighting large gradients, thus making it better at extracting the true boundary from noisy images and improving the accuracy of target recognition, especially mine detection and recognition.
[0022] (2) A method for extracting suspicious mine areas by combining brightness detection and gradient detection is provided. Gaussian filtering is used to smooth the image to remove outliers to avoid oversegmentation in the future. The size of the connected region is used to exclude some interference, such as large connected regions like underwater terraces. Finally, only the region that meets the requirements of gradient and brightness is left, which further improves the accuracy of mine detection and identification. Attached Figure Description
[0023] Figure 1 This is a flowchart of a target detection and recognition method in an image provided in an embodiment of the present invention;
[0024] Figure 2 This is a flowchart illustrating the implementation of extracting suspected mine areas from sonar images according to an embodiment of the present invention.
[0025] Figure 3A , Figure 3B , Figure 3C These are the original sonar image, the first-order normalized gradient map, and the second-order normalized gradient map provided in the embodiments of the present invention;
[0026] Figure 4This is a schematic diagram illustrating the real-time mine detection effect provided in an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0028] In this invention, the terms "first," "second," etc. (if present) in the invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0029] Figure 1 This is a flowchart illustrating a target detection and recognition method in an image provided in an embodiment of the present invention. (See attached document.) Figure 1 , combined Figures 2-4 The target detection and recognition method in the image in this embodiment will be described in detail. The method includes operations S1-S3.
[0030] Operation S1 calculates the gradient G in the horizontal direction of the image. x and the gradient G in the vertical direction y .
[0031] G x and G y Image I is convolved with a kernel of odd size. Preferably, G... x G y They are respectively:
[0032]
[0033]
[0034] Where I represents the image.
[0035] Operation S2, on G x The values at each position are squared and normalized to obtain the second-order normalized gradient in the horizontal direction. For G y The values at each position are squared and normalized to obtain the second-order normalized gradient in the vertical direction. calculate absolute value and The sum of the absolute values is used as the second-order normalization operator for the image.
[0036] In this embodiment, the target region and the background region in the image differ in gradient. Therefore, a second-order edge (SOE) operator is designed. This SOE operator is a combination of Gaussian smoothing and differential operation, which can suppress a large number of noisy edges in the sonar image, preserve the true edge of the target, and is highly efficient. This increases the proportion of true targets in the suspicious target region, which is helpful for subsequent target feature extraction and classification. The image is, for example, a sonar image, and the target is, for example, a mine. This SOE operator can be used to extract the suspicious mine region in the sonar image.
[0037] According to an embodiment of the present invention, They are respectively:
[0038]
[0039]
[0040] Where x is G x Each position in x min x max G x The minimum and maximum values in G, where y is G y Each position in the text, y min y max G y The minimum and maximum values in the range.
[0041] In this embodiment, the sum of absolute values is used instead of the sum of square roots to improve computational efficiency, resulting in a second-order normalization operator G. 2rd for:
[0042]
[0043] The following analysis examines the unique effects of the second-order normalization operator designed in this embodiment compared to the first-order normalization operator.
[0044] First-order normalization operator G 1rd It can be represented as:
[0045]
[0046]
[0047]
[0048] in, The first-order normalized gradient in the horizontal direction. This is the first-order normalized gradient in the vertical direction.
[0049] Second-order normalized gradient in the horizontal direction For example, it can be broken down as follows:
[0050]
[0051] It can be seen that, It can be broken down into The product of χ(x) and χ(x), where χ(x) is a linear decay coefficient between 0 and 1 that depends on the magnitude of the gradient itself. When the original gradient is small, χ(x) can significantly decay the original first-order normalized gradient. When the original gradient is large and close to the maximum gradient of the entire image, the second-order normalized gradient is close to the first-order normalized gradient. That is, the linear decay coefficient has a significant effect on small gradients but has almost no effect on large gradients. Thus, it can suppress small gradients and highlight large gradients, thereby making it better at extracting the true boundaries from noisy images.
[0052] contrast Figure 3A The original sonar image shown Figure 3B The results shown are obtained by applying the first-order normalization operator to the original sonar image. Figure 3C The results shown, applying the second-order normalization operator to the original sonar image, reveal that the edge map detected by the first-order normalization operator contains a large amount of noise; the second-order normalization suppresses the noise, resulting in a significant improvement. In the lower right corner of the original sonar image, there are three mines. It can be observed that the mine targets in the first-order normalization gradient map are submerged in background noise, making further detection impossible; while the second-order normalization gradient map suppresses the noisy edges and preserves the mine information.
[0053] Due to the influence of the seabed environment and the interference of sound waves themselves, sonar images typically contain Gaussian noise, impulse noise, and speckle noise. In this embodiment, gradient detection of sonar images is performed directly based on a second-order normalization operator, which can preserve true edges and suppress noise-induced edges in the sonar image. The second-order normalization operator can also help extract potential minefield areas, improving the accuracy of mine detection and identification.
[0054] Operation S3 uses a second-order normalization operator to perform gradient detection on the image to identify target edges and suppress noise-induced interference edges, thereby identifying the target in the image based on the target edges.
[0055] Preferably, when the method of this embodiment is applied to the field of mine detection, the image is a sonar image, the target is a mine, and gradient detection is performed on the image using a second-order normalization operator. Specifically, this includes: converting the sonar image into a grayscale sonar image, performing gradient detection on the grayscale sonar image using a second-order normalization operator, and filtering out regions where the gradient change is greater than a set threshold. The target edge is the edge of the region.
[0056] According to an embodiment of the present invention, the method further includes: performing Gaussian filtering smoothing on the grayscale sonar image to remove outliers; segmenting the grayscale sonar image after removing outliers using an OTSU threshold to segment foreground and background regions, and removing interference regions in the foreground region whose connected area is greater than the connectivity threshold. Identifying targets in the image based on target edges specifically includes: inputting the intersection of the region formed by the target edges and the foreground region after removing interference regions into a classifier for classification and identification to identify mines present in the sonar image.
[0057] See Figure 2 This demonstrates the process of using brightness and gradient detection in sonar images to screen for suspicious minefields.
[0058] The overall process for extracting suspected minefield areas is mainly divided into a brightness detection module and a gradient detection module. In the brightness detection module, firstly, a Gaussian filter is used to smooth the image to remove outliers (represented as discrete black dots in the sonar image), preventing oversegmentation later. Then, an OTSU threshold is used to segment the foreground and background regions. Furthermore, considering that mines are usually small targets, the size of the connected regions can be used to exclude some interference, such as larger connected regions like underwater terraces. The gradient detection module is used to handle ship self-noise. In sonar images, the brightness of the target and background may be very similar, causing the background to engulf the target. The difference lies in the larger gradient around the target. Therefore, in this embodiment, a second-order normalization operator is used on the grayscale sonar image simultaneously, leaving regions with large gradient changes. Then, the binarized results from the brightness detection module and the gradient detection module are intersected, leaving only regions where both gradient and brightness meet the requirements. Finally, these connected regions are dilated, allowing the subsequent classifier to learn more comprehensive and richer features.
[0059] See intermediate results of region extraction. Figure 2 Observing the brightness binarized sonar image output by the brightness detection module, it can be seen that due to the ship's self-noise, a large, bright background area appears in the upper right region, obscuring the bottom mine in this area. However, the gradient of the second-order normalization operator on the smooth background is very small. After finding the intersection of the two, the abnormally bright background with a small gradient can be filtered out, and the bottom mine in this area can be retained as a suspicious mine area.
[0060] A second-order normalization operator is used to help extract suspicious minefield areas. Then, appropriate brightness (e.g., average, maximum, minimum brightness) and shape features (e.g., oriented gradient histogram, HOG) are extracted from these areas before being fed into a classifier (e.g., support vector machine, decision tree) for classification and identification. Real-time detection results are shown below. Figure 4 As shown. See also Figure 4As can be seen, both bottom mines and moored mines in the sonar image are accurately detected and identified. The green target box represents bottom mines, and the red target box represents moored mines, indicating that the method in this embodiment has very good accuracy in mine detection and identification.
[0061] This invention also provides an image target detection and recognition system, comprising: a processor; and a memory storing a computer-executable program, which, when executed by the processor, causes the processor to perform the above-described image target detection and recognition method.
[0062] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for detecting and recognizing targets in images.
[0063] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for target detection and recognition in an image, characterized in that, include: Calculate the gradient G in the horizontal direction of the image. x and the gradient G in the vertical direction y ; For G x The values at each position are squared and normalized to obtain the second-order normalized gradient in the horizontal direction. For G y The values at each position are squared and normalized to obtain the second-order normalized gradient in the vertical direction. calculate absolute value and The sum of the absolute values is used as the second-order normalization operator for the image; The second-order normalization operator is used to perform gradient detection on the image to identify target edges and suppress noise-induced interference edges. Based on the target edges, the target present in the image is identified.
2. The target detection and recognition method in an image as described in claim 1, characterized in that, G x G y They are respectively: Wherein, I represents the image.
3. The target detection and recognition method in an image as described in claim 1, characterized in that, They are respectively: Where x is G x Each position in x min x max G x The minimum and maximum values in G, where y is G y Each position in the text, y min y max G y The minimum and maximum values in the range.
4. The target detection and recognition method in an image as described in any one of claims 1-3, characterized in that, The image is a sonar image, the target is a sea mine, and the gradient detection of the image using the second-order normalization operator specifically includes: The sonar image is converted into a grayscale sonar image. The second-order normalization operator is used to perform gradient detection on the grayscale sonar image, and regions with gradient changes greater than a set threshold are selected. The target edge is the edge of the region.
5. The target detection and recognition method in an image as described in claim 4, characterized in that, The method further includes: Gaussian filtering is applied to the grayscale sonar image to smooth it and remove outliers. The OTSU threshold is used to segment the grayscale sonar image after removing outliers to separate the foreground and background regions, and to remove interference regions in the foreground region whose connected area is greater than the connectivity threshold.
6. The target detection and recognition method in an image as described in claim 5, characterized in that, The step of identifying the target present in the image based on the target edge specifically includes: The intersection of the region formed by the target edge and the foreground region after removing interference is input into a classifier for classification and identification, so as to identify the mines present in the sonar image.
7. A target detection and recognition system in an image, characterized in that, include: processor; A memory storing a computer-executable program, which, when executed by the processor, causes the processor to perform the target detection and recognition method in an image as described in any one of claims 1-6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the target detection and recognition method in the image as described in any one of claims 1-6.