Nothing Special   »   [go: up one dir, main page]

CN116228864A - Chest ring target bullet hole ring number reading method based on visual detection - Google Patents

Chest ring target bullet hole ring number reading method based on visual detection Download PDF

Info

Publication number
CN116228864A
CN116228864A CN202310230224.0A CN202310230224A CN116228864A CN 116228864 A CN116228864 A CN 116228864A CN 202310230224 A CN202310230224 A CN 202310230224A CN 116228864 A CN116228864 A CN 116228864A
Authority
CN
China
Prior art keywords
target
bullet hole
target surface
image
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310230224.0A
Other languages
Chinese (zh)
Inventor
刘烨
戴尹
陶海
竺媛媛
燕升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN202310230224.0A priority Critical patent/CN116228864A/en
Publication of CN116228864A publication Critical patent/CN116228864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F41WEAPONS
    • F41JTARGETS; TARGET RANGES; BULLET CATCHERS
    • F41J5/00Target indicating systems; Target-hit or score detecting systems
    • F41J5/10Cinematographic hit-indicating systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20061Hough transform
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Aiming, Guidance, Guns With A Light Source, Armor, Camouflage, And Targets (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a chest ring target elastic ring number reading method based on visual detection, which comprises the following steps: target surface positioning is carried out on the obtained target paper image to obtain a target surface image, wherein the target paper image comprises a target paper image before shooting and a target paper image after shooting; converting the target surface image from an RGB color space to an HSI color space, and performing color edge detection to obtain a target surface green-white edge image; extracting Hough transformation features of the target surface green-white edge image to obtain a target loop line, and extracting a target surface area according to the target loop line; determining the target coordinates based on the filtered target surface area; based on the target surface area after the filtering treatment, determining the position of the bullet hole according to the saturation S of the bullet hole area after shooting and the target surface area before shooting and the change of the gray value of the color brightness I component, and determining the bullet hole coordinates based on the position of the bullet hole and the bulls center coordinates; and obtaining the bullet hole ring value based on the bullet hole coordinates and the bulls-eye coordinates.

Description

Chest ring target bullet hole ring number reading method based on visual detection
Technical Field
The invention belongs to the technical field of target tracking, and relates to a chest ring target bullet hole ring number reading method based on visual detection.
Background
At present, chest ring targets are used as target targets for outdoor shooting training, a mode of manually reporting targets at a short distance is used as a main mode, and telescope long-distance observation is used as an auxiliary mode. However, there are some problems with this approach: firstly, fewer people with target reporting experience and skilled target reporting rules are involved; secondly, the efficiency is low, and the target number is determined by means of manual visual inspection or a certain measuring tool for recording the target detection, target reporting and training results. Meanwhile, when the number of impact points on the target surface is large, new and old bullet holes are difficult to identify manually, the target reporting error is extremely large, and the shooting training quality is affected; thirdly, the safety is poor, the target personnel are usually hidden in the target trench near the target in advance, the gap time of each round of shooting is utilized to leave the target trench to observe the target surface and record the results, and if the shooting personnel are slightly negligent, the personnel casualties are caused, and the potential hazard is large. There may be a "people's feelings" that are not good for fairness.
Disclosure of Invention
The purpose is as follows: in order to overcome the defects in the prior art, the invention provides a chest ring target elastic ring number reading method based on visual detection.
The technical scheme is as follows: in order to solve the technical problems, the invention adopts the following technical scheme:
in a first aspect, the invention provides a method for reading the number of elastic loops of a chest loop target based on visual detection, which comprises the following steps:
step 1: target surface positioning is carried out on the obtained target paper image to obtain a target surface image, wherein the target paper image comprises a target paper image before shooting and a target paper image after shooting;
step 2: converting the target surface image from an RGB color space to an HSI color space to obtain gray values of hue information H, saturation S and color brightness I components of the target surface image, and performing color edge detection to obtain a target surface green-white edge image;
step 3: extracting Hough transformation features of the target surface green-white edge image to obtain a target loop line, and extracting a target surface area according to the target loop line;
step 4: filtering the target surface area;
step 5: determining the target coordinates based on the filtered target surface area;
step 6: based on the target surface area after the filtering treatment, determining the position of the bullet hole according to the saturation S of the bullet hole area after shooting and the target surface area before shooting and the change of the gray value of the color brightness I component, and determining the bullet hole coordinates based on the position of the bullet hole and the bulls center coordinates;
step 7: and obtaining the bullet hole ring value based on the bullet hole coordinates and the bulls-eye coordinates.
In some embodiments, step 1 further comprises smoothing the acquired target paper image.
In some embodiments, in step 2, converting the target surface image from RGB color space to HSI color space, to obtain gray values of hue information H, saturation S, and color brightness I components of the target surface image, including:
Figure BDA0004120046340000021
wherein->
Figure BDA0004120046340000022
Figure BDA0004120046340000023
Figure BDA0004120046340000024
Wherein R, G, B represents the gray values of the red, green and blue components of the target image in the RGB color space, and θ represents the HSI tone gray value; H. s, I the tone information H, saturation S, and gray scale value of the color intensity I component of the target image in the HSI color space.
In some embodiments, in step 2, performing color edge detection to obtain a target surface green-white edge image includes:
set target surface image pixel point P (i,j) =(H (i,j) ,S (i,j) ,I (i,j) ) Wherein H is (i,j) 、S (i,j) 、I (i,j) Representing pixel point P (i,j) Tone information H, saturation S, gray value of color luminance I component; setting two-dimensional array P 1(m,n) For the color edge detected image, use P (i,j) The window of 3*3 is taken as the center, and the diagonal angles are respectively P (i-1,j-1) ,P (i+1,j+1) In the HSI color space, the green constraint is: 60 < H < 180, S > 0.3; the constraint of white is: s is less than 0.3, I is more than 80; the following two conditions were taken as green-white edge detection conditions:
(1)P (i-1,j-1) 、P (i,j-1) 、P (i+1,j) all are green pixel points and P (i-1,j+1) 、P (i,j+1) 、P (i+1,j+1) White pixel points;
(2)P (i-1,j-1) 、P (i,j-1) 、P (i+1,j) are all white pixel points and P (i-1,j+1) 、P (i,j+1) 、P (i+1,j+1) All are green pixel points;
if at least any one condition is satisfied, judging P (i-1,j) 、P (i,j) 、P (i+1,j) For the green and white edge point, let the pixel point P in the output image 1(i-1,j) =P 1(i,j) =P 1(i+1,j) =1, the other pixels are set to 0;
and browsing the whole target surface image by the window to obtain a target surface green-white edge image.
In some embodiments, step 3: extracting Hough transformation features of the target surface green-white edge image to obtain a target loop line, and extracting a target surface area according to the target loop line; comprising the following steps:
extracting Hough transform features of the target surface green-white edge image to obtain a target loop line;
the maximum distance point between the two edge points on the horizontal and vertical lines of the target ring line is obtained to obtain the left vertex (x min Y), right vertex (x max Y), upper vertex (x, y min ) And lower vertex (x, y max ) The rectangular window formed by connection is a target surface area after division.
In some embodiments, in step 4, the target surface area is filtered using morphological filtering operation.
In some embodiments, step 5: determining the bulls-eye coordinates based on the filtered target surface region, comprising: the coordinates of the bulls-eye are obtained by a least squares curve fitting method.
In some embodiments, in step 6, determining the bullet hole coordinates based on the bullet hole locations and the bulls-eye coordinates comprises:
acquiring boundary information of a bullet hole, calculating Euclidean distance between a bullet hole boundary point and a bulls-eye coordinate, and selecting the bullet hole boundary point corresponding to the minimum distance value as a coordinate point of the bullet hole;
let the bulls-eye coordinates be (x) a ,y a ) The coordinates of the boundary point of the bullet hole are (x) b ,y b ) The Euclidean distance e between the bulls-eye and the bullet hole boundary point is expressed as:
Figure BDA0004120046340000041
the pixel coordinate corresponding to the minimum value of the euclidean distance e is the bullet hole coordinate (x i ,y i )。
In some embodiments, step 7: based on the bullet hole coordinates and the bulls-eye coordinates, obtaining bullet hole ring values comprises:
judging the gray value step times of the pixel points on the connecting line of the bulls eye and the bullet hole to judge the bullet hole ring value;
bullet hole coordinates (x) i ,y i ) Coordinate with the bulls-eye (x) a ,y a ) The linear equation of (2) is:
Figure BDA0004120046340000042
wherein i epsilon (1, 2 … n), x and y (x) are values of corresponding points on the straight line, and the values of the points are calculated from the coordinates (x a ,y a ) Firstly, searching along a straight line, and counting the number of gray value steps of a pixel point, wherein the counted value is n;
the bullet hole ring value m is:
Figure BDA0004120046340000043
in a second aspect, the invention provides a chest ring target bullet hole ring number reading device based on visual detection, which comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method according to the first aspect.
In a third aspect, the present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of the first aspect.
In a fourth aspect, the present invention provides an apparatus comprising,
one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods of the first aspect.
The beneficial effects are that: the chest ring target elastic ring number reading method based on visual detection provided by the invention has the following advantages: noise generated in the acquisition and transmission processes of the chest ring target paper image is eliminated through a smooth filtering mode, the chest ring target paper image is converted into an HSI color space from an RGB color space, color edge detection is carried out to obtain a target surface green-white edge image, pixel level separation is carried out on the chest ring target effective area based on Hough operation to extract a target surface area, target center coordinates and bullet hole coordinates are determined, bullet hole ring values are obtained, and an accurate detection result is obtained rapidly.
Drawings
FIG. 1 is a flow chart of a method according to an embodiment of the invention;
fig. 2 is a schematic diagram of the result of marking the bullet hole data according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the drawings and examples. The following examples are only for more clearly illustrating the technical aspects of the present invention, and are not intended to limit the scope of the present invention.
In the description of the present invention, the meaning of a number is one or more, the meaning of a number is two or more, and greater than, less than, exceeding, etc. are understood to exclude the present number, and the meaning of a number is understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, the descriptions of the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Example 1
A chest ring target bullet hole ring number reading method based on visual detection comprises the following steps:
step 1: target surface positioning is carried out on the obtained target paper image to obtain a target surface image, wherein the target paper image comprises a target paper image before shooting and a target paper image after shooting;
step 2: converting the target surface image from an RGB color space to an HSI color space to obtain gray values of hue information H, saturation S and color brightness I components of the target surface image, and performing color edge detection to obtain a target surface green-white edge image;
step 3: extracting Hough transformation features of the target surface green-white edge image to obtain a target loop line, and extracting a target surface area according to the target loop line;
step 4: filtering the target surface area;
step 5: determining the target coordinates based on the filtered target surface area;
step 6: based on the target surface area after the filtering treatment, determining the position of the bullet hole according to the saturation S of the bullet hole area after shooting and the target surface area before shooting and the change of the gray value of the color brightness I component, and determining the bullet hole coordinates based on the position of the bullet hole and the bulls center coordinates;
step 7: and obtaining the bullet hole ring value based on the bullet hole coordinates and the bulls-eye coordinates.
In some embodiments, the method for reading the number of the elastic loops of the chest ring target based on visual detection provided in this embodiment, as shown in fig. 1, includes:
step 1: collecting a target paper image, and carrying out target surface positioning on the obtained target paper image to obtain a target surface image, wherein the target paper image comprises a target paper image before shooting and a target paper image after shooting; because factors such as natural illumination, dust, target surface tremble and the like can influence image acquisition, the robustness of the algorithm is improved, and the algorithm is corrected.
Step 2: converting the target surface image from an RGB color space to an HSI color space to obtain target surface image tone information H, saturation S and gray values of color brightness 1 components, and performing color edge detection to obtain a target surface green-white edge image;
in some embodiments, the method further comprises performing image filtering processing on the target surface image in the HSI color space to obtain a clearer target surface image.
Step 2.1: the target paper is greatly influenced by illumination in an RGB image mode, and H is tone information in an HSI space and represents perception of vision on color; s is saturation and represents color depth information; i is the color luminance component, representing the image gray scale. The green and white edges are extracted as detection colors, and the target surface image is converted from an RGB color space to an HSI color space according to the following formula:
Figure BDA0004120046340000071
wherein->
Figure BDA0004120046340000072
Figure BDA0004120046340000073
Figure BDA0004120046340000074
Wherein R, G, B represents the gray values of the red, green and blue components of the target image in the RGB color space, and θ represents the HSI tone gray value; H. s, I the tone information H, saturation S, and gray scale value of the color intensity I component of the target image in the HSI color space.
Step 2.2: performing color edge detection to obtain a target surface green-white edge image, including: set image pixel point P (i,j) =(H (i,j) ,S (i,j) ,I (i,j) ) Wherein H is (i,j) 、S (i,j) 、I (i,j) Representing pixel point P (i,j) H, S, 1 component of (b). Setting two-dimensional array P 1(m,n) For the color edge detected image, use P (i,j) The window of 3*3 is taken as the center, and the diagonal angles are respectively P (i-1,j-1) ,P (i+1,j+1) In the HSI color space, the green constraint is: 60 < H < 180, S > 0.3; the constraint of white is: s is less than 0.3, I is more than 80; the following two conditions were taken as green-white edge detection conditions:
(1)P (i-1,j-1) 、P (i,j-1) 、P (i+1,j) all are green pixel points and P (i-1,j+1) 、P (i,j+1) 、P (i+1,j+1) White pixel points;
(2)P (i-1,j-1) 、P (i,j-1) 、P (i+1,j) are all white pixel points and P (i-1,j+1) 、P (i,j+1) 、P (i+1,j+1) All are green pixel points;
if any one of the conditions is satisfied, consider P (i-1,j) 、P (i,j) 、P (i+1,j) For the green and white edge point, let the pixel point P in the output image 1(i-1,j) =P 1(i,j) =P 1(i+1,j) =1, the other pixels are set to 0. And browsing the whole input image through the window to obtain a target surface green-white edge image.
Step 3: performing Hough transform feature extraction on the target surface green-white edge image obtained in the step 2 to obtain a target loop line, and extracting a target surface area according to the target loop line;
extracting Hough transform features of the target surface green-white edge image to obtain a target loop line;
the maximum distance point between the two edge points on the horizontal and vertical lines of the target ring line is obtained to obtain the left vertex (x min Y), right vertex (x max Y), upper vertex (x, y min ) Lower vertex (x, y max ) The rectangular window formed by connection is a target surface area after division.
Step 4: and (3) filtering the target surface area obtained in the step (3) to eliminate noise.
Through testing, morphological filtering can simplify data and is less time-consuming. The most basic morphological filtering operations include: corrosion, expansion, open operation, and close operation. The open operation smoothes sharp peaks in the image to eliminate bright details in the image that are smaller than the size of the structural elements. The formula is:
Figure BDA0004120046340000081
the closed operation eliminates dark spots in the image, filtering dark details. The formula is
Figure BDA0004120046340000082
Wherein: the ° represents an open operator, a closed operator, +.Corrosion operator->
Figure BDA0004120046340000083
Representing the expansion operator.
Step 5: determining the target coordinates based on the filtered target surface area;
the coordinates of the bulls-eye are obtained by a least squares curve fitting method.
The ring edge expression is: (x-A) 2 +(y-R) 2 -R 2 =0, converted into x 2 +y 2 -2ax-2by+c=0, then the center coordinates are: x is X 0 =A Y 0 =b, the circle radius is:
Figure BDA0004120046340000091
taking the coordinates Q of points on a known edge line i(i=12,3。。。。,n ) And the corresponding least square circle H i The error of the points is: deltaR i =x i 2 +y i 2 -2Ax i -2By i +C。
Sum of squares of the errors at each point:
Figure BDA0004120046340000092
minimum, there is->
Figure BDA0004120046340000093
Since A, B, C is linearly independent, the system of equations can be obtained:
Figure BDA0004120046340000094
Figure BDA0004120046340000095
Figure BDA0004120046340000096
a, B, C can be obtained, thereby obtaining the center coordinates and the radius.
Step 6: and determining the coordinates of the bullet hole.
The filtering treatment increases the contrast ratio of the bullet hole area and the background area, determines the bullet hole position according to the saturation S of the bullet hole area after shooting and the target area before shooting and the change of the gray value of the color brightness I component based on the target area after the filtering treatment, and determines the bullet hole coordinate by adopting a least square curve fitting method based on the bullet hole position and the bulls center coordinate; the method comprises the steps of acquiring contour or boundary information of a bullet hole, calculating Euclidean distance between a bullet hole boundary point and a bulls-eye coordinate, and selecting the bullet hole boundary point corresponding to the minimum distance value as a coordinate point of the bullet hole; let the bulls-eye coordinates be (x) a ,y a ) The coordinates of the boundary point of the bullet hole are (x) b ,y b ) The Euclidean distance e between the bulls-eye and the bullet hole boundary point is expressed as:
Figure BDA0004120046340000097
the bullet hole pixel coordinate corresponding to the minimum value is bullet hole coordinate (x i ,y i )。
Step 7: and obtaining the bullet hole ring value based on the bullet hole coordinates and the bulls-eye coordinates.
And judging the gray value step times of the pixel points on the connecting line of the bulls eye and the bullet hole to judge the bullet point ring value.
Bullet hole coordinates (x) i ,y i ) Coordinate with the bulls-eye (x) a ,y a ) The linear equation of (2) is:
Figure BDA0004120046340000101
wherein i epsilon (1, 2 … n), x and y (x) are values of corresponding points on the straight line, and the values of the points are calculated from the coordinates (x a ,y a ) Firstly, searching along a straight line, and counting the number of gray value steps of a pixel point, wherein the counted value is n;
the bullet hole ring value m is:
Figure BDA0004120046340000102
in some embodiments, it may further include: step 8: multiple bullet hole location determination mechanism. The number of loops is determined in real time every time a shot is completed, so that each frame of image is required to detect whether a new bullet hole exists. And carrying out real-time bullet hole detection on each frame of image by adopting inter-frame difference processing, YOLO detection and judgment processing. The main difference between two adjacent frames of images before and after shooting is positioned at the position of the newly added bullet hole, other areas are nearly the same, the gray values of the corresponding coordinates of the two adjacent frames of images captured before and after shooting are subtracted, and the obtained gray value difference is the position of the new bullet hole. If no difference exists, the two adjacent frames of bullet holes have no difference, and the target is taken as off-target. And repeating the comparison between the next two frames of pictures until the end.
The method comprises the steps of firstly labeling a large number of shot chest ring target images through a labelme tool, establishing a data set, eliminating noise generated in the acquisition and transmission processes of the chest ring target images through a smooth filtering mode, constructing and training a pytorch deep learning frame to carry out pixel level segmentation on the chest ring target effective area based on Hough operation, and providing a data basis for the next classification of the obtained result, so that the ring is detected and the ring number is read through a YOLO algorithm, and an accurate detection result is obtained. The method can be used for accurately reading the number of the target bullet hole ring in the fields of outdoor shooting training, teaching and scientific research, robot vision and the like.
Fig. 2 is a schematic diagram of the result of marking the bullet hole data in this embodiment, which is a schematic diagram of the original shooting target and the processed shooting target, respectively.
Example 2
In a second aspect, the embodiment provides a chest ring target bullet hole ring number reading device based on visual detection, which comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is operative according to the instructions to perform the steps of the method according to embodiment 1.
Example 3
In a third aspect, the present embodiment provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method described in embodiment 1.
Example 4
In a fourth aspect, the present invention provides an apparatus comprising,
one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods described in embodiment 1.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is only a preferred embodiment of the invention, it being noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the invention.

