WO2024109247A1 - 图像处理方法及装置 - Google Patents
图像处理方法及装置 Download PDFInfo
- Publication number
- WO2024109247A1 WO2024109247A1 PCT/CN2023/116594 CN2023116594W WO2024109247A1 WO 2024109247 A1 WO2024109247 A1 WO 2024109247A1 CN 2023116594 W CN2023116594 W CN 2023116594W WO 2024109247 A1 WO2024109247 A1 WO 2024109247A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- shadow
- image
- moving object
- pixel
- main image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—Three-dimensional [3D] image rendering
- G06T15/50—Lighting effects
- G06T15/60—Shadow generation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/60—Creating or editing images; Combining images with text
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—Three-dimensional [3D] image rendering
- G06T15/50—Lighting effects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/18—Image warping, e.g. rearranging pixels individually
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
- G06T7/248—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/01—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
- H04N7/0135—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes
- H04N7/0137—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes dependent on presence/absence of motion, e.g. of motion zones
Definitions
- the present application relates to the field of image processing technology, and in particular to an image processing method and device.
- Predictive frame technology is a mainstream technology in image rendering.
- Electronic devices can use predictive frame technology to reduce the cost of image rendering.
- electronic devices add shadow rendering.
- Predictive frame technology causes shadow jitter problems in predicted frames, increasing the difference between predicted frames and real images, greatly reducing user experience.
- Real images are images generated by electronic devices according to rendering logic, and real images are used to generate predicted frames.
- the present application provides an image processing method and device, the purpose of which is to solve the problem of shadow jitter in the predicted frame, reduce the difference between the predicted frame and the real image, and improve the user experience.
- the present application provides the following technical solutions:
- the present application provides an image processing method, which is applied to an electronic device, and the method includes: obtaining a first main image from a first real image and obtaining a second main image from a second real image, wherein the first real image and the second real image are images rendered by the electronic device; calculating motion vectors for the first main image and the second main image to obtain motion vectors; distorting the environment in the target main image and the moving object in the target main image according to the motion vectors to generate the environment in the predicted frame and the moving object in the predicted frame, wherein the target main image is a frame of the first main image and the second main image; and reusing the image data of the shadow of the moving object in the target main image in the predicted frame to generate the shadow of the moving object in the predicted frame.
- the shadow of the moving object in the predicted frame can be extracted from the environment in the predicted frame, so that the shadow of the moving object in the predicted frame can be generated independently, and the shadow of the moving object in the predicted frame no longer depends on the motion vector, but is generated by reusing the image data of the shadow of the moving object in the target main image in the predicted frame, thereby reducing the shadow jitter problem existing in the predicted frame, reducing the difference between the predicted frame and the real image, and improving the user experience.
- the environment in the target main image and the moving object in the target main image are warped according to the motion vector to generate the environment in the predicted frame and the moving object in the predicted frame, and the image data of the shadow of the moving object in the target main image is reused in the predicted frame to generate the shadow of the moving object in the predicted frame, including: according to the motion vector, the environment in the target main image and the moving object are warped to generate a first intermediate image, and the first intermediate image includes the environment and the moving object; in the first intermediate image, the image data of the shadow of the moving object is reused so that the first intermediate image includes the environment, the moving object, and the shadow of the moving object.
- the first intermediate image After obtaining the first intermediate image including the environment, the moving object, and the shadow of the moving object, the first intermediate image is completed to obtain a second intermediate image; then the second intermediate image is post-processed to fuse the user interface image corresponding to the target main image and the processed second intermediate image to obtain a predicted frame. Because the moving object and the shadow of the moving object have not changed after obtaining the first intermediate image, the moving object in the first intermediate image can be the moving object in the predicted frame, and the first intermediate image The shadow of the moving object in the image can be the shadow of the moving object in the prediction frame.
- the environment in the first intermediate image is completed during the image completion process, so the prediction frame includes the completed environment in the first intermediate image, that is, the environment in the second intermediate image.
- reusing the image data of the shadow of the moving object in the target main image in the predicted frame includes: for each pixel in the predicted frame, according to the position of the shadow of the moving object in the target main image, determining whether the pixel is located in the shadow of the moving object in the target main image; in determining that the pixel is located in the shadow of the moving object in the target main image, reusing the pixel value of the pixel in the target main image, the pixel value of the pixel in the target main image is the image data of the pixel in the target main image; in determining that the pixel is not located in the shadow of the moving object in the target main image, keeping the pixel value of the pixel unchanged.
- the pixel value of the pixel in the target main image is reused, so that both the position of the shadow of the moving object in the target main image and the image data of the shadow of the moving object in the target main image are reused, so that the shadow of the moving object in the target main image is merged into the predicted frame, avoiding the continuous use of the motion vector used by the environment to generate the shadow of the moving object in the predicted frame, reducing the shadow jitter problem existing in the predicted frame, reducing the difference between the predicted frame and the real image, and improving the user experience.
- the prediction frame reuses the position of the shadow of the moving object in the target main image
- the position of the shadow of the moving object in the prediction frame is the same as its position in the target main image.
- the shadow of the moving object has the same shape, color, and brightness in the prediction frame and the target main image.
- the motion vector is used to record the moving speed and moving direction of each pixel in the target main image, and according to the motion vector, the environment in the target main image and the moving object in the target main image are distorted, and the environment in the predicted frame and the moving object in the predicted frame are generated, including: according to the moving speed and moving direction of each pixel in the target main image, each pixel in the target main image is moved; in the process of moving the pixel, according to the position of the shadow of the moving object in the target main image, whether the pixel is located in the shadow of the moving object in the predicted frame is determined; in the case where it is determined that the pixel is located in the shadow of the moving object in the predicted frame, the pixel value of the pixel is set to a preset value; in the case where it is determined that the pixel is not located in the shadow of the moving object in the predicted frame, the pixel value of the pixel is set to the pixel value of the pixel in the target main image.
- the shadow of the moving object in the predicted frame is distinguished from other objects in the predicted frame by the preset value, so that the shadow of the moving object in the predicted frame is removed by the preset value and the position of the shadow of the moving object can be marked, so as to reserve the shadow of the moving object for the predicted frame, so that the predicted frame can reuse the image data of the shadow of the moving object in the target main image.
- the preset value includes a preset transparency
- the preset transparency is different from the transparency of other pixels in the target main image, and is distinguished by the preset transparency.
- the process of determining the position of the shadow of a moving object in a target main image includes: comparing the pixels to be compared that are in the same position in the environment shadow texture image and the moving object shadow texture image, the environment shadow texture image is generated based on the image data of the environment shadow in the target main image, and the moving object shadow texture image is generated based on the image data of the shadow of the moving object in the target main image; when it is determined that the pixel to be compared is in the shadow area of the moving object but not in the environment shadow, marking the pixel to be compared as being in the shadow area of the moving object; when it is determined that the pixel to be compared is in the shadow area of the moving object and in the environment shadow, marking the pixel to be compared as not being in the shadow area of the moving object; determining the position of the shadow of the moving object in the target main image based on the pixel to be compared that is marked as being in the shadow area of the moving object, the image data of the shadow of the moving object in the target main image
- the image data of the shadow of the moving object in the target main image is the same as the image data of the shadow of the moving object in the target main image.
- the position of the shadow of the moving object in the target main image can be determined according to the principle of "when the shadow of the moving object is in the environment shadow, the shadow of the moving object is not presented in the target main image", in preparation for determining the position of the shadow of the moving object in the predicted frame, so that the image data of the shadow of the moving object can be reused.
- the pixel value of the pixel to be compared in the moving object shadow texture image is greater than the pixel value of the pixel to be compared in the environment shadow texture image, it is determined that the pixel to be compared is in the shadow area of the moving object but not in the environment shadow; if the pixel value of the pixel to be compared in the moving object shadow texture image is less than or equal to the pixel value of the pixel to be compared in the environment shadow texture image, it is determined that the pixel to be compared is in the shadow area of the moving object and in the environment shadow.
- the pixel value of the pixel to be compared includes at least one of the R channel value, the G channel value, and the B channel value of the pixel to be compared.
- the pixel value of the pixel to be compared includes one of the R channel value, the G channel value, and the B channel value, which can save storage space; in some examples, the pixel value of the pixel to be compared includes two or three of the R channel value, the G channel value, and the B channel value, then when comparing the pixel values, the pixel values of the pixel to be compared can be first fused (such as weighted average) to obtain a numerical value, and then the numerical values are compared, thereby comprehensively considering the influence of different channel values.
- the method before obtaining the first main image from the first real image and obtaining the second main image from the second real image, the method further includes: when rendering the real image corresponding to the target main image, obtaining image data of the environmental shadow and image data of the shadow of the moving object, the image data of the environmental shadow and the image data of the shadow of the moving object are used to determine the position of the shadow of the moving object in the target main image, the position of the shadow of the moving object in the target main image and the image data of the shadow of the moving object are used to obtain the image data of the shadow of the moving object to be reused in the target main image.
- the image data of the environmental shadow and the image data of the shadow of the moving object are intercepted to prepare for reuse.
- obtaining the image data of the environment shadow and the image data of the shadow of the moving object includes: rendering the environment shadow of the real image to generate the image data of the environment shadow, and the image data of the environment shadow is stored in the first frame buffer; creating the second frame buffer and the third frame buffer; copying the image data of the environment shadow stored in the first frame buffer to the second frame buffer; changing the frame buffer bound to the real image from the first frame buffer to the third frame buffer; rendering the shadow of the moving object of the real image to generate the image data of the shadow of the moving object, and the image data of the shadow of the moving object is stored in the third frame buffer.
- the image data of the environment shadow and the image data of the shadow of the moving object are stored in different frame buffers respectively, so as to prevent the two parts of the image data from overlapping and causing the problem of being difficult to distinguish, thereby facilitating the use of the image data of the environment shadow and the image data of the shadow of the moving object.
- obtaining the image data of the environment shadow and the image data of the shadow of the moving object also includes: after rendering the shadow of the moving object of the real image, changing the frame buffer bound to the real image from the third frame buffer to the first frame buffer; rendering the shadow of the moving object of the real image again to generate the image data of the shadow of the moving object, and storing the image data of the shadow of the moving object in the first frame buffer.
- the image data of the environment shadow and the image data of the shadow of the moving object can be stored in the first frame buffer bound to the real image, so as to ensure the accuracy of the image data stored in the first frame buffer and prevent the real image (mainly the target main image) from lacking a shadow.
- copying the image data of the ambient shadow stored in the first frame buffer to the second frame buffer includes: calling the glBlitFramebuffer function to copy the image data of the ambient shadow stored in the first frame buffer to the second frame buffer.
- changing the frame buffer to which the real image is bound from the first frame buffer to the third frame buffer includes: calling the glBindFrameBuffer function to change the frame buffer to which the real image is bound from the first frame buffer to the third frame buffer.
- the method further includes: after generating the shadow of the moving object in the predicted frame, performing image completion on the predicted frame.
- the present application provides an electronic device comprising: one or more processors and a memory; the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the image processing method described in the first aspect.
- the present application provides a computer-readable storage medium for storing a computer program.
- the computer program When executed, it is specifically used to implement the image processing method as described in the first aspect.
- FIG1 is a schematic diagram of generating a prediction frame provided by the present application.
- FIG2 is a hardware structure diagram of an electronic device provided by the present application.
- FIG3 is a flowchart of generating a real image provided by the present application.
- FIG4 is a flowchart of generating a prediction frame provided by the present application.
- FIG. 5 is a flowchart of obtaining image data of environmental shadows and image data of shadows of moving objects in a real image provided by the present application.
- FIG6 is a flow chart of determining the position of the shadow of a moving object in a real image provided by the present application
- FIG7 is a flowchart of removing the shadow of a moving object generated according to a motion vector provided by the present application.
- FIG8 is a flow chart of multiplexing image data of shadows of moving objects in real images provided by the present application.
- FIG9 is a schematic diagram of multiplexed shadows provided in the present application.
- one or more refers to one, two or more; “and/or” describes the association relationship of the associated objects, indicating that three relationships may exist; for example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
- the character “/” generally indicates that the objects associated before and after are in an "or” relationship.
- references to "one embodiment” or “some embodiments” in this specification mean that one or more embodiments of the present application include a particular feature, structure or characteristic described in conjunction with the embodiment.
- the phrases “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean “one or more but not all embodiments”.
- the terms “include”, “comprising”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
- the electronic device can display multimedia stream files to the user through a display screen, so as to provide the user with a rich visual experience.
- the multimedia stream may include multiple frames of images.
- the video stream may include N frames of images, such as the 1st frame, the 2nd frame, and ... the Nth frame.
- the electronic device can display the 1st frame, the 2nd frame, ... the Nth frame on the display screen respectively.
- An application that wants to play the video stream can issue rendering commands for different frame images to the electronic device.
- the electronic device can render each frame image according to these rendering commands, obtain the rendering results (such as image data) of each frame image, and display based on the rendering results.
- Figure 1 is a schematic diagram of generating a prediction frame.
- the process of generating a prediction frame is: the electronic device performs user interface (UI) separation on a first real image and a second real image to obtain a first main image of the first real image and a first UI image of the first real image, a second main image of the second real image and a second UI image of the second real image, wherein the first real image is a previous frame image of the second real image, the UI image includes a UI interface in the real image, and the main image includes objects such as the environment, environmental shadows, moving objects, and shadows of moving objects in the real image.
- UI user interface
- the electronic device calculates a motion vector (MV) based on the first main image and the second main image to obtain the motion vector, where the motion vector indicates the moving direction and speed of each object in the second main image; performs image warping (ImageWarp) on the second main image based on the motion vector to obtain a first intermediate image, wherein ImageWarp uses the motion vector to move each object in the second main image; since the moving speeds and directions of each object in the second main image are different, image data is missing in the first intermediate image, so after obtaining the first intermediate image, image completion (HoleFilling) is performed on the first intermediate image to obtain the second intermediate image; the second intermediate image is fused with the second UI image (i.e., the second UI image is attached to the second intermediate image) to generate a prediction frame, thereby generating a prediction frame based on the first real image and the second real image.
- MV motion vector
- ImageWarp image warping
- the predicted frame may be an intermediate frame between the first real image and the second real image; in some examples, the predicted frame may be the next frame of the second real image.
- the electronic device may perform ImageWarp on the first main image according to the motion vector to obtain the first intermediate image.
- the second intermediate image and the first UI image are fused to generate the predicted frame.
- the electronic device can add shadow rendering to the image rendering, that is, for the moving objects in the first real image and the second real image, the electronic device renders a shadow for the moving object, and the shadow moves with the moving object.
- the shadow of the character is rendered, and when the character moves, the shadow of the character moves with the character.
- the predicted frame of the character is generated, the predicted frame also has a shadow.
- the image also includes the environment.
- the environment refers to the scene where the moving object is located.
- the electronic device also renders a shadow on the environment, which is called the environmental shadow.
- the shadow of the moving object moves according to the moving direction and speed of the environment.
- the present application provides an image processing method, in which, in the process of generating a prediction frame, the image data of the shadow of a moving object in a real image is reused into the prediction frame to generate the shadow of the moving object in the prediction frame, and the moving object, environment and environment shadow in the prediction frame are generated by motion vectors, a main image of a frame of real image and a UI image of the real image.
- the image data of the shadow of the moving object in the first real image or the second real image is reused.
- the shadow of the moving object generated according to the motion vector is removed during the process of generating the predicted frame.
- the electronic device renders the real image
- the image data of the shadow of the moving object in the real image and the position of the shadow of the moving object in the real image are obtained, wherein the position of the shadow of the moving object in the real image is to determine the position of the shadow of the moving object in the predicted frame, and the image data of the shadow of the moving object in the real image is for reuse in the predicted frame.
- the shadow of the moving object in the predicted frame no longer depends on the moving direction and moving speed of the environment, but is generated by reusing the image data of the shadow of the moving object in the real image in the predicted frame, thereby reducing the shadow jitter problem existing in the predicted frame, reducing the difference between the predicted frame and the real image, and improving the user experience.
- the main image of the real image includes the shadow of the moving object, and reusing the image data of the shadow of the moving object in the real image may refer to reusing the image data of the shadow of the moving object in the main image of the real image, and the position of the shadow of the moving object in the real image may refer to the position of the shadow of the moving object in the main image.
- the image data of the shadow of the moving object in the reused main image may also be referred to as the image data of the shadow of the moving object in the main image.
- the shadow rendering logic of the application is: when the shadow of the moving object is located in the environmental shadow, the shadow of the moving object is not presented in the real image. Therefore, when determining the position of the shadow of the moving object in the real image, there is a situation where the shadow that is located in both the moving object shadow and the environmental shadow is removed. Therefore, in some examples, the image data of the shadow of the moving object in the main image is the image data that is located in the shadow of the moving object but not in the environmental shadow, that is, partial image data of the shadow of the moving object in the main image; for example, in the following step S306, all image data of the shadow of the moving object is obtained, and the image data of the shadow of the moving object in the main image is partial image data of the total image data obtained in step S306. In some examples, the image data of the shadow of the moving object in the main image is the same as the total image data obtained in step S306.
- the electronic device can be a device that can provide network access.
- the electronic device can be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (Ultra-mobile Personal Computer, UMPC), a handheld computer, a netbook, a personal digital assistant (Personal Digital Assistant, PDA), a wearable electronic device, a smart watch and other devices.
- the present application does not specifically limit the specific form of the electronic device.
- the electronic device can have a display function. For example, the electronic device can generate a predicted frame based on the first real image and the second real image, display the predicted frame, and display the first real image and the second real image.
- the electronic device may include: a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, an antenna 1, Antenna 2, mobile communication module, wireless communication module, sensor module, button, motor, indicator, camera, display screen, and Subscriber Identity Module (SIM) card interface, etc.
- the audio module may include a speaker, a receiver, a microphone, an earphone interface, etc.
- the sensor module may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
- the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device.
- the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- the processor may include one or more processing units, for example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors.
- the processor is the nerve center and command center of the electronic device.
- the controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
- the external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
- the external memory card communicates with the processor through the external memory interface to implement the data storage function.
- the internal memory can be used to store computer executable program code, which includes instructions.
- the processor executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory. For example, in an embodiment of the present application, the processor enables the electronic device to execute the image processing method provided in the embodiment of the present application by running the instructions stored in the internal memory.
- GPU is a microprocessor for image processing, connecting the display screen and application processor. GPU is used to perform mathematical and geometric calculations for image rendering.
- the processor may include one or more GPUs, which execute program instructions to generate or change display information.
- the display screen is used to display images, videos, etc.
- the display screen includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, quantum dot light-emitting diodes (QLED), etc.
- the electronic device may include 1 or N display screens, where N is a positive integer greater than 1.
- GUIs graphical user interfaces
- a control is a GUI element, which is a software component included in an application program, and controls all data processed by the application program and interactive operations on these data. Users can interact with the control through direct manipulation to read or edit relevant information of the application program.
- controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.
- the display screen can display a video file containing a specific action, etc.
- the processor includes a CPU and a GPU.
- the CPU can generate a rendering instruction stream according to the rendering logic of the application program, and send the rendering instruction stream to the GPU so that the GPU can perform corresponding rendering according to the rendering instruction stream.
- the CPU can send rendering instructions of the rendering instruction stream to the GPU one by one.
- the CPU can send rendering instructions to the GPU again after receiving a response from the GPU; in some examples, the CPU does not need to wait for the response of the GPU, and continues to send the next rendering instruction after completing the sending of one rendering instruction, depending on the CPU's setting of the rendering instruction.
- the GPU when the GPU is performing the rendering of the real image, the GPU can obtain the image data of the shadow of the moving object in the real image, so as to reuse this part of the image data when generating the predicted frame.
- FIG3 it shows the process of generating the real image in the image processing method provided in the embodiment of the present application.
- the image data of the shadow of the moving object in the real image is obtained, which can include the following steps:
- the rendering instruction stream includes at least one rendering instruction, and the rendering instruction instructs the GPU to perform corresponding rendering, such as instructing the GPU to render a moving object in a real image, instructing the GPU to render an environment in a real image, and so on.
- the application when the application turns on shadow rendering, the application calls at least one of a specific program, a specific resource, and a specific rendering instruction, so that the judgment condition can record the information called when the application turns on shadow rendering.
- the judgment condition can record the label of the specific program to identify the specific program through the label, for example, the label of the specific program can be the program name of the specific program;
- the judgment condition can record the resource label of the specific resource to identify the specific resource through the resource label, for example, the resource label can be the resource name, etc.; if the application calls a specific instruction when turning on shadow rendering, the judgment condition can record the specific instruction.
- step S107 perform corresponding rendering according to the rendering instruction stream to obtain all image data of the real image, and complete the rendering of the environmental shadow and the shadow of the moving object through steps S103 to S106.
- a frame of real image may also include moving objects, environment, and UI interface, etc. Therefore, in some examples, the rendering here is mainly the rendering of the image except the environmental shadow and the shadow of the moving object, such as the rendering of the moving object, environment, UI interface, etc. In some examples, the rendering of the moving object and the environment may be before the shadow rendering, so the rendering of step S107 may be the rendering of the image except the environmental shadow, the shadow of the moving object, the moving object and the environment, such as the rendering of the UI interface.
- step S105 may be executed to render the shadow of the moving object.
- step S107 may be executed to perform corresponding rendering according to the rendering instruction stream to complete the rendering of the real image.
- S108 Output the real image according to all the image data of the real image. After obtaining all the image data of the real image, generate the real image according to all the image data of the real image, and display the real image.
- FIG3 shows a process of generating a prediction frame, in which the image data of the environment shadow and image data of the shadow of the moving object are used, and the following steps may be included:
- S202 MV calculation is performed on the first main image of the first real image and the second main image of the second real image to obtain a motion vector. That is, MV calculation is performed on the first main image and the second main image to obtain a motion vector, which indicates the moving direction and moving speed of each object in the second main image.
- step S203 determine whether to enable shadow rendering, if yes, execute step S204, if no, execute step S208.
- the determination of whether to enable shadow rendering can refer to the above step S102, which will not be repeated here.
- S204 Determine a region where the shadow of the moving object in the real image is located according to the image data of the environmental shadow and the image data of the shadow of the moving object.
- the image distortion of the second main image according to the motion vector mainly uses the motion vector to move each object in the second main image, specifically, for any object in the second main image, the object is moved according to the moving direction and moving speed of the object in the motion vector.
- the second main image includes the environment, the shadow of the environment, the moving object and the shadow of the moving object.
- the moving object and the environment are first separated from the second main image. This separation separates the environment and the shadow of the moving object from the moving object, that is, the second main image is separated into two parts, the first part includes the environment, the shadow of the environment and the shadow of the moving object, and the second part includes the moving object.
- the moving direction and moving speed of each object in the first part of the motion vector are used to move each object in the first part; and the moving direction and moving speed of the moving object in the second part of the motion vector are used to move the moving object.
- it is prohibited to reuse the image data of the shadow of the moving object in the real image.
- the shadow of the moving object in the first intermediate image is removed, and the shadow of the moving object can be removed in the process of generating the first intermediate image.
- the shadow of the moving object in the first intermediate image is removed.
- the first intermediate image obtained in step S205 is an image with an environment, environmental shadows, and a moving object, but the shadow of the moving object is removed.
- the purpose of removing the shadow of the moving object is to mark the position of the shadow of the moving object in the first intermediate image.
- the image data of the shadow of the moving object in the real image is not used in the process of generating the first intermediate image, so that a to-be-completed area with pixel values to be completed is reserved at the marked position.
- the position of the shadow of the moving object marked in the first intermediate image is obtained by moving the shadow of the moving object in the real image according to the motion vector, so the position of the shadow of the moving object marked in the first intermediate image is different from its position in the real image.
- multiplexing the image data of the shadow of the moving object in the second main image not only multiplexes the image data but also multiplexes the position of the shadow of the moving object in the second main image, so that the shadow of the moving object in the second main image is pasted in the first intermediate image.
- the position of the shadow of the moving object marked in the first intermediate image is different from its position in the second main image. Therefore, after multiplexing the image data of the shadow of the moving object, the position of the shadow of the moving object marked in the first intermediate image still has a to-be-completed area whose pixel values need to be completed. The pixel values of each pixel in the to-be-completed area are obtained through image completion processing.
- the moving speed and moving direction of each object in the second main image may be different, resulting in missing image data in the first intermediate image.
- the area with missing image data can be called the area to be completed.
- the pixel value of each pixel in the area to be completed is obtained through image completion processing.
- a deep learning network may be used to complete the pixel values of each pixel in the area to be completed.
- a traditional image restoration operation may be used to complete the pixel values of each pixel in the completed area.
- a mask image of the first intermediate image is used to complete the pixel values of each pixel in the area to be completed, so as to determine some static pixels corresponding to the pixels to be completed, and the pixel values of these static pixels are used to determine the pixel values of the pixels to be completed.
- the pixels to be filled there are three types of pixels, one is the pixels to be filled, one is the static pixels, and one is the dynamic pixels.
- the pixels to be filled refer to the pixels that need to be filled in the area to be filled in the mask image (the same as the first intermediate image).
- the moving object and the shadow of the moving object correspond to a region to be filled respectively.
- the region to be filled can be a blank area.
- the pixels in the blank area near the moving object are the pixels to be filled, and the pixels in the blank area near the shadow of the moving object are the pixels to be filled;
- the static pixels refer to the pixels corresponding to the environment in the mask image that is in a static state, and their pixel values can be used to determine the pixel values of the pixels to be filled;
- the dynamic pixels refer to the pixels corresponding to the objects in motion (or called moving objects) in the mask image, and their pixel values cannot be used to determine the pixel values of the pixels to be filled.
- the static pixel point is a valid reference point for completing the pixel point to be complemented
- the dynamic pixel point is an invalid reference point for completing the pixel point to be complemented.
- the grayscale value of the pixel point to be complemented is a first grayscale value
- the grayscale value of the static pixel point is a second grayscale value
- the grayscale value of the dynamic pixel point is a third grayscale value.
- the first grayscale value, the second grayscale value and the third grayscale value are not equal to each other.
- the grayscale value of the static pixel point is 0, the grayscale value of the dynamic pixel point is 1, and the grayscale value of the pixel point to be complemented is 0.5.
- the electronic device determines a group of valid static pixels corresponding to the pixel to be filled in the mask image, and determines the pixel value of the pixel to be filled based on the pixel values of the group of valid static pixels in the first intermediate image.
- One possible implementation is to convert the pixel values of the group of valid static pixels in the first intermediate image into pixel values. The weighted average of the values is used as the pixel value of the pixel to be filled.
- the electronic device fills the first intermediate image with pixel values according to the pixel values of each pixel to be filled to obtain the second intermediate image.
- a group of valid static pixels corresponding to a pixel to be complemented has the same pixel spacing as the pixel to be complemented, and compared with other static pixels (which can be called invalid static pixels), the pixel spacing between this group of valid static pixels and the pixel to be complemented is the smallest.
- the post-processing mainly involves performing image filtering on the second intermediate image.
- the shadow of the moving object in the predicted frame can be extracted from the environment of the predicted frame, so that the shadow of the moving object in the predicted frame no longer depends on the motion vector generation, but is generated by reusing the image data of the shadow of the moving object in the real image in the predicted frame, thereby reducing the shadow jitter problem existing in the predicted frame, reducing the difference between the predicted frame and the real image, and improving the user experience.
- the image processing method shown in FIG3 and FIG4 mainly involves four parts: 1. obtaining the image data of the environmental shadow and the image data of the shadow of the moving object in the real image; 2. determining the position of the shadow of the moving object in the real image; 3. removing the shadow of the moving object generated according to the motion vector; 4. multiplexing the image data of the shadow of the moving object in the real image.
- FIG5 shows a process of acquiring image data of environmental shadows and image data of shadows of moving objects in a real image, which may include the following steps:
- the first FB may be GameFB, which may be used as the default FB of the application.
- the image data obtained by executing the corresponding rendering according to the rendering instruction stream may be stored in GameFB. Determining to enable shadow rendering may refer to the above step S102, which will not be repeated here.
- S302 Rendering environmental shadows to generate image data of environmental shadows.
- the rendering instruction stream of the application program indicates that the environmental shadows should be rendered first, and then the shadow of the moving object should be superimposed on the environmental shadows to prevent the environmental shadows from overlapping the shadow of the moving object. Therefore, in this embodiment, the environmental shadows are rendered first, and the image data of the environmental shadows are stored in the first FB.
- the second FB may be an AmbientFB
- the third FB may be a HumanFB.
- the purpose of creating the second FB and the third FB is to use the two FBs to store image data of environmental shadows and image data of shadows of moving objects respectively during the process of generating a real image, so as to intercept the image data of environmental shadows and image data of shadows of moving objects during the process of generating a real image.
- step S303 is executed after determining to turn on shadow rendering, that is, step S303 and step S302 can be executed in parallel; in some examples, step S303 can be executed before step S302, which is not limited here.
- S304 Copy the image data of the environmental shadow to the second FB, so as to realize the image processing of the environmental shadow by the second FB. Independent storage of data, so as to intercept the image data of the environment shadow without hindering the generation of the real image.
- the glBlitFramebuffer() function is called to copy the image data of the environment shadow to the second FB.
- S305 Change the FB bound to the application from the first FB to the third FB.
- a possible implementation is to call the glBindFrameBuffer(Gl_DRAW_BUFFER, ID) function, where ID is the ID of the third FB, thereby changing the FB bound to the application from the first FB to the third FB.
- the shadow of the moving object can be rendered. If the FB bound to the application is the first FB when rendering the shadow of the moving object, the image data of the shadow of the moving object is stored in the first FB, and the image data of the shadow of the moving object and the image data of the environment shadow are mixed and stored in the first FB, making it difficult to obtain the image data of the shadow of the moving object from the first FB.
- the FB bound to the application is changed from the first FB to the third FB, and the image data of the shadow of the moving object generated when rendering the shadow of the moving object is stored in the third FB, thereby intercepting the image data of the shadow of the moving object in the process of generating a real image.
- S306 Render the shadow of the moving object to generate image data of the shadow of the moving object.
- the image data of the shadow of the moving object after the image data of the shadow of the moving object is generated, it can be copied to the first FB, which can also ensure that the image data of the environment shadow and the image data of the shadow of the moving object are stored in the first FB, but the efficiency of copying the image data is less than the efficiency of rendering the shadow of the moving object.
- the first to third FBs may store pixel values of an R channel in the image data to reduce occupancy of the first to third FBs.
- the image data of the environmental shadow is copied to the second FB, so that the image data of the environmental shadow is stored in the first FB and the second FB.
- the third FB is bound to the application, which can store the image data of the shadow of the moving object in the third FB when rendering the shadow of the moving object, so as to store the image data of the environmental shadow in the second FB and the image data of the shadow of the moving object in the third FB, thereby completing the interception of the image data of the environmental shadow and the image data of the shadow of the moving object in the process of generating the real image.
- the image data of the environmental shadow and the image data of the shadow of the moving object are stored in different FBs respectively, so as to prevent the two parts of the image data from overlapping and causing the problem of being difficult to distinguish.
- the image data of the environmental shadow and the image data of the shadow of the moving object can be stored in the first FB defaulted by the application, so as to ensure the accuracy of the image data stored in the first FB and prevent the real image from lacking shadows.
- the shadow rendering logic of the application is: when the shadow of the moving object is in the environmental shadow, the shadow of the moving object is not presented in the real image. Therefore, the image data of the environmental shadow and the image data of the shadow of the moving object are used to determine whether the shadow of the moving object is in the environmental shadow, so as to determine the position of the shadow of the moving object in the real image. As shown in FIG6 , it shows the process of determining the position of the shadow of the moving object in the real image, which may include the following steps:
- the image data of the environment shadow can generate an environment shadow texture image
- the image data of the shadow of the moving object can generate a moving object shadow texture image.
- the pixel-by-pixel comparison calculation can be performed on the pixels with the same coordinates in the environment shadow texture image and the moving object shadow texture image.
- step S403 determine whether the pixel is located in the ambient shadow, if not, execute step S404, if yes, execute step S405.
- a pixel When a pixel is located in the shadow of a moving object but not in the shadow of the environment, it means that the pixel is a pixel in the shadow of the moving object, and the pixel is marked as being in the shadow area of the moving object.
- a pixel When a pixel is not located in the shadow of a moving object, it means that the pixel is not a pixel in the shadow of the moving object, and the pixel is marked as not being in the shadow area of the moving object.
- a pixel When a pixel is located in the shadow of a moving object and in the shadow of the environment, it means that the pixel is both a pixel in the shadow of the moving object and a pixel in the shadow of the environment. According to the principle that "when the shadow of a moving object is in the shadow of the environment, the shadow of the moving object is not presented in the real image", the pixel is marked as not being in the shadow area of the moving object.
- a mask image is obtained, which represents the shadow area of the moving object in the real image.
- the pixels in the shadow area of the moving object are marked as 1, and the pixels not in the shadow area of the moving object are marked as 0.
- the area of the shadow of the moving object in the real image is determined by 1 and 0, thereby determining the position of the shadow of the moving object in the real image, that is, determining the position of the shadow of the moving object in the main image of the real image.
- FIG. 7 shows a process of removing the shadow of a moving object generated according to a motion vector.
- removing the shadow of the moving object in the first intermediate image is taken as an example, and the following steps may be included:
- image distortion means moving the pixel according to the moving direction and moving speed of the pixel.
- image distortion means moving the pixel according to the moving direction and moving speed of the pixel.
- step S502 Determine whether the pixel is located in the shadow of the moving object according to the position of the shadow of the moving object in the second main image. If not, execute step S503; if yes, execute step S504.
- each pixel point located in the shadow of the moving object in the second main image is still located in the shadow of the moving object after moving. Based on this principle, when the image is distorted, it is determined whether the pixel point is located in the shadow of the moving object in the second main image. If so, it is determined that the pixel point is located in the shadow of the moving object; otherwise, it is determined that the pixel point is not located in the shadow of the moving object.
- the position of the shadow of the moving object in the second main image is known, and the position of the shadow of the moving object in the first intermediate image can be determined in advance according to the moving direction and moving speed in the motion vector that match the shadow of the moving object. After completing the movement of any pixel point in the second main image, it is determined whether the pixel point is located in the shadow of the moving object in the first intermediate image according to the coordinates of the pixel point in the first intermediate image and the position of the shadow of the moving object in the first intermediate image.
- the pixel point in the first intermediate image are the same as the coordinates of a pixel point in the shadow of the moving object in the first intermediate image, it is determined that the pixel point is located in the shadow of the moving object in the first intermediate image; otherwise, it is determined that the pixel point is not located in the shadow of the moving object in the first intermediate image.
- a mask image is generated based on the position of the shadow of the moving object in the first intermediate image, in which pixel points in the shadow area of the moving object are marked as 1, and pixel points that are not in the shadow area of the moving object are marked as 0.
- the pixel value of the pixel point at the coordinates of the pixel point in the first intermediate image is searched from the mask image. If the pixel value of the pixel point at the coordinates is 1, it is determined that the pixel point is located in the shadow of the moving object; otherwise, it is determined that the pixel point is not located in the shadow of the moving object.
- S503 Fill the pixel value of the pixel point with the pixel value of the pixel point in the second main image.
- S505 After completing the image distortion of each pixel in the second main image, generate a first intermediate image with the shadow of the moving object removed, thereby obtaining a frame of the first intermediate image with the environment, the shadow of the environment, and the moving object, but with the shadow of the moving object removed.
- the shadow of the moving object removed may be that the pixel value of each pixel in the shadow of the moving object in the first intermediate image is a preset value.
- FIG8 is a process for multiplexing image data of shadows of moving objects in real images provided by the present application, which may include the following steps:
- step S602. For each pixel point, determine whether the pixel point is located in the shadow of the moving object according to the position of the shadow of the moving object in the real image. If yes, execute step S603; if not, execute step S604.
- whether the pixel point is located in the shadow of the moving object refers to whether the pixel point is located in the shadow of the moving object in the real image, specifically refers to the shadow of the moving object in the main image of the real image.
- the position of the shadow of the moving object in the real image can be represented by the coordinates of each pixel point located in the shadow of the moving object. If the coordinates of the pixel point in the first intermediate image from which the shadow of the moving object is removed are the same as the coordinates of a pixel point located in the shadow of the moving object, then it is determined that the pixel point in the first intermediate image from which the shadow of the moving object is removed is located in the shadow of the moving object. Otherwise, it is determined that the pixel point in the first intermediate image from which the shadow of the moving object is removed is not located in the shadow of the moving object.
- the position of the shadow of the moving object in the real image is represented by the mask image obtained in FIG. 6 above, specifically by a pixel point with a pixel value of 1 in the mask image. Then, when determining whether a pixel point in the first intermediate image for removing the shadow of the moving object is located in the shadow of the moving object, the coordinates of the pixel point are used to find the pixel value of the pixel point at the coordinates in the mask image. If the pixel value of the pixel point at the coordinates is 1, it is determined that the pixel point is located in the shadow of the moving object. Otherwise, it is determined that the pixel point is not located in the shadow of the moving object.
- (1) in FIG9 shows a real image frame used to generate a prediction frame.
- the position of the character's shadow in the real image is determined (such as the position circled by the irregular shape in (1) in FIG9).
- the environment of the real image is distorted using the motion vector to obtain the intermediate image shown in (2) in FIG9, which removes the character's shadow and the character.
- the character is distorted to obtain the intermediate image shown in (3) in FIG9, which removes the character's shadow and there is an area to be completed near the character.
- the shadow is rendered for the intermediate image shown in (3) in FIG9 .
- the image data of the shadow of the person in the real image shown in (1) in FIG9 is directly copied to the intermediate image shown in (3) in FIG9 , and the image shown in (4) in FIG9 is obtained.
- Image completion processing is performed on each pixel in the area to be completed, and the image shown in (5) in FIG9 is obtained.
- the shadow of the person in the image shown in (5) in FIG9 is obtained by reusing the shadow of the person shown in (1) in FIG9 , so the two frames of images have the same shadow.
- the shadow of the object is the same, specifically, the image data and the position of the shadow of the person in the two frames of images are the same.
- the present application also provides an electronic device, including: one or more processors and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, when the one or more processors execute the computer instructions, the electronic device performs the above-mentioned image processing method.
- the present application also provides a computer-readable storage medium for storing a computer program, which, when executed, is specifically used to implement the above-mentioned image processing method.
- the present application also provides a computer program product comprising instructions, and when the computer program product is run on a computer or a processor, the computer or the processor executes the above-mentioned image processing method.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
Abstract
Description
Claims (15)
- 一种图像处理方法,其特征在于,应用于电子设备中,所述方法包括:从第一真实图像中获取第一主图像以及从第二真实图像中获取第二主图像,所述第一真实图像和所述第二真实图像是所述电子设备渲染得到的图像;对所述第一主图像和所述第二主图像进行运动矢量计算,得到运动矢量;根据所述运动矢量,对目标主图像中的环境和所述目标主图像中的运动对象进行扭曲,生成预测帧中的环境和所述预测帧中的运动对象,所述目标主图像为所述第一主图像和所述第二主图像中的一帧主图像;在所述预测帧中复用运动对象的阴影在所述目标主图像中的图像数据,以生成所述预测帧中的运动对象的阴影。
- 根据权利要求1所述的方法,其特征在于,所述在所述预测帧中复用运动对象的阴影在所述目标主图像中的图像数据包括:对所述预测帧中的各像素点,根据所述运动对象的阴影在所述目标主图像中的位置,确定所述像素点是否位于所述目标主图像的运动对象的阴影中;在确定所述像素点位于所述目标主图像的运动对象的阴影中,复用所述像素点在所述目标主图像中的像素值,所述像素点在所述目标主图像中的像素值为所述像素点在所述目标主图像中的图像数据;在确定所述像素点没有位于所述目标主图像的运动对象的阴影中,保持所述像素点的像素值不变。
- 根据权利要求1所述的方法,其特征在于,所述运动矢量用于记录所述目标主图像中各像素点的移动速度和移动方向,所述根据所述运动矢量,对目标主图像中的环境和所述目标主图像中的运动对象进行扭曲,生成预测帧中的环境和所述预测帧中的运动对象包括:根据目标主图像中各像素点的移动速度和移动方向,对所述目标主图像中的各像素点进行移动;在对所述像素点进行移动过程中,根据所述运动对象的阴影在所述目标主图像中的位置,确定所述像素点是否位于所述预测帧的运动对象的阴影中;在确定所述像素点位于所述预测帧的运动对象的阴影中,将所述像素点的像素值设置为预设值;在确定所述像素点没有位于所述预测帧的运动对象的阴影中,将所述像素点的像素值设置为所述像素点在所述目标主图像中的像素值。
- 根据权利要求3所述的方法,其特征在于,所述预设值包括预设透明度,所述预设透明度与所述目标主图像中其他像素点的透明度不同。
- 根据权利要求2至4中任意一项所述的方法,其特征在于,所述运动对象的阴影在所述目标主图像中的位置的确定过程包括:将环境阴影纹理图像和运动对象阴影纹理图像中位置相同的各待比对像素点进行比对,所述环境阴影纹理图像根据所述目标主图像中环境阴影的图像数据生成,所述运动对象阴影纹理图像根据所述目标主图像中运动对象的阴影的图像数据生成;在确定所述待比对像素点处于运动对象的阴影区域但没有处于环境阴影中,标记所述待比对像素点处于所述运动对象的阴影区域中;在确定所述待比对像素点处于运动对象的阴影区域且处于环境阴影中,标记所述待比对像素点没有处于所述运动对象的阴影区域中;根据标记为处于所述运动对象的阴影区域中的所述待比对像素点,确定所述运动对象的阴影在所述目标主图像中的位置,所述运动对象的阴影在所述目标主图像中的图像数据包括位于所述位置中的所述待比对像素点在所述目标主图像中的像素值。
- 根据权利要求5所述的方法,其特征在于,若所述运动对象阴影纹理图像中所述待比对像素点的像素值大于所述环境阴影纹理图像中所述待比对像素点的像素值,确定所述待比对像素点处于运动对象的阴影区域但没有处于环境阴影中;若所述运动对象阴影纹理图像中所述待比对像素点的像素值小于或等于所述环境阴影纹理图像中所述待比对像素点的像素值,确定所述待比对像素点处于运动对象的阴影区域且处于环境阴影中。
- 根据权利要求6所述的方法,其特征在于,所述待比对像素点的像素值包括所述待比对像素点的R通道值、G通道值和B通道值中的至少一个。
- 根据权利要求1至7中任意一项所述的方法,其特征在于,在从第一真实图像中获取第一主图像以及从第二真实图像中获取第二主图像之前,所述方法还包括:在渲染所述目标主图像对应的真实图像时,得到环境阴影的图像数据和所述运动对象的阴影的图像数据,所述环境阴影的图像数据和所述运动对象的阴影的图像数据用于确定所述运动对象的阴影在所述目标主图像中的位置,所述运动对象的阴影在所述目标主图像中的位置和所述运动对象的阴影的图像数据用于得到待复用的运动对象的阴影在所述目标主图像中的图像数据。
- 根据权利要求8所述的方法,其特征在于,所述在渲染所述目标主图像对应的真实图像时,得到环境阴影的图像数据和所述运动对象的阴影的图像数据包括:渲染所述真实图像的环境阴影,以生成所述环境阴影的图像数据,所述环境阴影的图像数据存储到第一帧缓冲中;创建第二帧缓冲和第三帧缓冲;将所述第一帧缓冲中存储的所述环境阴影的图像数据复制到所述第二帧缓冲中;将所述真实图像绑定的帧缓冲从所述第一帧缓冲改为所述第三帧缓冲;渲染所述真实图像的运动对象的阴影,以生成所述运动对象的阴影的图像数据,所述运动对象的阴影的图像数据存储到所述第三帧缓冲中。
- 根据权利要求9所述的方法,其特征在于,所述在渲染所述目标主图像对应的真实图像时,得到环境阴影的图像数据和所述运动对象的阴影的图像数据还包括:在渲染完所述真实图像的运动对象的阴影后,将所述真实图像绑定的帧缓冲从所述第三帧缓冲改为所述第一帧缓冲;再次渲染所述真实图像的运动对象的阴影,以生成所述运动对象的阴影的图像数据,所述运动对象的阴影的图像数据存储到所述第一帧缓冲中。
- 根据权利要求9或10所述的方法,其特征在于,所述将所述第一帧缓冲中存储的 所述环境阴影的图像数据复制到所述第二帧缓冲中包括:调用glBlitFramebuffer函数将所述第一帧缓冲中存储的所述环境阴影的图像数据复制到所述第二帧缓冲中。
- 根据权利要求9至11中任意一项所述的方法,其特征在于,所述将所述真实图像绑定的帧缓冲从所述第一帧缓冲改为所述第三帧缓冲包括:调用glBindFrameBuffer函数将所述真实图像绑定的帧缓冲从所述第一帧缓冲改为所述第三帧缓冲。
- 根据权利要求1至12中任意一项所述的方法,其特征在于,所述方法还包括:在生成所述预测帧中的运动对象的阴影后,对所述预测帧进行图像补全。
- 一种电子设备,其特征在于,包括:一个或多个处理器以及存储器;所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1至13中任意一项所述的图像处理方法。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序被执行时,具体用于实现如权利要求1至13中任意一项所述的图像处理方法。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202380062845.0A CN119790435A (zh) | 2022-11-21 | 2023-09-01 | 图像处理方法及装置 |
| EP23893340.2A EP4498326A4 (en) | 2022-11-21 | 2023-09-01 | IMAGE PROCESSING METHOD AND APPARATUS |
| US18/860,941 US20250356552A1 (en) | 2022-11-21 | 2023-09-01 | Image processing method and apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211454684.3 | 2022-11-21 | ||
| CN202211454684.3A CN118057460A (zh) | 2022-11-21 | 2022-11-21 | 图像处理方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024109247A1 true WO2024109247A1 (zh) | 2024-05-30 |
Family
ID=91069096
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/116594 Ceased WO2024109247A1 (zh) | 2022-11-21 | 2023-09-01 | 图像处理方法及装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20250356552A1 (zh) |
| EP (1) | EP4498326A4 (zh) |
| CN (2) | CN118057460A (zh) |
| WO (1) | WO2024109247A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120166308A (zh) * | 2025-03-20 | 2025-06-17 | 北京航空航天大学 | 一种面向真实场景的光场3d片源生成方法 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9576393B1 (en) * | 2014-06-18 | 2017-02-21 | Amazon Technologies, Inc. | Dynamic rendering of soft shadows for interface elements |
| CN109410300A (zh) * | 2018-10-10 | 2019-03-01 | 苏州好玩友网络科技有限公司 | 一种游戏场景中的阴影处理方法及装置及终端设备 |
| CN109672886A (zh) * | 2019-01-11 | 2019-04-23 | 京东方科技集团股份有限公司 | 一种图像帧预测方法、装置及头显设备 |
| US20200111195A1 (en) * | 2018-10-09 | 2020-04-09 | Valve Corporation | Motion smoothing for re-projected frames |
| CN111028357A (zh) * | 2018-10-09 | 2020-04-17 | 北京嘀嘀无限科技发展有限公司 | 增强现实设备的软阴影处理方法和装置 |
| WO2022108472A1 (en) * | 2020-11-20 | 2022-05-27 | Huawei Technologies Co., Ltd | Device and method for optimizing power consumption during frames rendering |
| CN114742934A (zh) * | 2022-04-07 | 2022-07-12 | 北京字跳网络技术有限公司 | 图像渲染方法、装置、可读介质及电子设备 |
-
2022
- 2022-11-21 CN CN202211454684.3A patent/CN118057460A/zh active Pending
-
2023
- 2023-09-01 US US18/860,941 patent/US20250356552A1/en active Pending
- 2023-09-01 EP EP23893340.2A patent/EP4498326A4/en active Pending
- 2023-09-01 WO PCT/CN2023/116594 patent/WO2024109247A1/zh not_active Ceased
- 2023-09-01 CN CN202380062845.0A patent/CN119790435A/zh active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9576393B1 (en) * | 2014-06-18 | 2017-02-21 | Amazon Technologies, Inc. | Dynamic rendering of soft shadows for interface elements |
| US20200111195A1 (en) * | 2018-10-09 | 2020-04-09 | Valve Corporation | Motion smoothing for re-projected frames |
| CN111028357A (zh) * | 2018-10-09 | 2020-04-17 | 北京嘀嘀无限科技发展有限公司 | 增强现实设备的软阴影处理方法和装置 |
| CN109410300A (zh) * | 2018-10-10 | 2019-03-01 | 苏州好玩友网络科技有限公司 | 一种游戏场景中的阴影处理方法及装置及终端设备 |
| CN109672886A (zh) * | 2019-01-11 | 2019-04-23 | 京东方科技集团股份有限公司 | 一种图像帧预测方法、装置及头显设备 |
| WO2022108472A1 (en) * | 2020-11-20 | 2022-05-27 | Huawei Technologies Co., Ltd | Device and method for optimizing power consumption during frames rendering |
| CN114742934A (zh) * | 2022-04-07 | 2022-07-12 | 北京字跳网络技术有限公司 | 图像渲染方法、装置、可读介质及电子设备 |
Non-Patent Citations (2)
| Title |
|---|
| See also references of EP4498326A4 |
| WAN GANG, CAO XUE-FENG, LI FENG, ZHANG TING: "IBR Real-Time Shadow Technology in the Battlefield Environment Simulation", JOURNAL OF GEOMATICS SCIENCE AND TECHNOLOGY, CN, no. 01, 28 February 2007 (2007-02-28), CN, pages 18 - 21, XP009554994, ISSN: 1673-6338 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119790435A (zh) | 2025-04-08 |
| EP4498326A4 (en) | 2025-08-20 |
| CN118057460A (zh) | 2024-05-21 |
| EP4498326A1 (en) | 2025-01-29 |
| US20250356552A1 (en) | 2025-11-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018072270A1 (zh) | 一种图像显示增强方法及装置 | |
| CN107958480A (zh) | 图像渲染方法、装置及存储介质 | |
| CN112835485A (zh) | 应用界面处理方法、装置、电子设备及可读存储介质 | |
| EP4024186A1 (en) | Screenshot method and terminal device | |
| CN105278950A (zh) | 用于执行视频通话增强功能的方法及其电子装置 | |
| US12153792B2 (en) | Keyboard display method, foldable-screen device and computer-readable storage medium | |
| CN114339313A (zh) | 插帧方法、装置及电子设备 | |
| CN103298530B (zh) | 信息处理装置 | |
| CN115129214A (zh) | 一种显示设备和颜色填充方法 | |
| WO2024109247A1 (zh) | 图像处理方法及装置 | |
| WO2025011490A1 (zh) | 视频特效添加方法、装置、设备、存储介质和程序产品 | |
| CN102801936B (zh) | 实现在屏显示的方法 | |
| WO2024017145A1 (zh) | 显示方法和电子设备 | |
| US20240187725A1 (en) | Photographing method and electronic device | |
| CN114863008B (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| CN113822010A (zh) | 内容显示方法、装置、设备及存储介质 | |
| CN107454308A (zh) | 显示控制设备及其控制方法和存储介质 | |
| EP4210312A1 (en) | Photographing method and electronic device | |
| CN113453069B (zh) | 一种显示设备及缩略图生成方法 | |
| CN118259811A (zh) | 信息获取方法、装置、电子设备及介质 | |
| CN112995539B (zh) | 一种移动终端及图像处理方法 | |
| CN115185443A (zh) | 手写输入方法、装置、终端设备及计算机可读存储介质 | |
| CN115314588B (zh) | 背景同步方法、装置、终端、设备、系统及存储介质 | |
| EP4603970A1 (en) | Window animation processing method and electronic device | |
| JP2015176493A (ja) | 端末装置、表示プログラム及び表示方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23893340 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023893340 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023893340 Country of ref document: EP Effective date: 20241023 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18860941 Country of ref document: US |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202380062845.0 Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 202380062845.0 Country of ref document: CN |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWP | Wipo information: published in national office |
Ref document number: 18860941 Country of ref document: US |