Game image binarization processing method, device and computer readable storage medium

By converting game images to the HSV color space, statistically analyzing the ratio set, and automatically determining the foreground color for binarization, the problem of tedious manual adjustment of foreground color values ​​in existing technologies is solved. This achieves timeliness, flexibility, and accuracy in game image processing, thereby improving the user experience.

CN113902918BActive Publication Date: 2026-03-24NUBIA TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, game image processing requires manual intervention to adjust the foreground color values, which is cumbersome and cannot meet users' needs for timeliness, flexibility and accuracy in game moments.

Method used

By identifying the target region in the game image, converting it to the HSV color space, statistically analyzing the ratio set, picking the foreground HSV value, and determining the closest ratio in the ratio set for binarization, the system automatically adapts to changes in foreground color.

Benefits of technology

It achieves automatic adaptation to changes in foreground color without manual intervention, meeting the timeliness, flexibility, and accuracy requirements of game moments and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113902918B_ABST
    Figure CN113902918B_ABST
Patent Text Reader

Abstract

The application discloses a game image binarization processing method and device and a computer readable storage medium, wherein the method comprises the following steps: determining a target region meeting a preset processing condition in a game image, and obtaining a region image by intercepting the target region; converting an image matrix of the region image from an RGB color space to an HSV color space, and determining a ratio set corresponding to each color in the HSV color space; picking up a foreground in the game image, and obtaining an HSV value of the foreground; determining a ratio most close to the HSV value of the foreground in the ratio set, and performing a binarization operation on the game image according to a color corresponding to the ratio, so as to remove a background in the game image. When the game image is processed in a game moment, the application does not need manual intervention for color calibration, and meets the timeliness, flexibility and accuracy requirements of a user for game moment production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile communications, and more particularly to a method, device, and computer-readable storage medium for binarizing game images. Background Technology

[0002] In the current technology, with the continuous enrichment of various games on mobile devices, users' demands for gaming experience are also increasing. Currently, few device manufacturers offer solutions for capturing and processing exciting game moments; the most common approach is to take screenshots of exciting game scenes. Clearly, current game screenshot solutions cannot meet users' needs for appreciation and sharing.

[0003] To address the aforementioned issues, current solutions exist for sharing game moments after processing game images. These solutions require image recognition. When recognizing images, the foreground color is relied upon. A common approach is to binarize the image according to the current foreground color, removing background interference. However, the above solution has a problem: scene, view, and character transitions are frequent during gameplay, and different games have different color feature settings. Therefore, when the foreground color changes, the foreground color value in the device's code logic needs to be manually readjusted to achieve binarization based on the foreground color.

[0004] It can be seen that currently, when processing game images for game moments, manual intervention is required for color calibration, which is cumbersome and inefficient, and cannot meet users' needs for timeliness, flexibility, and accuracy in game moment creation. Summary of the Invention

[0005] To address the aforementioned technical deficiencies in the prior art, this invention proposes a game image binarization processing method, which includes:

[0006] In the game image, a target region that meets the preset processing conditions is identified, and the target region is cropped to obtain a region image.

[0007] The image matrix of the region image is converted from RGB color space to HSV color space, and the set of ratios corresponding to each color in the HSV color space is determined.

[0008] Pick the foreground in the game image and obtain the HSV value of the foreground.

[0009] The ratio closest to the HSV value of the foreground is determined from the set of ratios, and the game image is binarized according to the color corresponding to the ratio to remove the background from the game image.

[0010] Optionally, determining a target region in the game image that meets preset processing conditions and cropping the target region to obtain a region image includes:

[0011] Obtain the current game state and parse the image content of the game image captured under the game state.

[0012] The current game features and game progress are determined based on the game state and the image content.

[0013] Optionally, the step of determining a target region in the game image that meets preset processing conditions and cropping the target region to obtain a region image further includes:

[0014] The preset processing conditions are determined based on the game features and the game process, wherein the preset processing conditions include the division conditions for game characters and the capture conditions for the game view.

[0015] The target region is cropped from the game image according to the division conditions of the game character and / or the cropping conditions of the game view to obtain the region image.

[0016] Optionally, the step of converting the image matrix of the region image from RGB color space to HSV color space and determining the set of ratios corresponding to each color in the HSV color space includes:

[0017] Within the value range of 0-255, the H, S, and V values ​​of the region image in the HSV color space are divided into 17 intervals with an interval of 15.

[0018] 173 categories were identified that correspond to the 17 intervals.

[0019] Optionally, the step of converting the image matrix of the region image from RGB color space to HSV color space and determining the set of ratios corresponding to each color in the HSV color space further includes:

