An improved automatic target reporting bullet hole recognition method and system

By converting the image to gray and HSV space in the automatic target reporting system, combining image binarization and morphological processing, the minimum circumference circle is calculated, and the accuracy of clustered bullet hole recognition is solved, and the accurate segmentation and recognition of bullet holes is achieved.

CN115564965BActive Publication Date: 2025-08-26SHANDONG WANTENG ELECTRONIC TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211191633.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-08-26
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

The existing automatic target reporting system is easily affected by external lighting conditions when detecting bullet holes, which is very noisy and difficult to accurately identify clustered bullet holes, resulting in inaccurate detection.

Method used

The conversion from BGR space to gray and HSV space is adopted, combined with image binarization and black area extraction, and the calculation and morphological processing of the smallest circumference circle are divided to identify bullet holes in non-cluster and cluster situations.

Benefits of technology

Accurate identification of bullet holes is achieved, avoiding missed detection and segmentation errors of cluster bullet holes, and improving detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115564965B_ABST
    Figure CN115564965B_ABST
Patent Text Reader

Abstract

The present invention discloses an improved automatic target-reporting bullet hole recognition method and system. The method comprises the following steps: acquiring an image to be recognized; performing color space conversion on the image to be recognized, converting the image to be recognized from a BGR space to a gray space; converting the image to be recognized from a BGR space to an HSV space; performing image binarization processing on the image in the gray space; extracting black areas from the image in the HSV space to obtain a first bullet hole area image; performing an OR operation on the binarized image and the first bullet hole area image to obtain a second bullet hole area image; performing contour search on the second bullet hole area image to obtain the outline of the bullet hole area in the image; calculating the minimum circumscribed circle of each outline to obtain the center and radius of each minimum circumscribed circle; and respectively identifying bullet holes in a non-clustered situation and a clustered situation based on the radius of the minimum circumscribed circle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of shooting target reporting, in particular to an improved automatic target reporting bullet hole recognition method and system. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] The most important thing for an automatic target reporting system based on machine vision is to accurately detect bullet holes without missing or misdetecting them. Some existing algorithms have some drawbacks, especially when it comes to segmenting clustered bullet holes.

[0004] Chinese invention patent CN106802113B - Intelligent target reporting system and method based on multi-bullet hole pattern recognition algorithm. Although this patent can realize multi-bullet hole pattern recognition, this method is easily affected by external lighting conditions, has relatively large noise, and inaccurate detection. In addition, the bullet holes have different shapes and states, and it is impossible to accurately use sample training and classifier detection to identify the bullet holes. It cannot meet the needs in actual target reporting. Summary of the Invention

[0005] In order to solve the deficiencies of the prior art, the present invention provides an improved automatic target-reporting bullet hole recognition method and system;

[0006] In a first aspect, the present invention provides an improved automatic target reporting bullet hole recognition method;

[0007] An improved automatic target-reporting bullet hole recognition method comprises:

[0008] Obtain the image to be identified; perform color space conversion on the image to be identified, converting the image to be identified from BGR space to gray space; converting the image to be identified from BGR space to HSV space;

[0009] Performing image binarization on the gray space image; extracting black areas on the HSV space image to obtain a first bullet hole area image; performing an OR operation on the binarized image and the first bullet hole area image to obtain a second bullet hole area image;

[0010] Performing contour search on the second bullet hole area image to obtain the contour of the bullet hole area in the image; calculating the minimum circumscribed circle of each contour to obtain the center and radius of each minimum circumscribed circle;

[0011] Based on the radius of the minimum circumscribed circle, bullet holes in the non-clustered and clustered situations are identified respectively.

[0012] In a second aspect, the present invention provides an improved automatic target reporting and bullet hole recognition system;

[0013] An improved automatic target reporting and bullet hole recognition system, comprising:

[0014] The acquisition module is configured to: acquire an image to be identified; perform color space conversion on the image to be identified, converting the image to be identified from the BGR space to the gray space; and converting the image to be identified from the BGR space to the HSV space;

[0015] The image processing module is configured to: perform image binarization processing on the image in gray space; extract black areas from the image in HSV space to obtain a first bullet hole area image; perform an OR operation on the binarized image and the first bullet hole area image to obtain a second bullet hole area image;

