A positioning control method, system, and storage medium for a game light gun.

By using neural network models and sensor data processing, the offset of the light gun's crosshair is calculated and compensated, solving the compatibility issues of the game light gun and the interference of ambient light, thus achieving high-precision game control and a stable user experience.

CN118416464BActive Publication Date: 2026-01-06SHENZHEN XINGDA ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410513864.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2026-01-06
Estimated Expiration
2044-04-26

AI Technical Summary

Technical Problem

Existing game light guns have limitations in terms of compatibility, configuration complexity, and ambient light interference, resulting in unstable gaming experience and insufficient accuracy.

Method used

A neural network model is used to process screen images. By combining the direction of gravity, rotational angular velocity, and geomagnetic changes, the offset of the light gun crosshair is calculated and compensated, and the target positioning coordinates are obtained, thereby improving the accuracy of the light gun crosshair's trajectory.

Benefits of technology

It improves the positioning accuracy of the game light gun, enhances the user's gaming experience, avoids compatibility and configuration complexity issues, and enhances the stability of the device in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118416464B_ABST
    Figure CN118416464B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of game equipment, in particular to a positioning control method and system of a game light gun and a storage medium. The positioning control method comprises the following steps: collecting a screen image; performing neural network model processing on the screen image to obtain a screen frame image; calculating initial coordinates of a light gun aiming point in a display picture based on the screen frame image; detecting a current gravity direction and a rotation angular velocity of the light gun; calculating an offset of the light gun aiming point relative to the initial coordinates based on the gravity direction and the rotation angular velocity; and compensating the initial coordinates based on the offset to obtain target positioning coordinates of the light gun aiming point. The application can improve the performance of a game light gun product and further improve the experience of a user.
Need to check novelty before this filing date? Find Prior Art

Description

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 mainstream LCD and plasma displays. Infrared-based light guns can be used with 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 not requiring additional physical configuration, require specific drivers and are susceptible to ambient light interference. 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 and control method for a game light gun, employing the following technical solution:

[0007] A method for positioning and controlling a game light gun includes: acquiring a screen image; processing the screen image using a neural network model to obtain a screen frame image; calculating the initial coordinates of the light gun's crosshair in the displayed 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 for the initial coordinates based on the offset to obtain the target positioning coordinates of the light gun's crosshair.

[0008] 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 geomagnetic field, 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 improving the user's gaming experience.

[0009] Optionally, the step of processing the screen image using a neural network model to obtain a 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.

[0010] 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.

[0011] Optionally, the step of segmenting and extracting the optimized image and outputting the screen frame image includes: correcting the segmented and extracted optimized image based on a preset standard and outputting the corrected screen frame image, wherein the preset standard includes screen size.

[0012] 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.

[0013] Optionally, before acquiring the screen image, the method further includes: obtaining environmental detection parameters, wherein the detection parameters include light intensity, temperature, and humidity; and automatically adjusting the parameters of the camera based on the environmental parameters, wherein the camera is located on a light gun for acquiring the screen image.

[0014] By adopting the above technical solution, the camera parameters can be automatically adjusted based on the environmental parameters obtained to adapt to the current environment and ensure the clarity of the screen image during acquisition.

[0015] Optionally, before acquiring the environmental detection parameters, the method further includes: automatically performing status detection when the light gun is activated.

[0016] By adopting the above technical solution, automatic status detection can be performed when the light gun is started, ensuring that all components work normally.

[0017] Secondly, embodiments of this application provide a positioning control system for a game light gun, employing the following technical solution:

[0018] A positioning control system for a game light gun includes: a data acquisition module for acquiring screen images; a processing module for processing the screen images using 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 light gun's current gravity direction, rotational angular velocity, and relative change in geomagnetism; a second calculation module for calculating the offset of the light gun's crosshair relative to the initial coordinates based on the gravity direction, rotational angular velocity, and 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.

[0019] 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 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.

[0020] 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.

[0021] 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.

[0022] Optionally, the extraction unit includes: correcting the segmented and extracted optimized image based on a preset standard, and outputting the corrected screen frame image, wherein the preset standard includes screen size.

[0023] 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.

[0024] Thirdly, embodiments of this application provide an electronic device that adopts the following technical solution:

[0025] An electronic device, characterized in that it comprises: 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 a game light gun as described in any of the preceding claims.

[0026] Fourthly, embodiments of this application provide a computer-readable storage medium, employing the following technical solution:

[0027] 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 in any of the preceding claims.

[0028] In summary, this application includes at least one of the following beneficial technical effects:

[0029] 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 the changes in the light gun's gravity direction, rotational angular velocity, and relative geomagnetism, 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 improving the user's gaming experience.

[0030] 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.

[0031] 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

[0032] Figure 1 This is a flowchart illustrating a positioning control method for a game light gun disclosed in an embodiment of this application;

[0033] Figure 2 This is a schematic diagram of the captured screen image;

[0034] Figure 3 This is a schematic diagram for segmenting a screen image and extracting the screen frame image.

[0035] Figure 4 This is a schematic diagram for correcting the screen frame image;

[0036] Figure 5 A schematic diagram for determining the center point of the screen frame image;

[0037] Figure 6 This is a schematic diagram of the positioning control system for a game light gun disclosed in another embodiment of this application. Detailed Implementation

[0038] 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 and includes any or all possible combinations of one or more of the listed items.

[0039] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. 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.

[0040] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.

[0041] See Figure 1 The first embodiment of this application discloses a positioning control method for a game light gun, including:

[0042] S10. Capture screen image;

[0043] The images are acquired in real time by a camera mounted on the AI ​​gun, and the acquired images can be like... Figure 2As shown. It should be noted that the captured screen image may include not only the display screen itself, but also the screen frame, power cord, socket, or other obstructions. The camera is 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 functional effect.

[0044] S20. Process the screen image using a neural network model to obtain the screen frame image;

[0045] The neural network model processing can be understood as optimizing the image based on pre-set standards to improve image quality and facilitate accurate determination of the position of the light gun crosshair in the screen frame image.

[0046] In this embodiment, step S20 specifically includes:

[0047] S21. Perform image filtering and normalization on the screen image to obtain an optimized image;

[0048] Image filtering and image normalization are used to reduce image noise in screen images and improve image quality.

[0049] S22. Segment and extract the optimized image, and output the screen frame image.

[0050] The segmentation extraction process separates the screen image displayed within the display bezel from the clutter outside the display bezel, outputting the screen image within the display bezel, i.e., the screen frame image. This can be done as follows: Figure 3 As shown.

[0051] Furthermore, step S22 also includes: correcting the optimized image after segmentation and extraction based on a preset standard, and outputting the corrected screen frame image;

[0052] The preset standards include screen size, i.e., the length and width of the display screen, such as... Figure 4 As shown.

[0053] S30. Based on the screen frame image, calculate the initial coordinates of the light gun crosshair in the display screen;

[0054] 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.

[0055] S40. Detect the current gravity direction, rotational angular velocity, and relative change of the geomagnetic field of the light gun;

[0056] 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.

[0057] 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.

[0058] 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.

[0059] S60. Based on the offset, the initial coordinates are compensated to obtain the target positioning coordinates of the laser gun crosshair.

[0060] 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 precise motion path, thereby improving the accuracy of game control.

[0061] Specifically, when it is necessary to shoot a target, such as aiming at the center of a display screen, the light gun will quickly adjust its trajectory based on the offset to rapidly locate the center of the display screen. The center point of the light on the curved surface of the display can be as follows: Figure 5 As shown.

[0062] 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 what they see on the screen. In extreme environments, such as high or low temperatures, the game screen seen by the player 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 described in this application embodiment, 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.

[0063] It is worth mentioning that the positioning control method in this embodiment does not require consideration of whether the running device is compatible, as well as configuration complexity and specific driver issues.

[0064] In another embodiment, prior to step S10, the method further includes:

[0065] S01. Obtain environmental monitoring parameters;

[0066] The detection parameters may include light intensity, temperature, and humidity, which can be obtained in real time through sensor modules.

[0067] S02. Automatically adjust camera parameters based on environmental parameters;

[0068] The camera is located on the light gun to capture screen images. The parameters of the camera 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 for flexible adjustment.

[0069] In another embodiment, prior to step S01, the method further includes: automatically performing status detection when the light gun is activated.

[0070] Among them, by automatically performing status detection when the light gun is started, it can be ensured that each working component works normally.

