Impact point positioning method for virtual shooting
By placing T-shaped markers and infrared light markers on the target screen, combined with photogrammetry, the problem of inaccurate bullet impact point positioning in virtual shooting training was solved, achieving rapid and accurate bullet impact point positioning and data support, thus improving training effectiveness.
Patent Information
- Application Number
- CN202511150025.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-12-02
AI Technical Summary
In virtual shooting training, it is difficult to accurately locate the bullet impact point on the target screen in real time. Existing technologies are easily affected by image quality and site factors, resulting in inaccurate positioning.
Multiple T-shaped markers are evenly distributed on the target screen. Each marker includes six identical marker areas. The object coordinates are measured using infrared lamps, and the target screen image is captured in real time using an image acquisition device. The projection relationship between the object and the image is calculated using photogrammetry to determine the impact point.
It enables rapid and accurate positioning of the impact point, reduces construction costs, ensures training safety, provides real-time display and data analysis support, and improves the relevance and comprehensiveness of training.
Smart Images

Figure CN121053203A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of photogrammetry technology, and in particular to a method for locating the bullet impact point in a virtual shooting scenario. Background Technology
[0002] With the rapid development of computer technology and virtual reality technology, virtual shooting training of projection devices can be achieved based on images and virtual reality technology. Virtual shooting training not only ensures the safety of trainees but also records the entire training process for playback analysis. This allows trainees to identify their mistakes and shortcomings from a third-person perspective, facilitating continuous self-correction and summarization. It also makes the training more targeted and comprehensive, compensating for the deficiencies of live-fire shooting training.
[0003] However, in virtual shooting training, it is difficult to confirm the accurate bullet impact point on the target screen in real time. Related technologies can take pictures of the bullet impact point and analyze the pictures to determine the bullet impact point position. However, since there may be many marks on the target screen, it is difficult to accurately capture the bullet impact point position based solely on image analysis. This can easily lead to missed or incorrect captures. Furthermore, the positioning solution also depends on the quality of the image capture and is easily affected by site factors.
[0004] Therefore, there is currently a lack of a method that can accurately locate the point of impact on the target screen. Summary of the Invention
[0005] This application provides a method for locating the bullet impact point in virtual shooting, to overcome the shortcomings of the aforementioned related technologies. The technical solution is as follows: In a first aspect, embodiments of this application provide a method for locating the bullet impact point in a virtual shooting scenario, the method comprising: Multiple different T-shaped structure markers are evenly distributed on the target screen; each T-shaped structure marker includes 6 marker areas of the same size arranged in a T-shape, and each marker area includes 1 or 3 infrared light markers; The object coordinates of the infrared light markings on each T-shaped structure were measured; In response to the firing operation of the firing device, an image acquisition device arranged along the firing port axis of the firing device acquires images of the target screen in real time; The image coordinates of each highlighted region are determined based on the grayscale values of each pixel in the image, and the corresponding T-shaped structure identifier is determined according to the distribution of the highlighted regions in the image. Photogrammetric resection calculations are performed based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier to determine the projection relationship between the object-side and image-side coordinates. The exterior orientation elements of the camera of the image acquisition device are calculated based on the collinearity condition equation of photogrammetry and the projection relationship. Based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, the object plane coordinates corresponding to the center point of the image are calculated, and the object plane coordinates are output as the impact point positioning result.
[0006] In one alternative of the first aspect, among the multiple different T-shaped structure marks uniformly distributed on the target screen, the minimum distance between any two adjacent T-shaped structure marks is greater than the maximum distance between any two infrared light marks in each T-shaped structure mark.
[0007] In one alternative embodiment of the first aspect, determining the image-side coordinates of each highlighted region based on the grayscale values of each pixel in the image includes: The image is binarized. If the gray value of the corresponding pixel in the image is greater than a preset threshold, the gray value of the corresponding pixel is assigned to 255; otherwise, the gray value of the corresponding pixel is assigned to 0. Extract all bright pixels with a grayscale value of 255 from the image. Based on the 8-neighbor labeling method, when the grayscale value of the eight neighboring pixels of each bright pixel is 255, mark the bright pixel and the eight neighboring pixels as connected regions. Clustering is performed on connected regions to obtain the highlighted regions, and the image coordinates of the highlighted regions are obtained based on the average coordinates of all pixels in the highlighted regions.
[0008] In one alternative embodiment of the first aspect, after determining the image-side coordinates of each highlighted region based on the grayscale values of each pixel in the image, the method further includes: The distortion in the x and y directions of the image is calculated based on the camera intrinsic parameters obtained by pre-calibrating the image acquisition device. The image coordinates are corrected based on the distortion to obtain the corrected image coordinates.
[0009] In one alternative embodiment of the first aspect, each of the T-shaped structure identifiers is pre-encoded to obtain a binary code for each of the T-shaped structure identifiers; the method further includes: The value is assigned based on the number of infrared light markers in each marking area on each T-shaped structure marker. If the number of infrared light markers in the corresponding marking area is 1, the marking area is assigned a value of 0. If the number of infrared light markers in the corresponding marking area is 3, the marking area is assigned a value of 1. The values of the identifier areas are assigned according to the arrangement order of the six T-shaped identifiers from bottom to top and from left to right, thus obtaining the binary code of each T-shaped identifier.
[0010] In one alternative embodiment of the first aspect, determining the corresponding T-shaped structure identifier based on the distribution of the highlighted areas on the image includes: Based on the image coordinates corresponding to each highlighted area, a straight line fit is performed to determine the highlighted areas belonging to the same image T-shaped structure identifier. Encode each highlighted area of the T-shaped structure identifier by area. For highlighted areas with an area greater than a threshold, assign a value of 1; otherwise, assign a value of 0. Arrange the assigned values of each highlighted area in a bottom-to-top and left-to-right order to generate the corresponding binary code of the T-shaped structure identifier. The correspondence between square T-shaped structure identifiers and T-shaped structure identifiers is determined based on the same binary encoding.
[0011] In one alternative embodiment of the first aspect, determining the projection relationship between the object side and the image side includes: Based on the correspondence between the image-side T-shaped structure mark and the T-shaped structure mark, the infrared light mark on the T-shaped structure mark corresponding to the bright area on the image-side T-shaped structure mark is determined, and the image-side coordinates corresponding to the infrared light mark on the T-shaped structure mark are obtained. Based on the pairing of image-side coordinates and object-side coordinates of each infrared light marker on the T-shaped structure, the projection relationship between the object-side and image-side is calculated using photogrammetric resection.
[0012] Secondly, embodiments of this application also provide a bullet impact point positioning device for virtual shooting, comprising: The object processing unit is used to uniformly deploy multiple different T-shaped structure marks on the target screen; wherein each T-shaped structure mark includes 6 mark areas of the same size arranged in a T-shape, and each mark area includes 1 or 3 infrared light marks. The object space processing unit is also used to measure the object space coordinates of the infrared light markings on each T-shaped structure marking; An image processing unit is configured to, in response to the firing operation of the firing device, acquire images of the target screen in real time via an image acquisition device arranged along the firing port axis of the firing device; The image processing unit is also used to determine the image coordinates of each bright area based on the gray value of each pixel in the image, and to determine the corresponding T-shaped structure identifier according to the distribution of the bright areas in the image. The image processing unit is also used to perform photogrammetric resection calculations based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier, and to determine the projection relationship between the object-side and image-side. The impact point positioning unit is used to calculate the camera exterior orientation elements of the image acquisition device based on the collinearity condition equation of photogrammetry and the projection relationship; The impact point positioning unit is also used to calculate the object plane coordinates corresponding to the center point of the image based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, and output the object plane coordinates as the impact point positioning result.
[0013] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method provided by the first aspect or any implementation thereof of the embodiments of this application.
[0014] Fourthly, this application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided by the first aspect of the embodiments of this application or any implementation thereof.
[0015] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: This application provides a method for locating bullet impact points in virtual shooting. It is simple, easy to implement, and has low construction costs. It can display the bullet's impact position in real time, ensuring the safety of trainees and providing a new method for virtual shooting training. This application embodiment uses only image processing combined with pre-set T-shaped markers to quickly determine the mapping relationship between the object and image sides. This allows for the calculation of the external orientation elements of the camera in the image acquisition device within the shooting apparatus, eliminating the need for complex image analysis processes found in related technologies. Therefore, it enables quick and easy determination of the object coordinates based on the center point coordinates of the acquired image, thereby locating the bullet impact point. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a method for locating the bullet impact point in virtual shooting, provided in an embodiment of this application. Figure 2 A schematic diagram of the layout of the T-shaped structural markings on the target screen provided in an embodiment of this application; Figure 3 This is a schematic diagram of the T-shaped structure identifier provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of a bullet impact point positioning device for virtual shooting provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not limited to the steps or modules listed, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to such process, method, product, or apparatus.
[0020] It should be noted that the terms "first" and "second" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permitted. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in an order other than those described or illustrated herein.
[0021] The present application will now be described in detail with reference to specific embodiments.
[0022] Next, combine Figure 1 This application describes a method for locating bullet impact points in virtual shooting, as provided in an embodiment. For details, please refer to... Figure 1 , Figure 1 This illustration shows a flowchart of a virtual shooting bullet impact point positioning method provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps: S101, multiple different T-shaped structural markings are evenly distributed on the target screen; S102, measure the object coordinates of the infrared light markings on each T-shaped structure marking; S103, in response to the firing operation of the firing device, an image acquisition device arranged along the firing port axis of the firing device acquires an image of the target screen in real time; S104, determine the image coordinates of each bright area based on the gray value of each pixel in the image, and determine the corresponding T-shaped structure identifier according to the distribution of the bright areas in the image; S105, Perform photogrammetric resection calculations based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier to determine the projection relationship between the object-side and image-side. S106, The exterior orientation elements of the camera of the image acquisition device are calculated based on the collinearity condition equation of photogrammetry and the projection relationship; S107, Based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, calculate the object plane coordinates corresponding to the center point of the image, and output the object plane coordinates as the impact point positioning result.
[0023] In some embodiments, in S101, the target screen can be evenly divided into multiple grids, and a T-shaped structure identifier can be set in each grid. The number of T-shaped structure identifiers depends on the size of the target screen, and the total number does not exceed 64.
[0024] For example, Figure 2 This is a schematic diagram illustrating the layout of a T-shaped structure marking on a target screen, provided in an embodiment of this application. The target screen is evenly divided into m rows and n columns, as shown below. Figure 2 As shown, the target screen measures 3m × 5m and is divided into 3 rows and 5 columns, with each T-shaped structure marker placed within a pre-defined grid rectangle.
[0025] Specifically, each T-shaped sign includes six identical sign areas arranged in a T-shape. Each sign area includes one or three infrared LED signs. The spacing between adjacent infrared LED signs within each sign area can be set to 20cm. Figure 3 The diagram shown is a schematic diagram of a T-shaped structure marker provided in an embodiment of this application. Four marker areas are distributed along the longitudinal direction of the T-shape, and two other marker areas are distributed along the transverse direction of the T-shape on both sides of the top marker area of the four marker areas. Each marker area includes one or three infrared light markers.
[0026] Optionally, the deployment conditions of multiple different T-shaped structure marks on the target screen can be set, wherein the minimum distance between any two adjacent T-shaped structure marks is greater than the maximum distance between any two infrared light marks in each T-shaped structure mark.
[0027] In some embodiments, each of the T-shaped structure identifiers can be pre-encoded to obtain a binary code for each of the T-shaped structure identifiers. The method further includes: The value is assigned based on the number of infrared light markers in each marking area on each T-shaped structure marker. If the number of infrared light markers in the corresponding marking area is 1, the marking area is assigned a value of 0. If the number of infrared light markers in the corresponding marking area is 3, the marking area is assigned a value of 1. The values of the identifier areas are assigned according to the arrangement order of the six T-shaped identifiers from bottom to top and from left to right, thus obtaining the binary code of each T-shaped identifier.
[0028] For example, as Figure 3 Taking the T-shaped structure identifiers of parts a, b, and c as an example, the resulting binary codes are shown in Table 1 below. In part a, the T-shaped structure identifiers from bottom to top consist of 3 infrared light identifiers, 1 infrared light identifier, 3 infrared light identifiers, and 3 infrared light identifiers, assigned values of 1, 0, 1, and 1 respectively. On both sides, from left to right, there is 1 infrared light identifier and 3 infrared light identifiers, assigned values of 0 and 1 respectively. The resulting code for part a is 101101. Similarly, the binary codes for the corresponding T-shaped structure identifiers of parts b and c can be obtained.
[0029] Table 1. Codes corresponding to T-shaped identifiers
[0030] In some embodiments, in S102, the object coordinates of the infrared light markers on each T-shaped structure marker can be measured using a total station. An object coordinate system can be established in front of the target screen of the virtual shooting range. For example, a position near the center of the field where all T-shaped structure markers can be observed can be selected as the origin of the coordinate system. Facing the screen to the right is the positive X-axis direction, upward is the positive Y-axis direction, and perpendicular to the screen outward is the positive Z-axis direction. The coordinates of the infrared light markers on the T-shaped structure markers are measured, and the obtained three-dimensional coordinates are the corresponding object coordinates.
[0031] It should be noted that for a marking area with only one infrared light marker, the coordinates of that infrared light marker are directly measured as the corresponding object coordinates; for a marking area with three infrared light markers, the coordinates of the middle infrared light marker are measured as the object coordinates of the three infrared light markers.
[0032] In some embodiments, in S103, the image acquisition device is disposed at the firing port of the firing device, and the shooting optical axis of the image acquisition device coincides with the firing port axis of the firing device. In this way, the shooting direction of the image acquisition device is the same as the shooting direction, and the shooting center point is the same as the impact point of the bullet.
[0033] Specifically, the firing trigger device of the firing device can be bound to the image acquisition device. At the same time as firing, the image acquisition device can respond to the corresponding firing operation and synchronously execute the operation of acquiring images, thereby obtaining the image of the target screen at the moment of firing.
[0034] In some embodiments, in S104, the image coordinates of each highlighted region can be determined based on the grayscale values of each pixel in the image, including: S1041, the image is binarized. If the gray value of the corresponding pixel in the image is greater than a preset threshold, the gray value of the corresponding pixel is assigned to 255; otherwise, the gray value of the corresponding pixel is assigned to 0.
[0035] S1042, extract all bright pixels with a grayscale value of 255 in the image, and based on the 8-neighborhood labeling method, mark the bright pixel and the 8 neighboring pixels as connected regions when the grayscale value of each bright pixel is 255.
[0036] Specifically, S1042 is equivalent to extracting all connected regions with a gray value of 255 and using them as the same marker point. Connected regions can be searched using the 8-neighborhood marking method, that is, from the image, for each position with a gray value of 255, it is determined whether the gray values of 8 adjacent pixels are equal to 255. If so, it is marked as a connected region.
[0037] S1043, perform clustering based on connected regions to obtain the highlighted region, and obtain the image coordinates of the highlighted region based on the average coordinates of all pixels in the highlighted region.
[0038] The clustering process includes: Take the average of the image coordinates of all pixels within the connected region, and then perform clustering with the average value as the center and the distance to the farthest pixel in the connected region as the radius.
[0039] In this way, the image coordinates of the highlighted area can be obtained. It can be understood that the highlighted area on the image corresponds to the position of each infrared light marker in the image. Each highlighted area can be regarded as corresponding to all the infrared light markers in a marker area. The number of infrared light markers corresponding to the highlighted area can be further determined by the area of the highlighted area.
[0040] In some embodiments, a preset threshold for grayscale values can be selected based on lighting conditions. When the influence of light is small, a smaller preset threshold can be selected. For example, in an indoor environment, where the influence of external light is small, the preset threshold can be set to 200 to process the grayscale image. Conversely, a larger preset threshold should be selected than that in an indoor environment.
[0041] In some embodiments, after determining the image-side coordinates of each highlighted region based on the grayscale values of each pixel in the image, the method further includes: The distortion in the x and y directions of the image is calculated based on the camera intrinsic parameters obtained from the pre-calibration of the image acquisition device, using the following formula: ; in,( ) represents the distortion of the image in the x and y directions. x , y ) represents the pixel coordinates on the image; , b 1,2 () refers to the pre-calibrated camera intrinsic parameters. r The radial distance of the pixel coordinates from the image center. .
[0042] Furthermore, the image-space coordinates are corrected based on the distortion to obtain the corrected image-space coordinates, using the formula: ; in,( () represents the image-side coordinates after distortion correction; x , y () represents the image coordinates; x 0, y 0) is the principal point of the image, which is the vertical projection point of the optical center of the image acquisition device onto the imaging plane.
[0043] In some embodiments, the selected image acquisition device can be calibrated, the shooting depth of field adjusted according to the actual application scenario, and fixed inside the shooting device, such as inside a model gun barrel. Image acquisition is performed in a high-precision indoor calibration field. Using the image coordinates of the marker points in the calibration field and the corresponding object-side three-dimensional coordinates, the camera's intrinsic parameters, including but not limited to the image principal point (…), are calculated. x 0, y 0) Camera principal distance f Radial distortion parameters ( k 1, k 2, k 3) Tangential distortion parameters ( p 1, p 2) Shear parameters ( b 1, b 2).
[0044] Furthermore, in S104, the corresponding T-shaped structure identifier is determined based on the distribution of the highlighted areas on the image, specifically including: S1044, perform linear fitting based on the image coordinates corresponding to each highlighted area to determine the highlighted areas belonging to the same image T-shaped structure identifier.
[0045] Specifically, the relative positional relationship between the points in each highlighted area can be determined by arranging the image coordinates of the highlighted areas in order of size. The six points that are closest to each other can be identified as a group. By fitting a straight line, it can be determined that the four points that conform to the straight line equation are the vertical T-shaped points, and the three points that conform to the straight line equation are the horizontal points. Thus, the highlighted areas belonging to the same image T-shaped structure can be identified.
[0046] S1045, Encode each highlighted area of the square T-shaped structure identifier according to its area. For highlighted areas with an area greater than a threshold, assign a value of 1; otherwise, assign a value of 0. Arrange the assigned values of each highlighted area in a bottom-to-top and left-to-right order to generate the corresponding binary code of the square T-shaped structure identifier.
[0047] The specific encoding process can be found in Table 1 and Figure 3 The corresponding embodiment of pre-coding each of the T-shaped structure identifiers is not described in detail here.
[0048] S1046, Determine the correspondence between the square T-shaped structure identifier and the T-shaped structure identifier based on the same binary code.
[0049] Specifically, each T-shaped structure identifier is different and has a unique binary code. Therefore, the image-side T-shaped structure identifier corresponding to the same binary code can be determined, that is, the T-shaped structure identifier with the same binary code as the image-side T-shaped structure identifier can be found so as to calculate the projection relationship between the image-side and the object-side.
[0050] In some embodiments, S105, photogrammetric resection calculation is performed based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier to determine the projection relationship between the object-side and image-side coordinates, including: S1051, based on the correspondence between the image-side T-shaped structure identifier and the T-shaped structure identifier, determine the infrared light identifier on the T-shaped structure identifier corresponding to the bright area on the image-side T-shaped structure identifier, and obtain the image-side coordinates corresponding to the infrared light identifier on the T-shaped structure identifier.
[0051] Understandably, based on the description in S1043, the bright area on the image-square T-shaped structure mark is obtained by imaging the infrared light mark on the image. By the correspondence between the image-square T-shaped structure mark and the T-shaped structure mark, the image-square coordinates of each infrared light mark on the image can be obtained.
[0052] S1052, based on the pairing of the image-side coordinates and object-side coordinates of each infrared light mark on the T-shaped structure mark, the projection relationship between the object-side and image-side is calculated using photogrammetric resection.
[0053] In some embodiments, the obtained T-shaped markers can be cross-validated. For example, if there are 3 T-shaped markers, the three combinations (1,2), (1,3), and (2,3) can be selected. The coordinate points of all infrared light markers in the two markers are included in the cross-intersection calculation, and the residual size is determined. If the residual is less than 5 pixels, it indicates that the correspondence between the image and object is correct.
[0054] In some embodiments, S106, the exterior orientation elements of the camera of the image acquisition device are calculated based on the collinearity condition equation of photogrammetry combined with the projection relationship, using the following formula: ; in,( () represents the image-side coordinates; The camera's principal distance; X , Y Z) are the object coordinates corresponding to the image points; ) represents the camera's exterior orientation line element; ) is the exterior azimuth element of the camera ( The rotation matrix is constructed using the following formula: ; Based on the above formula, an error equation is established, and solved using the least squares adjustment method to obtain the camera exterior orientation elements. ).
[0055] In some embodiments, in S107, the object plane coordinates corresponding to the center point of the image can be calculated based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, and the object plane coordinates can be output as the impact point positioning result.
[0056] Specifically, considering that the screen is a plane, the Z-axis coordinate at any position on this plane is considered a constant. Therefore, the coordinates of the current image center point are taken as: ; in, w The width of the image. H The height of the image. Given the image center point's image coordinates, and with Z=Z0 (Z0 being the average of the Z-axis object coordinates of all infrared light markers), the object plane coordinates corresponding to the image center point are calculated according to the formula in S106 based on the camera exterior orientation elements obtained above. This can be used as the impact point position of the currently fired bullet on the screen.
[0057] In this embodiment, the target image is first acquired using a camera, and the target's coordinates are extracted from the image. Then, the image coordinates are converted into object-side three-dimensional coordinates using the camera's intrinsic and extrinsic parameters. This positioning method has advantages such as being non-contact, fast, capable of acquiring multiple observation targets simultaneously, and highly accurate. It can also display the impact point of the projectile in real time after the impact point has been determined.
[0058] Furthermore, the embodiments of this application can also provide data support for the statistical analysis of each shooting training session. It can statistically analyze parameters such as shooting accuracy and system deviation, which facilitates continuous self-correction and summarization by trainees practicing the shooting device. It also makes the training more targeted and comprehensive, making up for the shortcomings of live-fire shooting training. Moreover, the data recorded and fed back directly through images can objectively reflect the trainees' training status, which is convenient for automated assessment.
[0059] The following are apparatus embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of this application.
[0060] Please see below. Figure 4 This is a schematic diagram of a bullet impact point positioning device for virtual shooting, provided as an exemplary embodiment of this application. The device can be implemented through software, hardware, or a combination of both. The bullet impact point positioning device for virtual shooting in this embodiment includes an object processing unit, an image processing unit, and a bullet impact point positioning unit, wherein: The object processing unit is used to uniformly deploy multiple different T-shaped structure marks on the target screen; wherein each T-shaped structure mark includes 6 mark areas of the same size arranged in a T-shape, and each mark area includes 1 or 3 infrared light marks. The object space processing unit is also used to measure the object space coordinates of the infrared light markings on each T-shaped structure marking; An image processing unit is configured to, in response to the firing operation of the firing device, acquire images of the target screen in real time via an image acquisition device arranged along the firing port axis of the firing device; The image processing unit is also used to determine the image coordinates of each bright area based on the gray value of each pixel in the image, and to determine the corresponding T-shaped structure identifier according to the distribution of the bright areas in the image. The image processing unit is also used to perform photogrammetric resection calculations based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier, and to determine the projection relationship between the object-side and image-side. The impact point positioning unit is used to calculate the camera exterior orientation elements of the image acquisition device based on the collinearity condition equation of photogrammetry and the projection relationship; The impact point positioning unit is also used to calculate the object plane coordinates corresponding to the center point of the image based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, and output the object plane coordinates as the impact point positioning result.
[0061] It should be noted that the device provided in the above embodiments, when executing a virtual shooting bullet impact point positioning method, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device provided in the above embodiments and the embodiment of a virtual shooting bullet impact point positioning method belong to the same concept, and its implementation process is detailed in the method embodiment, which will not be repeated here.
[0062] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0063] Please see Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this application.
[0064] like Figure 5 As shown, the electronic device 500 includes a processor 501 and a memory 502.
[0065] In this embodiment, the processor 501 is the control center of the computer system, and can be a processor of a physical machine or a processor of a virtual machine. The processor 501 may include one or more processing cores, such as a 4-core processor or an 8-core processor. The processor 501 can be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array).
[0066] Processor 501 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake-up state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state.
[0067] Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments of this application, the non-transitory computer-readable storage media in memory 502 is used to store at least one instruction, which is executed by processor 501 to implement the method in the embodiments of this application.
[0068] In some embodiments, the electronic device 500 further includes a peripheral device interface 503 and at least one peripheral device 504. The processor 501, memory 502, and peripheral device interface 503 can be connected via a bus or signal line. Each peripheral device 504 can be connected to the peripheral device interface 503 via a bus, signal line, or circuit board. Specifically, the peripheral device 504 includes: a display screen, a camera, and audio circuitry. The peripheral device interface 503 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 501 and memory 502.
[0069] In some embodiments of this application, the processor 501, memory 502, and peripheral device interface 503 are integrated on the same chip or circuit board; in other embodiments of this application, any one or two of the processor 501, memory 502, and peripheral device interface 503 can be implemented on separate chips or circuit boards. This application does not specifically limit the implementation in this regard.
[0070] The block diagram of the electronic device shown in the embodiments of this application does not constitute a limitation on the electronic device 500. The electronic device 500 may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0071] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the methods in any of the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0072] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for locating the bullet impact point in virtual shooting, characterized in that, include: Multiple different T-shaped structure markers are evenly distributed on the target screen; each T-shaped structure marker includes 6 marker areas of the same size arranged in a T-shape, and each marker area includes 1 or 3 infrared light markers; The object coordinates of the infrared light markings on each T-shaped structure were measured; In response to the firing operation of the firing device, an image acquisition device arranged along the firing port axis of the firing device acquires images of the target screen in real time; The image coordinates of each highlighted region are determined based on the grayscale values of each pixel in the image, and the corresponding T-shaped structure identifier is determined according to the distribution of the highlighted regions in the image. Photogrammetric resection calculations are performed based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier to determine the projection relationship between the object-side and image-side coordinates. The exterior orientation elements of the camera of the image acquisition device are calculated based on the collinearity condition equation of photogrammetry and the projection relationship. Based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, the object plane coordinates corresponding to the center point of the image are calculated, and the object plane coordinates are output as the impact point positioning result.
2. The method for locating the bullet impact point in virtual shooting according to claim 1, characterized in that, Among the multiple different T-shaped structure marks evenly distributed on the target screen, the minimum distance between any two adjacent T-shaped structure marks is greater than the maximum distance between any two infrared light marks in each T-shaped structure mark.
3. The method for locating the bullet impact point in virtual shooting according to claim 1, characterized in that, Determining the image-side coordinates of each highlighted region based on the grayscale values of each pixel in the image includes: The image is binarized. If the gray value of the corresponding pixel in the image is greater than a preset threshold, the gray value of the corresponding pixel is assigned to 255; otherwise, the gray value of the corresponding pixel is assigned to 0. Extract all bright pixels with a grayscale value of 255 from the image. Based on the 8-neighbor labeling method, when the grayscale value of the eight neighboring pixels of each bright pixel is 255, mark the bright pixel and the eight neighboring pixels as connected regions. Clustering is performed on connected regions to obtain the highlighted regions, and the image coordinates of the highlighted regions are obtained based on the average coordinates of all pixels in the highlighted regions.
4. The method for locating the bullet impact point in virtual shooting according to claim 3, characterized in that, After determining the image-side coordinates of each highlighted region based on the grayscale values of each pixel in the image, the method further includes: The distortion in the x and y directions of the image is calculated based on the camera intrinsic parameters obtained by pre-calibrating the image acquisition device. The image coordinates are corrected based on the distortion to obtain the corrected image coordinates.
5. A method for locating the bullet impact point in virtual shooting according to claim 3 or 4, characterized in that, The method further includes pre-encoding each of the T-shaped structure identifiers to obtain a binary code for each T-shaped structure identifier. The value is assigned based on the number of infrared light markers in each marking area on each T-shaped structure marker. If the number of infrared light markers in the corresponding marking area is 1, the marking area is assigned a value of 0. If the number of infrared light markers in the corresponding marking area is 3, the marking area is assigned a value of 1. The values of the identifier areas are assigned according to the arrangement order of the six T-shaped identifiers from bottom to top and from left to right, thus obtaining the binary code of each T-shaped identifier.
6. The method for locating the bullet impact point in virtual shooting according to claim 5, characterized in that, The step of determining the corresponding T-shaped structure identifier based on the distribution of the highlighted areas on the image includes: Based on the image coordinates corresponding to each highlighted area, a straight line fit is performed to determine the highlighted areas belonging to the same image T-shaped structure identifier. Encode each highlighted area of the T-shaped structure identifier by area. For highlighted areas with an area greater than a threshold, assign a value of 1; otherwise, assign a value of 0. Arrange the assigned values of each highlighted area in a bottom-to-top and left-to-right order to generate the corresponding binary code of the T-shaped structure identifier. The correspondence between square T-shaped structure identifiers and T-shaped structure identifiers is determined based on the same binary encoding.
7. The method for locating the bullet impact point in virtual shooting according to claim 6, characterized in that, Determining the projection relationship between the object side and the image side includes: Based on the correspondence between the image-side T-shaped structure mark and the T-shaped structure mark, the infrared light mark on the T-shaped structure mark corresponding to the bright area on the image-side T-shaped structure mark is determined, and the image-side coordinates corresponding to the infrared light mark on the T-shaped structure mark are obtained. Based on the pairing of image-side coordinates and object-side coordinates of each infrared light marker on the T-shaped structure, the projection relationship between the object-side and image-side is calculated using photogrammetric resection.
8. A bullet impact point positioning device for virtual shooting, characterized in that, include: The object processing unit is used to uniformly deploy multiple different T-shaped structure marks on the target screen; wherein each T-shaped structure mark includes 6 mark areas of the same size arranged in a T-shape, and each mark area includes 1 or 3 infrared light marks. The object space processing unit is also used to measure the object space coordinates of the infrared light markings on each T-shaped structure marking; An image processing unit is configured to, in response to the firing operation of the firing device, acquire images of the target screen in real time via an image acquisition device arranged along the firing port axis of the firing device; The image processing unit is also used to determine the image coordinates of each bright area based on the gray value of each pixel in the image, and to determine the corresponding T-shaped structure identifier according to the distribution of the bright areas in the image. The image processing unit is also used to perform photogrammetric resection calculations based on the image-side coordinates and object-side coordinates corresponding to each T-shaped structure identifier, and to determine the projection relationship between the object-side and image-side. The impact point positioning unit is used to calculate the camera exterior orientation elements of the image acquisition device based on the photogrammetric collinearity condition equation and the projection relationship. The impact point positioning unit is also used to calculate the object plane coordinates corresponding to the center point of the image based on the collinearity condition equation of photogrammetry and the exterior orientation elements of the camera, and output the object plane coordinates as the impact point positioning result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 7.
10. 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, it implements the steps of the method as described in any one of claims 1 to 7.