[0020] The distribution of each pixel in the image of the region is statistically analyzed across the 173 categories.

[0021] The occupancy ratio of each category is determined based on the distribution status, and all the occupancy ratios are used as the ratio set.

[0022] Optionally, the step of picking the foreground in the game image and obtaining the HSV value of the foreground includes:

[0023] Determine the color picking parameters corresponding to the game features and / or the game progress.

[0024] The foreground in the game image is picked up using the color picking parameters.

[0025] Optionally, determining the ratio closest to the HSV value of the foreground in the ratio set, and performing a binarization operation on the game image based on the color corresponding to the ratio to remove the background from the game image, includes:

[0026] Calculate the foreground occupancy percentage of the HSV value of the foreground.

[0027] The occupancy ratio value that is closest to the foreground occupancy ratio value is determined from the set of ratio values, and the color corresponding to the occupancy ratio value is taken as the foreground color of the game image.

[0028] Optionally, the step of determining the ratio closest to the HSV value of the foreground in the ratio set, and performing a binarization operation on the game image based on the color corresponding to the ratio to remove the background from the game image, includes:

[0029] After capturing a new game image in the game state, a new target area is captured in the new game image according to the division conditions of the game character and / or the capture conditions of the game view.

[0030] If the game character and / or game view changes within the new target area, and if no change occurs, the new game image is binarized using the foreground color to remove the background from the new game image.

[0031] The present invention also proposes a game image binarization processing device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the game image binarization processing method as described in any of the preceding claims.

[0032] The present invention also proposes a computer-readable storage medium storing a game image binarization processing program, which, when executed by a processor, implements the steps of the game image binarization processing method as described in any of the preceding claims.

[0033] The present invention provides a game image binarization processing method, device, and computer-readable storage medium. The method involves: identifying a target region in a game image that meets preset processing conditions and cropping the target region to obtain a region image; converting the image matrix of the region image from RGB color space to HSV color space and determining the set of ratios corresponding to each color in the HSV color space; picking the foreground in the game image and obtaining the HSV value of the foreground; determining the ratio closest to the HSV value of the foreground in the set of ratios; and performing a binarization operation on the game image based on the color corresponding to the ratio to remove the background from the game image. This provides a user-friendly game image binarization processing scheme. When processing game moments in game images, no manual color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience. Attached Figure Description

[0034] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0035] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal according to the present invention;

[0036] Figure 2 This is a communication network system architecture diagram provided in an embodiment of the present invention;

[0037] Figure 3 This is a flowchart of the first embodiment of the game image binarization processing method of the present invention;

[0038] Figure 4 This is a flowchart of the second embodiment of the game image binarization processing method of the present invention;

[0039] Figure 5 This is a flowchart of the third embodiment of the game image binarization processing method of the present invention;

[0040] Figure 6 This is a flowchart of the fourth embodiment of the game image binarization processing method of the present invention;

[0041] Figure 7 This is a flowchart of the fifth embodiment of the game image binarization processing method of the present invention;

[0042] Figure 8 This is a flowchart of the sixth embodiment of the game image binarization processing method of the present invention;

[0043] Figure 9 This is a flowchart of the seventh embodiment of the game image binarization processing method of the present invention;

[0044] Figure 10This is a flowchart of the eighth embodiment of the game image binarization processing method of the present invention. Detailed Implementation

[0045] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0046] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0047] Terminals can be implemented in various forms. For example, the terminals described in this invention may include mobile terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0048] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to fixed-type terminals.

[0049] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0050] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:

[0051] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution).

[0052] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.

[0053] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0054] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0055] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0056] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0057] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands from processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being limited here.

[0058] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.

[0059] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.

[0060] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0061] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0062] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0063] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

[0064] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.

[0065] Please see Figure 2 , Figure 2 This invention provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.

[0066] Specifically, UE201 can be the aforementioned terminal 100, which will not be elaborated here.

[0067] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Among them, eNodeB2021 can connect to other eNodeB2022s via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203. eNodeB2021 can provide UE201 with access to EPC203.

[0068] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 provides registers to manage functions such as the Home Location Register (not shown in the diagram) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).

[0069] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.

[0070] Although the above description uses the LTE system as an example, those skilled in the art should understand that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.

[0071] Based on the aforementioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.

[0072] Example 1

[0073] Figure 3 This is a flowchart of the first embodiment of the game image binarization processing method of the present invention. A game image binarization processing method, the method comprising:

[0074] S1. Determine the target area in the game image that meets the preset processing conditions, and crop the target area to obtain the area image.