[0071] In summary, the positioning and control method for a game light gun disclosed in the first embodiment of this application involves: 1. After acquiring a screen image, processing it based on a neural network model to obtain a standardized screen frame image; 2. Calculating the initial coordinates of the light gun's crosshair on the displayed screen based on the screen frame image; and 3. Obtaining the offset of the light gun's crosshair relative to the initial coordinates by detecting the changes in the current light gun's gravity direction, rotational angular velocity, and relative geomagnetism. The initial coordinates can then be compensated and adjusted based on this offset to obtain the target positioning coordinates of the light gun's crosshair, ensuring the accuracy of the light gun's trajectory and thus improving the precision of game control. Furthermore, this solution does not require consideration of compatibility, configuration, or specific driver issues, further enhancing the performance of the game light gun product and improving the user's gaming experience.

[0072] 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 invention.

[0073] See Figure 6 The first 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.

[0074] 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.

[0075] 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.

[0076] In another embodiment, the extraction unit 222 includes: correcting the optimized image after segmentation and extraction based on a preset standard, and outputting a corrected screen frame image, wherein the preset standard includes the screen size.

[0077] 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 a game light gun, and therefore will not be described in detail here.

[0078] Optionally, each module and the other operations or functions described above in this embodiment are for implementing the methods in the foregoing embodiments.

[0079] Another embodiment of this application illustrates a computing electronic device including a memory and a processor.

[0080] 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.

[0081] A general-purpose processor can be a microprocessor or any conventional processor. Memory can include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices.

[0082] 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).

[0083] 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.

[0084] 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, programmable read-only memory), and disks and / or optical discs may also be used.

[0085] 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, an ultra-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.

[0086] 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.

[0087] 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.

[0088] 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 method for position control of a game light gun, characterized by, The method comprises: acquiring environmental detection parameters, wherein the detection parameters include illumination intensity, temperature, and humidity; automatically adjusting parameters of a camera based on the detection parameters, wherein the camera is located on a light gun and is used to collect a screen image; collecting the screen image; performing image filtering and normalization processing on the screen image to obtain an optimized image; performing segmentation and extraction on the optimized image, correcting the optimized image after segmentation and extraction based on a preset standard, and outputting a corrected screen frame image, wherein the preset standard includes a screen size; based on the screen frame image, calculating initial coordinates of a light gun aiming point in a display image; detecting a current gravity direction, a rotation angular velocity, and a relative geomagnetic change amount of the light gun; based on the gravity direction, the rotation angular velocity, and the relative geomagnetic change amount, calculating an offset amount of the light gun aiming point relative to the initial coordinates; based on the offset amount, compensating the initial coordinates to obtain target positioning coordinates of the light gun aiming point.

2. The method of claim 1, wherein, Before the acquiring environmental detection parameters, the method further comprises: when the light gun is started, automatically performing state detection.

3. A positioning control system for a game light gun, characterized by, The method comprises: a processing module, configured to acquire environmental detection parameters, wherein the detection parameters include illumination intensity, temperature, and humidity; and automatically adjust parameters of a camera based on the detection parameters, wherein the camera is located on a light gun and is used to collect a screen image; a collecting module, configured to collect the screen image; an optimization unit of the processing module, configured to perform image filtering and normalization processing on the screen image to obtain an optimized image; an extraction unit of the processing module, configured to perform segmentation and extraction on the optimized image, correct the optimized image after segmentation and extraction based on a preset standard, and output a corrected screen frame image, wherein the preset standard includes a screen size; a first calculation module, configured to calculate initial coordinates of a light gun aiming point in a display image based on the screen frame image; a detection module, configured to detect a current gravity direction, a rotation angular velocity, and a relative geomagnetic change amount of the light gun; a second calculation module, configured to calculate an offset amount of the light gun aiming point relative to the initial coordinates based on the gravity direction, the rotation angular velocity, and the relative geomagnetic change amount; a compensation module, configured to compensate the initial coordinates based on the offset amount to obtain target positioning coordinates of the light gun aiming point.

4. An electronic device, comprising: The method comprises: a processor; and a memory having stored thereon executable code that, when executed by the processor, causes the processor to perform a positioning control method of a game light gun as claimed in claim 1 or 2.

5. A computer readable storage medium, characterized in that, The memory having stored thereon executable code that, when executed by the processor of an electronic device, causes the processor to perform a positioning control method of a game light gun as claimed in claim 1 or 2.

Citation Information

Patent Citations

  • Game gun positioning method and system based on sensor

    CN103949052A

  • Aiming method and apparatus, and terminal and storage medium

    WO2023155357A1