Marine small target identification method, device, equipment and medium

By performing grayscale processing and contour extraction on small target images at sea, combined with Gaussian filtering and threshold processing, the low recognition accuracy caused by few pixels and complex sea conditions at sea is solved, and higher recognition accuracy and anti-interference are achieved ability.

CN119295968APending Publication Date: 2025-01-10NAVAL UNIV OF ENG PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411108911.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Small targets at sea have few pixels, few information in visual images, complex sea surface conditions, and difficult to apply fixed parameters, resulting in low recognition accuracy, especially affected by wind and wave interference.

Method used

By performing grayscale processing and smoothing on the target image, the target outline is extracted based on the preset threshold ratio and hard threshold, box and identify the target object, use the formula Gray = 0.299R + 0.587G + 0.114B for grayscale conversion, and pass Gaussian filtering performs smoothing to determine appropriate hard thresholds to reduce noise interference.

Benefits of technology

It improves the recognition accuracy of small targets at sea, enhances anti-interference ability, adapts to various changes in sea conditions, and significantly improves the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295968A_ABST
    Figure CN119295968A_ABST
Patent Text Reader

Abstract

The invention provides a sea small target identification method, device and equipment and a medium. The sea small target identification method comprises the following steps: acquiring a target image containing a target object; performing gray processing on the target image to obtain a gray image corresponding to the target image; based on a preset threshold ratio, extracting a target contour of the target object in the grayscale image; and frame-selecting the target object in the target image according to the target contour frame, and identifying the target object. The method is used for solving the problem of low target identification accuracy caused by few target pixels, less available information, complex sea surface conditions and difficulty in application of fixed parameters to the used sea conditions in the prior art, is accurate in target object detection, can accurately identify the appearance of the small target on the sea, carries out frame selection, and improves the target identification accuracy. Meanwhile, the anti-interference capability is high, the method adapts to various sea condition changes, and the identification accuracy of the small target on the sea is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision technology, and in particular to a method, device, equipment and medium for identifying small targets at sea. Background Art

[0002] Using small civilian drones to locate targets at sea has the characteristics of high efficiency, wide range, good maneuverability and high precision. However, when using drone visual images to identify targets at sea, the image is required to cover a large area, and the target is much smaller than the sea area, resulting in few target pixels and little information that can be used. At the same time, the sea surface conditions are complex, and fixed parameters are difficult to apply to the sea conditions used. As a result, in the final extracted visual image, the target occupies a very small proportion of the sea area image, and most of the time there are only a dozen pixels. In addition, the white waves formed by the influence of wind and waves at sea will interfere with the recognition of the target to a certain extent. As a result, the accuracy of target recognition is low. Summary of the invention

[0003] The present invention provides a method, device, equipment and medium for identifying small targets at sea, which are used to solve the problem in the related art that there are few target pixels, little available information, and the sea surface conditions are complicated, and fixed parameters are difficult to apply to the sea conditions used, thereby resulting in low accuracy in identifying targets.

[0004] The present invention provides a method for identifying small targets at sea, comprising the following steps.

[0005] Acquire a target image containing a target object; Perform grayscale processing on the target image to obtain a grayscale image corresponding to the target image; Based on a preset threshold ratio, extracting a target contour of a target object in a grayscale image; The target object is selected in the target image according to the target contour frame and the target object is identified.

[0006] According to a method for identifying small targets at sea provided by the present invention, grayscale processing is performed on a target image to obtain a grayscale image corresponding to the target image, including: Based on the target image, a blue parameter, a red parameter and a green parameter of the target image are obtained; The grayscale image corresponding to the target image is obtained using the following formula: ; Among them, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter.

[0007] According to a method for identifying small targets at sea provided by the present invention, after grayscale processing is performed on a target image to obtain a grayscale image corresponding to the target image, the method further comprises: Smooths grayscale images.

[0008] According to a method for identifying small targets at sea provided by the present invention, the grayscale image is smoothed according to the following formula: ; in, is a point in the grayscale image Gaussian function value on ; and is along Axis and The mean of the axis; and is along Axis and The standard deviation of the axis.

[0009] According to a method for identifying a small target at sea provided by the present invention, based on a preset threshold ratio, a target contour of a target object is extracted from a grayscale image, comprising: Based on the preset threshold ratio and the target hard threshold, the target contour of the target object is determined in the grayscale image.

[0010] According to a method for identifying small targets at sea provided by the present invention, the target hard threshold is determined by the following method: Acquire a hard threshold range for determining a target hard threshold, and determine a plurality of hard thresholds of the hard threshold in the hard threshold range; Determine the number of contours corresponding to each hard threshold based on a preset threshold ratio and a plurality of hard thresholds; The hard threshold with the smallest value and the number of contours being one is determined as the target hard threshold.