[0016] The contour search module is configured to: perform contour search on the second bullet hole area image to obtain the contour of the bullet hole area in the image; calculate the minimum circumscribed circle of each contour to obtain the center and radius of each minimum circumscribed circle;

[0017] The bullet hole recognition module is configured to respectively recognize bullet holes in a non-clustered situation and a clustered situation based on the radius of the minimum circumscribed circle.

[0018] In a third aspect, the present invention further provides an electronic device, comprising:

[0019] a memory for non-transitory storage of computer-readable instructions; and

[0020] a processor for executing said computer-readable instructions,

[0021] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.

[0022] In a fourth aspect, the present invention further provides a storage medium that non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0023] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] The bullet hole recognition method adopted by the present invention uses two-image OR operation to avoid missed bullet holes and distorted bullet hole areas due to being too small; bullet hole clustering is then processed to effectively segment the clustered bullet holes; the combination of these two methods can not only accurately locate bullet holes to ensure that no bullet holes are missed, but also effectively segment clustered bullet holes. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0027] Figure 1 It is a workflow diagram of the present invention;

[0028] Figure 2 This is a workflow diagram for processing clustered bullet holes according to the present invention;

[0029] Figure 3 To obtain the image;

[0030] Figure 4 is the image after binarization;

[0031] Figure 5 The black bullet hole area image extracted by hsv;

[0032] Figure 6 for Figure 4 and Figure 5 Image or image after operation;

[0033] Figure 7 It is an image of clustered bullet holes;

[0034] Figure 8 This is the bullet hole image after expansion processing. DETAILED DESCRIPTION

[0035] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0036] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0038] All data in this embodiment is obtained in compliance with laws and regulations and based on the consent of the user, and is used legally.

[0039] Explanation of terms:

[0040] BGR space, the full English name is: BlueGreenRed, Chinese interpretation is: blue, green, red, an image storage and reading format;

[0041] GRAY space, Chinese interpretation is: gray space;

[0042] HSV space, explained in Chinese and English as: Hue, Saturation, Value.

[0043] Example 1

[0044] This embodiment provides an improved automatic target-reporting bullet hole recognition method;

[0045] like Figure 1 As shown, an improved automatic target-reporting bullet hole recognition method includes:

[0046] S101: Acquire an image to be recognized; perform color space conversion on the image to be recognized, converting the image to be recognized from BGR space to gray space; converting the image to be recognized from BGR space to HSV space;

[0047] S102: performing image binarization processing on the image in the GRAY space; extracting black areas from the image in the HSV space to obtain a first bullet hole area image; performing an OR operation on the binarized image and the first bullet hole area image to obtain a second bullet hole area image;

[0048] S103: performing contour search on the second bullet hole area image to obtain the contours of the bullet hole area in the image; calculating the minimum circumscribed circle of each contour to obtain the center and radius of each minimum circumscribed circle;

[0049] S104: Based on the radius of the minimum circumscribed circle, bullet holes in the non-clustered situation and the clustered situation are identified respectively.

[0050] Furthermore, the step S104: identifying bullet holes in a non-clustered situation and a clustered situation based on the radius of the minimum circumscribed circle, specifically includes:

[0051] If the radius is less than a pixels, the current minimum circumscribed circle is considered not a bullet hole;

[0052] If the radius is between a pixels and b pixels, the current minimum circumscribed circle is considered to be a bullet hole;

[0053] If the radius is greater than b pixels, the current minimum circumscribed circle is considered to contain a cluster of bullet holes, and the clustered area is segmented. The identified bullet holes and the bullet holes identified in the clustered area are combined to obtain all the bullet holes. a and b are both positive integers, where a is less than b. For example, a is 4 and b is 12.

[0054] It should be understood that the reason why it is necessary to perform an OR operation on the binarized image and the first bullet hole area image is that the bullet holes obtained in the binarized image are more obvious and will not be missed, but they are easy to cluster and difficult to segment. The bullet holes extracted from the HSV image are easy to be missed, and the bullet hole area is small. Performing an OR operation on the two images can avoid missed detection and the situation where the extracted bullet hole area is too small.