[0075] S2. Convert the image matrix of the region image from RGB color space to HSV color space, and determine the set of ratios corresponding to each color in the HSV color space.

[0076] S3. Pick the foreground in the game image and obtain the HSV value of the foreground.

[0077] S4. Determine the ratio closest to the HSV value of the foreground in the set of ratios, and perform a binarization operation on the game image according to the color corresponding to the ratio to remove the background from the game image.

[0078] Optionally, in this embodiment, firstly, a target region meeting preset processing conditions is determined in the game image, and the target region is cropped to obtain a region image; then, the image matrix of the region image is converted from RGB color space to HSV color space, and the set of ratios corresponding to each color in the HSV color space is determined; next, the foreground in the game image is picked, and the HSV value of the foreground is obtained; finally, the ratio closest to the HSV value of the foreground is determined from the set of ratios, and the binarization operation of the game image is performed according to the color corresponding to the ratio to remove the background in the game image. This embodiment provides an automatic adaptation mechanism, which can adaptively binarize the image without manual intervention after the foreground color of the image to be binarized changes.

[0079] Optionally, in this embodiment, firstly, the image region of interest is captured, that is, the screenshot interface provided by the system is used to capture the region of interest, wherein the region of interest is divided according to preset conditions. Then, the image is converted to the HSV color space (Hue, Saturation, Value; a color space). The OpenCV color space conversion interface is called to convert the image matrix from the RGB (Red R, Green G, Blue B, a three-color system) color space to the HSV color space. Then, the pixel ratio of various color values ​​is statistically analyzed in the HSV color space, that is, the ratio of each color interval in the above-mentioned HSV color matrix is ​​obtained through statistical methods. Specifically, the H value, S value, and V value are all counted at intervals of 15, dividing the entire value range (0~255) into 17 intervals, for a total of 17. 3 The process involves categorizing the data into several categories; calculating the pixels falling into these categories in the second step; and then determining the proportion of each category. Finally, the HSV value of the current foreground color is obtained, along with its corresponding proportion value α. One method is to use a color picking tool to identify the HSV value of the current foreground and then record the corresponding proportion value α. Therefore, when binarizing the region of interest, the above steps are followed: first, the region is converted to HSV space; then, the pixel proportions of each color are calculated; the color value closest to the recorded value α is found, and this value is used as the current foreground color. This color is then used for binarization to remove the background.

[0080] The beneficial effect of this embodiment is that, by identifying a target region in the game image that meets preset processing conditions and cropping the target region to obtain a region image; converting the image matrix of the region image from RGB color space to HSV color space and determining the set of ratios corresponding to each color in the HSV color space; picking the foreground in the game image and obtaining the HSV value of the foreground; determining the ratio closest to the HSV value of the foreground in the set of ratios, and performing a binarization operation on the game image according to the color corresponding to the ratio to remove the background from the game image. This achieves a user-friendly game image binarization processing scheme. When processing game moments in game images, no manual intervention for color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience.

[0081] Example 2

[0082] Figure 4 This is a flowchart of a second embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of determining a target region in the game image that meets preset processing conditions and cropping the target region to obtain a region image includes:

[0083] S11. Obtain the current game state and parse the image content of the game image captured under the game state.

[0084] S12. Determine the current game features and game progress based on the game state and the image content.

[0085] Optionally, in this embodiment, the game state refers to the current game type and stage. For example, if the game is a strategy game, the current stage may be the game preparation stage, the shopping stage, or the game start stage.

[0086] Optionally, in this embodiment, when a preset game event is detected in a preset game state, a game image is captured, and the image content of the game image is identified.

[0087] Optionally, in this embodiment, the current game feature is determined, wherein the game feature is the skill release feature contained in the image content, for example, the action of a game character releasing a powerful move is regarded as a game feature.

[0088] Optionally, in this embodiment, the current game process is determined, wherein the game process is the number and positional relationship of the game characters contained in the image content, for example, the adjacent positions of the player and the opponent having two or more game characters at the same time are regarded as a node of the game process.

[0089] The beneficial effect of this embodiment is that by acquiring the current game state and parsing the image content of the game image captured under the game state, the current game characteristics and game progress are determined based on the game state and the image content. This implements a user-friendly game image binarization processing scheme. When processing game images for game moments, no manual intervention for color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in creating game moments, and enhancing the user experience.

[0090] Example 3

[0091] Figure 5 This is a flowchart of the third embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of determining a target region in the game image that meets the preset processing conditions and cropping the target region to obtain a region image further includes:

[0092] S13. Determine the preset processing conditions based on the game features and the game process, wherein the preset processing conditions include the division conditions for game characters and the capture conditions for the game view.

[0093] S14. The target area is cropped in the game image according to the division conditions of the game character and / or the cropping conditions of the game view to obtain the area image.

[0094] Optionally, in this embodiment, the preset processing conditions include the division conditions of game characters, wherein the interception range is determined according to the coverage range of the game characters, or the interception range is determined according to the coverage range of the game characters and their corresponding skill releases.

[0095] Optionally, in this embodiment, the preset processing conditions include the capture conditions of the game view, wherein the capture range is determined by the coverage of the game character and the corresponding skill release under the game's main perspective, or spectator perspective, or full field of view.

[0096] The beneficial effect of this embodiment is that the preset processing conditions are determined through the game features and the game process. These preset processing conditions include character segmentation conditions and view cropping conditions. The target region is cropped from the game image according to the character segmentation conditions and / or the view cropping conditions to obtain the region image. This implements a user-friendly game image binarization processing scheme. When processing game moments in game images, no manual intervention for color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience.

[0097] Example 4

[0098] Figure 6 This is a flowchart of the fourth embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of converting the image matrix of the region image from RGB color space to HSV color space and determining the set of ratios corresponding to each color in the HSV color space includes:

[0099] S21. Within the value range of 0-255, the H, S, and V values ​​of the region image in the HSV color space are divided into 17 intervals with an interval of 15.

[0100] S22. Determine the 173 categories corresponding to the 17 intervals.

[0101] The beneficial effect of this embodiment is that, by dividing the H, S, and V values ​​of the region image in the HSV color space into 17 intervals with 15 intervals within the value range of 0-255, 173 categories corresponding to the 17 intervals are determined. This achieves a user-friendly game image binarization processing scheme. When processing game images for game moments, no manual intervention for color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience.

[0102] Example 5

[0103] Figure 7 This is a flowchart of the fifth embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of converting the image matrix of the region image from RGB color space to HSV color space and determining the set of ratios corresponding to each color in the HSV color space further includes:

[0104] S23. Statistically analyze the distribution of each pixel in the region image under the 173 categories.

[0105] S24. Determine the occupancy ratio of each category based on the distribution status, and use all the occupancy ratios as the ratio set.

[0106] The beneficial effect of this embodiment is that by statistically analyzing the distribution of each pixel in the region image under the 173 categories, determining the occupancy ratio of each category based on the distribution, and using all the occupancy ratios as the ratio set, a user-friendly game image binarization processing scheme is achieved. When processing game images for game moments, no manual intervention in color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience.

[0107] Example 6

[0108] Figure 8 This is a flowchart of the sixth embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of picking the foreground in the game image and obtaining the HSV value of the foreground includes:

[0109] S31. Determine the color picking parameters corresponding to the game features and / or the game process.

[0110] S32. Pick the foreground in the game image using the color picking parameters.

[0111] The beneficial effect of this embodiment is that by determining color picking parameters corresponding to the game features and / or the game process, and picking the foreground in the game image using these color picking parameters, a user-friendly game image binarization processing scheme is achieved. When processing game moments in game images, no manual intervention for color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience.

[0112] Example 7

[0113] Figure 9 This is a flowchart of the seventh embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of determining the ratio closest to the HSV value of the foreground in the ratio set, and performing the binarization operation of the game image according to the color corresponding to the ratio to remove the background in the game image includes:

[0114] S41. Calculate the foreground occupancy ratio of the HSV value of the foreground.

[0115] S42. Determine the occupancy ratio value that is closest to the foreground occupancy ratio value in the set of ratio values, and use the color corresponding to the occupancy ratio value as the foreground color of the game image.

[0116] The beneficial effect of this embodiment is that by calculating the foreground occupancy ratio of the HSV value of the foreground, determining the occupancy ratio value closest to the foreground occupancy ratio value in the set of ratios, and using the color corresponding to the occupancy ratio value as the foreground color of the game image, a user-friendly game image binarization processing scheme is realized. When processing game images for game moments, no manual intervention in color calibration is required, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience of game moments.

[0117] Example 8

[0118] Figure 10 This is a flowchart of the eighth embodiment of the game image binarization processing method of the present invention. Based on the above embodiment, the step of determining the ratio closest to the HSV value of the foreground in the ratio set, and performing a binarization operation on the game image according to the color corresponding to the ratio to remove the background in the game image, includes:

[0119] S51. After capturing a new game image in the game state, capture a new target area in the new game image according to the division conditions of the game character and / or the capture conditions of the game view.