[0011] The present invention also provides a small target identification device at sea, comprising the following modules: An acquisition module, used for acquiring a target image containing a target object; A processing module, used for performing grayscale processing on the target image to obtain a grayscale image corresponding to the target image; An extraction module, used for extracting a target contour of a target object in a grayscale image based on a preset threshold ratio; The recognition module is used to select the target object in the target image according to the target contour frame and recognize the target object.

[0012] According to a small target identification device at sea provided by the present invention, the processing module is specifically used for: Based on the target image, a blue parameter, a red parameter and a green parameter of the target image are obtained; The grayscale image corresponding to the target image is obtained using the following formula: ; Among them, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter.

[0013] According to a small target identification device at sea provided by the present invention, the processing module is also used for: Smooths grayscale images.

[0014] According to a small target identification device at sea provided by the present invention, the processing module is specifically used for: The grayscale image is smoothed according to the following formula: ; in, is a point in the grayscale image Gaussian function value on ; and is along Axis and The mean of the axis; and is along Axis and The standard deviation of the axis.

[0015] According to a small target recognition device at sea provided by the present invention, the extraction module is specifically used for: Based on the preset threshold ratio and the target hard threshold, the target contour of the target object is determined in the grayscale image.

[0016] According to a small target recognition device at sea provided by the present invention, the extraction module is specifically used for: The target hard threshold is determined by the following method: Acquire a hard threshold range for determining a target hard threshold, and determine a plurality of hard thresholds of the hard threshold in the hard threshold range; Determine the number of contours corresponding to each hard threshold based on a preset threshold ratio and a plurality of hard thresholds; The hard threshold with the smallest value and the number of contours being one is determined as the target hard threshold.

[0017] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned methods for identifying small targets at sea is implemented.

[0018] The present invention also provides a computer program product, comprising a computer program, and when the computer program is executed by a processor, any of the above-mentioned methods for identifying small targets at sea is implemented.

[0019] The method for identifying small targets at sea provided by the present invention first obtains a target image containing a target object, then grayscales the target image to obtain a grayscale image corresponding to the target image, then extracts the target contour of the target object in the grayscale image based on a preset threshold ratio, and finally selects the target object in the target image according to the target contour frame, and identifies the target object. By grayscale processing and contour extraction of the target image, the target object is accurately selected, the target object is accurately detected, the shape of the small target at sea can be accurately identified, and the selection can be performed. At the same time, the method has strong anti-interference ability, adapts to various changes in sea conditions, and significantly improves the recognition accuracy of small targets at sea. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 It is a flow chart of a method for identifying small targets at sea provided by the present invention; Figure 2 A schematic diagram of the effect of grayscale processing provided by the present invention; Figure 3 A schematic diagram of the contour principle under a hard threshold provided by the present invention; Figure 4 A schematic diagram of the contour principle under a hard threshold provided by the present invention; Figure 5 A schematic diagram of the contour principle under a hard threshold provided by the present invention; Figure 6 A schematic diagram of the contour principle under a hard threshold provided by the present invention; Figure 7 A schematic diagram of the contour principle under a hard threshold provided by the present invention; Figure 8 A schematic diagram of the contour principle under a hard threshold provided by the present invention; Fig. 9 It is a structural schematic diagram of a small target identification device at sea provided by the present invention; Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0023] Using small civilian drones to locate targets at sea has the characteristics of high efficiency, wide range, good maneuverability and high precision. However, when using drone visual images to identify targets at sea, the image is required to cover a large area, and the target is much smaller than the sea area, resulting in few target pixels and little information that can be used. At the same time, the sea surface conditions are complex, and fixed parameters are difficult to apply to the sea conditions used. As a result, in the final extracted visual image, the target occupies a very small proportion of the sea area image, and most of the time there are only a dozen pixels. In addition, the white waves formed by the influence of wind and waves at sea will interfere with the recognition of the target to a certain extent. As a result, the accuracy of target recognition is low.

[0024] Therefore, there is an urgent need for a method for identifying small targets at sea to solve the above problems.

[0025] Combine the following Figure 1-Figure 10 The invention describes the method, device, equipment and medium for identifying small targets at sea.

[0026] Figure 1 This is one of the flow charts of the method for identifying small targets at sea provided by the present invention, such as Figure 2 As shown, the method includes the following: Step 101: Acquire a target image containing a target object.

[0027] During specific implementation, a target image containing a target object to be identified is acquired through a sensor, which may be acquired through a drone or other image sensors, and this is not limited in the embodiment of the present invention.

[0028] In one example, an image with a pixel size of 1920×1080 containing a target object is obtained. In the case where there are multiple targets in the sea, it is necessary to manually confirm which target needs to be identified and tracked. The specific method is to frame a region of interest around the target that needs to be identified and tracked. In this way, when the tracked target sinks, other targets can be flexibly selected for identification and tracking. At the same time, the size of the image processing is reduced after the region of interest is framed. Of course, in this step, other forms can also be used to identify which object is used, that is, to determine the target object, and the embodiment of the present invention is not limited to this.

[0029] Step 102: grayscale processing is performed on the target image to obtain a grayscale image corresponding to the target image.

[0030] In the specific implementation, the target image obtained in step 101 is preprocessed. The preprocessing includes grayscale processing and smoothing. For grayscale processing, since the images usually obtained are in a three-channel BGR (blue, green, red) color space, they need to be converted to a grayscale GRAY color space for subsequent processing. Specifically, the grayscale processing is performed using a weighted average method, and the grayscale value of each pixel is calculated as: ; Gray is grayscale, R is red parameter, G is green parameter, and B is blue parameter. The coefficients in the formula are selected based on the sensitivity of the human eye to different colors so as to retain as much visual information as possible when converting to grayscale. Of course, other values ​​can also be selected for calculation, and the embodiment of the present invention is not limited to this.

[0031] For smoothing, in order to reduce noise such as waves on the sea surface, Gaussian filtering is used to perform weighted averaging operations on each pixel in the image, so as to achieve the purpose of smoothing the image and reducing noise. Since Gaussian filtering smoothes the image, it can effectively suppress the noise in the image, especially Gaussian noise. Although Gaussian filtering will make the image blurred, it can retain the main features of the image, such as contours and edges, which is conducive to the subsequent extraction of the target contour. The mathematical expression of Gaussian filtering can be regarded as the convolution of the image and the Gaussian function. For a two-dimensional Gaussian function, the formula is as follows: ; in, It's on point Gaussian function value on ; and is along Axis and The mean (center position) of the axis; and is along Axis and The standard deviation of the axis determines the width of the distribution. Through the above preprocessing, a grayscale image with smoother object edges and less sea wave clutter noise can be obtained.

[0032] Step 103: extracting the target contour of the target object in the grayscale image based on a preset threshold ratio.

[0033] In specific implementation, the Canny edge detection algorithm is widely used because the step-type edge affected by white noise is optimal. The false response to a single edge caused by noise usually causes the so-called "striping" problem. Generally speaking, this problem is very common in edge detection. The output of Canny edge detection is usually thresholded to determine which edges are prominent. The striping phenomenon can be eliminated by hysteresis thresholding. That is, a hard threshold and a soft threshold are introduced. The optimal threshold needs to be selected considering factors such as image characteristics, noise level, and edge clarity. Usually, the preset threshold ratio between the hard threshold and the soft threshold is between 2:1 and 3:1.

[0034] In one embodiment, when the threshold ratio is set to 2:1, the hard thresholds can be 100, 150, 200, 260, 400, and 536 respectively. The edge detection results are as follows: Figure 3-Figure 8 As shown in the figure. When the hard threshold is set too low, too many noise edges will be detected. When the hard threshold is too high, the target edge will be defective. Therefore, it is necessary to calculate the most suitable target hard threshold. Specifically, after obtaining the edge image, traverse each pixel in the image and connect continuous points with the same color or intensity to form a contour. In this way, Figure 3-Figure 8 The number of contours in are 302, 90, 16, 1, 1, and 0 respectively. It can be seen that if a hard threshold value that makes the number of contours become 1 can be found, the complete target edge can be found. Specifically, a hard threshold range is first determined. The range can be set according to the user or in other forms. Then the hard threshold is increased from the minimum value. Then the threshold is used for Canny edge detection. After the edge is obtained, contour detection is performed to obtain the number of contours in the image. If the number of contours is 1, the loop is exited to output the target contour; if the number of contours has not reached 1, it is determined whether the hard threshold has reached the maximum value. If the hard threshold has reached the maximum value, the loop is exited to output the target contour. If the hard threshold has not reached the maximum value, the hard threshold is increased and the loop continues. The specific hard threshold number increased in each loop can be set according to the needs, and the embodiment of the present invention does not limit this.

[0035] Step 104: select the target object in the target image according to the target outline frame, and identify the target object.

[0036] In specific implementation, after obtaining the target outline, the outline is surrounded by a minimum rectangle, so that the target outline can be accurately selected.

[0037] The small target recognition device at sea provided by the present invention is described below. The small target recognition device at sea described below and the small target recognition method at sea described above can be referred to each other.

[0038] like Fig. 9 As shown, the present invention provides a small target identification device at sea, comprising the following modules: An acquisition module 901 is used to acquire a target image containing a target object; The processing module 902 is used to perform grayscale processing on the target image to obtain a grayscale image corresponding to the target image; An extraction module 903 is used to extract a target contour of a target object in a grayscale image based on a preset threshold ratio; The recognition module 904 is used to select a target object in the target image according to the target outline frame and recognize the target object.