[0055] Furthermore, if Figure 2 As shown, the bullet hole segmentation for the area where bullet holes are clustered specifically includes:

[0056] S1041: Cropping the bullet hole cluster area based on the center coordinates and radius of the minimum circumscribed circle to obtain a cropped image;

[0057] S1042: performing color space conversion on the cropped image, converting the color space from BGR space to HSV space; extracting black areas from the image in the HSV space to obtain a third bullet hole area image;

[0058] S1043: Performing morphological processing on the third bullet hole region image to fill the blank spaces inside the bullet hole region; extracting the bullet hole contours, and calculating the minimum circumscribed circle of each bullet hole contour to obtain the center and radius of the minimum circumscribed circle;

[0059] S1044: If the radius is greater than c pixels, the first intermediate value is less than the length of the cropped image, and the second intermediate value is less than the width of the cropped image, then the current minimum circumscribed circle is determined to be a bullet hole; otherwise, the current minimum circumscribed circle is determined not to be a bullet hole, and c is a positive integer, for example, the value of c is 2.

[0060] Furthermore, the step S1041: cropping the bullet hole clustering area according to the center coordinates and radius of the minimum circumscribed circle to obtain a cropped image, specifically includes:

[0061] The length and width of the cropped image are both three times the length of the radius;

[0062] The horizontal coordinate of the upper left corner of the cropped image is the horizontal coordinate of the center coordinate minus a fixed value;

[0063] The ordinate of the upper left corner of the cropped image is the ordinate of the circle center minus a fixed value;

[0064] The fixed value is the sum of the radius and d pixels, where d is a positive integer and the value of d is 5.

[0065] It should be understood that the fixed value is the sum of the radius and d pixels in order to prevent the capture of a portion of the clustered bullet hole area, that is, to move the coordinates of the upper left corner (starting point) of the area to be cut outward to expand the image area to be cut.

[0066] Furthermore, the morphological processing specifically refers to expansion processing.

[0067] Furthermore, the first intermediate value refers to the sum of the value of the horizontal coordinate of the center of the minimum circumscribed circle and the radius of the minimum circumscribed circle; the second intermediate value refers to the sum of the value of the vertical coordinate of the center of the minimum circumscribed circle and the radius of the minimum circumscribed circle.

[0068] In particular, the reason why the horizontal and vertical coordinates of the center of the circle plus the radius are used to determine the bullet holes is that when the image is cut, part of the surrounding bullet holes may be cut in. This is done to eliminate the bullet holes that are mistakenly cut at the edge.

[0069] Figure 3 To obtain the image; Figure 4 is the image after binarization; Figure 5 The black bullet hole area image extracted by hsv; Figure 6 for Figure 4 and Figure 5 Image or image after operation; Figure 7 It is an image of clustered bullet holes; Figure 8 This is the bullet hole image after expansion processing.

[0070] Example 2

[0071] This embodiment provides an improved automatic target reporting and bullet hole recognition system;

[0072] An improved automatic target reporting and bullet hole recognition system, comprising:

[0073] The acquisition module is configured to: acquire an image to be identified; perform color space conversion on the image to be identified, converting the image to be identified from the BGR space to the gray space; and converting the image to be identified from the BGR space to the HSV space;

[0074] The image processing module is configured to: perform image binarization processing on the image in gray space; extract black areas from the image in HSV space to obtain a first bullet hole area image; perform an OR operation on the binarized image and the first bullet hole area image to obtain a second bullet hole area image;

[0075] The contour search module is configured to: perform contour search on the second bullet hole area image to obtain the contour of the bullet hole area in the image; calculate the minimum circumscribed circle of each contour to obtain the center and radius of each minimum circumscribed circle;

[0076] The bullet hole recognition module is configured to respectively recognize bullet holes in a non-clustered situation and a clustered situation based on the radius of the minimum circumscribed circle.

[0077] Furthermore, bullet holes in clusters are identified separately, specifically including:

[0078] The bullet hole cluster area is cropped according to the center coordinates and radius of the minimum circumscribed circle to obtain a cropped image;

