Image processing method, device, non-volatile storage medium and electronic device
By calculating the proportion of each camp in the game scene and using color mapping textures, the natural transition of the game scene and personalized atmosphere rendering are achieved, solving the problem of unnatural scene switching in the existing technology.
Patent Information
- Application Number
- CN202011605260.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-12-29
Smart Images

Figure CN112619160B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to an image processing method, device, non-volatile storage medium and electronic device. Background Art
[0002] In the multi-camp strategy game provided by the related art, the entire game map is composed of different plots. Different camps have different map atmospheres, for example, the evil camp has a darker map atmosphere, the justice camp has a brighter map atmosphere, etc. When the game player drags the game map or switches the coordinates, he can jump from the area where one camp is located to the area where another camp is located. At this time, the map atmosphere of the entire game also needs to have a corresponding switching transition.
[0003] At present, existing multi-camp strategy games usually render the overall atmosphere of the game scene, but the rendering method they adopt is mostly to present a single atmosphere game scene, for example: all game scenes in the entire game present the same atmosphere effect. For games with multiple atmospheres and large scenes, under normal circumstances, the corresponding atmosphere is rendered when switching scenes; or when the atmosphere switches in the same scene, it is switched directly, which leads to a lack of scene transition and unnaturalness.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] At least some embodiments of the present invention provide an image processing method, apparatus, non-volatile storage medium and electronic device to at least solve the technical problem that the rendering method of the game scene atmosphere provided in the related art is relatively single and cannot perform personalized rendering of the areas where different game camps are located in the game scene.
[0006] According to one embodiment of the present invention, there is provided an image processing method, the method comprising:
[0007] Obtain an original rendered image to be displayed on a graphical user interface; determine a first camp and a second camp of the original rendered image; calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image; utilize a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp to obtain a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map; determine a first target color for each pixel in the original rendered image by using the first weight value, the second weight value, the first color, and the second color to display the target rendered image.
[0008] Optionally, determining the first camp of the original rendered image includes: determining the first camp based on a target plot corresponding to a target position of the original rendered image.
[0009] Optionally, determining the second camp of the original rendered image includes: performing interval sampling in multiple directions from a target plot corresponding to the target position to obtain the number of plots belonging to different camps; and determining the second camp based on the number of plots belonging to different camps.
[0010] Optionally, calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp includes: performing interval sampling in multiple directions from a target plot corresponding to the target position, counting a first number of plots occupied by the first camp and a second number of plots occupied by the second camp; and calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp based on the first number and the second number.
[0011] Optionally, interval sampling is performed from the target plot corresponding to the target position in multiple different directions, and a first number of plots occupied by the first camp and a second number of plots occupied by the second camp are counted, including: determining a third number of interval plots required and a fourth number of sampling plots required when sampling in each of the multiple different directions; based on the third number and the fourth number, a fifth number of all sampling plots obtained by interval sampling in multiple different directions; and from all the sampling plots of the fifth number, respectively counting the camp to which each sampling plot belongs to obtain the first number and the second number.
[0012] Optionally, the second number is the maximum number of sampling plots occupied by each of the remaining camps in the fifth number except the first number.
[0013] Optionally, calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp based on the first quantity and the second quantity includes: adding the first quantity and the second quantity to obtain a first calculation result; dividing the first quantity and the first calculation result to obtain a first weight value; dividing the second quantity and the first calculation result to obtain a second weight value; or, when the sum of the first weight value and the second weight value is a fixed value, subtracting the fixed value from the first quantity to obtain the second weight value.
[0014] Optionally, determining the first target color by the first weight value, the second weight value, the first color and the second color includes: multiplying the first color by the first weight value to obtain a second calculation result; multiplying the second color by the second weight value to obtain a third calculation result; and adding the second calculation result to the third calculation result to obtain the first target color.
[0015] According to one embodiment of the present invention, another image processing method is provided, the method comprising:
[0016] In response to a sliding operation on a graphical user interface, a first rendering image corresponding to a starting point of the sliding operation and a second rendering image corresponding to an end point of the sliding operation are determined, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting point, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end point; a first camp and a second camp of the first rendering image are determined, and a third color mapping map and a third weight value corresponding to the first camp are obtained, as well as a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to represent the proportion of the land occupied by the first camp in a plurality of land plots included in the first rendering image, and the fourth weight value is used to represent the proportion of the land occupied by the second camp in a plurality of land plots included in the first rendering image; based on the third color mapping map, the third weight value, the fourth color mapping map and the fourth weight value, The weight value determines the second target color of each pixel in the first rendered image; determines the first camp and the second camp of the second rendered image, obtains the fifth color mapping map and the fifth weight value corresponding to the first camp, and the sixth color mapping map and the sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image; determines the third target color of each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map and the sixth weight value; uses the time parameter to merge the second target color and the third target color to obtain the fourth target color to display the target rendered image, wherein the time parameter is the total time consumed from the start of the sliding operation to the display of the target rendered image.
[0017] Optionally, the above method further comprises: resetting the time parameter at every preset time interval.
[0018] Optionally, determining the second target color of each pixel in the rendered image at the starting position based on the third color mapping map, the third weight value, the fourth color mapping map and the fourth weight value includes: using the third color mapping map and the fourth color mapping map to obtain the third color corresponding to each pixel in the rendered image at the starting position on the third color mapping map and the fourth color corresponding to each pixel on the fourth color mapping map; determining the second target color by the third weight value, the fourth weight value, the third color and the fourth color.
[0019] Optionally, determining the third target color of each pixel in the rendered image where the end point is located based on the fifth color mapping map, the fifth weight value, the sixth color mapping map and the sixth weight value includes: using the fifth color mapping map and the sixth color mapping map to obtain the fifth color corresponding to each pixel in the rendered image where the end point is located on the fifth color mapping map and the sixth color corresponding to each pixel on the sixth color mapping map; determining the third target color through the fifth weight value, the sixth weight value, the fifth color and the sixth color.
[0020] Optionally, the second target color and the third target color are merged using the time parameter to obtain the fourth target color, including: obtaining a first duration and a second duration based on the time parameter, wherein the first duration is the duration currently experienced during the sliding operation, and the second duration is the remaining duration corresponding to the total duration; judging whether the current moment has reached the total duration set by the time parameter; when the total duration has not been reached at the current moment, repeatedly using the first duration and the second duration to merge the second target color and the third target color until the current moment reaches the total duration to obtain the fourth target color.
[0021] Optionally, using the first duration and the second duration to fuse the second target color and the third target color includes: multiplying the second target color by the first duration to obtain a fourth calculation result; multiplying the third target color by the second duration to obtain a fifth calculation result; and adding the fourth calculation result to the fifth calculation result to obtain a fourth target color.
[0022] According to one embodiment of the present invention, there is also provided an image processing device, the device comprising:
[0023] A first acquisition module is used to acquire an original rendered image to be displayed on a graphical user interface; a determination module is used to determine a first camp and a second camp of the original rendered image; a calculation module is used to calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image; a second acquisition module is used to use a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp to acquire a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to the second color mapping map; a processing module is used to determine a first target color for each pixel in the original rendered image by using the first weight value, the second weight value, the first color and the second color to display the target rendered image.
[0024] Optionally, the determination module is used to determine the first camp based on a target plot corresponding to the target position of the original rendered image.
[0025] Optionally, the determination module is used to perform interval sampling in multiple directions from the target plot corresponding to the target position to obtain the number of plots belonging to different camps; and determine the second camp based on the number of plots belonging to different camps.
[0026] Optionally, the calculation module is used to perform interval sampling in multiple directions from the target plot corresponding to the target position, count a first number of plots occupied by the first camp and a second number of plots occupied by the second camp; and calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp based on the first number and the second number.
[0027] Optionally, a calculation module is used to determine a third number of interval plots required and a fourth number of sampling plots required when sampling in each of multiple different directions; based on the third number and the fourth number, obtain a fifth number of all sampling plots obtained by interval sampling in multiple different directions; and from all the sampling plots of the fifth number, respectively count the camp to which each sampling plot belongs to, to obtain the first number and the second number.
[0028] Optionally, the second number is the maximum number of sampling plots occupied by each of the remaining camps in the fifth number except the first number.
[0029] Optionally, the calculation module is used to add the first quantity and the second quantity to obtain a first calculation result; divide the first quantity and the first calculation result to obtain a first weight value; divide the second quantity and the first calculation result to obtain a second weight value; or, when the sum of the first weight value and the second weight value is a fixed value, subtract the fixed value from the first quantity to obtain the second weight value.
[0030] Optionally, the processing module is used to multiply the first color and the first weight value to obtain a second calculation result; multiply the second color and the second weight value to obtain a third calculation result; and add the second calculation result and the third calculation result to obtain the first target color.
[0031] According to one embodiment of the present invention, another image processing device is provided, the device comprising:
[0032] A first determining module is used to respond to a sliding operation on a graphical user interface, determine a first rendering image corresponding to a starting point of the sliding operation and a second rendering image corresponding to an end point of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting point, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end point; a first processing module is used to determine a first camp and a second camp of the first rendering image, obtain a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of the land occupied by the first camp in the multiple land plots included in the first rendering image, and the fourth weight value is used to indicate the proportion of the land occupied by the second camp in the multiple land plots included in the first rendering image; a second determining module is used to determine a first camp and a second camp based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value. four weight values determine the second target color of each pixel in the first rendered image; a second processing module, used to determine the first camp and the second camp of the second rendered image, obtain the fifth color mapping map and the fifth weight value corresponding to the first camp, and the sixth color mapping map and the sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image; a third determination module, used to determine the third target color of each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map and the sixth weight value; a fusion module, used to fuse the second target color and the third target color using a time parameter to obtain a fourth target color to display a target rendered image, wherein the time parameter is the total time consumed from the start of the sliding operation to the display of the target rendered image.
[0033] Optionally, the above device further comprises: an updating module, configured to reset the time parameters at intervals of a preset duration.
[0034] Optionally, the second determination module is used to use the third color mapping map and the fourth color mapping map to obtain the third color corresponding to each pixel in the rendered image at the starting point position on the third color mapping map and the fourth color corresponding to each pixel on the fourth color mapping map; determine the second target color through the third weight value, the fourth weight value, the third color and the fourth color.
[0035] Optionally, a third determination module is used to use the fifth color mapping map and the sixth color mapping map to obtain the fifth color corresponding to each pixel in the rendered image at the end position on the fifth color mapping map and the sixth color corresponding to each pixel on the sixth color mapping map; and determine the third target color through the fifth weight value, the sixth weight value, the fifth color and the sixth color.
[0036] Optionally, a fusion module is used to obtain a first duration and a second duration based on a time parameter, wherein the first duration is the duration currently experienced during the sliding operation, and the second duration is the remaining duration corresponding to the total duration; determine whether the current moment has reached the total duration set by the time parameter; when the total duration has not been reached at the current moment, repeatedly use the first duration and the second duration to fuse the second target color and the third target color until the current moment reaches the total duration to obtain a fourth target color.
[0037] Optionally, the fusion module is used to multiply the second target color by the first duration to obtain a fourth calculation result; multiply the third target color by the second duration to obtain a fifth calculation result; and add the fourth calculation result to the fifth calculation result to obtain a fourth target color.
[0038] According to one embodiment of the present invention, a non-volatile storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above-mentioned image processing methods when running.
[0039] According to one embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program is configured to execute any of the above-mentioned image processing methods when running.
[0040] According to one embodiment of the present invention, there is further provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned image processing methods.
[0041] In at least some embodiments of the present invention, an original rendered image to be displayed on a graphical user interface is obtained, a first camp and a second camp of the original rendered image are determined, a first weight value corresponding to the first camp and a second weight value corresponding to the second camp are calculated, the first weight value is used to represent the proportion of the plot occupied by the first camp in a plurality of plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in a plurality of plots included in the original rendered image, and a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp are used to obtain a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map, and a first target color of each pixel in the original rendered image is determined by the first weight value, the second weight value, the first color and the second color to display the target rendered image, thereby achieving color grading (Color grading) using screen post-processing. The purpose of rendering the global atmosphere of the game is to achieve the technical effect of reducing the operational complexity of rendering the game scene atmosphere and performing highly liberal and personalized scene atmosphere rendering for the areas where different game camps are located in the game scene, thereby solving the technical problem that the rendering method of the game scene atmosphere provided in the relevant technology is relatively single and it is impossible to perform personalized rendering for the areas where different game camps are located in the game scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0043] Figure 1 is a flowchart of an image processing method according to one embodiment of the present invention;
[0044] Figure 2 is a schematic diagram of screen post-processing effect according to one optional embodiment of the present invention;
[0045] Figure 3 is a schematic diagram of a land sampling process according to one optional embodiment of the present invention;
[0046] Figure 4 is a flow chart of another image processing method according to one embodiment of the present invention;
[0047] Figure 5 is a schematic diagram of the transition and switching process of the game scene atmosphere according to one optional embodiment of the present invention;
[0048] Figure 6 is a flow chart of a scene atmosphere transition and switching process according to one optional embodiment of the present invention;
[0049] Figure 7 is a structural block diagram of an image processing device according to one embodiment of the present invention;
[0050] Figure 8 is a structural block diagram of another image processing device according to one embodiment of the present invention;
[0051] Fig. 9 is a structural block diagram of another image processing device according to one optional embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0054] According to one embodiment of the present invention, an embodiment of an image processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0055] The method embodiment can be executed in a mobile terminal, a computer terminal or a similar computing terminal. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD and other terminal devices. The mobile terminal may include one or more processors (the processor may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may also include a transmission device, an input and output device, and a display device for communication functions. It can be understood by those skilled in the art that the above structural description is only illustrative and does not limit the structure of the above mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0056] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the image processing method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, realizing the above-mentioned image processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0057] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0058] The display device may be, for example, a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contact and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0059] In this embodiment, an image processing method running on the above terminal is provided. Figure 1 1 is a flow chart of an image processing method according to one embodiment of the present invention. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here. Figure 1 As shown, the method comprises the following steps:
[0060] Step S100, obtaining an original rendered image to be displayed on a graphical user interface;
[0061] The original rendered image is the screen image obtained after the scene resources and model resources of the entire game are rendered, and it is the basic object processed by the color grading method of screen post-processing. Screen post-processing usually refers to the subsequent operation of the screen image to achieve various screen special effects. Screen post-processing may include but is not limited to: various blur effects, depth of field, etc. Color grading usually refers to a processing method for adjusting and correcting the final color and brightness of the image, such as: adding filters to the image to change the atmosphere of the image. Therefore, the advantage of using the color grading processing method of screen post-processing is that there is no need to control a single scene or model, but to remap the color of the complete image output after the overall rendering is completed, that is, the screen effect is independent of the virtual model in the game scene. Even if the virtual model is replaced, the atmosphere of the entire game can still be processed correctly.
[0062] For example, there are 10 virtual models in the current game scene. When using the color grading method of screen post-processing, there is no need to pay attention to the rendering process of these 10 virtual models. Instead, after all 10 virtual models are rendered, color grading is performed on a two-dimensional rendering image finally displayed on the screen.
[0063] Step S101, determining a first camp and a second camp of an original rendered image;
[0064] Specifically, the first camp can be determined based on the target plot corresponding to the target position of the original rendered image. The target position of the original rendered image may include, but is not limited to: the center position of the original rendered image (i.e., the center position of the entire image). The target plot corresponding to the target position of the original rendered image may include, but is not limited to: the center plot corresponding to the center position. Of course, the target position can also select the center position of the left half area of the original rendered image, the center position of the right half area of the original rendered image, the center position of the upper half area of the original rendered image, and the center position of the lower half area of the original rendered image. There is no obvious restriction here. Then, interval sampling is performed in multiple directions from the target plot corresponding to the target position to obtain the number of plots belonging to different camps, and the second camp is determined based on the number of plots belonging to different camps.
[0065] The first camp and the second camp can be either hostile or allied. For example, the first camp can be the human, elf, dwarf and other camps in the justice camp, and the second camp can be the orc and other camps in the evil camp. The dwarf camp can be located in the snowy area under the white atmosphere in the game scene, and the elf camp can be located in the forest area under the green and mysterious atmosphere in the game scene.
[0066] Step S102, calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to represent the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image;
[0067] That is, interval sampling is performed in multiple directions from the target plot corresponding to the target position to count the first number of plots occupied by the first camp and the second number of plots occupied by the second camp, and then the first weight value corresponding to the first camp and the second weight value corresponding to the second camp are calculated based on the first number and the second number. The first weight value is the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image. The second weight value is the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image.
[0068] In an optional embodiment, the first camp can be determined by the camp to which the central plot of the center position of the original rendered image belongs. Then, interval sampling can be performed from the central plot of the center position of the original rendered image in multiple different directions (for example, east, south, west, and north), so as to determine the second camp through the statistical results of the number of plots belonging to different camps obtained by interval sampling, and at the same time, the first number of plots occupied by the first camp and the second number of plots occupied by the second camp can be counted, and then the first weight value corresponding to the first camp and the second weight value corresponding to the second camp can be calculated based on the first number and the second number.
[0069] Step S103, using a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp, obtaining a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map;
[0070] The color mapping map uses a pre-configured color lookup table, i.e., a Look Up Table (LUT) map, to map the overall atmosphere of the game into the target atmosphere by color lookup. Thus, different game atmospheres can be rendered and natural transitions and switches can be achieved between different game atmospheres without re-reading the loaded scene. There are usually multiple game camps in the game scene displayed by the original rendered image, and each game camp occupies a different area. In order to render the overall atmosphere of the game of the original rendered image, after determining the first camp and the second camp, the first color mapping map corresponding to the first camp and the second color mapping map corresponding to the second camp (i.e., two LUT maps, which may include: the main atmosphere map Tex_0 corresponding to the current first camp and the secondary atmosphere map Tex_1 of the surrounding second camp) are used to obtain the first color corresponding to each pixel in the original rendered image on the first color mapping map and the second color corresponding to the second color mapping map.
[0071] Figure 2 is a schematic diagram of screen post-processing effects according to one optional embodiment of the present invention, such as Figure 2As shown, for the unprocessed original rendered image output in the game, a suitable screen post-processing atmosphere rendering can be performed for the area where each camp is located. That is, after re-searching and mapping the colors using the color grading processing method of screen post-processing, the screen post-processing image is obtained. Re-searching and mapping the colors through the LUT map, for example: the color of a pixel in the original rendered image was originally green, but after re-searching and mapping the colors through the LUT map, it is determined that the pixel color corresponding to green is blue. Therefore, after re-searching and mapping the colors through the LUT map, all green pixels in the original rendered image will become blue pixels, thereby obtaining a mysterious and hazy blue color atmosphere after processing.
[0072] Step S104 , determining a first target color of each pixel in the original rendered image by using the first weight value, the second weight value, the first color, and the second color to display a target rendered image.
[0073] Through the above steps, an original rendered image to be displayed on a graphical user interface can be obtained, a first camp and a second camp of the original rendered image can be determined, a first weight value corresponding to the first camp and a second weight value corresponding to the second camp can be calculated, the first weight value is used to represent the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image. By using a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp, a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to the second color mapping map are obtained, and a first target color of each pixel in the original rendered image is determined by the first weight value, the second weight value, the first color and the second color to display the target rendered image, thereby achieving color grading (Color grading) using screen post-processing. The purpose of rendering the global atmosphere of the game is to achieve the technical effect of reducing the operational complexity of rendering the game scene atmosphere and performing highly liberal and personalized scene atmosphere rendering for the areas where different game camps are located in the game scene, thereby solving the technical problem that the rendering method of the game scene atmosphere provided in the relevant technology is relatively single and it is impossible to perform personalized rendering for the areas where different game camps are located in the game scene.
[0074] Optionally, in step S101, performing interval sampling from a target plot corresponding to a target position in a plurality of different directions to count a first number of plots occupied by a first camp and a second number of plots occupied by a second camp may include the following execution steps:
[0075] Step S1010, determining a third number of interval plots required for sampling in each of a plurality of different directions and a fourth number of sampling plots required;
[0076] Step S1011, obtaining a fifth number of all sampling plots obtained by performing interval sampling in multiple different directions based on the third number and the fourth number;
[0077] Step S1012, counting the camp to which each sampling plot belongs from all the fifth number of sampling plots, to obtain the first number and the second number.
[0078] Since the game scene is usually divided into multiple different camps, each camp has a LUT map corresponding to the camp itself, that is, the main atmosphere map Tex_0. At the same time, in order to achieve a more delicate rendering effect, the situation of the surrounding camps needs to be taken into account in the game. For example: when the virtual character controlled by the game player is currently at the boundary between the righteous camp and the evil camp, the overall atmosphere should be between the transition effect of the atmosphere of the two camps. Therefore, interval sampling can be performed from the central plot where the center position of the original rendered image is located in multiple different directions (for example: east, south, west, and north) to obtain the statistical results of the number of sampled plots belonging to each camp. In an optional embodiment, the above second number is the maximum number of sampled plots occupied by the remaining camps except the first number in the fifth number. That is, based on the statistical results of the number of sampled plots belonging to each camp obtained by sampling, the camp with the largest number of sampled plots belonging to the same camp is determined as the second camp, and the color mapping map Tex_1 of the second camp is determined as the secondary atmosphere map of the current rendering atmosphere.
[0079] Figure 3 is a schematic diagram of a land sampling process according to one optional embodiment of the present invention, such as Figure 3 As shown, starting from the center plot of the screen, sampling is performed every 3 plots in the four directions of east, south, west and north, and 5 plots are sampled in each direction (the number can be flexibly set according to actual needs). That is, in the 31*31 plot, 20 plots are sampled for camp weight calculation. Assuming that there are currently three camps of elves, dwarves and orcs, among the 20 plots sampled, 7 plots including the central plot belong to the elf camp, so the elf camp is the first camp mentioned above. In addition, there are 10 plots belonging to the dwarf camp and 3 plots belonging to the orc camp. Therefore, the dwarf camp is the second camp mentioned above. At the same time, the number of plots Num_0 (i.e. 7 plots) occupied by the current first camp and the number of plots Num_1 (i.e. 10 plots) occupied by the surrounding second camp are recorded.
[0080] It should be noted that the number of sampling interval plots in the above-mentioned multiple different directions can be the same or different. For example, sampling is performed once every 3 plots in the west direction, and once every 2 plots in the east direction. A suitable value can be set according to visual requirements, which ultimately affects the corresponding weight values of different camps.
[0081] Optionally, in step S102, calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp based on the first quantity and the second quantity may include the following execution steps:
[0082] Step S1020, performing an addition operation on the first quantity and the second quantity to obtain a first calculation result;
[0083] Step S1021, performing a division operation on the first quantity and the first calculation result to obtain a first weight value;
[0084] Step S1022, dividing the second quantity by the first calculation result to obtain a second weight value; or, when the sum of the first weight value and the second weight value is a fixed value, subtracting the fixed value from the first quantity to obtain the second weight value.
[0085] After recording the number of tiles Num_0 occupied by the current first camp and the number of tiles Num_1 occupied by the surrounding second camp, the first weight value Weight_0 corresponding to the first camp and the second weight value Weight_1 corresponding to the second camp can be calculated based on Num_0 and Num_1, so as to be used as the weights of different maps in the subsequent color mapping process. The specific calculation formula is as follows:
[0086] Weight_0=Num_0 / (Num_0+Num_1);
[0087] Weight_1=1-Weight_0; or, Weight_1=Num_1 / (Num_0+Num_1);
[0088] Still taking the 20 plots obtained by the above sampling as an example, by recording the number of plots Num_0 (i.e. 7 plots) currently occupied by the first camp and the number of plots Num_1 (i.e. 10 plots) occupied by the surrounding second camp, we can calculate: Weight_0 = 7 / (10+7) = 0.4117, Weight_1 = 1-0.4117 = 0.5883 or Weight_1 = 10 / (10+7) = 0.5883.
[0089] Optionally, in step S104, determining the first target color by using the first weight value, the second weight value, the first color, and the second color may include the following execution steps:
[0090] Step S1040, performing a multiplication operation on the first color and the first weight value to obtain a second calculation result;
[0091] Step S1041, performing a multiplication operation on the second color and the second weight value to obtain a third calculation result;
[0092] Step S1042, performing an addition operation on the second calculation result and the third calculation result to obtain a first target color.
[0093] After the game scene is rendered, it will enter the screen post-processing process. In the pixel shader, each pixel on the screen can be shaded by using two maps to search and map the color, and performing weighted calculation and fusion processing based on the previously calculated land weight.
[0094] Through the color lookup mapping function, the following formula can be used to calculate the first color Color_0 and the second color Color_1 corresponding to each pixel in the two LUT maps:
[0095] Color_0=ColorLookupTable(Tex_0);
[0096] Color_1=ColorLookupTable(Tex_1);
[0097] Furthermore, based on the above Weight_0 and Weight_1, the final target color of each pixel is calculated using the following formula:
[0098] Final_color=Color_0*Weight_0+Color_1*Weight_1.
[0099] In this embodiment, another image processing method running on the above terminal is provided. Figure 4 1 is a flowchart of another image processing method according to one embodiment of the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here. Figure 4 As shown, the method comprises the following steps:
[0100] Step S400, in response to a sliding operation on the graphical user interface, determining a first rendering image corresponding to a starting position of the sliding operation and a second rendering image corresponding to an end position of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting position, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end position;
[0101] The sliding operation received by the graphical user interface can determine the starting position and the end position of the sliding operation. When the sliding operation is at the starting position, the graphical user interface is displayed as a first rendering image; when the sliding operation is at the end position, the graphical user interface is displayed as a second rendering image, thereby achieving switching between different rendering images. Similarly, the first rendering image and the second rendering image are both basic objects processed by a color grading method of screen post-processing.
[0102] Step S401, determining a first camp and a second camp of a first rendered image, obtaining a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of a plot occupied by the first camp in a plurality of plots included in the first rendered image, and the fourth weight value is used to indicate the proportion of a plot occupied by the second camp in a plurality of plots included in the first rendered image;
[0103] Specifically, the first camp can be determined based on the target plot corresponding to the target position of the first rendered image. The target position of the first rendered image may include, but is not limited to: the center position of the first rendered image (i.e., the center position of the entire image). The target plot corresponding to the target position of the first rendered image may include, but is not limited to: the center plot corresponding to the center position. Of course, the target position can also select the center position of the left half of the first rendered image, the center position of the right half of the first rendered image, the center position of the upper half of the first rendered image, and the center position of the lower half of the first rendered image. There is no obvious restriction here. Then, interval sampling is performed in multiple directions from the target plot corresponding to the target position to obtain the number of plots belonging to different camps, and the second camp is determined based on the number of plots belonging to different camps.
[0104] The first camp and the second camp can be either hostile or allied. For example, the first camp can be the human, elf, dwarf and other camps in the justice camp, and the second camp can be the orc and other camps in the evil camp. The dwarf camp can be located in the snowy area under the white atmosphere in the game scene, and the elf camp can be located in the forest area under the green and mysterious atmosphere in the game scene.
[0105] Interval sampling is performed in multiple directions from the target plot corresponding to the target position to count the first number of plots occupied by the first camp and the second number of plots occupied by the second camp, and then the third weight value corresponding to the first camp and the fourth weight value corresponding to the second camp are calculated based on the first number and the second number. The third weight value is the proportion of the plot occupied by the first camp in the multiple plots included in the first rendered image. The fourth weight value is the proportion of the plot occupied by the second camp in the multiple plots included in the first rendered image.
[0106] In an optional embodiment, the first camp can be determined by the camp to which the central plot of the center position of the first rendered image belongs. Then, interval sampling can be performed from the central plot of the center position of the first rendered image in multiple different directions (for example, east, south, west, and north), so as to determine the second camp through the statistical results of the number of plots belonging to different camps obtained by interval sampling, and at the same time, the first number of plots occupied by the first camp and the second number of plots occupied by the second camp can be counted, and then the third weight value corresponding to the first camp and the fourth weight value corresponding to the second camp can be calculated based on the first number and the second number.
[0107] Step S402, determining a second target color for each pixel in the first rendered image based on the third color mapping map, the third weight value, the fourth color mapping map and the fourth weight value;
[0108] The above-mentioned color mapping map uses a pre-configured color lookup table, i.e., a LUT map, to map the overall atmosphere of the game into the target atmosphere by color lookup. In this way, different game atmospheres can be rendered and natural transitions and switches can be achieved between different game atmospheres without re-reading the loaded scene. There are usually multiple game camps in the game scene displayed by the first rendered image, and each game camp occupies a different area. In order to render the overall atmosphere of the game of the first rendered image, after determining the above-mentioned first camp and the second camp, the third color mapping map corresponding to the first camp and the fourth color mapping map corresponding to the second camp (i.e., two LUT maps, which may include: the main atmosphere map Tex_0 corresponding to the current first camp and the secondary atmosphere map Tex_1 of the surrounding second camp) are used to obtain the color corresponding to each pixel in the first rendered image on the third color mapping map and the color corresponding to the fourth color mapping map.
[0109] Step S403, determining the first camp and the second camp of the second rendered image, obtaining a fifth color mapping map and a fifth weight value corresponding to the first camp, and a sixth color mapping map and a sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image;
[0110] Specifically, the first camp can be determined based on the target plot corresponding to the target position of the second rendered image. The target position of the second rendered image may include, but is not limited to: the center position of the second rendered image (i.e., the center position of the entire image). The target plot corresponding to the target position of the second rendered image may include, but is not limited to: the center plot corresponding to the center position. Of course, the target position can also select the center position of the left half area of the second rendered image, the center position of the right half area of the second rendered image, the center position of the upper half area of the second rendered image, and the center position of the lower half area of the second rendered image. There is no obvious restriction here. Then, interval sampling is performed in multiple directions from the target plot corresponding to the target position to obtain the number of plots belonging to different camps, and the second camp is determined based on the number of plots belonging to different camps.
[0111] The first camp and the second camp can be either hostile or allied. For example, the first camp can be the human, elf, dwarf and other camps in the justice camp, and the second camp can be the orc and other camps in the evil camp. The dwarf camp can be located in the snowy area under the white atmosphere in the game scene, and the elf camp can be located in the forest area under the green and mysterious atmosphere in the game scene.
[0112] Interval sampling is performed in multiple directions from the target plot corresponding to the target position to count the first number of plots occupied by the first camp and the second number of plots occupied by the second camp, and then the fifth weight value corresponding to the first camp and the sixth weight value corresponding to the second camp are calculated based on the first number and the second number. The fifth weight value is the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image. The sixth weight value is the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image.
[0113] In an optional embodiment, the first camp can be determined by the camp to which the central plot of the center position of the second rendered image belongs. Then, interval sampling can be performed from the central plot of the center position of the second rendered image in multiple different directions (for example, east, south, west, and north), so as to determine the second camp through the statistical results of the number of plots belonging to different camps obtained by interval sampling, and at the same time, the first number of plots occupied by the first camp and the second number of plots occupied by the second camp can be counted, and then the fifth weight value corresponding to the first camp and the sixth weight value corresponding to the second camp can be calculated based on the first number and the second number.
[0114] Step S404, determining a third target color for each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value;
[0115] The above-mentioned color mapping map uses a pre-configured color lookup table, i.e., a LUT map, to map the overall atmosphere of the game into the target atmosphere by color lookup. In this way, different game atmospheres can be rendered and natural transitions and switches can be achieved between different game atmospheres without re-reading the loaded scene. There are usually multiple game camps in the game scene displayed by the second rendered image, and each game camp occupies a different area. In order to render the overall atmosphere of the game of the second rendered image, after determining the above-mentioned first camp and second camp, the fifth color mapping map corresponding to the first camp and the sixth color mapping map corresponding to the second camp (i.e., two LUT maps, which may include: the main atmosphere map Tex_0 corresponding to the current first camp and the secondary atmosphere map Tex_1 of the surrounding second camp) are used to obtain the color corresponding to each pixel in the second rendered image on the fifth color mapping map and the color corresponding to the sixth color mapping map.
[0116] Step S405: The second target color and the third target color are merged using a time parameter to obtain a fourth target color to display a target rendered image, wherein the time parameter is the total time consumed from the start of the sliding operation to the display of the target rendered image.
[0117] In response to the sliding operation on the graphical user interface, the display positions of the multiple camps displayed in the graphical user interface and the areas where each camp is located in the screen image will change to varying degrees. Therefore, every time the map atmosphere is changed by switching the areas where different camps are located, four LUT maps need to be used for interpolation transition. That is, two maps of the new camp this time (including: main atmosphere map and secondary atmosphere map) and two maps of the previous old camp (including: main atmosphere map and secondary atmosphere map). To this end, it is necessary to determine the rendered image where the starting point of the sliding operation is located and the rendered image where the end point of the sliding operation is located. Through the above implementation method, on the basis of using color grading of screen post-processing to render the global atmosphere of the game, when switching between different game scene atmospheres, the natural switching and transition of the game scene atmosphere can be achieved, thereby enhancing the visual experience of game players.
[0118] Figure 5 is a schematic diagram of the transition and switching process of the game scene atmosphere according to one optional embodiment of the present invention, such as Figure 5 As shown, in order to achieve the natural switching and transition of the game scene atmosphere when switching between different scene atmospheres, it is necessary to record the corresponding position of the starting plot before the game player drags the map and the corresponding position of the end plot after dragging the map, and obtain the texture and weight corresponding to the starting plot and the texture and weight corresponding to the end plot respectively. That is,
[0119] The main atmosphere map of the starting plot is Tex_0, and the weight corresponding to the main atmosphere map of the starting plot is Weight_0;
[0120] The secondary atmosphere map of the starting plot is Tex_1, and the weight corresponding to the secondary atmosphere map of the starting plot is Weight_1;
[0121] The main atmosphere map of the destination plot is Tex_2, and the weight corresponding to the main atmosphere map of the destination plot is Weight_2;
[0122] The secondary atmosphere map of the destination plot is Tex_3, and the weight corresponding to the secondary atmosphere map of the destination plot is Weight_3;
[0123] Among them, the main atmosphere map of the starting plot is Tex_0, the weight corresponding to the main atmosphere map of the starting plot is Weight_0, the secondary atmosphere map of the starting plot is Tex_1, and the weight corresponding to the secondary atmosphere map of the starting plot is Weight_1. It only needs to be calculated when it is used for the first time. Later, the main atmosphere map of the terminal plot at the last switch can be directly used as Tex_2, the weight corresponding to the main atmosphere map of the terminal plot is Weight_2, the secondary atmosphere map of the terminal plot is Tex_3, and the weight corresponding to the secondary atmosphere map of the terminal plot is Weight_3 (that is, the starting plot of this transition and switch is the last terminal plot). Then, the interpolation transition calculation is performed according to the time parameter to obtain the final displayed color.
[0124] Optionally, the above method may further include the following execution steps:
[0125] Step S406, resetting the time parameters at every preset time interval.
[0126] The time parameter Time can be used to make the switching and transition time effects fully controllable and configurable, and the transition and switching effects are more natural. The value of the time parameter Time can be flexibly set according to visual needs. For example: when switching from the atmosphere of scene A to the atmosphere of scene B, you can set the Time value to 1 second for a fast transition, or you can set the Time value to 5 seconds for a slow transition. During the transition process, you can modify the input time parameter at intervals to make the game atmosphere complete a natural transition and switch.
[0127] At the beginning of the switch, a timer can be started to reset the time parameter Time at a fixed interval for time interpolation calculation. For example, if you want to complete the scene atmosphere transition and switch within 1 second, you need to set a total duration of 1 second, and then refresh the time parameter Time every 30 milliseconds (about 1 / 30 second) so that subsequent processing can perform color calculation based on the correct time parameter.
[0128] Optionally, in step S402, determining the second target color of each pixel in the rendered image at the starting point location based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value may include the following execution steps:
[0129] Step S4020, using the third color mapping map and the fourth color mapping map, obtaining a third color corresponding to each pixel in the rendered image at the starting point on the third color mapping map and a fourth color corresponding to each pixel on the fourth color mapping map;
[0130] Step S4021, determining a second target color by using the third weight value, the fourth weight value, the third color and the fourth color.
[0131] In each screen post-processing process, the second target color (Old_color) of each pixel in the rendered image at the starting position needs to be calculated. Specifically, the third color mapping map and the fourth color mapping map are first used to obtain the third color corresponding to each pixel in the rendered image at the starting position on the third color mapping map and the fourth color corresponding to each pixel on the fourth color mapping map, and then the second target color is determined by the third weight value, the fourth weight value, the third color and the fourth color. That is, Old_color = Color_0*Weight_0+Color_1*Weight_1.
[0132] Optionally, in step S404, determining the third target color of each pixel in the rendered image where the end point is located based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value may include the following execution steps:
[0133] Step S4040, using the fifth color mapping map and the sixth color mapping map, obtaining the fifth color corresponding to each pixel in the rendered image at the end point on the fifth color mapping map and the sixth color corresponding to each pixel on the sixth color mapping map;
[0134] Step S4041, determining a third target color by using the fifth weight value, the sixth weight value, the fifth color, and the sixth color.
[0135] In each screen post-processing process, the target color (New_color) of each pixel in the rendered image at the end position needs to be calculated. Specifically, the fifth color mapping map and the sixth color mapping map are first used to obtain the fifth color corresponding to each pixel in the rendered image at the end position on the fifth color mapping map and the sixth color corresponding to each pixel on the sixth color mapping map; then the third target color is determined by the fifth weight value, the sixth weight value, the fifth color and the sixth color. That is, New_color = Color_2*Weight_2+Color_3*Weight_3.
[0136] Optionally, in step S405, the second target color and the third target color are merged by using the time parameter to obtain the fourth target color, which may include the following execution steps:
[0137] Step S4050, obtaining a first duration and a second duration based on the time parameter, wherein the first duration is the duration currently experienced during the sliding operation, and the second duration is the remaining duration corresponding to the total duration;
[0138] Step S4051, determine whether the current moment has reached the total duration set by the time parameter; when the current moment has not reached the total duration, repeatedly use the first duration and the second duration to merge the second target color and the third target color until the current moment reaches the total duration to obtain the fourth target color.
[0139] In an optional embodiment, when the second target color and the third target color are merged using the first duration and the second duration, it is necessary to multiply the second target color by the first duration to obtain a fourth calculation result and to multiply the third target color by the second duration to obtain a fifth calculation result, and then perform an addition operation on the fourth calculation result and the fifth calculation result to obtain the fourth target color.
[0140] That is, the final displayed color is obtained by performing interpolation transition calculation based on the time parameter:
[0141] Final_color=New_color*Time+Old_color*(1-Time);
[0142] As time changes, since the value of Time will gradually increase, the proportion of New_color in Final_color will also increase accordingly, until the final value of Time is 1, it can be completely switched to New_color.
[0143] Figure 6 is a flow chart of a scene atmosphere transition and switching process according to one optional embodiment of the present invention. Figure 6As shown, the process may include the following processing steps:
[0144] Step 602 , in response to a sliding operation on a graphical user interface, determining a rendered image where a starting point of the sliding operation is located and a rendered image where an end point of the sliding operation is located.
[0145] Step 604, obtaining the main atmosphere map of the starting block as Tex_0, the weight corresponding to the main atmosphere map of the starting block as Weight_0, the secondary atmosphere map of the starting block as Tex_1, and the weight corresponding to the secondary atmosphere map of the starting block as Weight_1.
[0146] Step 606, obtaining the main atmosphere map of the destination plot as Tex_2, the weight corresponding to the main atmosphere map of the destination plot as Weight_2, the secondary atmosphere map of the destination plot as Tex_3, and the weight corresponding to the secondary atmosphere map of the destination plot as Weight_3.
[0147] Step 608: When the switching starts, a timer may be started to reset the time parameter Time at fixed intervals for time interpolation calculation.
[0148] Step 610, calculating the target color Old_color = Color_0*Weight_0+Color_1*Weight_1 of each pixel in the rendered image at the starting point position.
[0149] Step 612, calculate the target color New_color = Color_2*Weight_2+Color_3*Weight_3 of each pixel in the rendered image at the end point.
[0150] Step 614, perform interpolation transition calculation according to the time parameter to obtain the final displayed color: Final_color = New_color*Time+Old_color*(1-Time).
[0151] Step 616, determine whether the current moment has reached the total duration set by the time parameter; if yes, determine that the scene atmosphere transition is complete; if not, continue to execute step S518.
[0152] Step 618, continue timing and wait for the next update of the time parameter Time.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0154] In this embodiment, an image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0155] Figure 7 is a structural block diagram of an image processing device according to one embodiment of the present invention. Figure 7 As shown, the device includes: a first acquisition module 10, used to acquire an original rendered image to be displayed on a graphical user interface; a determination module 11, used to determine a first camp and a second camp of the original rendered image; a calculation module 12, used to calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to indicate the proportion of the plot occupied by the first camp in a plurality of plots included in the original rendered image, and the second weight value is used to indicate the proportion of the plot occupied by the second camp in a plurality of plots included in the original rendered image; a second acquisition module 13, used to obtain a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map by using a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp; a processing module 14, used to determine a first target color of each pixel in the original rendered image by using the first weight value, the second weight value, the first color and the second color to display the target rendered image.
[0156] Optionally, the determination module 11 is used to determine the first camp based on a target plot corresponding to a target position of the original rendered image.
[0157] Optionally, the determination module 11 is used to perform interval sampling in multiple directions from the target plot corresponding to the target position to obtain the number of plots belonging to different camps; and determine the second camp based on the number of plots belonging to different camps.
[0158] Optionally, the calculation module 12 is used to perform interval sampling in multiple directions from the target plot corresponding to the target position, count a first number of plots occupied by the first camp and a second number of plots occupied by the second camp; and calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp based on the first number and the second number.
[0159] Optionally, the calculation module 12 is used to determine a third number of interval plots required and a fourth number of sampling plots required when sampling in each of multiple different directions; based on the third number and the fourth number, obtain a fifth number of all sampling plots obtained by interval sampling in multiple different directions; and count the camps to which each sampling plot belongs from all the sampling plots of the fifth number to obtain the first number and the second number.
[0160] Optionally, the second number is the maximum number of sampling plots occupied by each of the remaining camps in the fifth number except the first number.
[0161] Optionally, the calculation module 12 is used to add the first quantity and the second quantity to obtain a first calculation result; divide the first quantity and the first calculation result to obtain a first weight value; divide the second quantity and the first calculation result to obtain a second weight value; or, when the sum of the first weight value and the second weight value is a fixed value, subtract the fixed value from the first quantity to obtain a second weight value.
[0162] Optionally, the processing module 14 is used to multiply the first color and the first weight value to obtain a second calculation result; multiply the second color and the second weight value to obtain a third calculation result; and add the second calculation result and the third calculation result to obtain the first target color.
[0163] In this embodiment, another image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0164] Figure 8 is a structural block diagram of another image processing device according to one embodiment of the present invention. Figure 8As shown, the device includes: a first determining module 20, which is used to respond to a sliding operation on a graphical user interface, determine a first rendering image corresponding to a starting position of the sliding operation and a second rendering image corresponding to an end position of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting position, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end position; a first processing module 21, which is used to determine a first camp and a second camp of the first rendering image, obtain a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of the block occupied by the first camp in the multiple blocks included in the first rendering image, and the fourth weight value is used to indicate the proportion of the block occupied by the second camp in the multiple blocks included in the first rendering image; a second determining module 22, which is used to determine a first camp and a second camp based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value. The second processing module 23 is used to determine the first camp and the second camp of the second rendering image, obtain the fifth color mapping map and the fifth weight value corresponding to the first camp, and the sixth color mapping map and the sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendering image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendering image; the third determining module 24 is used to determine the third target color of each pixel in the second rendering image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map and the sixth weight value; the fusion module 25 is used to fuse the second target color and the third target color using a time parameter to obtain a fourth target color to display the target rendering image, wherein the time parameter is the total time consumed from the start of the sliding operation to the display of the target rendering image.
[0165] Optionally, Fig. 9 is a structural block diagram of another image processing device according to one optional embodiment of the present invention. Fig. 9 As shown, the device includes Figure 8 In addition to all the modules shown, the above device also includes: an updating module 26, which is used to reset the time parameters at every preset time interval.
[0166] Optionally, the second determination module 22 is used to use the third color mapping map and the fourth color mapping map to obtain the third color corresponding to each pixel in the rendered image at the starting point position on the third color mapping map and the fourth color corresponding to each pixel on the fourth color mapping map; determine the second target color through the third weight value, the fourth weight value, the third color and the fourth color.
[0167] Optionally, the third determination module 24 is used to use the fifth color mapping map and the sixth color mapping map to obtain the fifth color corresponding to each pixel in the rendered image at the end position on the fifth color mapping map and the sixth color corresponding to each pixel on the sixth color mapping map; determine the third target color through the fifth weight value, the sixth weight value, the fifth color and the sixth color.
[0168] Optionally, the fusion module 25 is used to obtain a first duration and a second duration based on a time parameter, wherein the first duration is the duration currently experienced during the sliding operation, and the second duration is the remaining duration corresponding to the total duration; determine whether the current moment has reached the total duration set by the time parameter; when the total duration has not been reached at the current moment, repeatedly use the first duration and the second duration to fuse the second target color and the third target color until the total duration is reached at the current moment to obtain a fourth target color.
[0169] Optionally, the fusion module 25 is used to multiply the second target color by the first duration to obtain a fourth calculation result; multiply the third target color by the second duration to obtain a fifth calculation result; and add the fourth calculation result to the fifth calculation result to obtain a fourth target color.
[0170] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0171] An embodiment of the present invention further provides a non-volatile storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0172] Optionally, in this embodiment, the non-volatile storage medium may be configured to store a computer program for performing the following steps:
[0173] S1, obtaining an original rendered image to be displayed on a graphical user interface;
[0174] S2, determining a first camp and a second camp of the original rendered image;
[0175] S3, calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to represent the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image;
[0176] S4, using a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp, obtaining a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map;
[0177] S5, determining a first target color of each pixel in the original rendered image by using the first weight value, the second weight value, the first color, and the second color to display a target rendered image.
[0178] Optionally, in this embodiment, the non-volatile storage medium may also be configured to store a computer program for performing the following steps:
[0179] S1, in response to a sliding operation on a graphical user interface, determining a first rendering image corresponding to a starting position of the sliding operation and a second rendering image corresponding to an end position of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting position, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end position;
[0180] S2, determining a first camp and a second camp of the first rendered image, obtaining a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the first rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the first rendered image;
[0181] S3, determining a second target color for each pixel in the first rendered image based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value;
[0182] S4, determining a first camp and a second camp of the second rendered image, obtaining a fifth color mapping map and a fifth weight value corresponding to the first camp, and a sixth color mapping map and a sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image;
[0183] S5, determining a third target color for each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value;
[0184] S6. Using a time parameter to merge the second target color and the third target color to obtain a fourth target color to display a target rendered image, wherein the time parameter is a total time consumed from the start of the sliding operation to the display of the target rendered image.
[0185] Optionally, in this embodiment, the above-mentioned non-volatile storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0186] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0187] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0188] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0189] S1, obtaining an original rendered image to be displayed on a graphical user interface;
[0190] S2, determining a first camp and a second camp of the original rendered image;
[0191] S3, calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to represent the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image;
[0192] S4, using a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp, obtaining a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map;
[0193] S5, determining a first target color of each pixel in the original rendered image by using the first weight value, the second weight value, the first color, and the second color to display a target rendered image.
[0194] Optionally, in this embodiment, the processor may also be configured to perform the following steps through a computer program:
[0195] S1, in response to a sliding operation on a graphical user interface, determining a first rendering image corresponding to a starting position of the sliding operation and a second rendering image corresponding to an end position of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting position, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end position;
[0196] S2, determining a first camp and a second camp of the first rendered image, obtaining a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the first rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the first rendered image;
[0197] S3, determining a second target color for each pixel in the first rendered image based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value;
[0198] S4, determining a first camp and a second camp of the second rendered image, obtaining a fifth color mapping map and a fifth weight value corresponding to the first camp, and a sixth color mapping map and a sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image;
[0199] S5, determining a third target color for each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value;
[0200] S6. Using a time parameter to merge the second target color and the third target color to obtain a fourth target color to display a target rendered image, wherein the time parameter is a total time consumed from the start of the sliding operation to the display of the target rendered image.
[0201] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0202] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0203] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0205] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0206] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0207] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0208] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An image processing method, characterized in that: include: Obtaining an original rendered image to be displayed by a graphical user interface; Determine a first camp and a second camp of the original rendered image; Calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to represent the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image; Using a first color mapping map corresponding to the first camp and a second color mapping map corresponding to the second camp, obtaining a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map; A first target color of each pixel in the original rendered image is determined by the first weight value, the second weight value, the first color, and the second color to display a target rendered image.
2. The image processing method according to claim 1, characterized in that: Determining the first camp of the original rendered image includes: The first camp is determined based on a target plot corresponding to a target position of the original rendered image, wherein the target position includes one of the following: a center position of the original rendered image, a center position of a left half area of the original rendered image, a center position of a right half area of the original rendered image, a center position of an upper half area of the original rendered image, or a center position of a lower half area of the original rendered image.
3. The image processing method according to claim 2, characterized in that: Determining the second camp of the original rendered image includes: Performing interval sampling in multiple directions from the target plot corresponding to the target position to obtain the number of plots belonging to different camps; The second camp is determined based on the number of plots belonging to different camps.
4. The image processing method according to claim 2, characterized in that: Calculating the first weight value corresponding to the first camp and the second weight value corresponding to the second camp includes: Performing interval sampling in multiple directions from the target plot corresponding to the target position, and counting a first number of plots occupied by the first camp and a second number of plots occupied by the second camp; The first weight value corresponding to the first camp and the second weight value corresponding to the second camp are calculated based on the first number and the second number.
5. The image processing method according to claim 4, characterized in that: Performing interval sampling from the target plot corresponding to the target position in the multiple directions to count the first number of plots occupied by the first camp and the second number of plots occupied by the second camp includes: determining a third number of spacing plots required and a fourth number of sampling plots required when sampling in each of a plurality of different directions; Based on the third number and the fourth number, obtain a fifth number of all sampling plots obtained by performing interval sampling in the multiple different directions; The camp to which each sampling plot belongs is counted from all the fifth number of sampling plots to obtain the first number and the second number.
6. The image processing method according to claim 5, characterized in that: The second number is the maximum number of sampling plots occupied by each of the remaining camps in the fifth number except the first number.
7. The image processing method according to claim 4, characterized in that: Calculating a first weight value corresponding to the first camp and a second weight value corresponding to the second camp based on the first number and the second number includes: performing an addition operation on the first number and the second number to obtain a first calculation result; Performing a division operation on the first number and the first calculation result to obtain the first weight value; The second number is divided by the first calculation result to obtain the second weight value; or, when the sum of the first weight value and the second weight value is a fixed value, the fixed value is subtracted from the first number to obtain the second weight value.
8. The image processing method according to claim 1, characterized in that: Determining the first target color by using the first weight value, the second weight value, the first color, and the second color includes: Performing a multiplication operation on the first color and the first weight value to obtain a second calculation result; performing a multiplication operation on the second color and the second weight value to obtain a third calculation result; An addition operation is performed on the second calculation result and the third calculation result to obtain the first target color.
9. An image processing method, characterized in that: include: In response to a sliding operation on a graphical user interface, determining a first rendering image corresponding to a starting position of the sliding operation and a second rendering image corresponding to an end position of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting position, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end position; Determine a first camp and a second camp of the first rendered image, obtain a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of a plot occupied by the first camp in a plurality of plots included in the first rendered image, and the fourth weight value is used to indicate the proportion of a plot occupied by the second camp in a plurality of plots included in the first rendered image; Determining a second target color for each pixel in the first rendered image based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value; Determine the first camp and the second camp of the second rendered image, obtain a fifth color mapping map and a fifth weight value corresponding to the first camp, and a sixth color mapping map and a sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of the plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of the plot occupied by the second camp in the multiple plots included in the second rendered image; determining a third target color for each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value; The second target color and the third target color are merged using a time parameter to obtain a fourth target color to display a target rendered image, wherein the time parameter is a total time consumed from the start of the sliding operation to the display of the target rendered image.
10. The image processing method according to claim 9, characterized in that: The method further comprises: The time parameter is reset at every preset time interval.
11. The image processing method according to claim 9, characterized in that: Determining the second target color of each pixel in the rendered image at the starting point location based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value includes: Using the third color mapping map and the fourth color mapping map, obtain a third color corresponding to each pixel in the rendered image at the starting point position on the third color mapping map and a fourth color corresponding to each pixel on the fourth color mapping map; The second target color is determined by the third weight value, the fourth weight value, the third color, and the fourth color.
12. The image processing method according to claim 9, characterized in that: Determining the third target color of each pixel in the rendered image where the end point is located based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value includes: Using the fifth color mapping map and the sixth color mapping map, obtain a fifth color corresponding to each pixel in the rendered image at the end point position on the fifth color mapping map and a sixth color corresponding to each pixel on the sixth color mapping map; The third target color is determined by the fifth weight value, the sixth weight value, the fifth color, and the sixth color.
13. The image processing method according to claim 9, characterized in that: Using the time parameter to fuse the second target color and the third target color to obtain the fourth target color includes: Acquire a first duration and a second duration based on the time parameter, wherein the first duration is the duration currently experienced during the sliding operation, and the second duration is the remaining duration corresponding to the total duration; Determine whether the current time has reached the total duration set by the time parameter; When the current moment has not reached the total duration, the first duration and the second duration are repeatedly used to merge the second target color and the third target color until the current moment reaches the total duration to obtain the fourth target color.
14. The image processing method according to claim 13, characterized in that: Using the first duration and the second duration to merge the second target color and the third target color includes: Performing a multiplication operation on the second target color and the first duration to obtain a fourth calculation result; Performing a multiplication operation on the third target color and the second duration to obtain a fifth calculation result; An addition operation is performed on the fourth calculation result and the fifth calculation result to obtain the fourth target color.
15. An image processing device, characterized in that: include: A first acquisition module, used for acquiring an original rendered image to be displayed on a graphical user interface; A determination module, used to determine a first camp and a second camp of the original rendered image; a calculation module, configured to calculate a first weight value corresponding to the first camp and a second weight value corresponding to the second camp, wherein the first weight value is used to represent the proportion of the plot occupied by the first camp in the multiple plots included in the original rendered image, and the second weight value is used to represent the proportion of the plot occupied by the second camp in the multiple plots included in the original rendered image; A second acquisition module, used to obtain a first color corresponding to each pixel in the original rendered image on the first color mapping map and a second color corresponding to each pixel on the second color mapping map by using a first color mapping map corresponding to the first camp and a second color corresponding to each pixel on the second color mapping map; A processing module is used to determine a first target color of each pixel in the original rendered image by using the first weight value, the second weight value, the first color and the second color to display a target rendered image.
16. An image processing device, characterized in that: include: A first determination module is configured to respond to a sliding operation on a graphical user interface and determine a first rendering image corresponding to a starting position of the sliding operation and a second rendering image corresponding to an end position of the sliding operation, wherein the first rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the starting position, and the second rendering image is a rendering image displayed by the graphical user interface when the sliding operation is at the end position; A first processing module is used to determine a first camp and a second camp of the first rendering image, and obtain a third color mapping map and a third weight value corresponding to the first camp, and a fourth color mapping map and a fourth weight value corresponding to the second camp, wherein the third weight value is used to indicate the proportion of a plot occupied by the first camp in a plurality of plots included in the first rendering image, and the fourth weight value is used to indicate the proportion of a plot occupied by the second camp in a plurality of plots included in the first rendering image; A second determination module, configured to determine a second target color for each pixel in the first rendered image based on the third color mapping map, the third weight value, the fourth color mapping map, and the fourth weight value; a second processing module, used to determine the first camp and the second camp of the second rendered image, and obtain a fifth color mapping map and a fifth weight value corresponding to the first camp, and a sixth color mapping map and a sixth weight value corresponding to the second camp, wherein the fifth weight value is used to indicate the proportion of a plot occupied by the first camp in the multiple plots included in the second rendered image, and the fourth weight value is used to indicate the proportion of a plot occupied by the second camp in the multiple plots included in the second rendered image; A third determination module, configured to determine a third target color of each pixel in the second rendered image based on the fifth color mapping map, the fifth weight value, the sixth color mapping map, and the sixth weight value; A fusion module is used to fuse the second target color and the third target color using a time parameter to obtain a fourth target color to display a target rendered image, wherein the time parameter is a total time consumed from the start of the sliding operation to the display of the target rendered image.
17. A non-volatile storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the image processing method described in any one of claims 1 to 8 or the image processing method described in any one of claims 9 to 14 when running.
18. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the image processing method described in any one of claims 1 to 8 or the image processing method described in any one of claims 9 to 14.
