A method and system for processing light spot coordinate images in a simulated shooting game machine
By collecting and identifying infrared light spots emitted by toy guns and target lamps in real time, the difficulty of identifying in the existing technology when there are many external light sources is solved, and higher recognition accuracy and speed are achieved.
Patent Information
- Application Number
- CN202410876591.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In the case of many external light sources in the prior art, it is difficult to quickly and accurately identify infrared light spots emitted by toy guns.
Through the acquisition camera, the infrared light spots emitted by the toy gun and the target lamp are collected in real time, and the infrared light spots emitted by each toy gun and its corresponding target lamp are controlled to identify and process the infrared light spots based on multiple image video frames to reduce the influence of the external light source.
The accuracy and speed of identifying infrared light spots emitted by toy guns and target lamps is improved, and infrared light spots can be accurately identified with more external light sources.
Smart Images

Figure CN118799783B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an infrared light spot coordinate image processing method and system in a simulated shooting game machine. Background Art
[0002] Image processing is a technique that involves performing various operations on images in order to improve the visual effects of the image or extract useful information from the image. Image processing techniques include, but are not limited to, image digitization, image enhancement and restoration, image data encoding, image segmentation, and image recognition. These techniques can be used alone or in combination to achieve specific image processing goals.
[0003] At present, the image processing method for light spot coordinates in simulated shooting game consoles on the market is based on the player pulling the trigger to issue a trigger command, the acquisition camera then takes a screenshot of the corresponding screen, and then performs image recognition processing on the screenshot. This method cannot quickly and accurately identify the infrared light spots emitted by toy guns when there are many external light sources. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides an infrared light spot coordinate image processing method and system for an interactive system. The infrared light spots emitted by a toy gun and a target light are collected in real time by a collection camera, and the infrared light spots are recognized and processed for multiple image video frames, thereby reducing the influence of external light sources on the recognition of the infrared light spots emitted by the toy gun and the target light, improving the accuracy of recognizing the infrared light spots emitted by the toy gun and the target light, and improving the speed of recognizing the infrared light spots emitted by the toy gun and the target light.
[0005] Accordingly, the present invention proposes a method for processing infrared light spot coordinate images in a simulated shooting game machine, the method comprising the following steps:
[0006] Controlling a plurality of toy guns and more than one target light to send infrared light spots at set time intervals within a first time period;
[0007] Controlling the acquisition camera to obtain the video stream of the display screen, wherein the video stream includes a plurality of image video frames formed according to an acquisition cycle;
[0008] Perform image recognition processing on each image video frame in the video stream, and identify all infrared light spots in each image video frame;
[0009] Based on all the infrared light spots, the toy gun corresponding to the infrared light spots in each image video frame and the position information at which the toy gun is aimed are identified.
[0010] Preferably, before controlling the plurality of toy guns and the at least one target light to send infrared light at a set time interval within the first time period, the method further comprises:
[0011] Setting the emission time of the infrared light spot of each toy gun in the plurality of toy guns within the first time period, wherein the emission time of each toy gun in the plurality of toy guns is different, and the time interval between successive emission of the plurality of toy guns is greater than or equal to the generation time of each video frame in the video stream;
[0012] A target point light corresponding to each toy gun among the plurality of toy guns is set, and the firing time of the corresponding target point light is synchronized based on the firing time of each toy gun.
[0013] Preferably, the number of target lights corresponding to each toy gun is 0 or more than one. When there are four toy guns, the first toy gun corresponds to one
[0014] Preferably, the controlling of the plurality of toy guns and the at least one target light to send infrared light spots to the display screen at a set time interval within the first time period comprises:
[0015] Extracting a plurality of toy guns to be fired within a first time period and a target light corresponding to each toy gun;
[0016] According to the emission time set for each toy gun in the first time period, each toy gun and the target point lamp corresponding to each toy gun are controlled to send infrared light spots to the display screen.
[0017] Preferably, the method of identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots includes:
[0018] Extract the coordinate information of each infrared light point on all infrared light points;
[0019] Based on the coordinate information of all infrared light spots and the target point coordinate area in the screen area, the toy gun corresponding to the infrared light spot in the current image video frame is identified;
[0020] The position information at which the corresponding toy gun is aimed is determined based on the coordinate information of the infrared light spot in the non-target coordinate area.
[0021] Preferably, performing image recognition processing on each image video frame in the video stream and identifying all infrared light spots in each image video frame includes:
[0022] Performing noise reduction processing on infrared light spots based on image video frames in a video stream;
[0023] The infrared light spots are extracted from each image video frame after noise reduction processing.
[0024] Preferably, the performing noise reduction processing on the infrared light spots based on the image video frames in the video stream includes:
[0025] Acquire multiple continuous image video frames;
[0026] Identify all infrared light spots and infrared light spot coordinate information of each image video frame;
[0027] Determine whether there are repeated infrared light spots in a plurality of consecutive image video frames based on the infrared light spot coordinate information;
[0028] The repeated infrared light spots are identified as noise information, and the repeated infrared light spots are removed to enter the next processing process.
[0029] Preferably, before controlling the plurality of toy guns and more than one target light to send infrared light spots at set time intervals within the first time period, the method further comprises:
[0030] Open the calibration command of the simulated shooting game console;
[0031] Infrared light spot calibration is performed on multiple toy guns based on the calibration interface.
[0032] Preferably, after identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots, the method further includes:
[0033] Respond to the trigger command generated by the user and convert it into shooting picture information in the simulated shooting game machine based on the aimed position information.
[0034] The present invention also proposes a simulated shooting game system, the system comprising:
[0035] A plurality of toy guns, each of the plurality of toy guns being used to generate an infrared light spot;
[0036] One or more target point lights, each of the one or more target point lights is used to cooperate with the corresponding toy gun to generate an infrared light spot and emit it to the display screen;
[0037] A collection camera is used to collect a video stream on the display screen, wherein the video stream includes a plurality of image video frames formed according to a collection cycle;
[0038] A control module, used for controlling the plurality of toy guns and one or more target lights to send infrared light spots at set time intervals within a first time period, and controlling a collection camera to obtain a video stream where the display screen is located;
[0039] The processing module is used to perform image recognition processing on each image video frame in the video stream and identify all infrared light spots in each image video frame; and based on all infrared light spots, identify the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed.
[0040] The present invention uses a collection camera to collect infrared light spots emitted by toy guns and target lights in real time, controls each toy gun and its corresponding target light to emit infrared light spots, and controls the toy guns and the corresponding target lights to send infrared light spots at set time intervals, so that these infrared light spots can be projected onto a display screen when players raise their guns to simulate shooting; the infrared light spots are identified and processed based on multiple image video frames in the acquired video stream, wherein after the identification processing, an infrared light spot emitted by a toy gun or an infrared light spot emitted by a target light can be identified in each image video frame, noise points are identified through multiple image video frames, the influence of external light sources on the identification of infrared light spots emitted by toy guns and target lights is reduced, the accuracy of identifying infrared light spots emitted by toy guns and target lights is improved, and the speed of identifying infrared light spots emitted by toy guns and target lights is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 1 is a schematic diagram of a processing flow of an infrared light spot coordinate image processing method according to an embodiment of the present invention;
[0043] Figure 2 is a flow chart of performing noise reduction processing on infrared light spots based on image video frames in a video stream in an embodiment of the present invention;
[0044] Figure 3 is a flow chart for identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed in an embodiment of the present invention; Figure 4 It is a schematic diagram of the structure of a simulated shooting game machine system in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The infrared light spot coordinate image processing method in the simulated shooting game machine involved in the embodiment of the present invention controls multiple toy guns and more than one target light to send infrared light spots according to the set time interval within a first time period; controls the acquisition camera to obtain the video stream where the display screen is located, and the video stream includes a number of image video frames formed according to the acquisition period; performs image recognition processing on each image video frame in the video stream, and identifies all infrared light spots in each image video frame; based on all infrared light spots, identifies the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed.
[0047] In the embodiment of the present invention, by setting the corresponding relationship between the toy guns and the target lights, multiple toy guns and the corresponding target lights are controlled according to the first time period to complete the emission of infrared light spots, so that the acquisition camera can intercept the infrared light spots presented on the display screen, and then perform the red light spot recognition process. Since the emission time of each toy gun is different, the infrared light spots presented by each toy gun on the display screen are different and do not overlap, and each toy gun cooperates with the target light to control the emission of infrared light spots to the display screen at the same time, so that each toy gun has a quick recognition function, that is, the target light is displayed on the display screen. The infrared light spots presented on the display screen can be used to determine the red light spots presented by each toy gun on the display screen, and then the coordinate information of each toy gun on the display screen can be converted based on the red light spots, so that the toy gun can identify the exact shooting point on the display screen when responding to the user's trigger. By controlling the toy gun and the corresponding target light to complete the emission of infrared light spots, the influence of external light sources on the identification of infrared light spots emitted by toy guns and target lights can be reduced, thereby improving the accuracy of identifying infrared light spots emitted by toy guns and target lights and improving the speed of identifying infrared light spots emitted by toy guns and target lights.
[0048] Specifically, Figure 1 The schematic diagram of the processing flow of the infrared light spot coordinate image processing method in the embodiment of the present invention is shown. The infrared light spot coordinate image processing method in the simulated shooting game machine comprises the following steps:
[0049] S11, setting the association relationship and firing time between the toy gun and the target light;
[0050] Specifically, the entire game console system will default to the toy gun's firing time for the red light spot and the firing time for the target light.
[0051] This step can set the emission time of the infrared light spot of each toy gun among the multiple toy guns within the first time period, the emission time of each toy gun among the multiple toy guns is different, and the time interval between successive emission of the multiple toy guns is greater than or equal to the generation time of each video frame in the video stream; set the target point light corresponding to each toy gun among the multiple toy guns, and synchronize the emission time of the corresponding target point light based on the emission time of each toy gun.
[0052] Here, four toy guns are used as an example for explanation as follows, that is, the toy gun labels are W1, W2, W3 and W4, the first time period T includes the firing time t1, t2, t3 and t4 corresponding to each toy gun, the target light labels are B1, B2, B3, B4 and so on, and the firing time reference table can refer to Table 1.
[0053] Table 1 Toy gun firing schedule in the first time period
[0054] Launch time t1 t2 t3 t4 Toy gun logo W1 W2 W3 W4 Target light mark B1 B2 B3 B4 Target light mark B1 B2 B3 none Target light mark B1 B2 B1+B2 none
[0055] The firing times of the four toy guns in the first time period T are different, that is, the game console only allows the infrared light spots emitted by one toy gun to be retained in the same acquisition screen. In order to ensure that the infrared light spots on each toy gun can be recognized by the system, it is necessary to set a target light for each toy gun, that is, when each toy gun is fired, it is controlled to emit infrared light spots to the display screen at the same time as the corresponding target light. When there is a one-to-one correspondence between each toy gun and the target light, toy guns W1 and B1 need to emit infrared light spots to the display screen at the same time. Then, the display screen can distinguish and recognize that B1 has emitted infrared light spots through the corresponding target point on B1, and then it can be switched to the recognition function of toy gun W1.
[0056] It should be noted that the number of target lights corresponding to each toy gun is 0 or more than one, that is, at t4 here, when W4 emits infrared light spots, all target lights can be controlled not to emit infrared light spots to the target area, which can reduce the number of target lights used; at t3 here, when W3 emits infrared light spots, B1 and B2 can be controlled to cooperate with W3 to emit at the same time; when controlling multiple toy guns to emit infrared light spots, the corresponding target lights can be configured for each toy gun, so that each toy gun can be easily recognized by the system when emitting infrared light spots.
[0057] It should be noted that the time interval between the successive firing of multiple toy guns is greater than or equal to the generation time of each video frame in the video stream. For example, here four toy guns are controlled to complete the emission of infrared light spots based on the first time period T. The generation time of each video frame in the video stream is a sampling period. For example, when the first time period T is 1s, 50 frames of images are generated within 1s. The time for controlling the four toy guns to generate infrared light spots in succession is t1, t2, t3, and t4. Set t1, t2, t3, and t4 to have a certain duration. For example, t1, t2, t3, and t4 are continuously emitted. The time for emitting infrared light spots is 50ms, and there is a time interval of 200ms between t1 and t2, so the generation time of each video frame is 20ms. Since the time interval of 200ms between the successive firing of multiple toy guns is greater than or equal to the generation time of 20ms of each video frame in the video stream, in the generation process of each video frame, only the infrared light spots generated by each toy gun and the corresponding target light will be retained on the display screen, and there will be no infrared light spots generated by two toy guns on the display screen at the same time, so that the entire recognition process and recognition processing can be accurately processed.
[0058] In combination with the above description, the first time period T is divided into the first emission time t1 + first time interval + second emission time t2 + second time interval + third emission time t3 + third time interval + fourth emission time t4 + fourth time interval, where the first time interval, the second time interval, the third time interval, and the fourth time interval may be the same or different, but the first time interval, the second time interval, the third time interval, and the fourth time interval are all greater than the generation time of each video frame in the video stream.
[0059] S12, controlling the plurality of toy guns and one or more target lights to send infrared light spots at set time intervals within the first time period;
[0060] Specifically, according to the settings in step S12, multiple toy guns to be fired within the first time period and the target lights corresponding to each toy gun are extracted; and each toy gun and the target lights corresponding to each toy gun are controlled to send infrared light spots according to the firing time set for each toy gun within the first time period.
[0061] Referring to Table 1, it can be combined with the first time period T to control the emission time of each toy gun within T and the time interval between the emission of adjacent toy guns. For example, the toy gun W1 and the target light B1 first emit infrared light spots according to t1 (for example, set the duration of t1 to 50ms-100ms), and then enter the first time interval (all toy guns will not generate infrared light spots during the first time interval), then the toy gun W2 and the target light B2 emit infrared light spots according to t2 (for example, set the duration of t2 to 50ms-100ms), and then enter the second time interval (all toy guns will not generate infrared light spots during the second time interval), and then the toy gun W3 and the target light B3 emit infrared light spots according to t3 (for example, set the duration of t3 to 50ms-100ms). , then enter the third time interval (all toy guns will not generate infrared light spots during the third time interval), then toy gun W4 and target light B4 emit infrared light spots according to t4 (for example, set t4 time duration to 50ms-100ms), and then enter the fourth time interval (all toy guns will not generate infrared light spots during the fourth time interval), then the emission control of each toy gun and target light can be completed in the first time period T. Since the infrared light spots are generated by each toy gun, they can be aimed at the display screen by the user when playing with the toy gun, and the display screen can present the infrared light spots of the toy gun and the corresponding target light, and these infrared light spots can be captured by the camera, so that the infrared light spots emitted by each toy gun have corresponding coordinate relationships when they are emitted to the display screen.
[0062] Referring to Table 1, it can be combined with the first time period T to control the firing time of each toy gun within T and the time interval between the firings of adjacent toy guns. Here, three target lights can be set. For example, the toy gun W1 and the target light B1 first emit infrared light spots according to t1 (for example, the duration of t1 is set to 50ms-100ms), and then enter the first time interval (all toy guns will not generate infrared light spots during the first time interval), then the toy gun W2 and the target light B2 emit infrared light spots according to t2 (for example, the duration of t2 is set to 50ms-100ms), and then enter the second time interval (all toy guns will not generate infrared light spots during the second time interval), and then the toy gun W3 and the target light B3 emit infrared light spots according to t3 (for example, the duration of t3 is set to 50ms-100ms). 0ms-100ms), then enter the third time interval (all toy guns will not generate infrared light spots during the third time interval), then only toy gun W4 emits infrared light spots according to t4 (for example, set t4 time duration to 50ms-100ms), and then enter the fourth time interval (all toy guns will not generate infrared light spots during the fourth time interval), then the emission control of each toy gun and target light can be completed in the first time period T. Since the infrared light spots are generated by each toy gun, they can be aimed at the display screen by the user when playing with the toy gun, and the display screen can present the infrared light spots of the toy gun and the corresponding target light, and these infrared light spots can be captured by the camera, so that the infrared light spots emitted by each toy gun have corresponding coordinate relationships when they are emitted to the display screen.
[0063] Referring to Table 1, it can be combined with the first time period T to control the firing time of each toy gun within T and the time interval between the firings of adjacent toy guns. Two target lights can be set here. For example, the toy gun W1 and the target light B1 first emit infrared light spots according to t1 (for example, the duration of t1 is set to 50ms-100ms), and then enter the first time interval (all toy guns will not generate infrared light spots during the first time interval), then the toy gun W2 and the target light B2 emit infrared light spots according to t2 (for example, the duration of t2 is set to 50ms-100ms), and then enter the second time interval (all toy guns will not generate infrared light spots during the second time interval), then the toy gun W3 and the target lights B1 and B2 emit infrared light spots according to t3 (for example, the duration of t3 is set to 50ms-100ms). 50ms-100ms), then enter the third time interval (all toy guns will not generate infrared light spots during the third time interval), then only toy gun W4 emits infrared light spots according to t4 (for example, set t4 time duration to 50ms-100ms), and then enter the fourth time interval (all toy guns will not generate infrared light spots during the fourth time interval), then the emission control of each toy gun and target light can be completed in the first time period T. Since the infrared light spots are generated by each toy gun, they can be aimed at the display screen by the user when playing with the toy gun, and the display screen can present the infrared light spots of the toy gun and the corresponding target light, and these infrared light spots can be captured by the camera, so that the infrared light spots emitted by each toy gun have corresponding coordinate relationships when they are emitted to the display screen.
[0064] It should be noted that the embodiment of the present invention generally controls the infrared light spot to be generated within the emission time t1, t2, t3, and t4, and generally does not generate infrared light spots within the time interval to avoid affecting the overall recognition efficiency under subsequent image processing. That is, the time interval between the successive toy guns of the multiple toy guns is greater than or equal to the generation time of each video frame in the video stream to avoid the appearance of infrared light spots emitted by two different toy guns in one video frame, resulting in the simultaneous existence of two infrared light spots and the inability to identify the infrared light spot emitted by a specific toy gun.
[0065] This arrangement of a target light corresponding to each toy gun among multiple toy guns and synchronizing the emission time of the corresponding target light based on the emission time of each toy gun allows an infrared light spot emitted by a toy gun and an infrared light spot emitted by the target light to appear on the screen at the same time, which is conducive to identifying the infrared light spot emitted by the toy gun based on the infrared light spot emitted by the target light.
[0066] It should be noted that controlling multiple toy guns and one or more target lights to send infrared light spots at the set time intervals within the first time period includes: controlling each of the multiple toy guns and the corresponding target lights to send infrared light spots according to the generation time of each video frame in the video stream, that is, the emission time of the infrared light spots of each toy gun is controlled in combination with the acquisition frequency of the video stream. This combination enables more precise control of the generation time of the video frames for the acquisition of the video stream, thereby avoiding inconsistency between the acquisition frequency and the duration and time interval of the infrared light spots.
[0067] Here, controlling each of the multiple toy guns and the corresponding target light to send infrared light spots according to the generation time of each video frame in the video stream includes: obtaining the acquisition frequency of the video stream, configuring the emission duration corresponding to the multiple toy guns and the time interval between the emission of adjacent toy guns based on the acquisition frequency, that is, the generation time of the video frame is the emission duration and time interval corresponding to the configuration of the multiple toy guns, and the time interval is greater than or equal to the generation time of the video frame; after configuring the infrared emission instruction for each toy gun, simultaneously scheduling the infrared emission instruction of the target light corresponding to each toy gun, and then controlling each toy gun and the target light corresponding to each toy gun to complete the output of the infrared light spots based on the infrared emission instruction of each toy gun and the infrared emission instruction of the target light corresponding to each toy gun. This control method makes the acquisition frequency of the video stream coordinated with the emission time of the infrared light spots, so that the generation of the entire video frame and the display of the infrared light spots in the video frame are more orderly, and will not cause the disorder of the display of the infrared light spots in the video frame, so that the recognition efficiency of the infrared light spots in subsequent video frames is more accurate.
[0068] S13, controlling the acquisition camera to acquire the video stream of the display screen, wherein the video stream includes a plurality of image video frames formed according to an acquisition cycle;
[0069] It should be noted that the infrared light spots generated by the toy gun are dynamically projected onto the display screen, that is, when the user aims the toy gun at the target on the display screen, the infrared light spots generated can be projected onto the corresponding position on the display screen. If the user does not aim the toy gun at the corresponding position on the display screen, the infrared light spots of the toy gun will not be displayed on the display screen. All the target lights on the game console are set at fixed positions on the game console, and the infrared light spots emitted by the target lights are projected onto the target area on the display screen, which is equivalent to saying that the game console controls the emission of the target lights and infrared light spots on the toy gun, that is, the infrared light spots generated by the toy gun W1 may be projected onto the display screen by the player or may not be projected onto the display screen, but the infrared light spots generated by the target lights need to be projected onto the target area on the display screen within the emission time t1, that is, through this corresponding relationship, it can be determined whether the infrared light spots on the toy gun W1 act on the display screen. Similarly, the mapping relationship between other toy guns and target lights on the display screen is the same.
[0070] S14, performing image recognition processing on each image video frame in the video stream, and identifying all infrared light spots in each image video frame;
[0071] It should be noted that the image recognition processing for each image video frame in the video stream and identifying all infrared light spots in each image video frame includes: performing noise reduction processing on the infrared light spots based on the image video frames in the video stream; and extracting infrared light spots from each image video frame after the noise reduction processing. The noise reduction processing here adopts a filter-based method, and performs noise reduction processing on the image video frames in the video stream based on a combination of Gaussian filtering, mean filtering, median filtering and bilateral filtering.
[0072] It should be noted that the filter-based method can input the image video frames in the video stream into the corresponding filter. First, Gaussian filtering is applied to the image video frames in the video stream, using a suitable convolution kernel size and standard deviation; then, median filtering is performed on the image video frames after Gaussian filtering, and an appropriate window size is selected; secondly, bilateral filtering is applied to the image video frames after median filtering, and the parameters of the spatial domain and grayscale domain are adjusted. Finally, image video frames with noise reduction effect and retained image detail features are output.
[0073] It should be noted that the noise reduction processing of infrared light spots based on the image video frames in the video stream includes: obtaining multiple consecutive image video frames; identifying all infrared light spots and infrared light spot coordinate information of each image video frame; judging whether there are repeated infrared light spots in multiple consecutive image video frames based on the infrared light spot coordinate information; identifying the repeated infrared light spots as noise point information, and eliminating the repeated infrared light spots to enter the next processing process.
[0074] The method of performing image recognition processing on each image video frame in the video stream and identifying all infrared light spots in each image video frame includes: performing grayscale processing on each image video frame in the video stream obtained by the acquisition camera and identifying the infrared light spots in the image video frame; performing sharpening processing on the infrared light spots in the image video frame that has been grayscaled. The acquisition camera obtains each image video frame in the video stream and performs grayscale processing, and identifies the infrared light spots in the image video frame, wherein the image video frame color image is converted into a grayscale image. The grayscale image only contains brightness information, not color information, so each pixel has only one grayscale value, which better highlights the texture and structure of the image. By eliminating the interference of color information, the grayscale image can more clearly display the position of the infrared light spot; the infrared light spot in the image video frame that has been grayscaled is sharpened, wherein the edge of the infrared light spot is first filtered and noise is reduced and the edge data of the infrared light spot is processed, and then the edge information data distribution image and the original image are merged to obtain the final image after detail sharpening.
[0075] It should be noted that identifying the infrared light spots in the image video frames here includes: searching for external light spots in the image video frames based on the spot characteristics of the infrared light spots, that is, performing target search for the infrared light spots in the image video frames, and performing real-time analysis on the infrared light spots in the image video frames, and comparing and fitting the spot characteristic parameters of the infrared light spots in the video frames with the spot characteristic parameters of the infrared light spots in the target search, and obtaining the error between the infrared light spots in the video frames and the infrared light spots in the target search based on the fitting results, and when the error meets the threshold condition, the infrared light spot is identified as the infrared light spot generated in the embodiment of the present invention.
[0076] S15, based on all the infrared light spots, identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed;
[0077] It should be noted that the method of identifying the toy gun fired corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots includes: extracting the coordinate information of each infrared light spot on all the infrared light spots; identifying the toy gun fired corresponding to the infrared light spot in the current image video frame based on the coordinate information of all the infrared light spots and the target coordinate area in the screen area; and determining the position information at which the toy gun fired correspondingly based on the coordinate information of the infrared light spots in the non-target coordinate area.
[0078] In this step, the target coordinate area in the screen area is first located, and then the coordinate information of the infrared light spot is identified whether there is in the target coordinate area, and the corresponding toy gun is judged based on the coordinate information on the target coordinate area; when identifying which toy gun is playing the simulated shooting game, the coordinate information of the infrared light spot in the non-target coordinate area can be used to determine the position information of the toy gun on the display screen.
[0079] S16, responding to the trigger command generated by the user, and converting the aimed position information into shooting picture information in the simulated shooting game machine.
[0080] Respond to the trigger command generated by the user and convert it into shooting picture information in the simulated shooting game console based on the aimed position information, that is, the user pulls the trigger of the toy gun in the simulated shooting game console to generate a trigger command, and this trigger command is transmitted to the display screen, and then the display screen converts and generates a shooting picture in the simulated shooting game console according to the location of the infrared light spot emitted by the toy gun that issues the trigger command.
[0081] Figure 2 A flow chart of performing noise reduction processing on infrared light spots based on image video frames in a video stream in an embodiment of the present invention is shown. The noise reduction processing on infrared light spots based on image video frames in a video stream includes:
[0082] S131: Acquire a plurality of continuous image video frames, wherein the plurality of continuous image video frames refer to image video frames of more than one time period. In this embodiment, acquiring a plurality of continuous image video frames is preferably acquiring more than eight continuous image video frames;
[0083] S132: Identify all infrared light spots and infrared light spot coordinate information of each image video frame, wherein all infrared light spots of each image video frame include infrared light spots emitted by target lights, infrared light spots emitted by toy guns and infrared light spots formed by external environment lighting, identify infrared light spots and obtain coordinate information of corresponding infrared light spots.
[0084] S133: Determine whether there are repeated infrared light spots in multiple consecutive image video frames based on the infrared light spot coordinate information, wherein the infrared light spots emitted by the target light and the toy gun appear once in the image video frame within one cycle, and the external ambient light continuously emits light to the display screen, causing infrared light spots to continuously appear on the display screen, that is, the infrared light spots that repeatedly appear in the image video frames within one cycle are infrared light spots formed by the external ambient light.
[0085] S134: Identify the repeated infrared light spots as noise information, and remove the repeated infrared light spots to enter the next processing process, wherein the infrared light spots formed by the external environment illumination appear repeatedly in multiple image video frames. After removing the repeated infrared light spots, the corresponding image video frames only have the infrared light spots emitted by the toy gun and the infrared light spots emitted by the corresponding target lights. In this way, the specific toy gun and the position information of the toy gun's aiming can be determined according to the position of the target light.
[0086] Infrared light spots are extracted from each image video frame after noise reduction processing, wherein only one or two infrared light spots remain in each image video frame after noise reduction, and the infrared light spots are infrared light spots emitted by target lights or toy guns. The infrared light spots emitted by target lights or toy guns are extracted, and then the infrared light spots are processed in the next step.
[0087] Specifically, more than eight continuous image video frames are obtained, and then these multiple continuous image video frames are extracted and analyzed, the infrared light spots appearing in two consecutive image video frames are determined to be noise information, and this noise information is eliminated, retaining the infrared light spots that do not appear continuously in these multiple continuous image video frames.
[0088] Based on all the infrared light spots, the toy gun corresponding to the infrared light spots in each image video frame and the position information at which the toy gun is aimed are identified, wherein each image video frame contains corresponding infrared light spots emitted by the toy gun at different times and infrared light spots emitted by the target light.
[0089] Figure 3 A flow chart of identifying the toy gun fired corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed is shown in an embodiment of the present invention. The method of identifying the toy gun fired corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots includes:
[0090] S141: extracting the coordinate information of each infrared light spot among all the infrared light spots, wherein the coordinate information includes the area where each infrared light is located and the coordinates of the area. Based on this information, the location of each infrared light spot can be clearly understood.
[0091] S142: Based on the coordinate information of all infrared light spots and the target coordinate area in the screen area, identify the toy gun that fires the infrared light spot in the current image video frame, wherein each toy gun is provided with a corresponding target light, and the target light and the toy gun simultaneously fire the infrared light spot, and the position of each target light firing the infrared light spot is inconsistent, that is, the corresponding toy gun that fires can be identified according to the infrared light spot in the target coordinate area.
[0092] S143: Determine the position information aimed at by the corresponding toy gun based on the coordinate information of the infrared light spot in the non-target coordinate area, wherein the infrared light spot in the non-target coordinate area is emitted by a toy gun, that is, the position aimed at by the corresponding toy gun can be accurately known based on the coordinate information of the non-target coordinate area.
[0093] Specifically, the first frame of the image video frame is obtained and the infrared light spots in the image video frame are extracted, the infrared light spots in the target coordinate area and the non-target coordinate area are identified, and the positions of the infrared light spots in the target coordinate area are identified to determine which toy gun emits the infrared light spot in the image video frame. Then, the coordinate information of the infrared light spots in the non-target coordinate area is identified to determine the position where the infrared light spot emitted by the corresponding toy gun is aimed.
[0094] Specifically, Figure 4 The schematic diagram of the structure of the simulated shooting game system in the embodiment of the present invention is shown, and the system includes:
[0095] A plurality of toy guns, wherein each of the plurality of toy guns is used to generate an infrared light spot;
[0096] One or more target point lights, each of the one or more target point lights is used to cooperate with the corresponding toy gun to generate an infrared light spot and emit it to the display screen;
[0097] A collection camera is used to collect a video stream on the display screen, wherein the video stream includes a plurality of image video frames formed according to a collection cycle;
[0098] A control module, used for controlling the plurality of toy guns and one or more target lights to send infrared light spots at set time intervals within a first time period, and controlling a collection camera to obtain a video stream where the display screen is located;
[0099] The processing module is used to perform image recognition processing on each image video frame in the video stream and identify all infrared light spots in each image video frame; and based on all infrared light spots, identify the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed.
[0100] It should be noted that the control module here can control how multiple toy guns send infrared light spots, and control how each of the more than one target lights cooperates with the corresponding toy gun to send infrared light spots. The infrared light spots emitted by each toy gun can be projected onto the display screen or may be free on the display screen by the game user. The infrared light spots emitted by each target light will be projected onto the corresponding target area on the display screen, that is, the presence of infrared light spots in the target area can serve as an identification of the corresponding toy gun.
[0101] It should be noted that the control module here can also control the acquisition camera to obtain the video stream where the display screen is located, such as the frequency and time of acquiring the video stream and so on.
[0102] It should be noted that the control module can also configure relevant control processes for each toy gun and target light, that is, setting the emission time of the infrared light spot of each toy gun among the multiple toy guns within the first time period, the emission time of each toy gun among the multiple toy guns is different, and the time interval between successive emission of the multiple toy guns is greater than or equal to the generation time of each video frame in the video stream; setting the target light corresponding to each toy gun among the multiple toy guns, and synchronizing the emission time of the corresponding target light based on the emission time of each toy gun.
[0103] It should be noted that the number of target lights corresponding to each toy gun is 0 or more than one.
[0104] It should be noted that the control module here is used to extract multiple toy guns to be fired within the first time period and the target light corresponding to each toy gun; and control each toy gun and the target light corresponding to each toy gun to send infrared light spots according to the firing time set for each toy gun within the first time period.
[0105] It should be noted that the processing module here is used to extract the coordinate information of each infrared light spot among all the infrared light spots; based on the coordinate information of all the infrared light spots and the target coordinate area in the screen area, the toy gun corresponding to the infrared light spot in the current image video frame is identified; based on the coordinate information of the infrared light spots in the non-target coordinate area, the position information at which the corresponding toy gun is aimed is determined.
[0106] It should be noted that the processing module here performs noise reduction processing on the infrared light spots based on the image video frames in the video stream; and extracts the infrared light spots from each image video frame after the noise reduction processing. The noise reduction processing on the infrared light spots based on the image video frames in the video stream includes: obtaining multiple continuous image video frames; identifying all infrared light spots and infrared light spot coordinate information of each image video frame; judging whether there are repeated infrared light spots in multiple continuous image video frames based on the infrared light spot coordinate information; identifying the repeated infrared light spots as noise point information, and removing the repeated infrared light spots to enter the next processing process.
[0107] It should be noted that the processing module is used to grayscale each image video frame in the video stream acquired by the acquisition camera, and identify infrared light spots in the image video frames; and sharpen the infrared light spots in the grayscaled image video frames.
[0108] It should be noted that before controlling the plurality of toy guns and one or more target lights to send infrared light spots at the set time intervals within the first time period, the method further includes: starting the calibration instruction of the simulated shooting game machine; and calibrating the infrared light spots of the plurality of toy guns based on the calibration interface. The calibration can make the infrared light spots better match the display screen, so that the user's experience in the simulated shooting game machine is more intense.
[0109] In summary, the system in the embodiment of the present invention controls the plurality of toy guns and the corresponding target lights to complete the emission of infrared light spots according to the first time period by setting the corresponding relationship between the toy guns and the target lights, so that the acquisition camera can intercept the infrared light spots presented on the display screen, and then perform the red light spot recognition process. Since the emission time of each toy gun is different, the infrared light spots presented on the display screen by each toy gun are different and do not overlap, and each toy gun cooperates with the target light to control the emission of infrared light spots to the display screen at the same time, so that each toy gun has a rapid recognition function, that is, through the target light, The infrared light spots presented by the lights on the display screen can be used to determine the red light spots presented by each toy gun on the display screen, and then the coordinate information of each toy gun on the display screen can be converted based on the red light spots, so that the toy gun can identify the exact shooting point on the display screen when responding to the user's trigger. By controlling the toy gun and the corresponding target light to complete the emission of infrared light spots, the influence of external light sources on the identification of infrared light spots emitted by toy guns and target lights can be reduced, thereby improving the accuracy of identifying infrared light spots emitted by toy guns and target lights and improving the speed of identifying infrared light spots emitted by toy guns and target lights.
[0110] In addition, the above is a detailed introduction to the infrared light spot coordinate image processing method and system in a simulated shooting game machine provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for processing infrared light spot coordinate images in a simulated shooting game machine, characterized in that: The method comprises the following steps: Setting a target point light corresponding to each toy gun among the plurality of toy guns, and synchronizing the firing time of the corresponding target point light based on the firing time of each toy gun; Controlling a plurality of toy guns and more than one target light to send infrared light spots at set time intervals within a first time period; Controlling the acquisition camera to obtain the video stream of the display screen, wherein the video stream includes a plurality of image video frames formed according to an acquisition cycle; Perform image recognition processing on each image video frame in the video stream, and identify all infrared light spots in each image video frame; Based on all the infrared light spots, the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed are identified; The method of identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots includes: Extract the coordinate information of each infrared light point on all infrared light points; Based on the coordinate information of all infrared light spots and the target point coordinate area in the screen area, the toy gun corresponding to the infrared light spot in the current image video frame is identified; The position information at which the corresponding toy gun is aimed is determined based on the coordinate information of the infrared light spot in the non-target coordinate area.
2. The infrared light spot coordinate image processing method in the simulated shooting game machine according to claim 1, characterized in that: Before controlling the plurality of toy guns and more than one target light to send infrared light spots at set time intervals within the first time period, the method further includes: The emission time of the infrared light spot of each toy gun in the multiple toy guns is set within the first time period, the emission time of each toy gun in the multiple toy guns is different, and the time interval between successive emission of the multiple toy guns is greater than or equal to the generation time of each video frame in the video stream.
3. The infrared light spot coordinate image processing method in the simulated shooting game machine as claimed in claim 2, characterized in that: The number of target lights corresponding to each toy gun is 0 or more than one.
4. The infrared light spot coordinate image processing method in the simulated shooting game machine as claimed in claim 2, characterized in that: The controlling of the plurality of toy guns and the at least one target light to send infrared light spots at set time intervals within a first time period comprises: Extracting a plurality of toy guns to be fired within a first time period and a target light corresponding to each toy gun; Each toy gun and the target point lamp corresponding to each toy gun are controlled to send infrared light spots according to the emission time set for each toy gun within the first time period.
5. The infrared light spot coordinate image processing method in the simulated shooting game machine as claimed in claim 1, characterized in that: The performing image recognition processing on each image video frame in the video stream and identifying all infrared light spots in each image video frame includes: Performing noise reduction processing on infrared light spots based on image video frames in a video stream; The infrared light spots are extracted from each image video frame after noise reduction processing.
6. The infrared light spot coordinate image processing method in the simulated shooting game machine as claimed in claim 5, characterized in that: The denoising process of the infrared light spot based on the image video frame in the video stream includes: Acquire multiple continuous image video frames; Identify all infrared light spots and infrared light spot coordinate information of each image video frame; Determine whether there are repeated infrared light spots in a plurality of consecutive image video frames based on the infrared light spot coordinate information; The repeated infrared light spots are identified as noise information, and the repeated infrared light spots are removed to enter the next processing process.
7. The infrared light spot coordinate image processing method in the simulated shooting game machine as claimed in claim 1, characterized in that: Before controlling the plurality of toy guns and more than one target light to send infrared light spots at set time intervals within the first time period, the method further includes: Start the calibration command of the simulated shooting game console; Infrared light spot calibration is performed on multiple toy guns based on the calibration interface.
8. The infrared light spot coordinate image processing method in a simulated shooting game machine according to any one of claims 1 to 7, characterized in that: After the method of identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots, it also includes: Respond to the trigger command generated by the user and convert it into shooting picture information in the simulated shooting game machine based on the aimed position information.
9. A simulated shooting game system, characterized in that: The system comprises: A plurality of toy guns, each of the plurality of toy guns being used to generate an infrared light spot; One or more target point lights, each of the one or more target point lights is used to cooperate with the corresponding toy gun to generate an infrared light spot and emit it to the display screen; A collection camera is used to collect a video stream on the display screen, wherein the video stream includes a plurality of image video frames formed according to a collection cycle; A control module, for setting a target light corresponding to each toy gun in the plurality of toy guns, synchronizing the emission time of the corresponding target light based on the emission time of each toy gun, controlling the plurality of toy guns and one or more target lights to emit infrared light spots at a set time interval within a first time period, and controlling a collection camera to obtain a video stream where the display screen is located; A processing module, for performing image recognition processing on each image video frame in the video stream, and identifying all infrared light spots in each image video frame; and identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots; The method of identifying the toy gun corresponding to the infrared light spot in each image video frame and the position information at which the toy gun is aimed based on all the infrared light spots includes: Extract the coordinate information of each infrared light point on all infrared light points; Based on the coordinate information of all infrared light spots and the target point coordinate area in the screen area, the toy gun corresponding to the infrared light spot in the current image video frame is identified; The position information at which the corresponding toy gun is aimed is determined based on the coordinate information of the infrared light spot in the non-target coordinate area.
Citation Information
Patent Citations
Method and system for recognizing different shooting points on screen by infrared laser
CN104667527A