[0079] Performing color space conversion on the cropped image, converting the color space from BGR space to HSV space; extracting the black area of ​​the image in HSV space to obtain the third bullet hole area image;

[0080] Performing morphological processing on the third bullet hole area image to fill the blank space inside the bullet hole area; extracting the bullet hole contours, and calculating the minimum circumscribed circle of each bullet hole contour to obtain the center and radius of the minimum circumscribed circle;

[0081] If the radius is greater than c pixels, the first intermediate value is less than the length of the cropped image, and the second intermediate value is less than the width of the cropped image, then the current minimum circumscribed circle is determined to be a bullet hole. Otherwise, the current minimum circumscribed circle is determined not to be a bullet hole, and c is a positive integer.

[0082] It should be noted that the acquisition module, image processing module, contour search module, and bullet hole recognition module described above correspond to steps S101 to S104 in Example 1. The examples and application scenarios implemented by these modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules, as part of a system, can be executed in a computer system, such as a set of computer-executable instructions.

[0083] The descriptions of the various embodiments in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0084] The proposed system can be implemented in other ways. For example, the system embodiment described above is merely illustrative. For example, the above module division is only a logical function division. In actual implementation, other division methods may be used. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not implemented.

[0085] Example 3

[0086] This embodiment also provides an electronic device, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes the method described in the above embodiment one.

[0087] It should be understood that in this embodiment, the processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0088] The memory may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0089] During implementation, each step of the above method may be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software.

[0090] The method in Example 1 can be directly implemented as being executed by a hardware processor, or by a combination of hardware and software modules within the processor. The software module can be located in a storage medium well-established in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not given here.

[0091] Those skilled in the art will appreciate that the units and algorithm steps of the various examples described in conjunction with this embodiment can be implemented using electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0092] Example 4

[0093] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is performed.

[0094] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An improved automatic target bullet hole recognition method, characterized in that: include: Obtain an image to be identified; perform color space conversion on the image to be identified, converting the image to be identified from BGR space to gray space; Convert the image to be recognized from BGR space to HSV space; Perform image binarization on the gray space image; Extracting black areas from the image in HSV space to obtain a first bullet hole area image; performing an OR operation on the binary image and the first bullet hole area image to obtain a second bullet hole area image; Performing contour search on the second bullet hole area image to obtain the contour of the bullet hole area in the image; calculating the minimum circumscribed circle of each contour to obtain the center and radius of each minimum circumscribed circle; Based on the radius of the minimum circumscribed circle, bullet holes in the non-clustered and clustered situations are identified separately. Specifically, if the radius is less than a pixels, the current minimum circumscribed circle is considered not a bullet hole; if the radius is between a and b pixels, the current minimum circumscribed circle is considered a bullet hole; if the radius is greater than b pixels, the current minimum circumscribed circle is considered to be a clustered situation, and the clustered area is segmented; the identified bullet holes and the bullet holes identified in the clustered area are combined to obtain all the bullet holes; a and b are both positive integers, where a is less than b; Bullet hole segmentation is performed on the area where bullet holes are clustered, specifically including: cropping the bullet hole cluster area according to the center coordinates and radius of the minimum circumscribed circle to obtain a cropped image; performing color space conversion on the cropped image, converting the color space from BGR space to HSV space; extracting black areas from the HSV space image to obtain a third bullet hole area image; performing morphological processing on the third bullet hole area image to fill the blanks inside the bullet hole area; extracting bullet hole contours and calculating the minimum circumscribed circle of each bullet hole contour to obtain the center and radius of the minimum circumscribed circle; if the radius is greater than c pixels, the first intermediate value is less than the length of the cropped image, and the second intermediate value is less than the width of the cropped image, then the current minimum circumscribed circle is determined to be a bullet hole; otherwise, the current minimum circumscribed circle is determined not to be a bullet hole, where c is a positive integer.

2. The improved automatic target-reporting bullet hole recognition method according to claim 1, characterized in that: The morphological processing specifically refers to expansion processing.

