WO2020108018A1 - 游戏场景处理方法、装置、电子设备以及存储介质 - Google Patents

游戏场景处理方法、装置、电子设备以及存储介质 Download PDF

Info

Publication number
WO2020108018A1
WO2020108018A1 PCT/CN2019/106000 CN2019106000W WO2020108018A1 WO 2020108018 A1 WO2020108018 A1 WO 2020108018A1 CN 2019106000 W CN2019106000 W CN 2019106000W WO 2020108018 A1 WO2020108018 A1 WO 2020108018A1
Authority
WO
WIPO (PCT)
Prior art keywords
game
scene
game scene
electronic device
optimization parameters
Prior art date
Application number
PCT/CN2019/106000
Other languages
English (en)
French (fr)
Inventor
杨海
胡杰
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020108018A1 publication Critical patent/WO2020108018A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • the present application relates to the technical field of electronic devices, and more specifically, to a game scene processing method, device, electronic device, and storage medium.
  • the present application proposes a game scene processing method, device, electronic device, and storage medium to solve the above problems.
  • an embodiment of the present application provides a game scene processing method, which is applied to an electronic device.
  • the method includes: when the electronic device displays a game screen, identifying a game scene corresponding to the game screen; based on the Game scene, select target optimization parameters corresponding to the game scene from all optimization parameters; perform display enhancement processing on the game screen based on the target optimization parameters, wherein the display enhancement processing is processed through the target optimization parameters.
  • the image in the game screen improves the picture quality of the game screen.
  • an embodiment of the present application provides a game scene processing apparatus, which is applied to an electronic device, and includes a recognition module for recognizing a game corresponding to the game screen when the electronic device displays a game screen Scene; selection module for selecting target optimization parameters corresponding to the game scene from all optimization parameters based on the game scene; processing module for performing display enhancement processing on the game screen based on the target optimization parameters , Wherein the display enhancement processing processes the image in the game screen through the target optimization parameter to improve the image quality of the game screen.
  • an embodiment of the present application provides an electronic device, including a memory and a processor.
  • the memory is coupled to the processor.
  • the memory stores instructions that are executed when the instructions are executed by the processor.
  • the processor executes the above method.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores program code, and the program code can be called by a processor to execute the above method.
  • FIG. 1 shows a schematic flowchart of video playback provided by an embodiment of the present application
  • FIG. 2 shows a schematic flowchart of a game scene processing method provided by an embodiment of the present application
  • FIG. 3 shows a schematic flowchart of a game scene processing method provided by another embodiment of the present application.
  • step S290 of the game scene processing method shown in FIG. 3 of the present application is a schematic flowchart of step S290 of the game scene processing method shown in FIG. 3 of the present application;
  • FIG. 5 shows a block diagram of a game scene processing apparatus provided by an embodiment of the present application
  • FIG. 6 shows a block diagram of an electronic device for performing a game scene processing method according to an embodiment of the present application
  • FIG. 7 shows a storage unit for storing or carrying program code for implementing a game scene processing method according to an embodiment of the present application.
  • FIG. 1 shows a video playback process.
  • the next job is to analyze the audio and video data.
  • General video files are composed of video stream and audio stream. Different video formats have different audio and video packaging formats.
  • the process of synthesizing audio and video streams into files is called muxer, while the process of separating audio and video streams from media files is called demuxer.
  • muxer the process of synthesizing audio and video streams into files
  • demuxer the process of separating audio and video streams from media files.
  • the decoded video frame can be directly rendered, and the audio frame can be sent to the buffer of the audio output device for playback.
  • video rendering The timestamp of the audio playback needs to be synchronized.
  • video decoding may include hard decoding and soft decoding.
  • hardware decoding a part of the video data that is originally handed over to the Central Processing Unit (CPU) for processing is handed over to the graphics processor (Graphics Processing Unit, GPU) To do it, and the parallel computing capability of the GPU is much higher than that of the CPU, which can greatly reduce the load on the CPU. After the CPU occupancy rate is low, you can run some other programs at the same time.
  • the processor such as i52320, or any quad-core processor of AMD, it can perform both hard decoding and soft decoding.
  • the multimedia framework obtains the video file to be played by the client through the API interface with the client, and hands it to the video codec (Video Decode), where the Media Framework is in the Android
  • the multimedia framework, MediaPlayer, MediaPlayerService and Stagefrightplayer constitute the basic framework of Android multimedia.
  • the multimedia framework part adopts the C/S structure.
  • MediaPlayer serves as the client terminal of the C/S structure.
  • MediaPlayerService and Stagefrightplayer serve as the server terminal of the C/S structure. They assume the responsibility of playing multimedia files.
  • Video Decode is a super decoder that integrates the most commonly used audio and video decoding and playback to decode video data.
  • soft decoding that is, let the CPU decode the video through software.
  • Hard decoding means that the video decoding task can be completed independently through a dedicated daughter card device without resorting to the CPU.
  • the decoded video data will be sent to the layer transfer module (SurfaceFlinger), and SurfaceFlinger will render and synthesize the decoded video data on the display screen.
  • SurfaceFlinger is an independent Service, which receives all Window’s Surface as input, calculates the position of each Surface in the final composite image according to ZOrder, transparency, size, position and other parameters, and then hands it to HWComposer or OpenGL to generate the final The display buffer is then displayed on a specific display device.
  • the CPU decodes the video data to SurfaceFlinger for rendering and synthesis
  • hard decoding is decoded by the GPU and then rendered and synthesized by SurfaceFlinger.
  • the SurfaceFlinger will call the GPU to render and synthesize the image and display it on the display.
  • the current electronic devices process video data in a fixed manner. For example, when the electronic device runs a game application, the electronic device performs display enhancement processing on all game screens in the game application, or does not display it. Enhanced processing, and when the electronic device performs display enhancement processing on the game screen, the display enhancement processing is performed in the same way, and the display enhancement processing that is suitable for different game scenes will not be selected for display enhancement processing, therefore, causing display The picture quality of the game screen obtained after the enhancement process is not good.
  • the inventor discovered after long-term research and proposed the game scene processing method, device, electronic device, and storage medium provided in the embodiments of the present application. According to different game scenes, different optimization parameters are determined to pass the game scene The corresponding optimization parameters perform display enhancement processing on the game screen to improve the display effect of the game screen.
  • the specific game scene processing method will be described in detail in subsequent embodiments.
  • FIG. 2 shows a schematic flowchart of a game scene processing method provided by an embodiment of the present application.
  • the game scene processing method is used to determine different optimization parameters according to different game scenes, so as to perform display enhancement processing on the game screen through the optimization parameters corresponding to the game scene, and improve the display effect of the game screen.
  • the game scene processing method is applied to the game scene processing apparatus 200 shown in FIG. 5 and the electronic device 100 configured with the game scene processing apparatus 200 (FIG. 6 ).
  • the following will take the electronic device as an example to describe the specific process of this embodiment.
  • the electronic device applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, a vehicle-mounted device, a gateway, etc. There is no specific limit.
  • the process shown in FIG. 2 will be described in detail below.
  • the game scene processing method may specifically include the following steps:
  • Step S110 When the electronic device displays a game screen, identify a game scene corresponding to the game screen.
  • the electronic device may run a game resource file, where the game resource file may be a local resource file or a network resource file, which is not limited herein, and when the game resource file is local
  • the game corresponding to the game resource file may be a stand-alone game; when the game resource file is a network resource file, the game corresponding to the game resource file may be a web game.
  • the game resource file is a local resource file
  • the game resource file may be downloaded from the server by the electronic device in advance and stored locally, and when the game resource file is run, the electronic device may directly read from the local And run, for example, can be directly obtained from the memory of the electronic device and run.
  • the game resource file is a network resource file
  • the game resource file can be obtained and run online by the electronic device from the server, where the electronic device can obtain the game resource file online from the server through the wireless network
  • the game resource file can also be obtained online from the server through the data network, which is not limited herein, where the data network may include a 2G network, a 3G network, a 4G network, or a 5G network.
  • the electronic device may be installed with a game application, and the application icon corresponding to the game application is displayed on the desktop of the electronic device.
  • the electronic device runs the game application in response, and obtains game resource files from the server through the network; as another way, the electronic device can be installed with a browser, and based on the user's operation through the browser's webpage Enter the game interface, and obtain the game resource file from the server under the game interface.
  • the operation mode of the game resource file of the electronic device may include running in front of the electronic device, running in the background of the electronic device, and switching between the foreground and background of the electronic device, which is not specifically limited herein.
  • the game resource file running in the foreground of the electronic device refers to the game resource file that can usually interact with the user and can be displayed in the foreground, and it will be suspended when it is not visible; the game resource file running in the background of the electronic device is The interaction with the user is very limited. Except during the configuration period, the rest of the lifetime is hidden; the game resource file is switched between the foreground and background of the electronic device, which refers to the game resource file that can be randomly switched between the foreground and background.
  • the game resource file runs in the foreground of the electronic device.
  • the display interface of the electronic device may display the game screen corresponding to the game resource file. Further, the electronic device detects whether a game screen is displayed on its display interface, When the detection result indicates that a game screen is displayed, the electronic device recognizes the game scene corresponding to the game screen in response. As a way, the electronic device can recognize the game screen by means of image recognition, which will not be repeated here.
  • the game scenes may include game login scenes, game loading scenes, game store scenes, and game battle scenes, which are not limited herein.
  • each game scene corresponds to a different game scene ID, that is to say, the game scene ID has a unique correspondence with the game scene, therefore, in this embodiment, the game when the electronic device displays the game screen can be obtained Scene ID, and obtain the game scene corresponding to the game screen through the game scene ID.
  • Step S120 Based on the game scene, select target optimization parameters corresponding to the game scene from all optimization parameters.
  • the electronic device may store multiple game scenes and multiple optimization parameters, and store the correspondence between multiple game scenes and multiple optimization parameters, where the correspondence may include a game scene correspondence
  • One or more optimization parameters may also include one optimization parameter corresponding to one or more game scenes, which is not limited herein.
  • the correspondence between the game scene and the optimization parameters can be preset by the user and stored in the electronic device, can be automatically set by the electronic device and stored in advance, or can be sent to the electronic device after the server is preset. This is not limited.
  • the optimization effect of each optimization parameter in the plurality of optimization parameters on the game scene may be different, that is to say, each optimization parameter in the plurality of optimization parameters on the same game scene After processing, the display enhancement effect achieved can be different.
  • optimization parameters can include exposure enhancement, denoising, edge sharpening, contrast increase and saturation increase, etc.
  • target optimization parameters can include exposure enhancement, denoising, edge sharpening, contrast increase and saturation increase
  • the target optimization parameter is exposure enhancement
  • the target optimization parameter is denoising
  • the target optimization parameter includes exposure enhancement and denoising
  • the target optimization parameter includes exposure enhancement, denoising, Sharpen edges, increase contrast, and increase saturation.
  • the game screen corresponding to the game scene displayed by the electronic device is the decoded image content.
  • the decoded image content is RGBA format data
  • the RGBA format data needs to be converted to the HSV format Specifically, the histogram of the image content is obtained, and the histogram is counted to obtain the parameter for converting the RGBA format data to the HSV format, and then converting the RGBA format data to the HSV format according to the parameter.
  • the exposure enhancement is used to increase the brightness of the image.
  • the histogram of the image can be used to increase the brightness value of the area where the brightness value is passed.
  • the brightness of the image can be increased by nonlinear superposition.
  • T and I are images with values of [0,1]. The algorithm can iterate multiple times if the effect is not good.
  • denoising the image content is used to remove the noise of the image.
  • the image is often degraded due to the interference and influence of various noises during the generation and transmission of the image, which has a subsequent effect on the processing of the image and image vision. Will have an adverse effect.
  • noise such as: electrical noise, mechanical noise, channel noise and other noise. Therefore, in order to suppress noise, improve image quality, and facilitate higher-level processing, it is necessary to perform denoising preprocessing on the image. From the perspective of the probability distribution of noise, it can be divided into Gaussian noise, Rayleigh noise, gamma noise, exponential noise and uniform noise.
  • the image can be denoised by a Gaussian filter, where the Gaussian filter is a linear filter that can effectively suppress noise and smooth the image. Its operating principle is similar to the average filter, and the average value of the pixels in the filter window is taken as the output.
  • the coefficient of the window template is different from the mean filter.
  • the template coefficient of the mean filter is the same as 1.
  • the template coefficient of the Gaussian filter decreases as the distance from the center of the template increases. Therefore, the Gaussian filter is less blurry than the mean filter.
  • a 5 ⁇ 5 Gaussian filter window is generated, and the center position of the template is used as the coordinate origin for sampling. Bring the coordinates of each position of the template into the Gaussian function, and the value obtained is the coefficient of the template. Then convolving the Gaussian filter window with the image can denoise the image.
  • the edge sharpening is used to make the blurred image clearer.
  • image sharpening There are generally two methods for image sharpening: one is the differential method, and the other is the high-pass filtering method.
  • contrast stretching is a method of image enhancement, and also belongs to the grayscale conversion operation. Through grayscale transformation, the grayscale value is stretched to the entire range of 0-255, then its contrast is obviously greatly enhanced. You can use the following formula to map the gray value of a pixel to a larger gray space:
  • I(x,y) [(I(x,y)-Imin)/(Imax-Imin)](MAX-MIN)+MIN;
  • Imin and Imax are the minimum and maximum grayscale values of the original image
  • MIN and MAX are the minimum and maximum grayscale values of the grayscale space to be stretched.
  • the optimization parameter corresponding to the game scene can be selected from all optimization parameters based on the correspondence between the game scene and the optimization parameter, and the As the target optimization parameter, it can be understood that the target optimization parameter may include one optimization parameter or multiple optimization parameters, which is not limited herein.
  • the exposure enhancement can be selected as the target optimization parameter, and the display effect of the game login scene can be improved to a lesser degree, so as to improve the display effect of the game screen without causing electronic devices Excessive power consumption.
  • Step S130 Perform display enhancement processing on the game screen based on the target optimization parameter, wherein the display enhancement processing processes the image in the game screen through the target optimization parameter to improve the picture quality of the game screen.
  • display enhancement processing is performed on the game screen corresponding to the game scene based on the target optimization parameter, where the display enhancement processing uses the determined target optimization parameter to
  • the image is processed to improve the picture quality of the game screen, and the game screen is displayed and enhanced through optimization parameters adapted to the game scene of the game screen, while improving the display effect of the game screen, without causing the power of the electronic device Excessive consumption.
  • the image quality includes sharpness, sharpness, lens distortion, color, resolution, color gamut range, purity, etc., and its different combinations can have different display enhancement effects.
  • the display enhancement processing of the game screen can also be understood as a series of operations performed before the formal processing of the game screen, including image enhancement and image restoration, etc.
  • the image enhancement is to the original image by certain means Add some information or transform data, selectively highlight the features of interest in the image or suppress some unwanted features in the image, match the image with the target optimization parameters, thereby improving the image quality and enhancing the visual effect.
  • the corresponding target optimization parameters may include exposure enhancement, denoising, edge sharpening, contrast increase, and saturation increase, in which case the game scene may be corresponded to
  • the game screen is enhanced in exposure, denoising, edge sharpening, contrast and saturation to increase the display effect of the game screen in the game battle scene; for example, when the game scene is a game login scene, then
  • the corresponding target optimization parameter may include exposure enhancement.
  • the exposure of the game screen corresponding to the game scene may be enhanced to improve the display effect of the game screen of the game login scene.
  • the game picture quality obtained by performing the display enhancement processing on the game screen corresponding to the game battle scene and the display game scene corresponding to the game login scene are enhanced.
  • the processed game picture quality is different, and the game picture quality corresponding to the game battle scene is superior to the game picture quality corresponding to the game login scene.
  • a game scene processing method when an electronic device displays a game screen, the game scene corresponding to the game screen is identified, and based on the game scene, target optimization parameters corresponding to the game scene are selected from all optimization parameters, Perform display enhancement processing on the game screen based on the target optimization parameter, wherein the display enhancement processing processes the image in the game screen through the target optimization parameter to improve the picture quality of the game screen, thereby determining different optimization parameters according to different game scenes to pass
  • the optimization parameters corresponding to the game scene perform display enhancement processing on the game screen to improve the display effect of the game screen.
  • FIG. 3 is a schematic flowchart of a game scene processing method according to another embodiment of the present application. The following describes the process shown in FIG. 3 in detail.
  • the method may specifically include the following steps:
  • Step S210 When the electronic device displays a game screen, identify a game scene corresponding to the game screen.
  • step S210 For the specific description of step S210, please refer to step S110, which will not be repeated here.
  • Step S220 determine whether the game scene satisfies the specified scene.
  • the electronic device is provided with a designated scene, which is used as a basis for judging the game scene.
  • the specified scene may be stored locally by the electronic device in advance, or may be set during judgment, which is not limited herein.
  • the designated scene may be automatically configured by the electronic device, may be manually set by the user, or may be transmitted to the electronic device after the server is configured, which is not limited herein.
  • the specified scene may include a game battle scene and a game login scene. Therefore, after acquiring the game scene corresponding to the game screen displayed on the electronic device, the game scene is compared with the specified scene, for example, The game scene is compared with the game battle scene and the game login scene to determine whether the game scene meets the specified scene.
  • Step S230 When the game scene satisfies the specified scene, based on the game scene, the target optimization parameter corresponding to the game scene is selected from all the optimization parameters.
  • the target optimization parameter corresponding to the game scene may be selected from all optimization parameters based on the game scene .
  • a target display enhancement mode corresponding to the game scene may be determined from multiple display enhancement modes to perform display enhancement processing on the game screen corresponding to the game scene through the target display enhancement mode, wherein the target enhancement The mode includes at least the target optimization parameter, and each of the multiple display enhancement modes has a different image quality for the game screen obtained by processing the game screen.
  • the target display enhancement mode includes a first target display enhancement mode and a second target display enhancement mode
  • the first target display enhancement mode at least includes exposure enhancement, denoising, edge sharpening, contrast increase, and saturation increase Target optimization parameters
  • the second target display enhancement mode includes at least the target optimization parameters consisting of exposure enhancement and denoising, then, it is understandable that the game image quality obtained by processing the game screen through the first target display enhancement mode is excellent The game image quality obtained by processing the game screen through the second target display enhancement mode.
  • the electronic device may store multiple display enhancement modes and multiple game scenes, and store the correspondence between the multiple display enhancement modes and multiple game scenes, where the correspondence
  • the relationship may include one display enhancement mode corresponding to one or more game scenes, or a game scene corresponding to one or more display enhancement modes, which is not limited herein.
  • the correspondence between the display enhancement mode and the game scene can be preset by the user and stored in the electronic device, can be automatically set by the electronic device and stored in advance, or can be sent to the electronic device after the server is preset. No limitation here.
  • each of the multiple display enhancement modes processes a game picture corresponding to a game scene corresponding to a game scene with different picture quality, that is to say, through the multiple display enhancement modes
  • Each display enhancement mode processes the game screen corresponding to the same game scene, and achieves different display enhancement effects.
  • the optimization parameters used by each display enhancement mode are different, the number of optimization parameters is different, and the optimization parameters are optimized. Different methods can achieve different optimization effects on the game screen corresponding to the same game scene.
  • the electronic device may create a mapping relationship table, and the mapping relationship table may include correspondence between multiple display enhancement modes and multiple game scenes.
  • the mapping relationship table may be as shown in Table 1. Wherein, the display enhancement mode is denoted by A, and the game scene is denoted by B, then, through the mapping relationship table, the electronic device can correspondingly set the correspondence between the display enhancement mode and the game scene and store it locally in the electronic device.
  • the game scene corresponding to the game scene corresponding to the game screen may be searched from the mapping relationship table, and then based on the mapping relationship table
  • the corresponding relationship between the display enhancement mode and the game scene may be searched for the display enhancement mode corresponding to the game scene corresponding to the game screen, and the display enhancement mode may be determined as the target display enhancement mode.
  • the electronic device may search for a game scene that is consistent with the game battle scene, and if B1 is found to be a game battle scene, the game scene B1 may be further determined based on the mapping relationship table. If the display enhancement mode is A1, then it can be determined that the display enhancement mode corresponding to the game battle scene is A1, and the display enhancement mode A1 may include exposure enhancement, noise reduction, edge sharpening, contrast increase, and saturation increase in the optimization parameters .
  • Step S240 Detect the current load rate of the image processor of the electronic device.
  • the display enhancement processing will occupy more graphics processor (Graphics Processing Unit, GPU) resources, if the current load rate of the image processor is high, it means that the current load of the image processor is too large and the rest time is too long Short, if the current load rate of the image processor is high, the display enhancement processing of the game screen in the game scene may cause a problem of flashing screen or stuck. Therefore, in this embodiment, it can be The current load rate of the image processor is detected to determine whether the display screen enhancement process of the game screen when the image processor is at the current load rate will cause a problem of flashing and freezing of the electronic device.
  • graphics processor Graphics Processing Unit
  • Step S250 determine whether the current load rate is lower than the load rate threshold.
  • the electronic device is provided with a load rate threshold, which is used as a basis for determining the current load rate.
  • the load factor threshold may be stored locally by the electronic device in advance, or may be set during judgment, which is not limited herein.
  • the specified condition may be automatically configured by the electronic device, may be manually set by the user, or may be transmitted to the electronic device after configuration by the server, which is not limited herein. Further, after acquiring the current load rate of the image processor, the current load rate is compared with the load rate threshold to determine whether the current load rate is lower than the load rate threshold.
  • Step S260 When the current load rate is lower than the load rate threshold, display enhancement processing is performed on the game screen based on the target optimization parameter, where the display enhancement processing processes the target optimization parameter The image in the game screen improves the picture quality of the game screen.
  • the electronic device can respond to The game screen in the game scene is subjected to display enhancement processing.
  • Step S270 When the game scene does not satisfy the specified scene, obtain the number of times the electronic device loads the game scene within a specified time period.
  • the operating frequency of the processor of the electronic device can be reduced to reduce the power consumption of the electronic device when it is determined that display enhancement processing is not required on the game screen.
  • the electronic device may be detected in the specified The number of times to load the game store scene in the time period.
  • the specified time period may be stored locally by the electronic device in advance, or may be set during detection, which is not limited herein.
  • the specified time period may be automatically configured by the electronic device, may be manually set by the user, or may be transmitted to the electronic device after the server configuration is completed, which is not limited herein.
  • the specified time period may be one month before the current time, one week before the current time, one day before the current time, etc., which is not limited herein.
  • Step S280 Determine whether the number of times is greater than a threshold of times.
  • the electronic device is provided with a threshold number of times, which is used as a basis for determining the number of times the electronic device loads the game scene within a specified time period.
  • the threshold of the number of times may be stored locally by the electronic device in advance, or may be set at the time of judgment, which is not limited herein.
  • the threshold of the number of times may be automatically configured by the electronic device, may be manually set by the user, or may be transmitted to the electronic device after configuration by the server, which is not limited herein. Further, after obtaining the number of times that the electronic device loads the game scene within a specified time period, the number of times is compared with the number of times threshold to determine whether the number of times is greater than the number of times threshold.
  • Step S290 When the number of times is greater than the number of times threshold, select a part of the optimization parameters from all the optimization parameters as the target optimization parameters.
  • the game screen corresponding to the game scene can be displayed and enhanced to improve the user experience, specifically, from all optimization parameters Select some optimization parameters as the target optimization parameters, and perform display enhancement processing on the game screen corresponding to the game scene; when the number of times is not greater than the number of times threshold, it means that the user does not often use the game scene, and the game scene does not have high display requirements, so , The game screen corresponding to the game scene may not be subjected to display enhancement processing to reduce the power consumption of the electronic device.
  • FIG. 4 shows a schematic flowchart of step S290 of the game scene processing method shown in FIG. 3 of the present application.
  • the following describes the process shown in FIG. 4 in detail.
  • the method may specifically include the following steps:
  • Step S291 When the number of times is greater than the number of times threshold, output all the optimization parameters.
  • the electronic device when the judgment result indicates that the number of times that the electronic device loads the game scene within a specified time period is greater than the threshold number of times, the electronic device outputs all optimization parameters, such as output exposure enhancement, denoising, and edge sharpening , Contrast increase and saturation increase.
  • the electronic device can output all the optimization parameters in the form of voice, output all the optimization parameters in the display mode, or output all the optimization parameters by sending to other electronic methods, which is not limited herein.
  • Step S292 Receive a selection operation triggered by the user based on all the optimization parameters.
  • the electronic device detects the selection operation acting on all the optimization parameters, and receives the selection operation when it detects the selection operation triggered by the user.
  • the selection operation may include a touch operation acting on the electronic device and/or inputting voice information of the electronic device, which is not limited herein.
  • the touch operation may include at least a single-finger click, a multi-finger click, a single-finger long press, a multi-finger long press, a heavy press, multiple clicks, a sliding operation, and the like.
  • Step S293 Based on the selection operation, a part of the optimization parameters is selected from the all optimization parameters as the target optimization parameter.
  • a part of the optimization parameters can be selected as the target optimization parameters from all the optimization parameters, and the game screen in the game scene can be displayed and enhanced through the target optimization parameters.
  • the user-initiated selection operation characterizes the selection of exposure enhancement and denoising as the target optimization parameters from exposure enhancement, denoising, edge sharpening, contrast increase, and saturation increase, you can optimize the picture in the game scene Perform exposure enhancement and denoising to achieve the effect of enhancing the display of the game screen.
  • a game scene processing method when an electronic device displays a game screen, the game scene corresponding to the game screen is identified to determine whether the game scene satisfies the specified scene, and when the game scene satisfies the specified scene, based on the The game scene selects target optimization parameters corresponding to the game scene from all optimization parameters, detects the current load rate of the image processor of the electronic device, and determines whether the current load rate is lower than the load rate threshold, and when the load rate is lower than the load At the rate threshold, display enhancement processing is performed on the game screen based on the target optimization parameter.
  • the number of times the electronic device loads the game scene within the specified time period is acquired to determine whether the number is greater than the number of times threshold.
  • select some optimization parameters from all optimization parameters as the target optimization parameters and perform display enhancement processing on the game screen based on the target optimization parameters.
  • this embodiment also judges the load rate of the electronic device, and when the load rate is lower than the load rate threshold, performs display enhancement processing on the game screen to reduce the electronic device Stuck probability; in addition, this embodiment also judges whether the game scene meets the specified scene, and when the game scene does not meet the specified scene, then judges according to the number of times the game scene is loaded, and when the number of times of loading is greater than the threshold Perform display enhancement processing on the game screen to improve the display effect of the user's preferred game screen and enhance the user experience.
  • FIG. 5 shows a block diagram of a game scene processing apparatus 200 provided by an embodiment of the present application.
  • the game scene processing apparatus 200 is applied to the above-mentioned electronic device. The following will describe the block diagram shown in FIG. 5.
  • the game scene processing apparatus 200 includes: an identification module 210, a selection module 220, and a processing module 230, in which:
  • the identification module 210 is configured to identify the game scene corresponding to the game screen when the electronic device displays the game screen.
  • the selection module 220 is configured to select target optimization parameters corresponding to the game scene from all optimization parameters based on the game scene. Further, the selection module 230 includes: a scene determination submodule, a first selection submodule, a working frequency reduction submodule, a frequency acquisition submodule, a frequency determination submodule, a second selection submodule, and a determination submodule, wherein:
  • the scene judgment sub-module is used to judge whether the game scene satisfies the specified scene.
  • the first selection submodule is configured to select the target optimization parameter corresponding to the game scene from all the optimization parameters based on the game scene when the game scene satisfies the specified scene.
  • the working frequency reduction sub-module is used to reduce the working frequency of the processor of the electronic device when the game scene does not satisfy the specified scene.
  • the frequency acquisition sub-module is used for acquiring the number of times that the electronic device loads the game scene within a specified time period when the game scene does not satisfy the specified scene.
  • the times judgment sub-module is used to judge whether the times is greater than the times threshold.
  • the second selection submodule is configured to select a part of the optimization parameters from all the optimization parameters as the target optimization parameter when the number of times is greater than the threshold of the number of times. Further, the second selection sub-module includes: an optimization parameter output unit, a selection operation receiving unit, and a selection unit, wherein:
  • the optimization parameter output unit is configured to output all optimization parameters when the number of times is greater than the number of times threshold.
  • the selection operation receiving unit is configured to receive the selection operation triggered by the user based on all the optimization parameters.
  • the selection unit is configured to select a part of the optimization parameters from the all optimization parameters as the target optimization parameter based on the selection operation.
  • a determination submodule configured to determine a target display enhancement mode corresponding to the game scene from multiple display enhancement modes, wherein the target display enhancement mode includes the target optimization parameter, and among the multiple display enhancement modes Each display enhancement mode processes the game picture quality differently from the game picture.
  • the processing module 230 is configured to perform display enhancement processing on the game screen based on the target optimization parameter, wherein the display enhancement processing processes the image in the game screen through the target optimization parameter to improve the picture of the game screen quality. Further, the processing module 230 includes: a load rate detection sub-module, a load rate judgment sub-module, and a processing sub-module, wherein:
  • the load rate detection sub-module is used to detect the current load rate of the image processor of the electronic device.
  • the load rate determination sub-module is used to determine whether the current load rate is lower than a load rate threshold.
  • the processing submodule is configured to perform display enhancement processing on the game screen based on the target optimization parameter when the current load rate is lower than the load rate threshold.
  • the coupling between the modules may be electrical, mechanical, or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above integrated modules may be implemented in the form of hardware or software function modules.
  • FIG. 6 shows a structural block diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may be an electronic device capable of running an application program such as a smart phone, a tablet computer, an e-book.
  • the electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a screen 130, a codec 140, and one or more application programs, where one or more application programs may be stored in the memory In 120 and configured to be executed by one or more processors 110, one or more programs are configured to perform the method as described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 connects various parts of the entire electronic device 100 by using various interfaces and lines, executes or executes instructions, programs, code sets or instruction sets stored in the memory 120, and calls data stored in the memory 120 to execute Various functions and processing data of the electronic device 100.
  • the processor 110 may use at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA programmable logic array
  • the processor 110 may integrate one or a combination of one of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modem.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • modem modem
  • CPU mainly deals with operating system, user interface and application program, etc.
  • GPU is used for rendering and rendering of display content
  • modem is used for handling wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, and may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets.
  • the memory 120 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , Instructions for implementing the following method embodiments.
  • the storage data area may also store data created by the terminal 100 in use (such as a phone book, audio and video data, and chat history data).
  • the codec 140 can be used to encode or decode video data, and then transmit the decoded video data to the screen 130 for display, where the codec 140 can be a GPU, a dedicated DSP, FPGA, or ASIG chip Wait.
  • FIG. 7 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer readable medium 300 stores program codes, and the program codes can be called by a processor to execute the method described in the above method embodiments.
  • the computer-readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 300 has a storage space for the program code 310 that performs any of the method steps described above. These program codes can be read from or written into one or more computer program products.
  • the program code 310 may be compressed in an appropriate form, for example.
  • the game scene processing method, device, electronic device, and storage medium provided by the embodiments of the present application, when the electronic device displays the game screen, identify the game scene corresponding to the game screen, based on the game scene, from all optimization parameters A target optimization parameter corresponding to the game scene is selected, and display enhancement processing is performed on the game screen based on the target optimization parameter, wherein the display enhancement processing processes the image in the game screen through the target optimization parameter to improve the picture quality of the game screen.
  • the game scene processing method, device, electronic device, and storage medium provided in the embodiments of the present application determine different optimization parameters according to different game scenes, so as to perform display enhancement processing on the game screen through the optimization parameters corresponding to the game scene to improve the game screen display effect.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种游戏场景处理方法、装置、电子设备以及存储介质,涉及电子设备技术领域。该方法应用于电子设备,所述方法包括:当电子设备显示游戏画面时,识别该游戏画面对应的游戏场景,基于游戏场景,从所有优化参数中选取与该游戏场景对应的目标优化参数,基于该目标优化参数对游戏画面进行显示增强处理,其中,该显示增强处理通过目标优化参数处理游戏画面中的图像提高游戏画面的画质。

Description

游戏场景处理方法、装置、电子设备以及存储介质
相关申请的交叉引用
本申请要求于2018年11月27日提交的申请号为CN201811428414.9的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及电子设备技术领域,更具体地,涉及一种游戏场景处理方法、装置、电子设备以及存储介质。
背景技术
随着科学技术的发展,电子设备已经成为人们日常生活中最常用的电子产品之一。并且,用户经常会通过电子设备玩游戏等,而用户在玩游戏时电子设备可以对游戏画面进行处理以提升游戏画面的显示效果。
发明内容
鉴于上述问题,本申请提出了一种游戏场景处理方法、装置、电子设备以及存储介质,以解决上述问题。
第一方面,本申请实施例提供了一种游戏场景处理方法,应用于电子设备,所述方法包括:当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景;基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数;基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。
第二方面,本申请实施例提供了一种游戏场景处理装置,应用于电子设备,所述装置包括:识别模块,用于当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景;选取模块,用于基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数;处理模块,用于基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。
第三方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1示出了本申请实施例提供的视频播放的流程示意图;
图2示出了本申请一个实施例提供的游戏场景处理方法的流程示意图;
图3示出了本申请又一个实施例提供的游戏场景处理方法的流程示意图;
图4示出了本申请的图3所示的游戏场景处理方法的步骤S290的流程示意图;
图5示出了本申请实施例提供的游戏场景处理装置的模块框图;
图6示出了本申请实施例用于执行根据本申请实施例的游戏场景处理方法的电子设备的框图;
图7示出了本申请实施例的用于保存或者携带实现根据本申请实施例的游戏场景处理方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
请参阅图1,图1示出了视频播放的流程。具体地,操作系统在获取到待播放的数据的时候,接下来的工作就是解析音视频数据。一般的视频文件都由视频流和音频流两部分组成,不同的视频格式音视频的封装格式不一样。将音频流和视频流合成文件的过程称为muxer,反之从媒体文件中分离音频流和视频流的过程称为demuxer。播放视频文件就需要从文件流中分离出音频流和视频流,分别对其进行解码,解码后的视频帧可以直接渲染,音频帧可以送到音频输出设备的缓冲区进行播放,当然,视频渲染和音频播放的时间戳需要控制同步。
具体地,视频解码可以包括硬解码和软解码,硬件解码是将原来全部交由中央处理器(Central Processing Unit,CPU)来处理的视频数据的一部分交由图形处理器(Graphics Processing Unit,GPU)来做,而GPU的并行运算能力要远远高于CPU,这样可以大大的降低对CPU的负载,CPU的占用率较低了之后就可以同时运行一些其他的程序了,当然,对于较好的处理器来说,比如i52320,或者AMD任何一款四核心处理器来说,既可以进行硬解码,也可以进行软解码。
具体地,如图1所示,多媒体框架(Media Framework)通过与客户端的API接口获取客户端待播放的视频文件,并交由视频编解码器(Video Decode),其中,Media Framework为Android系统中多媒体框架,MediaPlayer、MediaPlayerService和Stagefrightplayer三个部分构成了Android多媒体的基本框架。多媒体框架部分采用了C/S的结构,MediaPlayer作为C/S结构的Client端,MediaPlayerService和Stagefrightplayer作为C/S结构Server端,承担着播放多媒体文件的责任,通过Stagefrightplayer,Server端完成Client端的请求并作出响应。Video Decode是一款集成了最常用的音频和视频解码与播放的超级解码器,用于将视频数据解码。
其中,软解码,即通过软件让CPU来对视频进行解码处理。而硬解码, 指不借助于CPU,而通过专用的子卡设备来独立完成视频解码任务。
不论是硬解码还是软解码,在将视频数据解码之后,会将解码后的视频数据发送至图层传递模块(SurfaceFlinger),由SurfaceFlinger将解码后的视频数据渲染和合成之后,在显示屏上显示。其中,SurfaceFlinger是一个独立的Service,它接收所有Window的Surface作为输入,根据ZOrder、透明度、大小、位置等参数,计算出每个Surface在最终合成图像中的位置,然后交由HWComposer或OpenGL生成最终的显示Buffer,然后显示到特定的显示设备上。
如图1所示,软解码中,CPU将视频数据解码之后交给SurfaceFlinger渲染和合成,而硬解码由GPU解码之后,交由SurfaceFlinger渲染和合成。而SurfaceFlinger会调用GPU实现图像的渲染和合成,并在显示屏上显示。
其中,目前的电子设备对视频数据的处理方式固定,例如,在电子设备运行有游戏类应用程序时,电子设备对游戏类应用程序内的所有游戏画面均进行显示增强处理,或者均不进行显示增强处理,并且,电子设备在对游戏画面进行显示增强处理时,进行显示增强处理的方式相同,不会针对不同的游戏场景选择与之适配的显示增强方式进行显示增强处理,因此,造成显示增强处理后得到的游戏画面的画质不佳。针对上述问题,发明人经过长期的研究发现,并提出了本申请实施例提供的游戏场景处理方法、装置、电子设备以及存储介质,根据不同的游戏场景确定不同的优化参数,以通过与游戏场景对应的优化参数对游戏画面进行显示增强处理,提升游戏画面的显示效果。其中,具体的游戏场景处理方法在后续的实施例中进行详细的说明。
实施例
请参阅图2,图2示出了本申请一个实施例提供的游戏场景处理方法的流程示意图。所述游戏场景处理方法用于根据不同的游戏场景确定不同的优化参数,以通过与游戏场景对应的优化参数对游戏画面进行显示增强处理,提升游戏画面的显示效果。在具体的实施例中,所述游戏场景处理方法应用于如图5所示的游戏场景处理装置200以及配置有所述游戏场景处理装置200的电子设备100(图6)。下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以为智能手机、平板电脑、穿戴式电子设备、车载设备、网关等,在此不做具体的限定。下面将针对图2所示的流程进行详细的阐述,所述游戏场景处理方法具体可以包括以下步骤:
步骤S110:当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景。
在本实施例中,电子设备可以运行有游戏资源文件,其中,该游戏资源文件可以为本地资源文件,也可以为网络资源文件,在此不做限定,其中,当所述游戏资源文件为本地资源文件时,所述游戏资源文件所对应的游戏可以为单机游戏;当所述游戏资源文件为网络资源文件时,所述游戏资源文件所对应的游戏可以为网页游戏。具体地,若所述游戏资源文件为本地资源文件,那么,该游戏资源文件可以由电子设备预先从服务器下载并存储在本地,在运行所述 游戏资源文件时,电子设备可以直接从本地读取并运行,例如,可以直接从电子设备的内存的获取并运行。作为另一种方式,若所述游戏资源文件为网络资源文件,那么,该游戏资源文件可以由电子设备从服务器在线获取并运行,其中,电子设备可以通过无线网络从服务器在线获取游戏资源文件,也可以通过数据网络从服务器在线获取游戏资源文件,在此不做限定,其中,数据网络可以包括2G网络、3G网络、4G网络或5G网络。
另外,当游戏资源文件为网络资源文件时,电子设备可以安装有游戏类应用程序,并在电子设备的桌面显示该游戏类应用程序对应的应用程序图标,当检测到用户针对该应用程序图标的触控操作时,电子设备作为响应运行该游戏类应用程序,并通过网络从服务器获取游戏资源文件;作为另一种方式,电子设备可以安装有浏览器,并基于用户操作通过该浏览器的网页进入游戏界面,并在该游戏界面下从服务器获取游戏资源文件。
进一步地,电子设备的游戏资源文件的运行方式可以包括在电子设备的前运行、在电子设备的后台运行、以及在电子设备的前台和后台切换运行,在此不做具体的限定。其中,游戏资源文件在电子设备的前台运行是指通常可以和用户进行交互,能在前台显示的游戏资源文件,当它不可见时就会被挂起;游戏资源文件在电子设备的后台运行是指和用户交互非常有限,除了配置期间,其生存期的其他时间都是隐藏的;游戏资源文件在电子设备的前台和后台切换运行是指可以在前台以及后台之间随意切换的游戏资源文件。可选的,在本实施例中,所述游戏资源文件在电子设备的前台运行。
在本实施例中,当电子设备在前台运行游戏资源文件时,电子设备的显示界面可以显示该游戏资源文件对应的游戏画面,进一步地,电子设备对其显示界面是否显示有游戏画面进行检测,当检测结果表征显示有游戏画面时,电子设备作为响应识别该游戏画面对应的游戏场景,作为一种方式,电子设备可以通过图像识别的方式对游戏画面进行识别,在此不再赘述。其中,所述游戏场景可以包括游戏登录场景、游戏加载场景、游戏商店场景以及游戏战斗场景等,在此不做限定。可以理解的,每个游戏场景均对应一个不同的游戏场景ID,也就是说,游戏场景ID和游戏场景有唯一对应性,因此,在本实施例中,可以获取电子设备显示游戏画面时的游戏场景ID,并通过该游戏场景ID获取该游戏画面对应的游戏场景。
步骤S120:基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数。
在本实施例中,电子设备可以存储有多个游戏场景和多个优化参数,以及存储有多个游戏场景和多个优化参数之间的对应关系,其中,该对应关系可以包括一个游戏场景对应一个或多个优化参数,也可以包括一个优化参数对应一个或多个游戏场景,在此不做限定。其中,游戏场景和优化参数之间的对应关系可以由用户预先设定后存储在电子设备、可以由电子设备预先自动设定后存储、也可以由服务器预先设定完成后发送至电子设备,在此不做限定。其中,在本实施例中,所述多个优化参数中的每个优化参数对游戏场景的优化效果可以不同,也就是说,通过所述多个优化参数中的每个优化参数对同一游戏场景 进行处理,所达到的显示增强效果可以不同。
其中,优化参数可以包括曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加等,且目标优化参数可以包括曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加中的一个或多个的组合,例如,该目标优化参数为曝光度增强、该目标优化参数为去噪、该目标优化参数包括曝光度增强和去噪、该目标优化参数包括曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加等。
具体地,电子设备显示的游戏场景对应的游戏画面为经过解码后的图像内容,由于经过解码之后的图像内容为RGBA格式的数据,为了对图像内容优化,需要将RGBA格式的数据转换为HSV格式,具体地,获取图像内容的直方图,对直方图统计从而获取将RGBA格式的数据转换为HSV格式的参数,在根据该参数将RGBA格式的数据转换为HSV格式。
其中,曝光度增强,用于提高图像的亮度,则可以通过图像的直方图,将亮度值交底的区域增加亮度值,另外,也可以是通过非线性叠加,增加图像亮度,具体地,I表示要处理的较暗图像,T表示处理后的比较亮的图像,则曝光度增强的方式为T(x)=I(x)+(1-I(x))*I(x)。其中,T和I都是[0,1]取值的图像。如果一次效果不好算法可以多次迭代。
其中,对图像内容去噪用于去除图像的噪声,具体地,图像在生成和传输过程中常常因受到各种噪声的干扰和影响而是图像降质,这对后续图像的处理和图像视觉效应将产生不利影响。噪声种类很多,比如:电噪声,机械噪声,信道噪声和其他噪声。因此,为了抑制噪声,改善图像质量,便于更高层次的处理,必须对图像进行去噪预处理。从噪声的概率分布情况来看,可分为高斯噪声、瑞利噪声、伽马噪声、指数噪声和均匀噪声。
具体地,可以通过高斯滤波器对图像去噪,其中,高斯滤波器是一种线性滤波器,能够有效的抑制噪声,平滑图像。其作用原理和均值滤波器类似,都是取滤波器窗口内的像素的均值作为输出。其窗口模板的系数和均值滤波器不同,均值滤波器的模板系数都是相同的为1;而高斯滤波器的模板系数,则随着距离模板中心的增大而系数减小。所以,高斯滤波器相比于均值滤波器对图像模糊程度较小。
例如,产生一个5×5的高斯滤波窗口,以模板的中心位置为坐标原点进行取样。将模板各个位置的坐标带入高斯函数,得到的值就是模板的系数。再将该高斯滤波窗口与图像卷积就能够对图像去噪。
其中,边缘锐化用于使模糊的图像变得更加清晰起来。图像锐化一般有两种方法:一种是微分法,另外一种是高通滤波法。
其中,对比度增加用于增强图像的画质,使得图像内的颜色更加鲜明,具体地,对比度拉伸是图像增强的一种方法,也属于灰度变换操作。通过灰度变换,将灰度值拉伸到整个0-255的区间,那么其对比度显然是大幅增强的。可以用如下的公式来将某个像素的灰度值映射到更大的灰度空间:
I(x,y)=[(I(x,y)-Imin)/(Imax-Imin)](MAX-MIN)+MIN;
其中Imin,Imax是原始图像的最小灰度值和最大灰度值,MIN和MAX是 要拉伸到的灰度空间的灰度最小值和最大值。
因此,在本实施例中,在确定电子设备显示的游戏画面对应的游戏场景后,可以基于该游戏场景与优化参数的对应关系从所有优化参数中选取与游戏场景对应的优化参数,并将其作为目标优化参数,可以理解的,目标优化参数可以包括一个优化参数,也可以包括多个优化参数,在此不做限定。例如,当所述游戏场景为游戏战斗场景时,可以选取曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加共同作为目标优化参数,以极大化的提升战斗场景的显示效果;当所述游戏场景为游戏登录场景时,可以选取曝光度增强作为目标优化参数,可以较小程度的提升游戏登录场景的显示效果,以在提升游戏画面的显示效果的基础上,不造成电子设备过多的功耗。
步骤S130:基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。
进一步地,在确定所述游戏场景对应的目标优化参数后,基于该目标优化参数对游戏场景对应的游戏画面进行显示增强处理,其中,该显示增强处理通过确定的目标优化参数对游戏画面中的图像进行处理,提高游戏画面的画质,以通过与该游戏画面的游戏场景适配的优化参数对游戏画面进行显示增强处理,在提升游戏画面的显示效果的同时,不造成电子设备的电量的过多消耗。其中,该画质包括清晰度、锐度、镜头畸变、色彩、解析度、色域范围、纯度等,其不同的组合方式可以有不同的显示增强效果。其中,需要说明的是,对游戏画面的显示增强处理还可以理解为在对游戏画面进行正式处理之前所做的一系列操作,包括图像增强和图像复原等,图像增强是通过一定手段对原图像附加一些信息或者变换数据,有选择地突出图像中感兴趣的特征或者抑制图像中某些不需要的特征,使图像与目标优化参数相匹配,从而改善图像质量,加强视觉效果。
例如,当所述游戏场景为游戏战斗场景时,那么,其对应的目标优化参数可以包括曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加,此时可以对所述游戏场景对应的游戏画面进行曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加,从而提升游戏战斗场景下的游戏画面的显示效果;又例如,当所述游戏场景为游戏登录场景时,那么,其对应的目标优化参数可以包括曝光度增强,此时可以对游戏场景对应的游戏画面进行曝光度增强,以提升游戏登录场景的游戏画面的显示效果。另外,由于游戏战斗场景和游戏登录场景所对应的目标优化参数不同,因此,在对游戏战斗场景对应的游戏画面进行显示增强处理得到的游戏画质和对游戏登录场景对应的游戏画面进行显示增强处理得到的游戏画质不同,且游戏战斗场景对应的游戏画质优于游戏登录场景对应的游戏画质。
本申请一个实施例提供的游戏场景处理方法,当电子设备显示游戏画面时,识别该游戏画面对应的游戏场景,基于该游戏场景,从所有优化参数中选取与该游戏场景对应的目标优化参数,基于该目标优化参数对游戏画面进行 显示增强处理,其中,该显示增强处理通过目标优化参数处理游戏画面中的图像提高游戏画面的画质,从而根据不同的游戏场景确定不同的优化参数,以通过与游戏场景对应的优化参数对游戏画面进行显示增强处理,提升游戏画面的显示效果。
请参阅图3,图3示出了本申请又一个实施例提供的游戏场景处理方法的流程示意图。下面将针对图3所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:
步骤S210:当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景。
其中,步骤S210的具体描述请参阅步骤S110,在此不再赘述。
步骤S220:判断所述游戏场景是否满足指定场景。
作为一种方式,电子设备设置有指定场景,该指定场景用于作为游戏场景的判断依据。其中,可以理解的,该指定场景可以由电子设备预先存储在本地,也可以在判断时再进行设置,在此不做限定。另外,该指定场景可以由电子设备自动配置、可以由用户手动设置、也可以由服务器配置完成后传输至电子设备,在此不做限定。在本实施例中,该指定场景可以包括游戏战斗场景和游戏登录场景,因此,在获取所述电子设备显示的游戏画面对应的游戏场景后,将该游戏场景与指定场景进行比较,例如,将游戏场景和游戏战斗场景以及游戏登录场景进行比较,以判断该游戏场景是否满足指定场景。
步骤S230:当所述游戏场景满足所述指定场景时,基于所述游戏场景,从所述所有优化参数中选取与所述游戏场景对应的所述目标优化参数。
其中,当确定所述游戏场景满足指定场景,例如,当所述游戏场景为游戏战斗场景或游戏登录场景时,可以基于该游戏场景,从所有优化参数中选取与该游戏场景对应的目标优化参数。
作为一种实施方式,可以从多个显示增强方式中确定与该游戏场景对应的目标显示增强方式,以通过该目标显示增强方式对游戏场景对应的游戏画面进行显示增强处理,其中,该目标增强方式至少包括目标优化参数,且多个显示增强方式中的每个显示增强方式对游戏画面处理得到的游戏画面的画质不同。例如,该目标显示增强方式包括第一目标显示增强方式和第二目标显示增强方式,且第一目标显示增强方式至少包括由曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加组成的目标优化参数,第二目标显示增强方式至少包括由曝光度增强和去噪组成的目标优化参数,那么,可以理解的,通过该第一目标显示增强方式对游戏画面处理得到的游戏画质优于通过该第二目标显示增强方式对游戏画面处理得到的游戏画质。
具体地,在本实施例中,所述电子设备可以存储有多个显示增强方式和多个游戏场景,并存储有所述多个显示增强方式和多个游戏场景的对应关系,其中,该对应关系可以包括一个显示增强方式对应一个或多个游戏场景,也可以包括一个游戏场景对应一个或多个显示增强方式,在此不做限定。其中,显示 增强方式和游戏场景之间的对应关系可以由用户预先设定后存储在电子设备、可以由电子设备预先自动设定后存储、也可以由服务器预先设定完成后发送至电子设备,在此不做限定。
其中,在本实施例中,所述多个显示增强方式中的每个显示增强方式对游戏场景对应的游戏画面处理得到的游戏画质不同,也就是说,通过所述多个显示增强方式中的每个显示增强方式对同一游戏场景对应的游戏画面进行处理,所达到的显示增强效果不同,例如,通过每个显示增强方式所采用的优化参数不同、优化参数的数量不同、优化参数的优化方式不同等,可以达到对同一游戏场景对应的游戏画面的优化效果不同。
作为一种方式,所述电子设备可以创建映射关系表,该映射关系表中可以包括多个显示增强方式和多个游戏场景的对应关系,例如,所述映射关系表可以如表1所示,其中,所述显示增强方式用A表示,游戏场景用B表示,那么,通过所述映射关系表,该电子设备可以对应设置显示增强方式和游戏场景的对应关系并存储在电子设备本地。
表1
显示增强方式 游戏场景
A1 B1
A2 B2
A3 B3
A4 B4
进一步地,在本实施例中,在确定所述游戏画面对应的游戏场景后,可以从所述映射关系表中查找与该游戏画面对应的游戏场景一致的游戏场景,然后再基于映射关系表中的显示增强方式和游戏场景的对应关系,可以查找与所述游戏画面对应的游戏场景对应的显示增强方式,将该显示增强方式确定为目标显示增强方式。例如,当所述游戏场景为游戏战斗场景时,电子设备可以查找与游戏战斗场景一致的游戏场景,若查找到B1为游戏战斗场景,可以进一步基于所述映射关系表确定游戏场景B1所对应的显示增强方式为A1,那么,可以确定游戏战斗场景所对应的显示增强方式为A1,且显示增强方式A1可以包括优化参数中的曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加。
步骤S240:检测所述电子设备的图像处理器的当前负载率。
其中,由于显示增强处理会占用较多的图像处理器(Graphics Processing Unit,GPU)资源,因此,如果图像处理器的当前负载率较高,表征该图像处理器当前的负载过大,休息时间过短,如果在图像处理器的当前负载率较高的情况下对所述游戏场景中的游戏画面进行显示增强处理,可能会造成闪屏、卡死的问题,因此,在本实施例中,可以检测图像处理器的当前负载率,以判断在图像处理器处于当前负载率的情况下进行游戏画面的显示增强处理 是否会造成电子设备的闪屏、卡顿的问题。
步骤S250:判断所述当前负载率是否低于负载率阈值。
在本实施例中,电子设备设置有负载率阈值,用于作为当前负载率的判断依据。可以理解的,该负载率阈值可以由电子设备预先存储在本地,也可以是在判断时再进行设置,在此不做限定。另外,该指定条件可以由电子设备自动配置、可以由用户手动设置、也可以由服务器配置完成后传输至电子设备,在此不做限定。进一步地,在获取所述图像处理器的当前负载率后,将当前负载率与负载率阈值进行比较,以判断该当前负载率是否低于负载率阈值。
步骤S260:当所述当前负载率低于所述负载率阈值时,基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。
其中,在确定当前负载率低于负载率阈值时,表征在当前负载率下对游戏画面进行显示增强处理不会造成电子设备的闪屏、卡死的问题,因此,电子设备作为响应,可以对游戏场景中的游戏画面进行显示增强处理。
步骤S270:当所述游戏场景不满足所述指定场景时,获取所述电子设备在指定时间段内加载所述游戏场景的次数。
作为一种方式,在确定游戏场景不满足指定场景,例如,当所述游戏场景为游戏登录场景时,可以确定在该游戏场景下,不用对该游戏场景中的游戏画面进行显示增强处理,此时,可以降低电子设备的处理器的工作频率,以在确定不用对游戏画面进行显示增强处理时,降低电子设备的功耗。
作为另一种方式,在确定游戏场景不满足指定场景时,获取电子设备在指定时间段内加载该游戏场景的次数,例如,当所述游戏场景为游戏商店场景时,可以检测电子设备在指定时间段内加载该游戏商店场景的次数。具体地,该指定时间段可以由电子设备预先存储在本地,也可以是在检测时再进行设置,在此不做限定。另外,该指定时间段可以由电子设备自动配置、可以由用户手动设置、也可以由服务器配置完成后传输至电子设备,在此不做限定。进一步地,所述指定时间段可以为当前时间之前的一个月、当前时间之前的一周、当前时间之前的一天等,在此不做限定。
步骤S280:判断所述次数是否大于次数阈值。
在本实施例中,电子设备设置有次数阈值,用于作为电子设备在指定时间段内加载所述游戏场景的次数的判断依据。可以理解的,该次数阈值可以由电子设备预先存储在本地,也可以是在判断时再进行设置,在此不做限定。另外,该次数阈值可以由电子设备自动配置、可以由用户手动设置、也可以由服务器配置完成后传输至电子设备,在此不做限定。进一步地,在获取电子设备在指定时间段内加载所述游戏场景的次数后,将该次数与次数阈值进行比较,以判断该次数是否大于次数阈值。
步骤S290:当所述次数大于所述次数阈值时,从所述所有优化参数中选取 部分优化参数作为所述目标优化参数。
可以理解的,当该次数大于次数阈值时,表征用户经常使用该游戏场景,因此,可以对该游戏场景对应的游戏画面进行显示增强处理,以提升用户体验,具体地,可以从所有优化参数中选取部分优化参数作为目标优化参数,对游戏场景对应的游戏画面进行显示增强处理;当该次数不大于次数阈值时,表征用户不经常使用该游戏场景,且该游戏场景对显示需求不高,因此,可以不对该游戏场景对应的游戏画面进行显示增强处理,以降低电子设备的功耗。
请参阅图4,图4示出了本申请的图3所示的游戏场景处理方法的步骤S290的流程示意图。下面将针对图4所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:
步骤S291:当所述次数大于所述次数阈值时,输出所述所有优化参数。
作为一种实施方式,在判断结果表征电子设备在指定时间段内加载所述游戏场景的次数大于该次数阈值时,电子设备输出所有优化参数,例如,输出曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加。其中,电子设备可以通过语音的形式输出所有优化参数、通过显示的方式输出所有优化参数、也可以通过发送至其他电子的方式输出所有优化参数,在此不做限定。
步骤S292:接收用户基于所述所有优化参数触发的选择操作。
进一步地,电子设备对作用于所有优化参数上的选择操作进行检测,并且在检测到用户触发的选择操作时,接收该选择操作。其中,该选择操作可以包括作用于电子设备的触控操作和/或输入电子设备的语音信息,在此不做限定,作为一种方式,当所述选择操作为作用于电子设备的触控操作时,该触控操作可以包括触控操作至少可以包括单指点击、多指点击、单指长按、多指长按、重压、多次点击、滑动操作等。
步骤S293:基于所述选择操作从所述所有优化参数中选取部分优化参数作为所述目标优化参数。
在本实施例中,基于用户的选择操作,可以从所有优化参数中选取部分优化参数作为目标优化参数,并通过目标优化参数对游戏场景中的游戏画面进行显示增强处理。例如,当用户触发的选择操作表征从曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加中选择曝光度增强和去噪作为目标优化参数时,可以通过对游戏场景中的优化画面进行曝光度增强和去噪,以达到对游戏画面进行显示增强的效果。
本申请又一个实施例提供的游戏场景处理方法,当电子设备显示游戏画面时,识别该游戏画面对应的游戏场景,判断该游戏场景是否满足指定场景,当该游戏场景满足指定场景时,基于该游戏场景从所有优化参数中选取与该游戏场景对应的目标优化参数,检测该电子设备的图像处理器的当前负载率,判断该当前负载率是否低于负载率阈值,当该负载率低于负载率阈值时,基于该目标优化参数对游戏画面进行显示增强处理,当该游戏场景不满足指定场景时,获取该电子设备在指定时间段内加载该游戏场景的次数,判断该次 数是否大于次数阈值,当该次数大于次数阈值时,从所有优化参数中选取部分优化参数作为目标优化参数,基于该目标优化参数对游戏画面进行显示增强处理。相较于图2所示的游戏场景处理方法,本实施例还对电子设备的负载率进行判断,并在负载率低于负载率阈值时,再对游戏画面进行显示增强处理,降低电子设备的卡顿几率;另外,本实施例还对游戏场景是否满足指定场景进行判断,并在游戏场景不满足指定场景时,再根据该游戏场景的被加载次数进行判断,并在加载次数大于次数阈值时对游戏画面进行显示增强处理,以提升用户偏好的游戏画面的显示效果,提升用户体验。
请参阅图5,图5示出了本申请实施例提供的游戏场景处理装置200的模块框图。所述游戏场景处理装置200应用于上述电子设备,下面将针对图5所示的框图进行阐述,所述游戏场景处理装置200包括:识别模块210、选取模块220以及处理模块230,其中:
识别模块210,用于当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景。
选取模块220,用于基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数。进一步地,所述选取模块230包括:场景判断子模块、第一选取子模块、工作频率降低子模块、次数获取子模块、次数判断子模块、第二选取子模块以及确定子模块,其中:
场景判断子模块,用于判断所述游戏场景是否满足指定场景。
第一选取子模块,用于当所述游戏场景满足所述指定场景时,基于所述游戏场景,从所述所有优化参数中选取与所述游戏场景对应的所述目标优化参数。
工作频率降低子模块,用于当所述游戏场景不满足所述指定场景时,降低所述电子设备的处理器的工作频率。
次数获取子模块,用于当所述游戏场景不满足所述指定场景时,获取所述电子设备在指定时间段内加载所述游戏场景的次数。
次数判断子模块,用于判断所述次数是否大于次数阈值。
第二选取子模块,用于当所述次数大于所述次数阈值时,从所述所有优化参数中选取部分优化参数作为所述目标优化参数。进一步地,所述第二选取子模块包括:优化参数输出单元、选择操作接收单元以及选取单元,其中:
优化参数输出单元,用于当所述次数大于所述次数阈值时,输出所述所有优化参数。
选择操作接收单元,用于接收用户基于所述所有优化参数触发的选择操作。
选取单元,用于基于所述选择操作从所述所有优化参数中选取部分优化参数作为所述目标优化参数。
确定子模块,用于从多个显示增强方式中确定与所述游戏场景对应的目标显示增强方式,其中,所述目标显示增强方式包括所述目标优化参数,所述多个显示增强方式中的每个显示增强方式对所述游戏画面处理得到的游戏画质不 同。
处理模块230,用于基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。进一步地,所述处理模块230包括:负载率检测子模块、负载率判断子模块以及处理子模块,其中:
负载率检测子模块,用于检测所述电子设备的图像处理器的当前负载率。
负载率判断子模块,用于判断所述当前负载率是否低于负载率阈值。
处理子模块,用于当所述当前负载率低于所述负载率阈值时,基于所述目标优化参数对所述游戏画面进行显示增强处理。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
请参阅图6,其示出了本申请实施例提供的一种电子设备100的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、屏幕130、编解码器140以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。
其中,处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、 程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
所述编解码器140可以用于对视频数据进行编码或解码,然后将解码后的视频数据传输到屏幕130进行显示,其中,该编解码器140可以为GPU、专用的DSP、FPGA、ASIG芯片等。
请参阅图7,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质300中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质300可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质300包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质300具有执行上述方法中的任何方法步骤的程序代码310的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码310可以例如以适当形式进行压缩。
综上所述,本申请实施例提供的游戏场景处理方法、装置、电子设备以及存储介质,当电子设备显示游戏画面时,识别该游戏画面对应的游戏场景,基于游戏场景,从所有优化参数中选取与该游戏场景对应的目标优化参数,基于该目标优化参数对游戏画面进行显示增强处理,其中,该显示增强处理通过目标优化参数处理游戏画面中的图像提高游戏画面的画质。本申请实施例提供的游戏场景处理方法、装置、电子设备以及存储介质根据不同的游戏场景确定不同的优化参数,以通过与游戏场景对应的优化参数对游戏画面进行显示增强处理,提升游戏画面的显示效果。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种游戏场景处理方法,其特征在于,应用于电子设备,所述方法包括:
    当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景;
    基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数;
    基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数,包括:
    判断所述游戏场景是否满足指定场景;
    当所述游戏场景满足所述指定场景时,基于所述游戏场景,从所述所有优化参数中选取与所述游戏场景对应的所述目标优化参数。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    当所述游戏场景不满足所述指定场景时,降低所述电子设备的处理器的工作频率。
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    当所述游戏场景不满足所述指定场景时,获取所述电子设备在指定时间段内加载所述游戏场景的次数;
    判断所述次数是否大于次数阈值;
    当所述次数大于所述次数阈值时,从所述所有优化参数中选取部分优化参数作为所述目标优化参数。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当所述次数不大于所述次数阈值时,不对所述游戏画面进行显示增强处理。
  6. 根据权利要求4或5所述的方法,其特征在于,所述当所述次数大于所述次数阈值时,从所述所有优化参数中选取部分优化参数作为目标优化参数,包括:
    当所述次数大于所述次数阈值时,输出所述所有优化参数;
    接收用户基于所述所有优化参数触发的选择操作;
    基于所述选择操作从所述所有优化参数中选取部分优化参数作为所述目标优化参数。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述当所述电子设 备显示游戏画面时,识别所述游戏画面对应的游戏场景,包括:
    当所述电子设备显示游戏画面时,通过图像识别的方式对所述游戏画面对应的游戏场景进行识别。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景,包括:
    当所述电子设备显示游戏画面时,获取与所述游戏画面关联的游戏场景ID;
    根据所述游戏场景ID从游戏场景数据库中获取与所述游戏场景ID对应的游戏场景,并将所述与所述游戏场景ID对应的游戏场景确定为所述游戏场景,其中,所述游戏场景数据库包括多个游戏场景ID和多个游戏场景,所述游戏场景和所述游戏场景ID一一对应,每个所述游戏场景ID关联至少一个游戏画面。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数,包括:
    从多个显示增强方式中确定与所述游戏场景对应的目标显示增强方式,其中,所述目标显示增强方式包括所述目标优化参数,所述多个显示增强方式中的每个显示增强方式对所述游戏画面处理得到的游戏画面的画质不同。
  10. 根据权利要求9所述的方法,其特征在于,所述从多个显示增强方式中确定与所述游戏场景对应的目标显示增强方式,包括:
    根据所述游戏场景从预先创建的映射关系表中选取出与所述游戏场景对应的目标增强方式,其中,所述映射关系表包括多个显示增强和多个游戏场景的对应关系。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述基于所述目标优化参数对所述游戏画面进行显示增强处理,包括:
    检测所述电子设备的图像处理器的当前负载率;
    判断所述当前负载率是否低于负载率阈值;
    当所述当前负载率低于所述负载率阈值时,基于所述目标优化参数对所述游戏画面进行显示增强处理。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述优化参数包括曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加中的一种或多种的组合。
  13. 根据权利要求12所述的方法,其特征在于,所述游戏场景包括游戏战斗场景,所述基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数,包括:
    当所述游戏场景为所述游戏战斗场景时,将所述优化参数中的曝光度增强、去噪、边缘锐化、对比度增加以及饱和度增加,确定为所述目标优化参数。
  14. 根据权利要求12或13所述的方法,其特征在于,所述游戏场景包括游戏登录场景,所述基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数,包括:
    当所述游戏场景为所述游戏登录场景时,将所述优化参数中的曝光度增强确定为所述目标优化参数。
  15. 根据权利要求1-14任一项所述的方法,其特征在于,在所述当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景之前,还包括:
    判断所述电子设备的显示界面是否显示游戏画面;
    当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景。
  16. 一种游戏场景处理装置,其特征在于,应用于电子设备,所述装置包括:
    识别模块,用于当所述电子设备显示游戏画面时,识别所述游戏画面对应的游戏场景;
    选取模块,用于基于所述游戏场景,从所有优化参数中选取与所述游戏场景对应的目标优化参数;
    处理模块,用于基于所述目标优化参数对所述游戏画面进行显示增强处理,其中,所述显示增强处理通过所述目标优化参数处理所述游戏画面中的图像提高所述游戏画面的画质。
  17. 根据权利要求16所述的装置,其特征在于,场景判断子模块、第一选取子模块、工作频率降低子模块、次数获取子模块、次数判断子模块、第二选取子模块以及确定子模块,其中:
    场景判断子模块,用于判断所述游戏场景是否满足指定场景。
    第一选取子模块,用于当所述游戏场景满足所述指定场景时,基于所述游戏场景,从所述所有优化参数中选取与所述游戏场景对应的所述目标优化参数。
    工作频率降低子模块,用于当所述游戏场景不满足所述指定场景时,降低所述电子设备的处理器的工作频率。
    次数获取子模块,用于当所述游戏场景不满足所述指定场景时,获取所述电子设备在指定时间段内加载所述游戏场景的次数。
    次数判断子模块,用于判断所述次数是否大于次数阈值。
    第二选取子模块,用于当所述次数大于所述次数阈值时,从所述所有优化参数中选取部分优化参数作为所述目标优化参数。
    确定子模块,用于从多个显示增强方式中确定与所述游戏场景对应的目标显示增强方式,其中,所述目标显示增强方式包括所述目标优化参数,所述多 个显示增强方式中的每个显示增强方式对所述游戏画面处理得到的游戏画质不同。
  18. 根据权利要求16或17所述的装置,其特征在于,所述处理模块包括:负载率检测子模块、负载率判断子模块以及处理子模块,其中:
    负载率检测子模块,用于检测所述电子设备的图像处理器的当前负载率。
    负载率判断子模块,用于判断所述当前负载率是否低于负载率阈值。
    处理子模块,用于当所述当前负载率低于所述负载率阈值时,基于所述目标优化参数对所述游戏画面进行显示增强处理。
  19. 一种电子设备,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-15任一项所述的方法。
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-15任一项所述的方法。
PCT/CN2019/106000 2018-11-27 2019-09-16 游戏场景处理方法、装置、电子设备以及存储介质 WO2020108018A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811428414.9 2018-11-27
CN201811428414.9A CN109685726B (zh) 2018-11-27 2018-11-27 游戏场景处理方法、装置、电子设备以及存储介质

Publications (1)

Publication Number Publication Date
WO2020108018A1 true WO2020108018A1 (zh) 2020-06-04

Family

ID=66185639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/106000 WO2020108018A1 (zh) 2018-11-27 2019-09-16 游戏场景处理方法、装置、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN109685726B (zh)
WO (1) WO2020108018A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507572A (zh) * 2021-07-09 2021-10-15 Oppo广东移动通信有限公司 视频画面的显示方法、装置、终端及存储介质
CN116991347A (zh) * 2023-04-14 2023-11-03 深圳Tcl新技术有限公司 游戏画面投屏方法、装置、存储介质及电子设备

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685726B (zh) * 2018-11-27 2021-04-13 Oppo广东移动通信有限公司 游戏场景处理方法、装置、电子设备以及存储介质
CN110334027B (zh) * 2019-07-04 2024-04-12 深圳市腾讯网域计算机网络有限公司 游戏画面测试方法和装置
CN110531951B (zh) * 2019-08-30 2022-03-25 腾讯科技(深圳)有限公司 画面输出模式调整方法、装置、设备、系统及存储介质
CN110795054B (zh) * 2019-10-21 2023-07-28 Oppo广东移动通信有限公司 画质调节方法及相关产品
CN110795056B (zh) * 2019-11-08 2023-08-15 Oppo广东移动通信有限公司 调节显示参数的方法、装置、终端及存储介质
CN112138371A (zh) * 2020-09-15 2020-12-29 北京智明星通科技股份有限公司 基于关联访问次数的游戏场景加载方法、系统及服务器
CN114827431A (zh) * 2021-01-27 2022-07-29 Oppo广东移动通信有限公司 场景包处理方法、协处理芯片、主处理芯片及电子设备
CN113034384A (zh) * 2021-02-26 2021-06-25 Oppo广东移动通信有限公司 视频处理方法、装置、电子设备以及存储介质
CN115202551A (zh) * 2021-04-13 2022-10-18 广州视源电子科技股份有限公司 画面显示方法、装置、存储介质及设备
CN113368495A (zh) * 2021-04-15 2021-09-10 深圳豹亮科技有限公司 一种游戏图像画质提升方法
CN113625983A (zh) * 2021-08-10 2021-11-09 Oppo广东移动通信有限公司 图像显示方法、装置、计算机设备及存储介质
CN114554284B (zh) * 2022-02-22 2023-08-11 网易(杭州)网络有限公司 画质信息处理方法、装置、计算机设备及存储介质
CN114760527A (zh) * 2022-04-13 2022-07-15 北京字跳网络技术有限公司 游戏场景中的视频播放方法、装置、存储介质及电子设备
CN116091292B (zh) * 2022-08-17 2023-11-21 荣耀终端有限公司 数据处理方法和相关装置
CN115396717B (zh) * 2022-08-23 2024-05-17 海信视像科技股份有限公司 显示设备及显示画质调节方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107398070A (zh) * 2017-07-19 2017-11-28 腾讯科技(深圳)有限公司 一种游戏画面的显示控制方法及装置、电子设备
US20180084305A1 (en) * 2016-09-16 2018-03-22 Centurylink Intellectual Property Llc Video Quality Optimization Based on Display Capabilities
CN108543306A (zh) * 2018-03-28 2018-09-18 努比亚技术有限公司 一种游戏亮度调控方法、设备及计算机可读存储介质
CN108733334A (zh) * 2018-03-13 2018-11-02 广东欧珀移动通信有限公司 画质参数调节方法、装置、终端及存储介质
CN109685726A (zh) * 2018-11-27 2019-04-26 Oppo广东移动通信有限公司 游戏场景处理方法、装置、电子设备以及存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100073362A1 (en) * 2008-09-23 2010-03-25 Ike Ikizyan Method And System For Scene Adaptive Dynamic 3-D Color Management
CN103699413B (zh) * 2013-12-24 2017-05-03 北京世界星辉科技有限责任公司 优化游戏运行环境的方法、客户端、服务器及系统
WO2016040255A1 (en) * 2014-09-09 2016-03-17 Dolby Laboratories Licensing Corporation Self-adaptive prediction method for multi-layer codec
CN105898175A (zh) * 2014-09-18 2016-08-24 青岛海尔电子有限公司 一种模板文件的制作方法和装置
CN105045367A (zh) * 2015-01-16 2015-11-11 中国矿业大学 基于游戏负载预测的android系统设备功耗优化方法
CN104834529A (zh) * 2015-05-25 2015-08-12 腾讯科技(深圳)有限公司 一种应用的性能优化的方法及装置
CN105049609B (zh) * 2015-06-29 2019-05-03 惠州Tcl移动通信有限公司 一种优化游戏画面的方法及系统
US20180095522A1 (en) * 2016-10-04 2018-04-05 Mediatek Inc. Scenario-Based Policy For Performance And Power Management In Electronic Apparatus
CN108257103B (zh) * 2018-01-25 2020-08-25 网易(杭州)网络有限公司 游戏场景的遮挡剔除方法、装置、处理器及终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180084305A1 (en) * 2016-09-16 2018-03-22 Centurylink Intellectual Property Llc Video Quality Optimization Based on Display Capabilities
CN107398070A (zh) * 2017-07-19 2017-11-28 腾讯科技(深圳)有限公司 一种游戏画面的显示控制方法及装置、电子设备
CN108733334A (zh) * 2018-03-13 2018-11-02 广东欧珀移动通信有限公司 画质参数调节方法、装置、终端及存储介质
CN108874539A (zh) * 2018-03-13 2018-11-23 Oppo广东移动通信有限公司 资源配置方法、装置、终端及存储介质
CN108543306A (zh) * 2018-03-28 2018-09-18 努比亚技术有限公司 一种游戏亮度调控方法、设备及计算机可读存储介质
CN109685726A (zh) * 2018-11-27 2019-04-26 Oppo广东移动通信有限公司 游戏场景处理方法、装置、电子设备以及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507572A (zh) * 2021-07-09 2021-10-15 Oppo广东移动通信有限公司 视频画面的显示方法、装置、终端及存储介质
CN116991347A (zh) * 2023-04-14 2023-11-03 深圳Tcl新技术有限公司 游戏画面投屏方法、装置、存储介质及电子设备
CN116991347B (zh) * 2023-04-14 2024-06-04 深圳Tcl新技术有限公司 游戏画面投屏方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN109685726A (zh) 2019-04-26
CN109685726B (zh) 2021-04-13

Similar Documents

Publication Publication Date Title
WO2020108018A1 (zh) 游戏场景处理方法、装置、电子设备以及存储介质
WO2020107989A1 (zh) 视频处理方法、装置、电子设备以及存储介质
CN109218802B (zh) 视频处理方法、装置、电子设备及计算机可读介质
US20210281718A1 (en) Video Processing Method, Electronic Device and Storage Medium
WO2020108081A1 (zh) 视频处理方法、装置、电子设备和计算机可读介质
CN109379625B (zh) 视频处理方法、装置、电子设备和计算机可读介质
CN109242802B (zh) 图像处理方法、装置、电子设备及计算机可读介质
US20210168441A1 (en) Video-Processing Method, Electronic Device, and Computer-Readable Storage Medium
US20210287631A1 (en) Video Processing Method, Electronic Device and Storage Medium
CN109120988B (zh) 解码方法、装置、电子设备以及存储介质
WO2020108060A1 (zh) 视频处理方法、装置、电子设备以及存储介质
WO2020108098A1 (zh) 视频处理方法、装置、电子设备及计算机可读介质
CN109587558B (zh) 视频处理方法、装置、电子设备以及存储介质
WO2020108092A1 (zh) 视频处理方法、装置、电子设备及存储介质
WO2020108010A1 (zh) 视频处理方法、装置、电子设备以及存储介质
WO2020062924A1 (zh) 视频增强控制方法、装置、电子设备及存储介质
KR102558385B1 (ko) 비디오 증강 제어 방법, 장치, 전자 기기 및 저장 매체
CN109618228B (zh) 视频增强控制方法、装置以及电子设备
US11562772B2 (en) Video processing method, electronic device, and storage medium
CN109167946B (zh) 视频处理方法、装置、电子设备以及存储介质
WO2020038071A1 (zh) 视频增强控制方法、装置、电子设备及存储介质
CN109218803B (zh) 视频增强控制方法、装置以及电子设备
CN109712100B (zh) 视频增强控制方法、装置以及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19891642

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19891642

Country of ref document: EP

Kind code of ref document: A1