Claims (10)

1. The method for reading the number of the elastic rings of the chest ring target based on visual detection is characterized by comprising the following steps of:
step 1: target surface positioning is carried out on the obtained target paper image to obtain a target surface image, wherein the target paper image comprises a target paper image before shooting and a target paper image after shooting;
step 2: converting the target surface image from an RGB color space to an HSI color space to obtain gray values of hue information H, saturation S and color brightness I components of the target surface image, and performing color edge detection to obtain a target surface green-white edge image;
step 3: extracting Hough transformation features of the target surface green-white edge image to obtain a target loop line, and extracting a target surface area according to the target loop line;
step 4: filtering the target surface area;
step 5: determining the target coordinates based on the filtered target surface area;
step 6: based on the target surface area after the filtering treatment, determining the position of the bullet hole according to the saturation S of the bullet hole area after shooting and the target surface area before shooting and the change of the gray value of the color brightness I component, and determining the bullet hole coordinates based on the position of the bullet hole and the bulls center coordinates;
step 7: and obtaining the bullet hole ring value based on the bullet hole coordinates and the bulls-eye coordinates.
2. The method for reading the elastic ring number of the chest ring target based on visual detection according to claim 1, wherein in the step 2, the target image is converted from an RGB color space to an HSI color space to obtain gray values of hue information H, saturation S and color brightness I components of the target image, and the method comprises the following steps:
Figure FDA0004120046330000011
wherein->
Figure FDA0004120046330000012
Figure FDA0004120046330000013
Figure FDA0004120046330000014
Wherein R, G, B represents the gray values of the red, green and blue components of the target image in the RGB color space, and θ represents the HSI tone gray value; H. s, I the tone information H, saturation S, and gray scale value of the color intensity I component of the target image in the HSI color space.
3. The method for reading the number of the elastic loops of the chest ring target based on visual detection according to claim 1, wherein in the step 2, color edge detection is performed to obtain a green-white edge image of the target surface, and the method comprises the following steps:
set target surface image pixel point P (i,j) =(H (i,j) ,S (i,j) ,I (i,j) ) Wherein H is (i,j) 、S (i,j) 、I (i,j) Representing pixel point P (i,j) Tone information H, saturation S, gray value of color luminance 1 component; setting two-dimensional array P 1(m,n) For the color edge detected image, use P (i,j) The window of 3*3 is taken as the center, and the diagonal angles are respectively P (i-1,j-1) ,P (i+1,j+1) In the HSI color space, the green constraint is: 60 < H < 180, S > 0.3; the constraint of white is: s is less than 0.3, I is more than 80; the following two conditions were taken as green-white edge detection conditions:
(1)P (i-1,j-1) 、P (i,j-1) 、P (i+1,j) all are green pixel points and P (i-1,j+1) 、P (i,j+1) 、P (i+1,j+1) White pixel points;
(2)P (i-1,j-1) 、P (i,j-1) 、P (i+1,j) are all white pixel points and P (i-1,j+1) 、P (i,j+1) 、P (i+1,j+1) All are green pixel points;
if at least any one condition is satisfied, judging P (i-1,j) 、P (i,j) 、P (i+1,j) For the green and white edge point, let the pixel point P in the output image 1(i-1,j) =P 1(i,j) =P 1(i+1,j) =1, the other pixels are set to 0;
and browsing the whole target surface image by the window to obtain a target surface green-white edge image.
4. The method for reading the number of the elastic rings of the chest ring target based on visual detection according to claim 1, wherein the step 3 is as follows: extracting Hough transformation features of the target surface green-white edge image to obtain a target loop line, and extracting a target surface area according to the target loop line; comprising the following steps:
extracting Hough transform features of the target surface green-white edge image to obtain a target loop line;
the maximum distance point between the two edge points on the horizontal and vertical lines of the target ring line is obtained to obtain the left vertex (x min Y), right vertex (x max Y), upper vertex (x, y min ) And lower vertex (x, y max ) The rectangular window formed by connection is a target surface area after division.
5. The method for reading the number of the elastic loops of the chest ring target based on visual detection according to claim 1, wherein in the step 4, a morphological filtering operation is adopted to perform filtering treatment on the target surface area.
6. The method for reading the number of the elastic rings of the chest ring target based on visual detection according to claim 1, wherein the step 5 is as follows: determining the bulls-eye coordinates based on the filtered target surface region, comprising: the coordinates of the bulls-eye are obtained by a least squares curve fitting method.
7. The method for reading the number of the bullet holes of the chest ring target based on the visual inspection according to claim 1, wherein in the step 6, the bullet hole coordinates are determined based on the bullet hole positions and the bulls eye coordinates, comprising:
acquiring boundary information of a bullet hole, calculating Euclidean distance between a bullet hole boundary point and a bulls-eye coordinate, and selecting the bullet hole boundary point corresponding to the minimum distance value as a coordinate point of the bullet hole;
let the bulls-eye coordinates be (x) a ,y a ) The coordinates of the boundary point of the bullet hole are (x) b ,y b ) The Euclidean distance e between the bulls-eye and the bullet hole boundary point is expressed as:
Figure FDA0004120046330000031
the pixel coordinate corresponding to the minimum value of the euclidean distance e is the bullet hole coordinate (x i ,y i )。
8. The method for reading the number of the elastic rings of the chest ring target based on visual detection according to claim 1, wherein the step 7 is as follows: based on the bullet hole coordinates and the bulls-eye coordinates, obtaining bullet hole ring values comprises:
judging the gray value step times of the pixel points on the connecting line of the bulls eye and the bullet hole to judge the bullet hole ring value;
bullet hole coordinates (x) i ,y i ) Coordinate with the bulls-eye (x) a ,y a ) The linear equation of (2) is:
Figure FDA0004120046330000032
wherein i epsilon (1, 2 … n), x and y (x) are values of corresponding points on the straight line, and the values of the points are calculated from the coordinates (x a ,y a ) Firstly, searching along a straight line, and counting the number of gray value steps of a pixel point, wherein the counted value is n;
the bullet hole ring value m is:
Figure FDA0004120046330000033
9. a storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method according to any of claims 1 to 8.
10. An apparatus, characterized in that: comprising the steps of (a) a step of,
one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods of claims 1-8.
CN202310230224.0A 2023-03-10 2023-03-10 Chest ring target bullet hole ring number reading method based on visual detection Pending CN116228864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310230224.0A CN116228864A (en) 2023-03-10 2023-03-10 Chest ring target bullet hole ring number reading method based on visual detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310230224.0A CN116228864A (en) 2023-03-10 2023-03-10 Chest ring target bullet hole ring number reading method based on visual detection