[0039] According to a small target identification device at sea provided by the present invention, the processing module 902 is specifically used for: Based on the target image, a blue parameter, a red parameter and a green parameter of the target image are obtained; The grayscale image corresponding to the target image is obtained using the following formula: ; Among them, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter.

[0040] According to a small target identification device at sea provided by the present invention, the processing module 902 is also used for: Smooths grayscale images.

[0041] According to a small target identification device at sea provided by the present invention, the processing module 902 is specifically used for: The grayscale image is smoothed according to the following formula: ; in, is a point in the grayscale image Gaussian function value on ; and is along Axis and The mean of the axis; and is along Axis and The standard deviation of the axis.

[0042] According to a small target recognition device at sea provided by the present invention, the extraction module 903 is specifically used for: Based on the preset threshold ratio and the target hard threshold, the target contour of the target object is determined in the grayscale image.

[0043] According to a small target recognition device at sea provided by the present invention, the extraction module 903 is specifically used for: The target hard threshold is determined by the following method: Acquire a hard threshold range for determining a target hard threshold, and determine a plurality of hard thresholds of the hard threshold in the hard threshold range; Determine the number of contours corresponding to each hard threshold based on a preset threshold ratio and a plurality of hard thresholds; The hard threshold with the smallest value and the number of contours being one is determined as the target hard threshold.

[0044] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communications interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communications interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the method for identifying small targets at sea, and the method includes: Acquire a target image containing a target object; Perform grayscale processing on the target image to obtain a grayscale image corresponding to the target image; Based on a preset threshold ratio, extracting a target contour of a target object in a grayscale image; The target object is selected in the target image according to the target contour frame and the target object is identified.

[0045] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0046] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the marine small target identification method provided by the above methods, the method comprising: Acquire a target image containing a target object; Perform grayscale processing on the target image to obtain a grayscale image corresponding to the target image; Based on a preset threshold ratio, extracting a target contour of a target object in a grayscale image; The target object is selected in the target image according to the target contour frame and the target object is identified.

[0047] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the method for identifying small targets at sea provided by the above methods, the method comprising: Acquire a target image containing a target object; Perform grayscale processing on the target image to obtain a grayscale image corresponding to the target image; Based on a preset threshold ratio, extracting a target contour of a target object in a grayscale image; The target object is selected in the target image according to the target contour frame and the target object is identified.

[0048] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0049] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying small targets at sea, characterized in that: The method comprises: Acquire a target image containing a target object; Performing grayscale processing on the target image to obtain a grayscale image corresponding to the target image; Extracting a target contour of the target object in the grayscale image based on a preset threshold ratio; The target object is framed in the target image according to the target outline frame, and the target object is identified.

2. The method for identifying small targets at sea according to claim 1, characterized in that: The grayscale processing of the target image to obtain a grayscale image corresponding to the target image includes: Obtaining a blue parameter, a red parameter, and a green parameter of the target image based on the target image; The grayscale image corresponding to the target image is obtained using the following formula: ; Among them, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter.

3. The method for identifying small targets at sea according to claim 1, characterized in that: After performing grayscale processing on the target image to obtain a grayscale image corresponding to the target image, the method further includes: The grayscale image is smoothed.

4. The method for identifying small targets at sea according to claim 3, characterized in that: The grayscale image is smoothed according to the following formula: ; in, is a point in the grayscale image Gaussian function value on ; and is along Axis and The mean of the axis; and is along Axis and The standard deviation of the axis.

5. The method for identifying small targets at sea according to claim 4, characterized in that: The step of extracting the target contour of the target object in the grayscale image based on a preset threshold ratio includes: Based on the preset threshold ratio and the target hard threshold, a target contour of the target object is determined in the grayscale image.

6. The method for identifying small targets at sea according to claim 5, characterized in that: The target hard threshold is determined by the following method: Acquire a hard threshold range for determining the target hard threshold, and determine a plurality of hard thresholds of the hard threshold in the hard threshold range; Determine the number of contours corresponding to each hard threshold based on the preset threshold ratio and the multiple hard thresholds; The hard threshold whose number of contours is one and whose value is the smallest is determined as the target hard threshold.

7. A small target identification device at sea, characterized in that: include: An acquisition module, used for acquiring a target image containing a target object; A processing module, used for performing grayscale processing on the target image to obtain a grayscale image corresponding to the target image; An extraction module, configured to extract a target contour of the target object in the grayscale image based on a preset threshold ratio; The recognition module is used to select the target object in the target image according to the target outline frame and recognize the target object.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for identifying small targets at sea as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying small targets at sea as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for identifying small targets at sea as described in any one of claims 1 to 6 is implemented.