Front sight positioning system and method, electronic equipment and storage medium
By adopting a sight positioning system combining the light source array luminous mode and camera image in multiplayer shooting games, the problem of high computing power requirements and inaccurate sight matching in the prior art is solved, and the efficiency, accuracy and low-cost effect of sight positioning is achieved.
Patent Information
- Application Number
- CN202411772389.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-25
AI Technical Summary
The technology used for sight positioning in existing multiplayer shooting games cannot take into account the advantages of low computing power requirements and no error matching of sight aiming positions.
A sight positioning system is adopted, which includes a screen, multiple game guns, light source arrays and cameras. Through the matching relationship between the multiple luminous modes of the light source array and the laser emitter, combined with the image continuously acquired by the camera, the controller determines the aiming position of the game gun corresponding to the light spot and its sight on the screen.
It has achieved no matching errors in the game gun and the aiming position of the sight of the star in multiplayer shooting games, and the computing power requirements are low and the cost is low.
Smart Images

Figure CN119499631A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of game equipment, and in particular relates to a crosshair positioning system, method, electronic equipment and storage medium. Background Art
[0002] In existing multiplayer shooting games, there is a need to simultaneously track the crosshairs of multiple game guns.
[0003] To address this demand, a commonly used solution is to install a laser transmitter in a game gun, control the laser transmitters in multiple game guns to emit lasers to the screen in turn at a preset frequency to form a light spot on the screen, take photos based on the camera at the preset frequency and match the photos and the game guns according to the shooting order of the photos and the emission order of the laser transmitter, and determine the crosshair aiming position of the game gun according to the position of the light spot on the screen based on the correspondence between the photos and the game guns. However, this solution needs to ensure that the shooting frequency of the camera and the emission frequency of the laser are the same, so a camera with an external trigger function is required, which is costly. In addition, when the camera cannot respond to the external trigger signal and causes frame loss, the light spot in the photo may not match the laser gun, resulting in an incorrect match between the crosshair aiming position and the game gun.
[0004] Another common solution is to install a laser emitter that can emit lasers with different spot shapes in the game gun, control the laser emitters in multiple game guns to emit lasers to the screen to form a spot on the screen, take photos based on the camera according to the preset frequency, confirm the spot shape and calculate the position of the spot on the screen, and determine the crosshair aiming position of the game gun based on the position of the spot on the screen in the photo and the correspondence between the spot shape and the game gun. However, this solution requires the recognition of the spot shape and requires high computing power. Therefore, the existing crosshair positioning method for multiplayer shooting games cannot have the advantages of low computing power requirements and accurate matching of the game gun and the crosshair aiming position.
[0005] Therefore, the existing technology needs to be improved and developed. Summary of the invention
[0006] The purpose of the present application is to provide a crosshair positioning system, method, electronic device and storage medium, aiming to solve the problem that the existing crosshair positioning method for multiplayer shooting games cannot have the advantages of low computing power requirements and accurate matching of the game gun and the crosshair aiming position.
[0007] In a first aspect, the present application provides a crosshair positioning system for determining the crosshair aiming position of a game gun in a multiplayer shooting game, comprising: Screen; A plurality of game guns, each of which comprises a laser emitter, and the plurality of laser emitters are used to emit lasers in turn and form light spots on the screen; A light source array is arranged on one side of the screen and has a plurality of light emission modes, wherein different light emission modes are matched to different laser emitters, and the light source array is used to emit light in a light emission mode matched with the laser emitter when the laser emitter emits laser; A camera, used for continuously acquiring a first image, where the first image is an image of the screen and the light source array; The controller is used to determine the game gun corresponding to the light spot according to the light pattern of the light source array in the first image based on the matching relationship between the light pattern and the laser emitter when there is a light spot in the first image, and determine the aiming position of the crosshairs of the game gun corresponding to the light spot on the screen according to the position of the light spot in the first image.
[0008] The crosshair positioning system of the present application determines the game gun corresponding to the light spot according to the light emission pattern of the light source array in the first image, and determines the aiming position of the crosshairs of the game gun corresponding to the light spot on the screen according to the position of the light spot in the first image. There will be no matching errors between the aiming positions of the game gun and the crosshairs, and the computing power requirements are low. In addition, the crosshair positioning system of the present application does not need to ensure that the frequency at which the camera acquires the first image is the same as the frequency at which multiple game guns fire in turn, so there is no need to use a camera with an external trigger function, and the cost is low.
[0009] Further, the light source array includes a plurality of light emitting units, and the plurality of light emitting units are arranged in a linear array; The matching relationship between the light-emitting mode and the laser emitter is a matching relationship between a binary code defined based on the on and off conditions of all light-emitting units and the serial number of the laser emitter.
[0010] In this embodiment, the crosshair positioning system of the present application can easily establish a matching relationship between the binary code and the laser emitter number, so that each laser emitter can correspond to the light emission mode of a light source array and the light emission mode corresponding to each laser emitter is different, thereby realizing a one-to-one correspondence between the light emission mode of the game gun and the light source array, thereby achieving no matching errors between the aiming positions of the game gun and the crosshair during the crosshair positioning process, and the present application only needs to identify the position of the light emitting unit in the light source array in the first image to determine the light emission mode of the light source array, and the computing power requirement is low.
[0011] Furthermore, the process of determining the aiming position of the crosshairs of the game gun corresponding to the light spot on the screen according to the position of the light spot in the first image includes: Acquire the light spot image coordinates according to the first image, where the light spot image coordinates are the image pixel coordinates of the light spot in the first image; The light spot screen coordinates are calculated according to the light spot image coordinates based on a preset transformation matrix, the preset transformation matrix is a transformation matrix of an affine transformation or a perspective transformation, and the light spot screen coordinates are screen pixel coordinates of the light spot on the screen.
[0012] In this embodiment, the crosshair positioning system of the present application can simply calculate the screen coordinates of the light spot based on affine transformation or perspective transformation, so that the crosshair aiming position can be determined simply and efficiently.
[0013] Furthermore, the process of obtaining the preset transformation matrix includes: Controlling the camera to shoot a screen with a pre-set marking point to obtain a second image; Identify the identified image coordinates according to the second image, where the identified image coordinates are image pixel coordinates of the identified point on the second image; A preset transformation matrix is calculated according to the identification image coordinates and the identification screen coordinates, where the identification screen coordinates are the screen pixel coordinates of the identification point on the screen.
[0014] Furthermore, the preset transformation matrix is a transformation matrix of perspective transformation; There are four identification points, which are respectively set at the four corners of the screen.
[0015] Furthermore, the time interval from when the light source array stops emitting light in the current light-emitting mode to when it emits light in the next light-emitting mode is greater than the larger value of the first afterglow duration and the second afterglow duration, the first afterglow duration is the duration for which the afterglow of the light spot on the screen is maintained, and the second afterglow duration is the duration for which the afterglow of the light source array is maintained.
[0016] Furthermore, the sight positioning system also includes: Filter, mounted on the camera.
[0017] In a second aspect, the present application provides a crosshair positioning method, which is applied in a crosshair positioning system to determine the crosshair aiming position of a game gun in a multiplayer shooting game. The crosshair positioning system includes: Screen; A plurality of game guns, each of which comprises a laser emitter, and the plurality of laser emitters are used to emit lasers in turn and form light spots on the screen; A light source array is arranged on one side of the screen and has a plurality of light emission modes, wherein different light emission modes are matched to different laser emitters, and the light source array is used to emit light in a light emission mode matched with the laser emitter when the laser emitter emits laser; A camera, used for continuously acquiring a first image, where the first image is an image of the screen and the light source array; The methods of crosshair positioning include: S1. When there is a light spot in the first image, the game gun corresponding to the light spot is determined according to the light pattern of the light source array in the first image based on the matching relationship between the light pattern and the laser emitter, and the aiming position of the crosshairs of the game gun corresponding to the light spot on the screen is determined according to the position of the light spot in the first image.
[0018] The crosshair positioning method of the present application determines the game gun corresponding to the light spot according to the light emission pattern of the light source array in the first image, and determines the aiming position of the crosshairs of the game gun corresponding to the light spot on the screen according to the position of the light spot in the first image. There will be no matching errors between the aiming positions of the game gun and the crosshairs, and the computing power requirement is low. In addition, the crosshair positioning system of the present application does not need to ensure that the frequency at which the camera acquires the first image is the same as the frequency at which multiple game guns fire in turn, so there is no need to use a camera with an external trigger function, and the cost is low.
[0019] In a third aspect, the present application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the steps in the above method are performed.
[0020] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0021] As can be seen from the above, the present application provides a crosshair positioning system, method, electronic device and storage medium, wherein the crosshair positioning system provided by the present application determines the game gun corresponding to the light spot according to the light emission pattern of the light source array in the first image, and determines the aiming position of the crosshair of the game gun corresponding to the light spot on the screen according to the position of the light spot in the first image, without any matching errors between the aiming positions of the game gun and the crosshair, and with low computing power requirements; in addition, the crosshair positioning system of the present application does not need to ensure that the frequency at which the camera acquires the first image is the same as the frequency at which multiple game guns fire in turn, and therefore does not need to use a camera with an external trigger function, and the cost is low.
[0022] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present application. The purpose and other advantages of the present application can be achieved and obtained through the structures specifically pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of the structure of the crosshair positioning system provided in an embodiment of the present application.
[0024] Figure 2 A schematic diagram of the structure of a light source array provided in an embodiment of the present application.
[0025] Figure 3 This is a diagram of the electrical control framework of the crosshair positioning system provided in an embodiment of the present application.
[0026] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0027] Explanation of reference numerals: 1. game gun; 11. laser transmitter; 3. screen; 4. light source array; 41. light emitting unit; 5. camera; 6. controller; 7. filter; 301. processor; 302. memory; 303. communication bus. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0029] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0030] First, as Figure 1 and Figure 3 As shown, the present application provides a crosshair positioning system for determining the crosshair aiming position of a game gun 1 in a multiplayer shooting game, comprising: Screen 3; A plurality of game guns 1, each of which comprises a laser emitter 11, and the plurality of laser emitters 11 are used to emit lasers in turn and form light spots on the screen 3; The light source array 4 is arranged on one side of the screen 3 and has a plurality of light emission modes, and different light emission modes are matched with different laser emitters 11. The light source array 4 is used to emit light in a light emission mode matched with the laser emitter 11 when the laser emitter 11 emits laser; A camera 5, used for continuously acquiring a first image, where the first image is an image of the screen 3 and the light source array 4; The controller 6 is used to determine the game gun 1 corresponding to the light spot according to the light pattern of the light source array 4 in the first image based on the matching relationship between the light pattern and the laser emitter 11 when there is a light spot in the first image, and determine the aiming position of the crosshairs of the game gun 1 corresponding to the light spot on the screen 3 according to the position of the light spot in the first image.
[0031] Specifically, the light source array 4 may emit light in different light emission modes by different light sources in the light source array 4 emitting light, or by other existing methods that can enable the light source array 4 to emit light in different light emission modes matching different laser emitters 11 .
[0032] More specifically, when it is necessary to determine the aiming position of the crosshairs of the game gun 1, the multiple laser emitters 11 on the multiple game guns 1 emit lasers in turn and form a light spot on the screen 3, and at the same time, the light source array 4 emits light in a light emission mode matching the laser emitter 11, and the camera 5 continuously acquires the first image. The controller 6 determines the game gun 1 corresponding to the light spot according to the light emission mode of the light source array 4 in the first image based on the matching relationship between the light emission mode and the laser emitter 11, and determines the aiming position of the crosshairs of the game gun 1 corresponding to the light spot on the screen 3 according to the position of the light spot in the first image. The method of determining the aiming position of the crosshairs of the game gun 1 corresponding to the light spot on the screen 3 according to the position of the light spot in the first image may be to determine the position of the light spot on the screen 3 according to the position of the light spot in the first image, and use the position of the light spot on the screen 3 as the aiming position of the crosshairs of the game gun 1 corresponding to the light spot, or may be other methods that can determine the aiming position of the crosshairs of the game gun 1 on the screen 3.
[0033] More specifically, during the time period when any laser emitter 11 emits a laser and the light source array 4 emits light, the laser emitter 11 matches the light emission pattern of the light source array 4, and thus the game gun 1 where the laser emitter 11 is located matches the light emission pattern of the light source array 4. Therefore, the light spot in any first image is the light spot emitted by the laser emitter 11 that matches the light emission pattern of the light source array 4 in the first image. Therefore, the controller 6 can determine the corresponding laser emitter 11 based on the light spot in the first image, and then determine the game gun 1 corresponding to the light spot, and determine the crosshair aiming position of the game gun 1 corresponding to the light spot based on the position of the light spot in the first image.
[0034] More specifically, when the camera 5 does not respond to the trigger signal, resulting in the failure to capture the first image of the light spot generated by the laser emitter 11 on a certain game gun 1 and the light source array 4 corresponding to the laser emitter 11, the controller 6 cannot locate the crosshairs of the game gun 1. However, in the remaining first image with the light spot, the light emission modes of the laser emitter 11 and the light source array 4 corresponding to the light spot still match, and the game gun 1 where the laser emitter 11 corresponding to the light spot is located also still matches the light emission mode of the light source array 4. Therefore, the present application will not cause a mismatch between the aiming position of the game gun 1 and the crosshairs. For the game gun 1 that does not capture the corresponding first image, it is only necessary to make the laser emitter 11 on the game gun 1 corresponding to the unlocated crosshairs re-emit laser light after the crosshairs positioning process, make the light source array 4 re-emit light in a light emission mode matching the laser emitter 11, and make the camera 5 re-acquire the first image to perform the crosshairs positioning.
[0035] In addition, the present application only needs to determine the matching relationship between the light pattern of the light source array 4 and the laser emitter 11 to determine the game gun 1 corresponding to the light spot in the first image, and does not need to identify the shape of the light spot, so the computing power requirement is low.
[0036] The crosshair positioning system of the present application determines the game gun 1 corresponding to the light spot according to the light emission pattern of the light source array 4 in the first image, and determines the aiming position of the crosshairs of the game gun 1 corresponding to the light spot on the screen 3 according to the position of the light spot in the first image. There will be no mismatch between the aiming positions of the game gun 1 and the crosshairs, and the computing power requirement is low. In addition, the crosshair positioning system of the present application does not need to ensure that the frequency at which the camera 5 acquires the first image is the same as the frequency at which multiple game guns 1 fire in turn, so there is no need to use a camera 5 with an external trigger function, and the cost is low.
[0037] In some preferred embodiments, the light source array 4 includes a plurality of light emitting units 41, and the plurality of light emitting units 41 are arranged in a linear array; The matching relationship between the light emitting mode and the laser emitter 11 is the matching relationship between the binary code defined based on the on and off conditions of all the light emitting units 41 and the serial number of the laser emitter 11 .
[0038] Specifically, in the present embodiment, the light emission mode of the light source array 4 is the on-off mode of the light emitting units 41 in the light source array 4. The process of defining the binary code of the light source array 4 based on the on-off status of all the light emitting units 41 may be to use the ordinal number of the light emitting unit 41 in the light source array 4 as the number of bits of the binary code, make any light emitting unit 41 in the light source array 4 emit light, make the number of bits of the binary code corresponding to the light emitting unit 41 that emits light be set to 1 and make the number of bits of the binary code corresponding to the light emitting unit 41 that does not emit light be set to 0 to define the binary code; in addition, after any light emitting unit 41 in the light source array 4 emits light, make the number of bits of the binary code corresponding to the light emitting unit 41 that emits light be set to 0 and make the number of bits of the binary code corresponding to the light emitting unit 41 that does not emit light be set to 1 to define the binary code.
[0039] More specifically, the process of establishing the matching relationship between the binary code and the number of the laser emitter 11 can be to number the laser emitter 11 and establish a matching relationship between the number of the laser emitter 11 and the binary code having the same value as the binary number corresponding to the number of the laser emitter 11.
[0040] More specifically, if Figure 2 As shown, Figure 2 Taking the light source array 4 in as an example, Figure 2 The hollow rectangle is the luminous light-emitting unit 41, and the solid rectangle is the non-luminous light-emitting unit 41. The ordinal numbers from left to right are 5, 4, 3, 2, 1 and 0, respectively corresponding to the 5th, 4th, 3rd, 2nd, 1st and 0th bits in the binary code. If the binary code bits corresponding to the luminous light-emitting unit 41 are set to 1, and the binary code bits corresponding to the non-luminous light-emitting unit 41 are set to 0, the binary number obtained after binary coding of the light source array 4 is 101010, so the binary code of the light source array 4 is 101010. A matching relationship is established between the binary code and the number of the laser emitter 11 corresponding to the binary number 101010, i.e., number 42; if the number of bits of the binary code corresponding to the luminous light-emitting unit 41 in the light source array 4 is set to 0, and the number of bits of the binary code corresponding to the non-luminous light-emitting unit 41 is set to 1, the binary number obtained after binary encoding of the light source array 4 is 010101, and therefore a matching relationship is established between the binary code of the light source array 4 and the number of the laser emitter 11 corresponding to the binary number 010101, i.e., number 21.
[0041] In this embodiment, the crosshair positioning system of the present application can easily establish a matching relationship between the binary code and the number of the laser emitter 11, so that each laser emitter 11 can correspond to a light emission mode of the light source array 4 and the light emission modes corresponding to each laser emitter 11 are different, thereby realizing a one-to-one correspondence between the light emission modes of the game gun 1 and the light source array 4, so that there will be no matching errors between the game gun 1 and the aiming position of the crosshair positioning process, and the present application only needs to identify the position of the light emitting unit 41 that emits light in the light source array 4 in the first image to determine the light emission mode of the light source array 4, and the computing power requirement is low.
[0042] In some preferred embodiments, the process of determining the aiming position of the crosshairs of the game gun 1 on the screen 3 corresponding to the light spot according to the position of the light spot in the first image includes: Acquire the light spot image coordinates according to the first image, where the light spot image coordinates are the image pixel coordinates of the light spot in the first image; The light spot screen coordinates are calculated according to the light spot image coordinates based on a preset transformation matrix, the preset transformation matrix is a transformation matrix of an affine transformation or a perspective transformation, and the light spot screen coordinates are the screen pixel coordinates of the light spot on the screen 3 .
[0043] Specifically, the screen coordinates of the light spot represent the aiming position of the crosshairs of the game gun 1 on the screen 3 corresponding to the light spot.
[0044] In this embodiment, the crosshair positioning system of the present application can simply calculate the screen coordinates of the light spot based on affine transformation or perspective transformation, so that the crosshair aiming position can be determined simply and efficiently.
[0045] In some preferred implementations, the process of obtaining the preset transformation matrix includes: Control the camera 5 to shoot the screen 3 with the marking points preset thereon to obtain a second image; Identify the identified image coordinates according to the second image, where the identified image coordinates are image pixel coordinates of the identified point on the second image; The preset transformation matrix is calculated according to the identification image coordinates and the identification screen coordinates, and the identification screen coordinates are the screen pixel coordinates of the identification point on the screen 3.
[0046] Specifically, the marker screen coordinates may be acquired in advance, or may be acquired in any step before calculating a preset transformation matrix according to the marker image coordinates and the marker screen coordinates.
[0047] In this embodiment, the crosshair positioning system of the present application can simply calculate the preset transformation matrix based on the identification image coordinates and the identification screen coordinates, so as to facilitate the subsequent calculation of the light spot screen coordinates based on the preset transformation matrix and determine the crosshair aiming position.
[0048] Preferably, during the acquisition of the preset transformation matrix, the screen 3 displays a black picture and the color of the identification point is white.
[0049] In this embodiment, the crosshair positioning system of the present application can accurately identify the coordinates of the marker image according to the second image based on the color difference between the screen 3 display image and the marker point.
[0050] In some preferred embodiments, the preset transformation matrix is a transformation matrix of perspective transformation; There are four identification points, which are respectively set at the four corners of the screen 3.
[0051] In this embodiment, the crosshair positioning system of the present application can use four identification points as four fixed vertices of the perspective transformation process, so that the preset transformation matrix can be determined simply and accurately.
[0052] In some preferred embodiments, the time interval from when the light source array 4 stops emitting light in the current light-emitting mode to when it emits light in the next light-emitting mode is greater than the larger value of the first afterglow duration and the second afterglow duration, the first afterglow duration is the duration during which the afterglow of the light spot on the screen 3 is maintained, and the second afterglow duration is the duration during which the afterglow of the light source array 4 is maintained.
[0053] Specifically, after the laser emitter 11 stops emitting laser or the light source array 4 stops emitting light, the light spot and the afterglow of the light source array 4 will continue to exist for a period of time before disappearing. If the laser emitter 11 emits laser or the light source array 4 emits light during this period of time, the light spot in the first image or the light emission pattern of the light source array 4 may be misidentified. Therefore, in this embodiment, the crosshair positioning system of the present application makes the time interval from the light source array 4 stopping to emitting light to the light emission again greater than the larger value of the first afterglow duration and the second afterglow duration, which can prevent the light spot in the first image or the light emission pattern of the light source array 4 from being misidentified, thereby ensuring that the game gun 1 and the crosshair aiming position accurately correspond.
[0054] In some preferred embodiments, the crosshair positioning system further comprises: The optical filter 7 is mounted on the camera 5 .
[0055] Specifically, since the wavelength of the laser emitter 11 in the crosshair positioning system is usually within a specific range, in this embodiment, the crosshair positioning system of the present application is provided with a filter 7, which can enable the camera 5 to capture a first image with a light spot when a light spot exists on the screen 3, and can enable the position of the light spot in the first image to be confirmed.
[0056] Preferably, the matching relationship is generated based on the corresponding number of laser emitters 11 activated by the controller 6 according to the number of game participants, and the corresponding number of light pattern generation of the light source arrays 4 determined by the controller 6 according to the number of game participants; The controller 6 is also used to number the game guns 1 where the activated laser emitters 11 are located before the multiple laser emitters 11 fire in turn, and determine the firing order of the laser emitters 11 according to the order of the game gun 1 numbers.
[0057] In this embodiment, when the crosshair is positioned, it is only necessary to make the activated laser emitters 11 emit lasers in turn to meet the game requirements, and there is no need to perform crosshair positioning on the game gun 1 where other laser emitters 11 are located, which can save time and resources for crosshair positioning, and the present application can determine the crosshair aiming position of the game gun 1 in numerical order, which is not prone to errors.
[0058] In a second aspect, the present application provides a crosshair positioning method, which is applied in a crosshair positioning system to determine the crosshair aiming position of a game gun 1 in a multiplayer shooting game. The crosshair positioning system includes: Screen 3; A plurality of game guns 1, each of which comprises a laser emitter 11, and the plurality of laser emitters 11 are used to emit lasers in turn and form light spots on the screen 3; The light source array 4 is arranged on one side of the screen 3 and has a plurality of light emission modes, and different light emission modes are matched with different laser emitters 11. The light source array 4 is used to emit light in a light emission mode matched with the laser emitter 11 when the laser emitter 11 emits laser; A camera 5, used for continuously acquiring a first image, where the first image is an image of the screen 3 and the light source array 4; The crosshair positioning method includes: S1. when there is a light spot in the first image, based on the matching relationship between the light pattern and the laser emitter 11, the game gun 1 corresponding to the light spot is determined according to the light pattern of the light source array 4 in the first image, and the aiming position of the crosshair of the game gun 1 corresponding to the light spot on the screen 3 is determined according to the position of the light spot in the first image.
[0059] The crosshair positioning method provided in the present application determines the game gun 1 corresponding to the light spot according to the light emission pattern of the light source array 4 in the first image, and determines the aiming position of the crosshair of the game gun 1 corresponding to the light spot on the screen 3 according to the position of the light spot in the first image. There will be no matching errors between the aiming positions of the game gun 1 and the crosshair, and the computing power requirement is low. In addition, the crosshair positioning system of the present application does not need to ensure that the frequency at which the camera 5 acquires the first image is the same as the frequency at which multiple game guns 1 fire in turn, so there is no need to use a camera 5 with an external trigger function, and the cost is low.
[0060] Thirdly, Figure 4As shown, the present application provides an electronic device, including a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown). The memory 302 stores a computer program executable by the processor 301. When the electronic device is running, the processor 301 executes the computer program to execute the method in any optional implementation of the above embodiment to achieve the following functions: when there is a light spot in the first image, based on the matching relationship between the light emission pattern and the laser emitter 11, the game gun 1 where the laser emitter 11 corresponding to the light spot is located is determined according to the light emission pattern of the light source array 4 in the first image, and the aiming position of the crosshairs of the game gun 1 corresponding to the light spot on the screen 3 is determined according to the position of the light spot in the first image.
[0061] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method in any optional implementation of the above embodiments is executed to achieve the following functions: when there is a light spot in the first image, based on the matching relationship between the light emission pattern and the laser emitter 11, the game gun 1 where the laser emitter 11 corresponding to the light spot is located is determined according to the light emission pattern of the light source array 4 in the first image, and the aiming position of the crosshairs of the game gun 1 corresponding to the light spot on the screen 3 is determined according to the position of the light spot in the first image. Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0062] In summary, the present application provides a crosshair positioning system, method, electronic device and storage medium, wherein the crosshair positioning system provided by the present application determines the game gun 1 corresponding to the light spot according to the light emission pattern of the light source array 4 in the first image, and determines the aiming position of the crosshair of the game gun 1 corresponding to the light spot on the screen 3 according to the position of the light spot in the first image, without any matching errors between the aiming positions of the game gun 1 and the crosshair, and has low computing power requirements; in addition, the crosshair positioning system of the present application does not need to ensure that the frequency at which the camera 5 acquires the first image is the same as the frequency at which multiple game guns 1 fire in turn, and therefore does not need to use a camera 5 with an external trigger function, and has low cost.
[0063] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0064] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0065] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0066] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0067] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A crosshair positioning system for determining the crosshair aiming position of a game gun (1) in a multiplayer shooting game, characterized in that: include: screen(3); A plurality of game guns (1), each of the game guns (1) comprising a laser emitter (11), and the plurality of laser emitters (11) are used to emit lasers in turn and form light spots on the screen (3); a light source array (4) disposed on one side of the screen (3) and having a plurality of light emission modes, wherein different light emission modes match different laser emitters (11), and wherein the light source array (4) is used to emit light in a light emission mode matching the laser emitter (11) when the laser emitter (11) emits laser light; A camera (5) for continuously acquiring a first image, wherein the first image is an image of the screen (3) and the light source array (4); The controller (6) is used to determine the game gun (1) corresponding to the light spot based on the matching relationship between the light pattern and the laser emitter (11) according to the light pattern of the light source array (4) in the first image when there is a light spot in the first image, and determine the aiming position of the crosshairs of the game gun (1) corresponding to the light spot on the screen (3) according to the position of the light spot in the first image.
2. The sight positioning system according to claim 1, characterized in that: The light source array (4) comprises a plurality of light emitting units (41), and the plurality of light emitting units (41) are arranged in a linear array; The matching relationship between the light emitting mode and the laser emitter (11) is a matching relationship between a binary code defined based on the on / off conditions of all light emitting units (41) and a number of the laser emitter (11).
3. The sight positioning system according to claim 1, characterized in that: The process of determining the aiming position of the crosshairs of the game gun (1) corresponding to the light spot on the screen (3) according to the position of the light spot in the first image comprises: Acquire the light spot image coordinates according to the first image, wherein the light spot image coordinates are the image pixel coordinates of the light spot in the first image; The light spot screen coordinates are calculated according to the light spot image coordinates based on a preset transformation matrix, wherein the preset transformation matrix is a transformation matrix of an affine transformation or a perspective transformation, and the light spot screen coordinates are the screen pixel coordinates of the light spot on the screen (3).
4. The sight positioning system according to claim 3, characterized in that: The process of obtaining the preset transformation matrix includes: Controlling a camera (5) to shoot a screen (3) on which a marking point is pre-set, thereby acquiring a second image; Identify the identification image coordinates according to the second image, wherein the identification image coordinates are image pixel coordinates of the identification point on the second image; The preset transformation matrix is calculated according to the identification image coordinates and the identification screen coordinates, wherein the identification screen coordinates are the screen pixel coordinates of the identification point on the screen (3).
5. The sight positioning system according to claim 4, characterized in that: The preset transformation matrix is a perspective transformation matrix; The identification points include four, and the four identification points are respectively arranged at the four corners of the screen (3).
6. The sight positioning system according to claim 1, characterized in that: The time interval from when the light source array (4) stops emitting light in a current light-emitting mode to when it emits light in a next light-emitting mode is greater than the larger value of a first afterglow duration and a second afterglow duration, wherein the first afterglow duration is the duration during which the afterglow of the light spot on the screen (3) is maintained, and the second afterglow duration is the duration during which the afterglow of the light source array (4) is maintained.
7. The sight positioning system according to claim 1, characterized in that: The crosshair positioning system also includes: A filter (7) is mounted on the camera (5).
8. A crosshair positioning method, applied in a crosshair positioning system, for determining the crosshair aiming position of a game gun (1) in a multiplayer shooting game, characterized in that: The crosshair positioning system comprises: screen(3); A plurality of game guns (1), each of the game guns (1) comprising a laser emitter (11), and the plurality of laser emitters (11) are used to emit lasers in turn and form light spots on the screen (3); a light source array (4) disposed on one side of the screen (3) and having a plurality of light emission modes, wherein different light emission modes match different laser emitters (11), and wherein the light source array (4) is used to emit light in a light emission mode matching the laser emitter (11) when the laser emitter (11) emits laser light; A camera (5) for continuously acquiring a first image, wherein the first image is an image of the screen (3) and the light source array (4); The crosshair positioning method comprises: S1. When a light spot exists in the first image, based on the matching relationship between the light pattern and the laser emitter (11), the game gun (1) corresponding to the light spot is determined according to the light pattern of the light source array (4) in the first image, and the aiming position of the crosshairs of the game gun (1) corresponding to the light spot on the screen (3) is determined according to the position of the light spot in the first image.
9. An electronic device, characterized in that: The invention comprises a processor (301) and a memory (302), wherein the memory (302) stores a computer program executable by the processor (301), and when the processor (301) executes the computer program, the steps in the method according to claim 8 are executed.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor (301), the steps in the method according to claim 8 are executed.