Positioning control method and system for game light gun, and storage medium
By processing screen images using a neural network model and combining sensor data to compensate for the coordinates of the light gun crosshair, the compatibility issues of the game light gun and the interference of ambient light were resolved, achieving high-precision game control and improving the user experience.
Patent Information
- Application Number
- PCT/CN2025/102982
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-30
AI Technical Summary
Existing game light guns have limitations in terms of compatibility, configuration complexity, and ambient light interference, which affect the stability and accuracy of the gaming experience.
A neural network model is used to process screen images. By combining the direction of gravity, rotational angular velocity, and relative geomagnetic change, the offset of the light gun sight is calculated and coordinate compensation is performed to achieve accurate positioning of the light gun sight, avoiding compatibility and specific driver issues.
It improves the positioning accuracy of the game light gun, enhances the user's gaming experience, reduces image noise, and adapts to different environmental conditions.
Smart Images

Figure CN2025102982_30102025_PF_FP_ABST
Abstract
Description
A positioning control method, system, and storage medium for a game light gun. Technical Field
[0001] This application relates to the field of game device technology, and in particular to a positioning control method, system and storage medium for a game light gun. Background Technology
[0002] Gaming is an important form of leisure and entertainment, and shooting games often use light guns.
[0003] Currently, common game light guns include CRT TV light guns, infrared-based light guns, and camera-based light guns that recognize white borders on the screen. CRT TV light guns rely on light spots on the screen and, while offering high accuracy, are only compatible with CRT display technology and cannot be used in current mainstream LCD and plasma displays. Infrared-based light guns can be used on LCD displays, but their configuration is complex, and the transmitter and receiver require precise alignment and calibration, leading to complicated operation. Camera-based light guns, while requiring no additional physical configuration, necessitate the installation of specific drivers and are susceptible to interference from ambient light. In complex environments, the recognition rate and positioning accuracy of white borders are poor, affecting the stability and accuracy of the gaming experience.
[0004] Based on the above, the current game light gun market has some limitations and shortcomings, so new technical solutions are needed to improve the performance of game light gun products and thus enhance the user experience. Summary of the Invention
[0005] In order to solve or partially solve the problems existing in the above-mentioned related technologies, this application provides a positioning control method, system and storage medium for a game light gun, which can improve the performance of game light gun products and thus enhance the user experience.
[0006] In a first aspect, embodiments of this application provide a positioning control method for a game light gun, comprising: acquiring a screen image; processing the screen image based on a neural network model to obtain a screen frame image; calculating the initial coordinates of the light gun's crosshair in the display screen based on the screen frame image; detecting the current changes in the light gun's gravity direction, rotational angular velocity, and relative geomagnetism; calculating the offset of the light gun's crosshair relative to the initial coordinates based on the gravity direction, rotational angular velocity, and relative geomagnetism; and compensating the initial coordinates based on the offset to obtain the target positioning coordinates of the light gun's crosshair.
[0007] By adopting the above technical solution, after acquiring the screen image, a standardized screen frame image can be obtained through processing based on a neural network model. Based on this screen frame image, the initial coordinates of the light gun's crosshair in the displayed image can be calculated. Furthermore, by detecting the changes in the current light gun's gravity direction, rotational angular velocity, and relative geomagnetism, the offset of the light gun's crosshair relative to its initial coordinates can be obtained. This offset allows for compensation and adjustment of the initial coordinates, resulting in the target positioning coordinates of the light gun's crosshair. This ensures the accuracy of the light gun's trajectory, thereby improving the precision of game control. Simultaneously, this solution eliminates the need to consider compatibility, configuration, and specific driver issues, further enhancing the performance of game light gun products and ultimately improving the user's gaming experience.
[0008] Optionally, the step of processing the screen image using the neural network model to obtain the screen frame image includes: performing image filtering and normalization on the screen image to obtain an optimized image; and segmenting and extracting the optimized image to output the screen frame image.
[0009] By adopting the above technical solutions, image filtering and normalization of the screen image can reduce image noise, improve image quality, and facilitate accurate segmentation and extraction of the image.
[0010] Optionally, after segmenting and extracting the optimized image, the positioning control method for the game light gun further includes: correcting the segmented and extracted optimized image based on a preset standard, wherein the preset standard includes screen size.
[0011] By adopting the above technical solution, the optimized image after segmentation and extraction is corrected based on the screen size, which facilitates the accurate determination of the position of the light gun crosshair on the screen frame image.
[0012] Optionally, before acquiring the screen image, the positioning control method of the game light gun further includes: acquiring environmental detection parameters, wherein the environmental detection parameters include light intensity, temperature and humidity; and automatically adjusting the parameters of the camera based on the environmental detection parameters, wherein the camera is located on the light gun and is used to acquire the screen image.
[0013] By adopting the above technical solution, the camera parameters can be automatically adjusted based on the environmental detection parameters to adapt to the current environment and ensure the clarity of the screen image during acquisition.
[0014] Optionally, before acquiring the environmental detection parameters, the positioning control method for the game light gun further includes: automatically performing status detection when the light gun is started.
[0015] By adopting the above technical solution, automatic status detection can be performed when the light gun is started, ensuring that all components work normally.
[0016] Secondly, embodiments of this application provide a positioning control system for a game light gun, comprising: a data acquisition module for acquiring screen images; a processing module for processing the screen images based on a neural network model to obtain a screen frame image; a first calculation module for calculating the initial coordinates of the light gun's crosshair in the displayed screen based on the screen frame image; a detection module for detecting the current gravity direction, rotational angular velocity, and relative change in geomagnetism of the light gun; a second calculation module for calculating the offset of the light gun's crosshair relative to the initial coordinates based on the gravity direction, the rotational angular velocity, and the relative change in geomagnetism; and a compensation module for compensating the initial coordinates based on the offset to obtain the target positioning coordinates of the light gun's crosshair.
[0017] By adopting the above technical solution, after the acquisition module acquires the screen image, it is processed based on the neural network model in the processing module to obtain a standardized screen frame image. The first calculation module can calculate the initial coordinates of the light gun crosshair in the display screen based on the screen frame image. The detection module detects the current gravity direction, rotational angular velocity, and relative geomagnetic changes of the light gun. The second calculation module then calculates the offset of the light gun crosshair relative to the initial coordinates. Based on this offset, the compensation module can adjust the initial coordinates to obtain the target positioning coordinates of the light gun crosshair, ensuring the accuracy of the light gun crosshair's movement trajectory and thus improving the accuracy of game control. At the same time, this solution does not need to consider compatibility, configuration, or specific driver issues, thereby further improving the performance of the game light gun product and enhancing the user's gaming experience.
[0018] Optionally, the processing module includes: an optimization unit for performing image filtering and normalization on the screen image to obtain an optimized image; and an extraction unit for segmenting and extracting the optimized image to output the screen frame image.
[0019] By adopting the above technical solution, the optimization unit can perform image filtering and image normalization on the screen image to reduce image noise and improve image quality, and the extraction unit can facilitate accurate image segmentation and extraction.
[0020] Optionally, the extraction unit is further configured to correct the optimized image after segmentation and extraction based on a preset standard, wherein the preset standard includes screen size.
[0021] By adopting the above technical solution, the optimized image after segmentation and extraction can be corrected based on the screen size, which can accurately correct the screen frame image, so as to accurately determine the position of the light gun crosshair in the screen frame image.
[0022] Thirdly, embodiments of this application provide an electronic device that adopts the following technical solution:
[0023] An electronic device is characterized by comprising: a processor; and a memory storing executable code thereon, wherein when the executable code is executed by the processor, the processor performs a positioning control method for any game light gun as described above.
[0024] Fourthly, embodiments of this application provide a computer-readable storage medium, employing the following technical solution:
[0025] A computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform a positioning control method for a game light gun as described above.
[0026] In summary, this application includes at least one of the following beneficial technical effects:
[0027] 1. After capturing screen images, processing them using a neural network model yields a standardized screen frame image. Based on this image, the initial coordinates of the light gun's crosshair on the displayed screen can be calculated. Furthermore, by detecting changes in the light gun's gravitational direction, rotational angular velocity, and relative geomagnetic field, the offset of the crosshair relative to its initial coordinates can be obtained. This offset allows for compensation and adjustment of the initial coordinates, resulting in the target positioning coordinates of the light gun's crosshair. This ensures the accuracy of the crosshair's trajectory, thereby improving game control precision. Simultaneously, this solution eliminates the need to consider compatibility, configuration, or specific driver issues, further enhancing the performance of game light gun products and ultimately improving the user's gaming experience.
[0028] 2. By performing image filtering and image normalization on the screen image, image noise can be reduced, image quality can be improved, and accurate image segmentation and extraction can be facilitated.
[0029] 3. By correcting the optimized image after segmentation and extraction based on the screen size, accurate correction of the screen frame image can be achieved, so as to accurately determine the position of the light gun crosshair in the screen frame image. Attached Figure Description
[0030] Figure 1 is a flowchart illustrating a positioning control method for a game light gun according to an embodiment of this application;
[0031] Figure 2 is a schematic diagram of the captured screen image;
[0032] Figure 3 is a schematic diagram of segmenting the screen image to extract the screen frame image;
[0033] Figure 4 is a schematic diagram of correcting the screen frame image;
[0034] Figure 5 is a schematic diagram for determining the center point of the screen frame image;
[0035] Figure 6 is a schematic diagram of the positioning control system of a game light gun disclosed in another embodiment of this application. Detailed Implementation
[0036] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations that include one or more of the listed items.
[0037] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0038] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0039] Referring to Figure 1, the first embodiment of this application discloses a positioning control method for a game light gun, including:
[0040] S10. Capture screen image;
[0041] The screen images are captured in real time by a camera mounted on the AI gun, as shown in Figure 2. It should be noted that the captured screen images may include not only the display screen itself, but also the screen frame, power cord, socket, or other obstructions. The camera can be a high-definition RGB camera capable of capturing color images. Of course, the brand and model of the camera are not limited here, as long as it achieves the same function and effect.
[0042] S20. Process the screen image based on the neural network model to obtain the screen frame image;
[0043] The processing based on the neural network model can be understood as optimizing the image according to a pre-set standard to improve image quality and facilitate accurate determination of the position of the light gun crosshair in the screen frame image.
[0044] In this embodiment, step S20 specifically includes:
[0045] S21. Perform image filtering and normalization on the screen image to obtain an optimized image;
[0046] Image filtering and image normalization are used to reduce image noise in screen images and improve image quality.
[0047] S22. Segment and extract the optimized image, and output the screen frame image.
[0048] The segmentation and extraction process is used to separate the screen image displayed within the display bezel from the clutter outside the display bezel, so as to output the screen image displayed within the display bezel, i.e., the screen frame image, as shown in Figure 3.
[0049] Furthermore, after step S22, the positioning control method for the game light gun also includes: correcting the optimized image after segmentation and extraction based on a preset standard; wherein, the preset standard includes the screen size, that is, the length and width data of the display screen, as shown in Figure 4.
[0050] S30. Based on the screen frame image, calculate the initial coordinates of the light gun crosshair in the display screen;
[0051] The initial coordinates can be determined based on the origin of the coordinate system established based on the screen frame image. The origin of the coordinate system is pre-set by default, for example, the lower left corner of the screen frame is used as the origin of the coordinate system, but this is not limited here.
[0052] S40. Detect the current gravity direction, rotational angular velocity, and relative change of the geomagnetic field of the light gun;
[0053] In this embodiment, the movement of the light gun causes the light gun sight to move on the display screen. This can be understood as analogous to moving a mouse cursor in real-time on a computer screen. Regarding the acquisition of gravity direction and rotational angular velocity, this embodiment uses a nine-axis / six-axis gyroscope to measure the light gun's gravity direction, rotational angular velocity, and relative change in geomagnetism in real time. Based on a nine-axis sensor fusion algorithm, data such as the light gun's motion direction, velocity, and acceleration are obtained.
[0054] S50. Based on the changes in gravity direction, rotational angular velocity, and relative geomagnetism, calculate the offset of the laser gun sight relative to the initial coordinates.
[0055] Here, the offset can be understood as the error between the position of the light gun's crosshair displayed on the screen (i.e., the initial coordinates) and the actual position of the light gun itself. This can be calculated using a 9-axis sensor fusion algorithm by calculating the changes in gravity direction, rotational angular velocity, and relative geomagnetism to obtain the actual position of the light gun. This position is then compared with the initial coordinates to calculate the offset. It should be noted that the 9-axis sensor fusion algorithm is an existing technology, and its calculation process will not be detailed here.
[0056] S60. Based on the offset, the initial coordinates are compensated to obtain the target positioning coordinates of the laser gun crosshair.
[0057] The offset not only compensates for the current initial coordinates, but also updates the subsequent motion trajectory in real time to ensure the device's accurate motion trajectory, thereby improving the precision of game control.
[0058] Specifically, when it is necessary to shoot at a target, such as aiming at the center of the display screen, the light gun will quickly adjust its trajectory based on the offset to quickly locate the center of the display screen. The center point of the light gun on the curved surface of the display can be shown in Figure 5.
[0059] It should be noted that when the AI light gun is aimed at and held at the center of the screen, the player moves the AI gun to aim and fire based on the screen image seen by the naked eye. In extreme environments, such as high or low temperature environments, the game image seen by the player's naked eye may be distorted, resulting in inaccurate aiming. At this time, the system will automatically detect the current movement state (i.e., offset) of the AI light gun based on the positioning control method disclosed in the embodiments of this application, and correct the movement trajectory of the AI light gun in a timely manner to improve the positioning accuracy of the game and enhance the player's experience.
[0060] It is worth mentioning that the positioning control method in this embodiment does not require consideration of whether the running device is compatible, nor does it require consideration of configuration and specific driver issues.
[0061] In another embodiment, prior to step S10, the positioning control method for the game light gun further includes:
[0062] S01. Obtain environmental monitoring parameters;
[0063] Among them, environmental monitoring parameters may include light intensity, temperature and humidity, which can be obtained in real time through sensor modules.
[0064] S02. Automatically adjust camera parameters based on environmental detection parameters;
[0065] The camera is located on the light gun and is used to capture screen images. The camera parameters may include exposure and focus parameters to capture clear images. The specific adjustment of the camera parameters is not limited in this embodiment. Preset rules can be set according to the actual situation and flexibly adjusted according to the preset rules.
[0066] In another embodiment, prior to step S01, the positioning control method for the game light gun further includes: automatically performing status detection when the light gun is activated. This automatic status detection upon activation ensures the proper functioning of all operating components.
[0067] In summary, the positioning and control method for a game light gun disclosed in the first embodiment of this application, after acquiring screen images, processes them based on a neural network model to obtain a standardized screen frame image. Based on the screen frame image, the initial coordinates of the light gun's crosshair in the displayed screen can be calculated. Furthermore, by detecting the changes in the current light gun's gravity direction, rotational angular velocity, and relative geomagnetism, the offset of the light gun's crosshair relative to the initial coordinates can be obtained. This offset allows for compensation and adjustment of the initial coordinates, obtaining the target positioning coordinates of the light gun's crosshair. This ensures the accuracy of the light gun's trajectory, thereby improving the precision of game control. Simultaneously, this solution does not require consideration of compatibility, configuration, or specific driver issues, further enhancing the performance of the game light gun product and ultimately improving the user's gaming experience.
[0068] Furthermore, the labels for each step in this embodiment are for illustrative purposes only and do not represent a limitation on the execution order of each step. In practical applications, the execution order of each step can be adjusted or performed simultaneously as needed, and such adjustments or substitutions are all within the protection scope of this application.
[0069] Referring to Figure 6, the second embodiment of this application discloses a positioning control system for a game light gun, including: a data acquisition module 21, a processing module 22, a first calculation module 23, a detection module 24, a second calculation module 25, and a compensation module 26.
[0070] The acquisition module 21 is used to acquire screen images; the processing module 22 is used to process the screen images based on preset processing standards to obtain screen frame images; the first calculation module 23 is used to calculate the initial coordinates of the light gun crosshair in the display screen based on the screen frame images; the detection module 24 is used to detect the current gravity direction, rotational angular velocity, and relative geomagnetic changes of the light gun; the second calculation module 25 is used to calculate the offset of the light gun relative to the initial coordinates based on the gravity direction, rotational angular velocity, and relative geomagnetic changes; and the compensation module 26 is used to compensate the initial coordinates based on the offset to obtain the target positioning coordinates of the light gun crosshair.
[0071] In another embodiment, the processing module 22 includes an optimization unit 221 and an extraction unit 222. The optimization unit 221 is used to perform image filtering and normalization processing on the screen image to obtain an optimized image. The extraction unit 222 is used to segment and extract the optimized image to output a screen frame image.
[0072] In another embodiment, the extraction unit 222 is further configured to correct the optimized image after segmentation and extraction based on a preset standard, wherein the preset standard includes screen size.
[0073] It should be noted that the positioning control system for a game light gun disclosed in this application is used to implement the above-mentioned positioning control method for the game light gun, and therefore will not be described in detail here.
[0074] Optionally, the various modules and other operations or functions described above in this embodiment are for implementing the methods in the foregoing embodiments.
[0075] Another embodiment of this application illustrates an electronic device including a memory and a processor.
[0076] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0077] The general-purpose processor can be a microprocessor or any conventional processor, and the memory can include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices.
[0078] The ROM can store static data or instructions required by the processor or other modules of the computer. The permanent storage device can be a read-write storage device. It can also be a non-volatile storage device that retains stored instructions and data even when the computer is powered off. In some implementations, the permanent storage device uses a high-capacity storage device (e.g., magnetic or optical disk, flash memory).
[0079] In other implementations, the persistent storage device can be a removable storage device (e.g., a floppy disk or optical drive). System memory can be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory can store some or all of the instructions and data required by the processor during runtime.
[0080] In addition, the memory may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory and / or programmable read-only memory), and may also be disk and / or optical disk.
[0081] In some embodiments, the memory may include a removable storage device that is readable and / or writable, such as a laser disc (CD), a read-only digital versatile optical disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, a high-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not contain a carrier wave or transient electronic signals transmitted wirelessly or via a wired connection. Executable code is stored on memory 310, which, when processed by a processor, can cause the processor to perform some or all of the methods described above.
[0082] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.
[0083] Alternatively, this application may be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) storing executable code (or computer program or computer instruction code) thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the methods described above according to this application.
[0084] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A positioning and control method for a game light gun, characterized in that, include: Capture screen images; The screen image is processed based on a neural network model to obtain a screen frame image; Based on the screen frame image, calculate the initial coordinates of the light gun's crosshair in the displayed image; Detect the current gravity direction, rotational angular velocity, and relative change in the geomagnetic field of the light gun; Based on the direction of gravity, the rotational angular velocity, and the change in relative geomagnetism, the offset of the light gun's crosshair relative to the initial coordinates is calculated; as well as The initial coordinates are compensated based on the offset to obtain the target positioning coordinates of the light gun's crosshair.
2. The positioning and control method for a game light gun according to claim 1, characterized in that, The process of using the neural network model to process the screen image to obtain the screen frame image includes: The screen image is subjected to image filtering and normalization to obtain an optimized image; and The optimized image is segmented and extracted to output the screen frame image.
3. The positioning and control method for a game light gun according to claim 2, characterized in that, After segmenting and extracting the optimized image, the positioning and control method for the game light gun further includes: The optimized image after segmentation and extraction is corrected based on preset standards, including screen size.
4. The positioning and control method for a game light gun according to claim 1, characterized in that, Before acquiring the screen image, the positioning and control method for the game light gun further includes: Acquire environmental monitoring parameters, wherein the environmental monitoring parameters include light intensity, temperature, and humidity; and The camera parameters are automatically adjusted based on the environmental detection parameters, wherein the camera is located on the light gun and is used to capture the screen image.
5. The positioning and control method for a game light gun according to claim 4, characterized in that, Before acquiring the environmental detection parameters, the positioning and control method for the game light gun further includes: When the light gun is activated, a status check is automatically performed.
6. A positioning control system for a game light gun, characterized in that, include: The acquisition module is used to acquire screen images; The processing module is used to process the screen image through the neural network model to obtain a screen frame image; The first calculation module is used to calculate the initial coordinates of the light gun's crosshair in the display screen based on the screen frame image; The detection module is used to detect the current gravity direction, rotational angular velocity, and relative change in geomagnetism of the light gun; The second calculation module is used to calculate the offset of the light gun's crosshair relative to the initial coordinates based on the direction of gravity, the rotational angular velocity, and the change in the relative geomagnetism. as well as The compensation module is used to compensate the initial coordinates based on the offset to obtain the target positioning coordinates of the light gun's crosshair.
7. The positioning control system for the game light gun according to claim 6, characterized in that, The processing module includes: An optimization unit is used to perform image filtering and normalization processing on the screen image to obtain an optimized image; and The extraction unit is used to segment and extract the optimized image and output the screen frame image.
8. The positioning control system for the game light gun according to claim 7, characterized in that, The extraction unit is also used to correct the optimized image after segmentation and extraction based on preset standards, wherein the preset standards include screen size.
9. An electronic device, characterized in that, include: processor; as well as The memory stores executable code, which, when executed by the processor, causes the processor to perform the positioning control method for the game light gun as described in claim 1.
10. A computer-readable storage medium, characterized in that, It stores executable code, which, when executed by the processor of the electronic device, causes the processor to execute the positioning control method of the game light gun as described in claim 1.
Citation Information
Patent Citations
Control device for communicating visual information
CN103337111A
Game gun positioning method and system based on sensor
CN103949052A
Gun pressing auxiliary method for shooting type games, gun pressing auxiliary device for shooting type games, mobile terminal and storage medium
CN110075521A
Game light gun positioning control method and system and storage medium
CN118416464A
Handheld Pointing Device
US20130328772A1