3. The improved automatic target-reporting bullet hole recognition method according to claim 1, characterized in that: The first intermediate value refers to the sum of the horizontal coordinate value of the center of the minimum circumscribed circle and the radius of the minimum circumscribed circle; the second intermediate value refers to the sum of the vertical coordinate value of the center of the minimum circumscribed circle and the radius of the minimum circumscribed circle.

4. An improved automatic target reporting bullet hole recognition system, characterized in that: include: The acquisition module is configured to: acquire an image to be identified; perform color space conversion on the image to be identified, converting the image to be identified from the BGR space to the gray space; and converting the image to be identified from the BGR space to the HSV space; An image processing module is configured to: perform image binarization processing on the image in the gray space; Extracting black areas from the image in HSV space to obtain a first bullet hole area image; performing an OR operation on the binary image and the first bullet hole area image to obtain a second bullet hole area image; The contour search module is configured to: perform contour search on the second bullet hole area image to obtain the contour of the bullet hole area in the image; calculate the minimum circumscribed circle of each contour to obtain the center and radius of each minimum circumscribed circle; The bullet hole recognition module is configured to: based on the radius of the minimum circumscribed circle, respectively recognize bullet holes in the case of non-clustered bullet holes and bullet holes in the case of clustered bullet holes, specifically including: if the radius is less than a pixels, it is considered that the current minimum circumscribed circle is not a bullet hole; if the radius is between a pixels and b pixels, it is considered that the current minimum circumscribed circle is a bullet hole; if the radius is greater than b pixels, it is considered that the current minimum circumscribed circle has a bullet hole cluster situation, and the bullet hole cluster area is segmented; the identified bullet holes and the bullet holes identified in the clustered area are aggregated to obtain all the bullet holes; a and b are both positive integers, where a is less than b; the bullet hole segmentation in the bullet hole cluster area specifically includes: according to the coordinates of the center of the minimum circumscribed circle, the bullet holes are segmented. The method comprises the following steps: first, performing a color space conversion on the cropped image, converting the color space from BGR space to HSV space, extracting black areas from the HSV space image, and obtaining a third bullet hole area image; performing morphological processing on the third bullet hole area image, and filling the blanks inside the bullet hole area; extracting the bullet hole contours, and calculating the minimum circumscribed circle of each bullet hole contour to obtain the center and radius of the minimum circumscribed circle; and if the radius is greater than c pixels, the first intermediate value is less than the length of the cropped image, and the second intermediate value is less than the width of the cropped image, then the current minimum circumscribed circle is determined to be a bullet hole; otherwise, the current minimum circumscribed circle is determined not to be a bullet hole, where c is a positive integer.

5. The improved automatic target reporting and bullet hole recognition system as claimed in claim 4, characterized in that: Bullet holes in clusters are identified separately, including: The bullet hole cluster area is cropped according to the center coordinates and radius of the minimum circumscribed circle to obtain a cropped image; Performing color space conversion on the cropped image, converting the color space from BGR space to HSV space; extracting the black area of ​​the image in HSV space to obtain the third bullet hole area image; Performing morphological processing on the third bullet hole area image to fill the blank space inside the bullet hole area; extracting the bullet hole contours, and calculating the minimum circumscribed circle of each bullet hole contour to obtain the center and radius of the minimum circumscribed circle; If the radius is greater than c pixels, the first intermediate value is less than the length of the cropped image, and the second intermediate value is less than the width of the cropped image, then the current minimum circumscribed circle is determined to be a bullet hole. Otherwise, the current minimum circumscribed circle is determined not to be a bullet hole, and c is a positive integer.

6. An electronic device, comprising: a memory for non-transitory storage of computer-readable instructions; as well as a processor for executing said computer-readable instructions, When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 3 is executed.

7. A storage medium, characterized in that: The computer-readable instructions are non-transitory stored, wherein when the non-transitory computer-readable instructions are executed by a computer, the method according to any one of claims 1 to 3 is performed.

Citation Information

Patent Citations

  • Intelligent target reporting system and method based on multi-bullet-hole pattern recognition algorithm

    CN106802113B

  • Deformation monitoring method and system

    CN110057308A

  • Intelligent video targeting real-time detection method

    CN112507827A

  • DNA fragment identification method and device, computer equipment and storage medium

    CN113221860A