[0120] S52. Detect whether the game character and / or game view has changed in the new target area. If no change has occurred, perform a binarization operation on the new game image with the foreground color to remove the background from the new game image.

[0121] Optionally, in this embodiment, when the production requirement for a game moment is generated again, firstly, a pre-captured game image is performed, and then, a new target area is captured according to the above-mentioned division conditions of game characters and / or the capture conditions of the game view.

[0122] Optionally, in this embodiment, it is detected whether the game character and / or game view has changed in the new target area. If it has not changed, it is determined that the game character or game view still has the same foreground color as the previous processing. Therefore, the new game image is directly binarized using the foreground color obtained above to remove the background in the new game image.

[0123] The beneficial effect of this embodiment is that, after capturing a new game image in the game state, a new target area is captured in the new game image according to the division conditions of the game character and / or the capture conditions of the game view; within the new target area, it is detected whether the game character and / or the game view has changed; if not, a binarization operation is performed on the new game image using the foreground color to remove the background from the new game image. This achieves a user-friendly game image binarization processing scheme, eliminating the need for manual color calibration when processing game moments, meeting users' needs for timeliness, flexibility, and accuracy in game moment creation, and enhancing the user experience.

[0124] Example 9

[0125] Based on the above embodiments, the present invention also proposes a game image binarization processing device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the game image binarization processing method as described in any of the above embodiments.

[0126] It should be noted that the above-described device embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the device embodiments, which will not be repeated here.

[0127] Example 10

[0128] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing a game image binarization processing program, which, when executed by a processor, implements the steps of the game image binarization processing method as described in any of the above embodiments.

[0129] It should be noted that the above-described medium embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the medium embodiments, which will not be repeated here.

[0130] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0131] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0133] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for binarizing game images, characterized in that, The method includes: In the game image, a target region that meets the preset processing conditions is identified, and the target region is cropped to obtain a region image; The image matrix of the region image is converted from RGB color space to HSV color space, and the set of ratios corresponding to each color in the HSV color space is determined. Pick the foreground in the game image and obtain the HSV value of the foreground; The ratio closest to the HSV value of the foreground is determined from the set of ratios, and the game image is binarized according to the color corresponding to the ratio to remove the background from the game image. in, Within the value range of 0-255, the H, S, and V values ​​of the region image in the HSV color space are divided into 17 intervals with an interval of 15. Determine the 17 corresponding to the 17 intervals 3 One category; The statistics of each pixel in the region image in the 17 3 Distribution status under each category; The occupancy ratio of each category is determined based on the distribution status, and all the occupancy ratios are used as the ratio set. Calculate the foreground occupancy ratio of the HSV value of the foreground; The occupancy ratio value that is closest to the foreground occupancy ratio value is determined from the set of ratio values, and the color corresponding to the closest occupancy ratio value is taken as the foreground color of the game image.

2. The game image binarization processing method according to claim 1, characterized in that, The step of determining a target region in the game image that meets preset processing conditions and cropping the target region to obtain a region image includes: Obtain the current game state and parse the image content of the game image captured under the game state; The current game features and game progress are determined based on the game state and the image content.

3. The game image binarization processing method according to claim 2, characterized in that, The step of determining a target region in the game image that meets preset processing conditions and cropping the target region to obtain a region image further includes: The preset processing conditions are determined based on the game features and the game process, wherein the preset processing conditions include the division conditions for game characters and the capture conditions for the game view. The target region is cropped from the game image according to the division conditions of the game character and / or the cropping conditions of the game view to obtain the region image.

4. The game image binarization processing method according to claim 3, characterized in that, The step of picking up the foreground in the game image and obtaining the HSV value of the foreground includes: Determine the color picking parameters corresponding to the game features and / or the game progress; The foreground in the game image is picked up using the color picking parameters.

5. The game image binarization processing method according to claim 4, characterized in that, The process involves determining the ratio closest to the HSV value of the foreground in the set of ratios, and performing a binarization operation on the game image based on the color corresponding to the ratio to remove the background from the game image. This is followed by: After capturing a new game image in the game state, a new target area is captured in the new game image according to the division conditions of the game character and / or the capture conditions of the game view; If the game character and / or game view changes within the new target area, and if no change occurs, the new game image is binarized using the foreground color to remove the background from the new game image.

6. A game image binarization processing device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the game image binarization processing method as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a game image binarization processing program, which, when executed by a processor, implements the steps of the game image binarization processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Binarization method, device and equipment for blue target

    CN111523551A

  • Image processing apparatus, image processing system, and image processing method

    CN113450266A