Publications (1)

Publication Number Publication Date
CN116228864A true CN116228864A (en) 2023-06-06

Family

ID=86584237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310230224.0A Pending CN116228864A (en) 2023-03-10 2023-03-10 Chest ring target bullet hole ring number reading method based on visual detection

Country Status (1)

Country Link
CN (1) CN116228864A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118470106A (en) * 2024-04-30 2024-08-09 无锡奥润激光技术有限公司 Automatic target reporting method and system suitable for laser simulated shooting

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118470106A (en) * 2024-04-30 2024-08-09 无锡奥润激光技术有限公司 Automatic target reporting method and system suitable for laser simulated shooting

Similar Documents

Publication Publication Date Title
US12094152B2 (en) Method for fully automatically detecting chessboard corner points
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN105740856B (en) A kind of pointer instrument registration read method based on machine vision
CN109308447A (en) The method of equipment operating parameter and operating status is automatically extracted in remote monitoriong of electric power
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN108288264B (en) Wide-angle camera module contamination testing method
CN109507192A (en) A kind of magnetic core detection method of surface flaw based on machine vision
CN112304954B (en) Part surface defect detection method based on line laser scanning and machine vision
CN108537787B (en) Quality judgment method for face image
Christlein et al. A study on features for the detection of copy-move forgeries
CN113706490B (en) Wafer defect detection method
CN111259891B (en) Method, device, equipment and medium for identifying identity card in natural scene
CN106296691B (en) Pavement disease recognition methods based on image analysis
CN108665468B (en) Device and method for extracting tangent tower insulator string
CN109389165A (en) Oil level gauge for transformer recognition methods based on crusing robot
CN109242787A (en) It paints in a kind of assessment of middle and primary schools&#39; art input method
CN111060442A (en) Oil particle detection method based on image processing
CN111340749A (en) Image quality detection method, device, equipment and storage medium
CN113657335A (en) Mineral phase identification method based on HSV color space
CN110807763A (en) Method and system for detecting ceramic tile surface bulge
CN109064439B (en) Partition-based single-side light-entering type light guide plate shadow defect extraction method
CN108257125B (en) Depth image quality non-reference evaluation method based on natural scene statistics
CN116228864A (en) Chest ring target bullet hole ring number reading method based on visual detection
CN103852034A (en) Elevator guide rail perpendicularity detection method
JP2015171143A (en) Camera calibration method and apparatus using color-coded structure, and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination