Image processing method and device and terminal equipment
By using a texture pool to manage rendered textures on the terminal device, the problem of large memory consumption of rendered textures is solved, achieving high efficiency and resource saving in image post-processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, when terminal devices perform multiple post-processing steps on images, rendering textures consumes a large amount of memory, resulting in resource waste and low efficiency.
The terminal device determines the rendering texture based on the texture pool, copies the image to the rendering texture and performs post-processing, and stores it in the texture pool to reuse the rendering texture, reducing the need to create new rendering textures.
It improves the efficiency and accuracy of image post-processing, reduces the memory usage of rendered textures, and saves resources.
Smart Images

Figure CN121921206A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, and terminal device. Background Technology
[0002] Image post-processing involves fine-tuning and optimizing an already generated image. Examples of post-processing include adding filters or whitening the image.
[0003] Currently, when terminal devices perform post-processing on images, they need to create a temporary rendering texture for each post-processing step and then use this rendering texture to perform post-processing on the image. However, when performing multiple post-processing steps on an image, the rendering texture occupies a large amount of memory, resulting in wasted resources. Summary of the Invention
[0004] This disclosure provides an image processing method, apparatus, and terminal device to solve technical problems in the prior art.
[0005] In a first aspect, embodiments of this disclosure provide an image processing method, the image processing method comprising:
[0006] In response to post-processing of the first image, a first rendering texture is determined based on the post-processing and a texture pool, the texture pool being used to store multiple rendering textures required for post-processing.
[0007] The first image is copied to the first rendering texture to obtain the second rendering texture;
[0008] The second rendering texture is subjected to the post-processing, and the first rendering texture or the second rendering texture is stored in the texture pool.
[0009] In a second aspect, embodiments of this disclosure provide an image processing apparatus, which includes a determining module, a copying module, a processing module, and a storage module, wherein:
[0010] The determining module is used to determine a first rendering texture based on the post-processing and the texture pool in response to post-processing of the first image, wherein the texture pool is used to store multiple rendering textures required for post-processing.
[0011] The copying module is used to copy the first image to the first rendering texture to obtain a second rendering texture.
[0012] The processing module is used to perform the post-processing on the second rendered texture;
[0013] The storage module is used to store the first rendering texture or the second rendering texture in the texture pool.
[0014] Thirdly, this disclosure provides a terminal device including: a processor and a memory;
[0015] The memory stores computer-executed instructions;
[0016] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the image processing methods described in the first aspect above and various possible aspects of the first aspect.
[0017] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the image processing methods described in the first aspect and various possible aspects of the first aspect.
[0018] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the image processing methods described in the first aspect above and various possible aspects of the first aspect.
[0019] This disclosure provides an image processing method, apparatus, and terminal device. In response to post-processing of a first image, the terminal device determines a first rendering texture based on the post-processing and a texture pool. The texture pool can store multiple rendering textures required for post-processing. The terminal device can copy the first image to the first rendering texture to obtain a second rendering texture, perform post-processing on the second rendering texture, and store either the first or second rendering texture in the texture pool. In this method, since the terminal device can obtain the first rendering texture from the texture pool, the efficiency of image post-processing is improved. Furthermore, after the first rendering texture is used, the terminal device can re-store either the first or second rendering texture in the texture pool. Therefore, the terminal device can reuse rendering textures required for post-processing based on the texture pool, without creating a large number of rendering textures, thereby reducing the memory occupied by rendering textures and saving resources. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0022] Figure 2A schematic flowchart of an image processing method provided in an embodiment of this disclosure;
[0023] Figure 3 This is a schematic diagram illustrating a process for determining post-processing for a first image, provided as an embodiment of the present disclosure.
[0024] Figure 4 A schematic diagram of a texture mechanism provided in an embodiment of this disclosure;
[0025] Figure 5 A schematic diagram illustrating the determination of a second rendering texture, provided as an embodiment of this disclosure;
[0026] Figure 6 This is a schematic diagram illustrating another method for determining a second rendering texture, provided by an embodiment of this disclosure.
[0027] Figure 7 This is a schematic diagram of a method for determining a first rendering texture provided in an embodiment of the present disclosure;
[0028] Figure 8 This is a schematic diagram of a method for releasing a rendered texture according to an embodiment of the present disclosure;
[0029] Figure 9 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure;
[0030] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Detailed Implementation
[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0032] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0033] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the terminal device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0034] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the terminal device.
[0035] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0036] For ease of understanding, the concepts involved in the embodiments of this disclosure will be explained below.
[0037] Terminal device: A device with wireless transceiver capabilities. Terminal devices can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. These terminal devices can be mobile phones, tablet computers, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, vehicle-mounted terminal devices, wireless terminals in self-driving vehicles, wireless terminal devices in remote medical care, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, wireless terminal devices in smart homes, wearable terminal devices, etc. The terminal equipment involved in the embodiments of this disclosure may also be referred to as a terminal, user equipment (UE), access terminal equipment, vehicle-mounted terminal, industrial control terminal, UE unit, UE station, mobile station, mobile station, remote station, remote terminal equipment, mobile device, UE terminal equipment, wireless communication equipment, UE agent, or UE device, etc. The terminal equipment may also be fixed or mobile.
[0038] In related technologies, image post-processing involves fine-tuning and optimizing an already generated image. For example, image post-processing can include adding filters, whitening, and slimming faces. Currently, when performing image post-processing, terminal devices need to create a temporary rendering texture for each post-processing step and then use that texture to perform the post-processing. For instance, if a terminal device performs whitening, filtering, and beautification on an image, it needs to create at least one rendering texture for whitening, at least one for filtering, and at least one for beautification. This results in a large memory footprint for the rendering textures, wasting memory resources and reducing the efficiency of image post-processing.
[0039] To address the technical problems in related technologies, embodiments of this disclosure provide an image processing method. In response to post-processing of a first image, a terminal device determines first texture information of the rendering texture required for post-processing, and a first number of rendering textures associated with the first texture information. Based on the first texture information, the first number, and a texture pool, a first rendering texture is determined. The terminal device can copy the first image to the first rendering texture to obtain a second rendering texture, and perform post-processing on the second rendering texture. The terminal device can store either the first rendering texture or the second rendering texture in the texture pool. Thus, since the terminal device can quickly and accurately obtain the first rendering texture from the texture pool based on the first texture information and the first number, the efficiency and accuracy of image post-processing are improved. Furthermore, after the first rendering texture is used, the terminal device can re-store either the first rendering texture or the second rendering texture in the texture pool. Therefore, the terminal device can reuse the rendering textures required for post-processing based on the texture pool, without creating a large number of rendering textures, thereby reducing the memory occupied by rendering textures and saving resources.
[0040] Below, in conjunction with Figure 1 The application scenarios of the embodiments of this disclosure will be described.
[0041] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure. Please refer to [link / reference]. Figure 1 This includes a texture pool and image A. The texture pool contains rendering texture 1, rendering texture 2, ..., rendering texture n. (Terminal device) Figure 1(Not shown) Based on post-processing (filtering), a first rendering texture can be obtained from the texture pool, and image A can be copied to the first rendering texture to obtain the first rendering texture of the copied image A. The terminal device can add a filter to the first rendering texture of the copied image A to obtain image B. Here, image B can be the image of image A with the filter added. In this way, the terminal device can reuse rendering textures based on the texture pool without creating redundant rendering textures, thereby reducing the memory occupied by rendering textures, saving resources, and the terminal device can quickly obtain the first rendering texture for post-processing from the texture pool, improving the efficiency of image post-processing.
[0042] It should be noted that, Figure 1 These are examples of application scenarios in the embodiments of this disclosure, and are not intended to limit the application scenarios of the embodiments of this disclosure.
[0043] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0044] Figure 2 This is a schematic flowchart illustrating an image processing method provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 2 The method may include:
[0045] S201. In response to post-processing of the first image, determine the first rendering texture based on the post-processing and the texture pool.
[0046] The execution entity of this disclosure can be a terminal device or an image processing device within the terminal device. The image processing device can be implemented in software, or it can be implemented using a combination of software and hardware; this disclosure does not limit the implementation in this regard.
[0047] Optionally, post-processing of the first image may include adding filters to the first image, whitening the first image, and beautifying the first image, etc., and this disclosure does not limit this.
[0048] The terminal device can obtain post-processing of the first image based on the following feasible implementation method: displaying a page, which may include at least one control corresponding to post-processing, and obtaining post-processing of the first image in response to touch of the control for post-processing.
[0049] The controls corresponding to post-processing can be associated with post-processing. For example, if the user clicks the control corresponding to post-processing 1, the terminal device will obtain post-processing 1; if the user clicks the control corresponding to post-processing 2, the terminal device will obtain post-processing 2. For example, after the user clicks the post-processing control, the terminal device can respond with post-processing of the first image.
[0050] Below, in conjunction with Figure 3 The process of determining the post-processing of the first image by the terminal device is explained.
[0051] Figure 3 This is a schematic diagram illustrating a process for determining post-processing for a first image, as provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 3 This includes the terminal device. The page displayed on the terminal device includes a first image, filter controls, beautification controls, whitening controls, and face-slimming controls. If the user clicks a filter control, the terminal device can determine that the post-processing of the first image is a filter.
[0052] Optional, in Figure 3 In the illustrated embodiment, if the user clicks the beautification control, the terminal device can determine that the post-processing of the first image is beautification. If the user clicks the whitening control, the terminal device can determine that the post-processing of the first image is whitening. If the user clicks the face slimming control, the terminal device can determine that the post-processing of the first image is face slimming. In this way, the terminal device can accurately determine the post-processing of the first image based on the user's actions, improving the accuracy of post-processing determination and enhancing the user experience.
[0053] The first image can be an image from a video. For example, the video may include 100 frames, and the terminal device can perform post-processing on each frame of the video. For example, the terminal device can acquire the first image from the video to be post-processed, and the first image can be the first frame, the second frame, ..., the last frame of the video to be post-processed. This disclosure does not limit this aspect.
[0054] The texture pool can store multiple rendering textures required for post-processing. These rendering textures can carry image content. For example, a rendering texture can be a "canvas," the content of which can be blank, and the terminal device can copy image content into this "canvas." For example, the texture pool can store multiple rendering textures, and these multiple rendering textures can be rendering textures already used in post-processing. For example, the terminal device can perform beautification and whitening processing on a video. The terminal device performs beautification and whitening processing on the first frame of the video based on rendering texture 1 and rendering texture 2. Therefore, when the terminal device performs beautification and whitening processing on the second frame of the video, the texture pool can include rendering texture 1 and rendering texture 2.
[0055] Optionally, the texture pool can be empty or it can include at least one rendering texture. For example, when the terminal device performs post-processing on the first frame of a video, the texture pool can be empty, that is, the texture pool does not yet include rendering textures. After the terminal device performs multiple post-processing on multiple frames of the video, the texture pool can store the rendering textures that have been used in multiple post-processing.
[0056] Optionally, the texture pool may include a rendering texture and its texture information. The texture information may be parameters of the rendering texture. For example, the texture information may be parameters such as the length, width, height, and color depth of the rendering texture; however, this embodiment does not limit the specific parameters.
[0057] Optionally, the texture pool can store rendered textures based on texture information. For example, the texture pool can store rendered textures with the same texture information in a location associated with the texture information. For example, the texture pool includes the memory space corresponding to texture information 1 (e.g., the memory space allocated by the terminal device for texture information 1) and the memory space corresponding to texture information 2. The terminal device can store the rendered texture of texture information 1 in the memory space corresponding to texture information 1, and store the rendered texture corresponding to texture information 2 in the memory space corresponding to texture information 2. For example, the texture information of rendered texture A and rendered texture B is texture information 1, and the texture information of rendered texture C is texture information 2. The memory space corresponding to texture information 1 is memory space a, and the memory space corresponding to texture information 2 is memory space b. The terminal device can store rendered texture A and rendered texture B in memory space a, and store rendered texture C in memory space b.
[0058] Below, in conjunction with Figure 4 The texturing mechanism of the embodiments of this disclosure will be described.
[0059] Figure 4 This is a schematic diagram illustrating a texture mechanism provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 4This includes a texture mechanism. The texture mechanism comprises a texture pool and an activation list. The texture pool can include texture information 1, texture information 2, and texture information 3. The rendering textures associated with texture information 1 are rendering texture A and rendering texture B. The rendering texture associated with texture information 2 is rendering texture C. The rendering texture associated with texture information 3 is empty.
[0060] Please see Figure 4 The activation list can include render texture D, render texture E, and render texture F. Render textures D, E, and F can be used for post-processing of the image in this operation. After post-processing of the image is complete, the terminal device (…) Figure 4 (Not shown) The render textures D, E, and F in the activation list can be re-stored in the texture pool (based on the texture information corresponding to the render textures).
[0061] The first rendering texture can be a texture required for post-processing the first image. For example, if the terminal device responds to whitening processing of the first image, the first rendering texture can be a texture required for whitening; if the terminal device responds to beautification processing of the first image, the first rendering texture can be a texture required for beautification.
[0062] The terminal device can determine the first rendering texture based on the following feasible implementation: determining the first texture information of the first rendering texture required for post-processing, and the first number of rendering textures associated with the first texture information; and determining the first rendering texture based on the first texture information, the first number, and the texture pool. In this way, the terminal device can accurately determine the first rendering texture required for post-processing, improving the accuracy of the first rendering texture.
[0063] The first texture information can be the texture information of the first rendering texture required for post-processing. For example, if the image is 10*10 in size, the first texture information of the first rendering texture required for post-processing can include the length and width of the rendering texture being 10.
[0064] Optionally, the terminal device can determine the size of the first rendering texture required for post-processing based on the size of the image, and the terminal device can pre-set texture information such as the number of color bits for each post-processing step.
[0065] Optionally, the terminal device can receive a post-processing request message for the first image. This request message may include first texture information of at least one rendering texture required for the post-processing, and a first number of rendering textures corresponding to each first texture information. For example, the terminal device can receive a whitening request message for the first image. This whitening request message may indicate first texture information with a length of 10 and a width of 10, and first texture information with a length of 20 and a width of 20. That is, the whitening process requires two types of rendering textures. Furthermore, the whitening request message may indicate a first number of rendering textures corresponding to the first texture information with a length of 10 and a width of 10, and a first number of rendering textures corresponding to the first texture information with a length of 20 and a width of 20. For example, if the first number of rendering textures corresponding to the first texture information with a length of 10 and a width of 10 is 1, and the first number of rendering textures corresponding to the first texture information with a length of 20 and a width of 20 is 2, then this post-processing requires one rendering texture with a length of 10 and a width of 10, and two rendering textures with a length of 20 and a width of 20.
[0066] S202. Copy the first image to the first rendering texture to obtain the second rendering texture.
[0067] The second rendering texture may include the first image content of the first image.
[0068] The terminal device can copy the image to the first rendering texture using the following feasible implementation: obtain the first image content of the first image; if the first rendering texture does not contain image content, copy the first image content to the first rendering texture; if the first rendering texture contains image content, overwrite the image content in the first rendering texture with the first image content. In this way, the terminal device can accurately copy the first image to the first rendering texture, improving the accuracy of post-processing of the first image.
[0069] Optionally, the content of the first image can be an object in the first image. For example, if the object in the first image is a triangle, then the content of the first image can be a triangle; if the object in the first image is a circle, then the content of the first image can be a circle.
[0070] Optionally, the content of the first image may also be all the content in the first image, and this embodiment of the disclosure does not limit this.
[0071] The first rendering texture may or may not include image content. For example, if the first rendering texture was used in a previous post-processing step, it may include the image content copied during that step. Conversely, if the terminal device did not use the first rendering texture in a previous post-processing step, or if the terminal device used the first rendering texture and then deleted the image content copied from it, the first rendering texture may not include image content.
[0072] If the first rendering texture does not include image content, the terminal device can directly copy the first image content into the first rendering texture to obtain the second rendering texture. For example, if the first image includes a triangle image, the terminal device can directly copy the triangle image into the first rendering texture to obtain the second rendering texture. Alternatively, the terminal device can directly copy the first image into the first rendering texture to obtain the second rendering texture. This embodiment of the present disclosure does not limit the scope of the invention.
[0073] If the first rendering texture includes image content, the terminal device can overwrite the image content with the first image content. For example, if the first image includes a triangle image and the first rendering texture includes a circle image, the terminal device can delete the circle image in the first rendering texture and copy the triangle image into the first rendering texture to obtain the second rendering image. Alternatively, the terminal device can replace the circle image in the first rendering texture with a triangle image to obtain the second rendering image. This embodiment of the present disclosure does not limit the specific method used.
[0074] Below, in conjunction with Figures 5-6 The process of determining the second rendering texture is explained.
[0075] Figure 5 This is a schematic diagram illustrating the determination of a second rendering texture according to an embodiment of this disclosure. Please refer to... Figure 5 This includes a first image and a first rendered texture. The first image contains a triangular image, and the first rendered texture does not include the second image content. (Terminal device) Figure 5 (Not shown) The triangle image can be copied into the first rendering texture to obtain the second rendering texture, so that the second rendering texture can include the triangle image.
[0076] Figure 6 This is a schematic diagram illustrating another method for determining the second rendering texture, provided as an embodiment of this disclosure. Please refer to... Figure 6 This includes a first image and a first rendered texture. The first image contains a triangular image, and the first rendered texture contains a circular image. (Terminal device) Figure 6(Not shown) The circular image in the first rendering texture can be replaced with a triangular image in the image to obtain the second rendering image. In this way, the second rendering texture can include a triangular image.
[0077] S203. Perform post-processing on the second rendering texture and store the first rendering texture or the second rendering texture in the texture pool.
[0078] The terminal device can perform post-processing on the second rendered texture. For example, in Figure 5 In the illustrated embodiment, the second rendering texture may include a triangle image, and the terminal device may adjust the color of the triangle image of the second rendering texture.
[0079] It should be noted that the terminal device can perform post-processing on the second rendered texture based on any feasible implementation method, and the embodiments disclosed herein are not limited in this regard.
[0080] After post-processing by the terminal device, the terminal device can re-store the first or second rendered texture in the texture pool. For example, the first and second rendered textures may have different image contents, but their texture information is the same. Therefore, the first and second rendered textures can be considered as the same rendered texture during use.
[0081] Optionally, the terminal device can directly store the second rendered texture in the texture pool, or it can delete the image content of the second rendered texture (the first rendered texture) and then store it in the texture pool. This embodiment of the present disclosure does not limit this. For example, when the terminal device performs whitening processing on the first image, the texture pool can add rendered texture 1 and rendered texture 2 to the active list. After the terminal device performs whitening processing on the first image, it can either store rendered texture 1 and rendered texture 2 from the active list back in the texture pool, or it can delete the image memory in rendered texture 1 and rendered texture 2 and then store them back in the texture pool.
[0082] Optionally, the terminal device may store the second rendered texture in the memory space corresponding to the texture information of the second rendered texture. For example, in Figure 4 In the embodiment shown, if the terminal device adds the rendering texture D of texture information 3 to the activation list, then after the rendering texture D is no longer used (the texture information D may include image content, but the texture information remains unchanged), the terminal device can restore the rendering texture D in the memory space corresponding to texture information 3.
[0083] Optionally, after the terminal device stores the second rendering texture in the texture pool, the above image processing method further includes: copying the second image content in the second rendering texture to the output texture to obtain the second image, and rendering and displaying the second image.
[0084] The output texture can be used for rendering or display. For example, during image post-processing, one or more rendering textures (which can also be temporary textures) can be created. These rendering textures can store and process image data (such as shadow maps, reflection maps, etc.). After processing, these rendering textures can be merged or copied into the output texture for display on the screen.
[0085] The second image can be a post-processed version of the first image. For example, if the first image is whitened, the second image can be the whitened version of the first image; if the first image is beautified, the second image can be the beautified version of the first image.
[0086] The method by which the terminal device copies the second image content in the second rendering texture to the output texture is the same as the method by which the terminal device copies the first image to the first rendering texture, and will not be described again in this embodiment.
[0087] Once the terminal device receives the second image, it can render and display it on the screen. This allows users to view the post-processing effects on the first image in a timely manner, improving the user experience.
[0088] This disclosure provides an image processing method. In response to post-processing of a first image, a terminal device determines first texture information of the rendering texture required for post-processing, and a first number of rendering textures associated with the first texture information. Based on the first texture information, the first number, and a texture pool, a first rendering texture is determined. The terminal device can copy the first image to the first rendering texture to obtain a second rendering texture, and perform post-processing on the second rendering texture. The terminal device can store the second rendering texture in the texture pool. Furthermore, the terminal device can copy the second image content from the second rendering texture to an output texture to obtain a second image, which is then rendered and displayed. This method improves the efficiency and accuracy of image post-processing because the terminal device can quickly and accurately obtain the first rendering texture from the texture pool based on the first texture information and the first number. After the first rendering texture is used, the terminal device can re-store the second rendering texture (or the first rendering texture) in the texture pool. Therefore, the terminal device can reuse the rendering textures required for post-processing based on the texture pool, reducing the need to create numerous rendering textures and saving resources. Finally, the terminal device can display the post-processed second image promptly, improving image display efficiency and enhancing the user experience.
[0089] exist Figure 2 Based on the embodiments shown, the following, in conjunction with Figure 7 The method for determining the first rendering texture based on post-processing and texture pool in the above image processing method will be described.
[0090] Figure 7 This is a schematic diagram illustrating a method for determining a first rendering texture according to an embodiment of this disclosure. Please refer to... Figure 7 The method process includes:
[0091] S701, determine the first texture information of the first rendering texture required for post-processing, and the first number of rendering textures associated with the first texture information.
[0092] S702. Determine the first rendering texture based on the first texture information, the first quantity, and the texture pool.
[0093] The terminal device can determine the first rendering texture based on the following feasible implementation: determine whether there is second texture information in the texture pool that is identical to the first texture information; if it exists, determine the first rendering texture based on the second texture information, the first quantity, and the texture pool; if it does not exist, create the first quantity of first rendering textures based on the first texture information. In this way, the terminal device can reuse the first rendering texture in the texture pool, saving resources.
[0094] The second texture information can be the same as the first texture information. For example, if the first texture information is a rendering texture with a length of 10 and a width of 10, then the second texture information can be a rendering texture with a length of 10 and a width of 10. If the first texture information is a rendering texture with a length of 20 and a width of 20, then the second texture information can be a rendering texture with a length of 20 and a width of 20.
[0095] Optionally, the terminal device may determine whether there is second texture information in the texture pool that is the same as the first texture information based on any feasible implementation method, and the embodiments of this disclosure do not limit this.
[0096] If a second texture information identical to the first texture information exists in the texture pool, it indicates that a first rendering texture may exist in the texture pool. Therefore, the terminal device can determine the first rendering texture based on the second texture information, the first quantity, and the texture pool.
[0097] If no second texture information identical to the first texture information exists in the texture pool, it means that the first rendering texture does not exist in the texture pool. Therefore, the terminal device can create a first number of first rendering textures based on the first texture information. For example, if the first texture information includes a rendering texture with a length of 10 and a width of 10, and the first quantity is 3, and no second texture information identical to the first texture information exists in the texture pool, the terminal device can create 3 first rendering textures with a length of 10 and a width of 10.
[0098] Specifically, the terminal device determines the first rendering texture based on the second texture information, the first quantity, and the texture pool. Specifically, it can be done by: determining whether the first rendering texture exists in the texture pool based on the second texture information, and determining the first rendering texture based on the result.
[0099] If a rendering texture corresponding to the second texture information exists in the texture pool, the terminal device can determine that a first rendering texture exists in the texture pool. For example, since the first texture information is the same as the second texture information, if the texture information of a rendering texture in the texture pool is the second texture information, then that rendering texture can be the first rendering texture. For example, the texture pool includes rendering texture 1 and rendering texture 2, where rendering texture 1 has a size of 10*10 and rendering texture 2 has a size of 20*20. If the second texture information is that the length and width of the rendering texture are 10, then the terminal device can determine that a first rendering texture exists in the texture pool and identify rendering texture 1 as the first rendering texture.
[0100] It should be noted that the terminal device can determine whether the first rendering texture exists in the texture pool based on any feasible implementation method, and the embodiments disclosed herein do not limit this.
[0101] The terminal device determines the first rendering texture based on this result (indicating whether the first rendering texture exists in the texture pool), and there are three possible scenarios:
[0102] Case 1: It exists, and the second quantity of the first rendered texture in the texture pool is greater than or equal to the first quantity.
[0103] If a first rendering texture exists, and the second number of first rendering textures in the texture pool is greater than or equal to the first number, then the terminal device can obtain the first number of first rendering textures from the texture pool. For example, if a first rendering texture exists in the texture pool, and the second number of first rendering textures is greater than or equal to the first number, then the terminal device can obtain enough first rendering textures from the texture pool, and the terminal device does not need to create first rendering textures. For example, if there are 4 first rendering textures in the texture pool, and the terminal device needs 3 first rendering textures for post-processing the first image, then the terminal device can obtain 3 first rendering textures from the texture pool.
[0104] Case 2: It exists, and the second quantity of the third rendered texture is less than the first quantity.
[0105] If a second number of first rendering textures exists and the second number of first rendering textures in the texture pool is less than the first number, then the terminal device can obtain a second number of first rendering textures from the texture pool and create a third number of first rendering textures based on the second texture information.
[0106] The third quantity is the difference between the first and second quantities. For example, if the first quantity is 3 and the second quantity is 2, then the third quantity can be 1.
[0107] For example, if a first rendering texture exists in the texture pool, and the second number of first rendering textures is less than the first number, it means that the terminal device cannot obtain enough first rendering textures from the texture pool. Therefore, the terminal device needs to create some more first rendering textures before it can perform post-processing on the first image. For example, if there are two first rendering textures in the texture pool, and the terminal device needs three first rendering textures to perform post-processing on the first image, the terminal device can obtain two first rendering textures from the texture pool. Since the first texture information is the same as the second texture information, the terminal device can create at least one first rendering texture based on the second texture information, thereby obtaining enough first rendering textures.
[0108] Case 3: Not present.
[0109] If the first rendering texture does not exist, the terminal device can create a first number of first rendering textures based on the second texture information. For example, if the first rendering texture does not exist in the texture pool, it means that the terminal device cannot obtain the first rendering texture from the texture pool. Since the first texture information is the same as the second texture information, the terminal device can create a first number of first rendering textures based on the second texture information. For example, if the first rendering texture does not exist in the texture pool, but the terminal device needs 3 first rendering textures for post-processing the first image, the terminal device can create at least 3 first rendering textures based on the second texture information to obtain a sufficient number of first rendering textures.
[0110] Optionally, in the above three cases, if the terminal device creates a first rendering texture, after the first rendering texture is used, the terminal device can store the newly created first rendering texture in the texture pool (or copy the second rendering texture of the first image). In this way, the number of first rendering textures in the texture pool can gradually increase, and the number of first rendering textures that the terminal device can reuse can also gradually increase, thereby improving the reuse rate of the first rendering texture and improving the efficiency of image post-processing.
[0111] This disclosure provides a method for determining a first rendering texture. A terminal device can determine first texture information of the first rendering texture required for post-processing, and a first number of rendering textures associated with the first texture information. It then determines whether second texture information identical to the first texture information exists in the texture pool. If it exists, the first rendering texture is determined based on the second texture information, the first number, and the texture pool. If it does not exist, a first number of first rendering textures are created based on the first texture information. In this way, the terminal device can accurately reuse rendering textures in the texture pool, and since the terminal device can reuse a large number of rendering textures in the texture pool, it can improve the reuse rate of rendering textures and increase the efficiency of the first image post-processing.
[0112] Based on any of the above embodiments, after the terminal device stores the second rendering texture in the texture pool, the above method may further include a method for releasing the rendering texture in the texture pool. Below, in conjunction with... Figure 8 This section explains the method for releasing rendered textures from the texture pool.
[0113] Figure 8 This is a schematic diagram illustrating a method for releasing a rendered texture according to an embodiment of this disclosure. Please refer to [link / reference]. Figure 8 The method process includes:
[0114] S801. Obtain the frequency of use of each rendered texture stored in the texture pool within a preset duration.
[0115] Optionally, the preset duration can be a period of time, or it can be the duration used by the terminal device to process a segment of video frames. This embodiment of the present disclosure does not limit this. For example, the preset duration can be 1 second, 2 seconds, etc., or it can be the duration used by the terminal device to process 10 frames of images, 20 frames of images, etc.
[0116] The usage frequency can be the number of times a rendering texture is used within a preset duration. For example, if the preset duration is 1 second, the usage frequency can be the number of times each rendering texture in the texture pool is used within 1 second. Alternatively, if the preset duration is the time it takes for a terminal device to process 20 frames of images, the usage frequency can be the number of times each rendering texture in the texture pool is used during the process of the terminal device processing 20 frames of images.
[0117] For example, the texture pool can include render texture 1 and render texture 2. If render texture 1 is used once and render texture 2 is used twice in 1 second, then the usage frequency of render texture 1 is 1 and the usage frequency of render texture 2 is 2.
[0118] For example, the texture pool may include rendering texture 1 and rendering texture 2. During the processing of the first image of 20 frames by the terminal device, if rendering texture 1 is used 3 times and rendering texture 2 is used 5 times, then the usage frequency of rendering texture 1 is 3 and the usage frequency of rendering texture 2 is 5.
[0119] It should be noted that the terminal device can determine the frequency of use of each rendered texture within a preset time period based on any feasible implementation method, and the embodiments disclosed herein do not limit this.
[0120] S802. Based on usage frequency, determine the third rendering texture in the texture pool.
[0121] Specifically, the usage frequency of the third rendering texture is less than or equal to a preset threshold. For example, if the usage frequency of a rendering texture in the texture pool is greater than the preset threshold, then that rendering texture is not the third rendering texture; if the usage frequency of a rendering texture in the texture pool is less than or equal to the preset threshold, then that rendering texture is the third rendering texture. For example, the texture pool may include rendering texture 1, rendering texture 2, and rendering texture 3. If the usage frequency of rendering texture 1 and rendering texture 2 is 3 times, and the usage frequency of rendering texture 3 is 0 times, then the terminal device can determine rendering texture 3 as the third rendering texture.
[0122] Optionally, the preset threshold can be any value such as 0, 1, 2, or any value between 0 and 10. This embodiment of the present disclosure does not limit this value.
[0123] S803, Release the third rendering texture from the texture pool.
[0124] Among them, the terminal device can release the third rendering texture in the texture pool. In this way, if the rendering texture in the texture pool is used less frequently, the terminal device can release the rendering texture in the texture pool, thereby saving the memory of the texture pool.
[0125] This disclosure provides a method for releasing rendering textures. The method involves obtaining the usage frequency of each rendering texture stored in the texture pool within a preset time period. Based on the usage frequency, a third rendering texture with a usage frequency less than or equal to a preset threshold is determined in the texture pool, and then released from the texture pool. In this way, the terminal device can release rendering textures with lower usage frequencies from the texture pool, avoiding excessive memory usage by numerous rendering textures, thereby improving the memory utilization of the texture pool and saving resources.
[0126] Figure 9 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 9 The image processing apparatus 900 includes a determining module 901, a copying module 902, a processing module 903, and a storage module 904, wherein:
[0127] The determining module 901 is used to determine a first rendering texture based on the post-processing and the texture pool in response to the post-processing of the first image, wherein the texture pool is used to store multiple rendering textures required for post-processing.
[0128] The copying module 902 is used to copy the first image to the first rendering texture to obtain a second rendering texture.
[0129] The processing module 903 is used to perform the post-processing on the second rendered texture;
[0130] The storage module 904 is used to store the first rendering texture or the second rendering texture in the texture pool.
[0131] According to one or more embodiments of this disclosure, the determining module 901 is specifically used for:
[0132] Determine the first texture information of the first rendering texture required for the post-processing, and the first number of rendering textures associated with the first texture information;
[0133] The first rendering texture is determined based on the first texture information, the first quantity, and the texture pool.
[0134] According to one or more embodiments of this disclosure, the determining module 901 is specifically used for:
[0135] Determine whether there is a second texture information in the texture pool that is identical to the first texture information;
[0136] If it exists, the first rendering texture is determined based on the second texture information, the first quantity, and the texture pool;
[0137] If it does not exist, then create a first number of first rendering textures based on the first texture information.
[0138] According to one or more embodiments of this disclosure, the determining module 901 is specifically used for:
[0139] Based on the second texture information, it is determined whether a first rendering texture exists in the texture pool;
[0140] If it exists, and the second number of first rendering textures in the texture pool is greater than or equal to the first number, then the first number of first rendering textures are obtained from the texture pool;
[0141] If it exists, and the second number of first rendering textures in the texture pool is less than the first number, then the second number of first rendering textures are obtained from the texture pool, and a third number of first rendering textures are created based on the second texture information, wherein the third number is the difference between the first number and the second number;
[0142] If it does not exist, then create a first number of first rendering textures based on the second texture information.
[0143] According to one or more embodiments of this disclosure, the copying module 902 is specifically used for:
[0144] Obtain the first image content of the first image;
[0145] If the first rendering texture does not contain image content, then the first image content is copied to the first rendering texture;
[0146] If the first rendering texture includes image content, then the first image content will overwrite the image content in the first rendering texture.
[0147] According to one or more embodiments of this disclosure, the processing module 903 is further configured to:
[0148] Obtain the usage frequency of each rendered texture stored in the texture pool within a preset time period;
[0149] Based on the usage frequency, a third rendering texture is determined in the texture pool, wherein the usage frequency of the third rendering texture is less than or equal to a preset threshold.
[0150] Release the third rendering texture from the texture pool.
[0151] According to one or more embodiments of this disclosure, the processing module 903 is further configured to:
[0152] The content of the second image in the second rendered texture is copied to the output texture to obtain the second image;
[0153] Render and display the second image.
[0154] The image processing apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0155] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 10 The diagram illustrates a structural schematic suitable for implementing the terminal device 1000 of the embodiments of the present disclosure. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0156] like Figure 10 As shown, the terminal device 1000 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the terminal device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0157] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows terminal device 1000 to exchange data via wireless or wired communication with other devices. Although Figure 10 A terminal device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0158] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.
[0159] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0160] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.
[0161] The aforementioned computer-readable medium carries one or more programs, which, when executed by the terminal device, cause the terminal device to perform the method shown in the above embodiments.
[0162] This disclosure provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements various methods that may be involved in the above embodiments.
[0163] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements various methods that may be involved in the above embodiments.
[0164] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0166] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0167] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0168] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0169] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0170] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0171] It is understood that the data involved in this technical solution (including but not limited to the data itself, its acquisition, or its use) shall comply with the requirements of relevant laws, regulations, and provisions. Data may include information, parameters, and messages, such as flow control instructions.
[0172] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0173] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments. Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms of implementing the claims.
Claims
1. An image processing method, characterized in that, include: In response to post-processing of the first image, a first rendering texture is determined based on the post-processing and a texture pool, the texture pool being used to store multiple rendering textures required for post-processing. The first image is copied to the first rendering texture to obtain the second rendering texture; The second rendering texture is subjected to the post-processing, and the first rendering texture or the second rendering texture is stored in the texture pool.
2. The method according to claim 1, characterized in that, The step of determining the first rendering texture based on the post-processing and texture pool includes: Determine the first texture information of the first rendering texture required for the post-processing, and the first number of rendering textures associated with the first texture information; The first rendering texture is determined based on the first texture information, the first quantity, and the texture pool.
3. The method according to claim 2, characterized in that, Determining the first rendering texture based on the first texture information, the first quantity, and the texture pool includes: Determine whether there is a second texture information in the texture pool that is identical to the first texture information; If it exists, the first rendering texture is determined based on the second texture information, the first quantity, and the texture pool; If it does not exist, then create a first number of first rendering textures based on the first texture information.
4. The method according to claim 3, characterized in that, Determining the first rendering texture based on the second texture information, the first quantity, and the texture pool includes: Based on the second texture information, it is determined whether a first rendering texture exists in the texture pool; If it exists, and the second number of first rendering textures in the texture pool is greater than or equal to the first number, then the first number of first rendering textures are obtained from the texture pool; If it exists, and the second number of first rendering textures in the texture pool is less than the first number, then the second number of first rendering textures are obtained from the texture pool, and a third number of first rendering textures are created based on the second texture information, wherein the third number is the difference between the first number and the second number; If it does not exist, then create a first number of first rendering textures based on the second texture information.
5. The method according to any one of claims 1-4, characterized in that, The step of copying the first image to the first rendering texture includes: Obtain the first image content of the first image; If the first rendering texture does not contain image content, then the first image content is copied to the first rendering texture; If the first rendering texture includes image content, then the first image content will overwrite the image content in the first rendering texture.
6. The method according to any one of claims 1-4, characterized in that, After storing the second rendering texture in the texture pool, the method further includes: Obtain the usage frequency of each rendered texture stored in the texture pool within a preset time period; Based on the usage frequency, a third rendering texture is determined in the texture pool, wherein the usage frequency of the third rendering texture is less than or equal to a preset threshold. Release the third rendering texture from the texture pool.
7. The method according to any one of claims 1-4, characterized in that, After storing the second rendering texture in the texture pool, the method further includes: The content of the second image in the second rendered texture is copied to the output texture to obtain the second image; Render and display the second image.
8. An image processing apparatus, characterized in that, It includes a determination module, a copying module, a processing module, and a storage module, among which: The determining module is used to determine a first rendering texture based on the post-processing and the texture pool in response to post-processing of the first image, wherein the texture pool is used to store multiple rendering textures required for post-processing. The copying module is used to copy the first image to the first rendering texture to obtain a second rendering texture. The processing module is used to perform the post-processing on the second rendered texture; The storage module is used to store the first rendering texture or the second rendering texture in the texture pool.
9. A terminal device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the image processing method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the image processing method as described in any one of claims 1-7.
11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the image processing method as described in any one of claims 1-7.