Image processing method and apparatus, and electronic device
By acquiring the first image of the video and its corresponding depth image and the depth image and optical flow image of the second image of the first N frames, and performing splicing processing to obtain the supersampled image, it solves the problem that the supersampling model in the existing technology cannot obtain low-resolution images. The issue of prior information improves the efficiency and accuracy of oversampling processing.
Patent Information
- Application Number
- PCT/CN2024/077008
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-20
- Filing Date
- 2024-02-08
- Publication Date
- 2024-08-29
AI Technical Summary
Existing supersampling models cannot obtain prior information of low-resolution images, resulting in low accuracy of supersampled images.
By acquiring the first image of the video and its corresponding first depth image, as well as the first N frames of the second image and the depth image and optical flow image of the second image of each frame, the splicing process is performed to obtain the supersampled image of the first image, using This image information improves the accuracy of supersampling processing.
The efficiency and accuracy of oversampling processing are improved. By obtaining more image prior information, the time required for image oversampling is reduced, and the resolution and clarity of the supersampled image are improved.
Smart Images

Figure CN2024077008_29082024_PF_FP_ABST
Abstract
Description
Image processing method, device and electronic equipment
[0001] This application claims priority to Chinese Patent Application No. 202310181542.2 filed on February 20, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The embodiments of the present disclosure relate to an image processing method, apparatus, and electronic device. Background Art
[0003] Supersampling can convert low-resolution images in a video into high-resolution images, thereby obtaining a high-resolution video.
[0004] Currently, a pre-trained supersampling model can be fed a low-resolution image, which is then supersampled based on the model to produce a high-resolution supersampled image. However, this method fails to capture prior information about the low-resolution image, resulting in low accuracy in the supersampled image. Improving the accuracy of supersampled images is an urgent problem.
[0005] Summary of the Invention
[0006] The present disclosure provides an image processing method, apparatus, and electronic device for solving the technical problem of low oversampling accuracy.
[0007] In a first aspect, the present disclosure provides an image processing method, the method comprising:
[0008] Acquire a first image of a video and a first depth image corresponding to the first image;
[0009] Acquire the first N frames of second images of the first image, and a second depth image and an optical flow image corresponding to each frame of the second image, where N is an integer greater than 0;
[0010] A super-sampled image corresponding to the first image is determined based on the first image, the first depth image, the first N frames of second images, N second depth images, and N optical flow images.
[0011] In a second aspect, the present disclosure provides an image processing device, comprising a first acquisition module, a second acquisition module, and a determination module, wherein:
[0012] The first acquisition module is used to acquire a first image of the video and a first depth image corresponding to the first image;
[0013] The second acquisition module is used to acquire the first N frames of second images of the first image, and the second depth image and optical flow image corresponding to each frame of the second image, where N is an integer greater than 0;
[0014] The determining module is configured to determine a super-sampled image corresponding to the first image based on the first image, the first depth image, the first N frames of second images, N second depth images, and N optical flow images.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a processor and a memory;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the image processing method as described in the first aspect and various possible aspects of the first aspect.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the image processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0019] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing method as described in the first aspect and various possible aspects of the first aspect.
[0020] The present disclosure provides an image processing method, apparatus, and electronic device, wherein the electronic device can obtain a first image of a video and a first depth image corresponding to the first image, obtain the second image of the first N frames, the second depth image corresponding to each second image, and an optical flow image, wherein N is an integer greater than 0, and determine a super-sampled image corresponding to the first image based on the first image, the first depth image, the second image of the first N frames, the N second depth images, and the N optical flow images. According to the above method, since the electronic device can directly perform super-sampling convolution on a low-resolution image, the number of pixels in the convolution process is small, and thus the efficiency of super-sampling can be improved, and the electronic device can perform super-sampling processing on the first image based on the image information of the first image and the image information of the first N frames, so the electronic device can obtain more image prior information, which can improve the accuracy of image super-sampling. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure, a brief introduction to the drawings required for use in the embodiments will be given below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0023] FIG2 is a schematic diagram of a flow chart of an image processing method provided by an embodiment of the present disclosure;
[0024] FIG3 is a schematic diagram of a second image provided by an embodiment of the present disclosure;
[0025] FIG4 is a schematic diagram of an optical flow image corresponding to a second image provided by an embodiment of the present disclosure;
[0026] FIG5 is a schematic diagram of a target optical flow image provided by an embodiment of the present disclosure;
[0027] FIG6 is a schematic diagram of a process for determining a third stitched image according to an embodiment of the present disclosure;
[0028] FIG7 is a schematic diagram of the structure of a supersampling network provided by an embodiment of the present disclosure;
[0029] FIG8 is a schematic diagram of an image processing method according to an embodiment of the present disclosure;
[0030] FIG9 is a schematic diagram of a training method for a supersampling network provided by an embodiment of the present disclosure;
[0031] FIG10 is a schematic diagram of a training process of a supersampling network provided by an embodiment of the present disclosure;
[0032] FIG11 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure;
[0033] FIG12 is a schematic structural diagram of another image processing device provided by an embodiment of the present disclosure; and
[0034] FIG13 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0036] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.
[0037] Electronic device: is a device with wireless transceiver function. The electronic device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted. The electronic device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, an on-board electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical care, a wireless electronic device in smart grid, a wireless electronic device in transportation safety, a wireless electronic device in smart city, a wireless electronic device in smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be referred to as a terminal, user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE agent or a UE device, etc. The electronic device can also be fixed or mobile.
[0038] Optical flow reconstruction processing: Optical flow reconstruction processing is an image processing method that reconstructs an image based on the optical flow information of the image. The optical flow information between any two images can indicate the movement information of the pixel positions between the two images. For example, for adjacent images A and B, the electronic device can obtain an optical flow image (an image including optical flow information) between image A and image B. The electronic device can reconstruct image B based on the optical flow image and image A. The electronic device can also reconstruct image A based on the optical flow image and image B. For example, the electronic device can obtain an optical flow image related to image A and image B. When each value of the optical flow image is +2, it means that each pixel of image A is moved to the right by 2 pixel units to reconstruct image B.
[0039] It should be noted that the reconstructed image B may be the same as or different from the original image B, and the reconstructed image A may be the same as or different from the original image A, which is mainly determined by the accuracy of the optical flow information included in the optical flow image.
[0040] In related technologies, supersampling processing can convert low-resolution images in a video into high-resolution images, thereby obtaining a high-resolution video. However, before performing supersampling convolution on the low-resolution image, the electronic device needs to perform feature extraction on the low-resolution image to obtain a low-resolution feature image, then perform upsampling processing on the low-resolution feature image to obtain a high-resolution feature image, and finally perform supersampling convolution on the high-resolution feature image to obtain a high-resolution image. In this way, supersampling convolution on the high-resolution feature image takes a long time, which reduces the efficiency of supersampling. In addition, the electronic device can only perform supersampling processing on the low-resolution image of the current frame. The electronic device has less prior information on the low-resolution image, and the oversampling is more difficult, which leads to lower accuracy of the supersampled image.
[0041] To solve the technical problems in the related art, the present disclosure provides an image processing method. An electronic device can obtain a first image of a video and a first depth image corresponding to the first image. The electronic device obtains the first N frames of second images of the first image, a second depth image corresponding to each frame of the second image, and an optical flow image. The electronic device performs a stitching process on the first image and the first depth image to obtain a first stitched image. The electronic device performs a stitching process on each frame of the second image and the second depth image corresponding to the second image to obtain N second stitched images. Based on the first stitched image, the N second stitched images, and the N optical flow images, a supersampled image corresponding to the first image is determined. In this way, the electronic device can perform supersampled convolution processing on low-resolution images, reduce the time required for image supersampling, and improve the efficiency of supersampling. Moreover, because the first stitched image and the N second stitched images can include more image prior information of the first image, the electronic device can accurately perform supersampling processing on the first image, thereby improving the accuracy of image supersampling.
[0042] The application scenario of the embodiment of the present disclosure is described below with reference to FIG1 .
[0043] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Please refer to FIG1 , which includes: an electronic device, a previous first frame rendering image, and a current frame rendering image. The previous first frame rendering image and the depth image B corresponding to the previous first frame rendering image are spliced, and the spliced image is subjected to optical flow processing to obtain a spliced image of the current frame rendering image and depth image a reconstructed by optical flow. Depth image a is a depth image of the current frame reconstructed by optical flow based on depth image B. The current frame rendering image and the depth image A corresponding to the current frame rendering image are spliced to obtain a spliced image of the current frame rendering image and depth image A.
[0044] Referring to FIG1 , an electronic device is input with a stitched image of the rendered image of the current frame and depth image a reconstructed by optical flow, and a stitched image of the rendered image of the current frame and depth image A. The electronic device can output a supersampled image of the rendered image of the current frame, wherein the resolution of the supersampled image of the rendered image of the current frame is greater than the resolution of the rendered image of the current frame. In this way, since the electronic device can perform supersampling processing on the rendered image of the current frame based on more image information, the accuracy of the supersampling processing is improved. Furthermore, the electronic device can perform supersampling processing on low-resolution images, and the electronic device processes fewer pixels, thereby improving the efficiency of supersampling.
[0045] It should be noted that FIG1 is only an example illustrating an application scenario of the embodiment of the present disclosure, and is not intended to limit the application scenario of the embodiment of the present disclosure.
[0046] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0047] FIG2 is a flow chart of an image processing method provided by an embodiment of the present disclosure. Referring to FIG2 , the method may include:
[0048] S201: Acquire a first image of a video and a first depth image corresponding to the first image.
[0049] The execution subject of the embodiments of the present disclosure may be an electronic device or an image processing device provided in the electronic device. The image processing device may be implemented based on software or a combination of software and hardware, which is not limited in the embodiments of the present disclosure.
[0050] The video may be a rendered video. For example, the video may be a virtual video or virtual animation rendered by a rendering machine. The video may also be other videos, which are not limited in the present embodiment. Optionally, the first image may be any frame of the video. For example, the first image may be the second, third, or fourth frame of the video.
[0051] Optionally, the first depth image may be a depth image of the first image. The first depth image may indicate the distance between a pixel in the first image and the photographing device. For example, the first image includes an object. If the distance between the object and the photographing device is small, the color of the object is darker in the first depth image corresponding to the first image. If the distance between the object and the photographing device is large, the color of the object is darker in the first depth image corresponding to the first image. Based on the first depth image, the distance between each pixel in the first image and the photographing device can be determined.
[0052] Optionally, the electronic device can receive a video output by a rendering machine. For example, the rendering machine can render a virtual video, and the electronic device can be connected to the rendering machine. After the rendering machine generates the virtual video, the rendering machine can send the virtual video to the electronic device. Optionally, the electronic device can also receive a video sent by a server. For example, the electronic device can be connected to a server. After the server captures the rendered video, the server can send the rendered video to the electronic device.
[0053] It should be noted that the electronic device can obtain the video based on other feasible implementation methods, and the embodiments of the present disclosure are not limited to this.
[0054] Optionally, the electronic device may process the first image based on an image recognition algorithm to obtain a first depth image corresponding to the first image. For example, the electronic device may process the first image using a pre-trained depth image acquisition model, and the depth image acquisition model may output a first depth image corresponding to the first image. For example, when rendering each frame of a video, a rendering engine may render a depth image corresponding to each frame, and then send the depth image corresponding to each frame to the electronic device.
[0055] It should be noted that the electronic device can also obtain the depth image of the first image based on other feasible implementation methods (for example, after the server captures the video, it can extract the depth image corresponding to each frame image in the video and send the first image and the first depth image to the electronic device). The embodiment of the present disclosure is not limited to this.
[0056] S202 : Acquire the first N frames of second images of the first image, and a second depth image and an optical flow image corresponding to each frame of the second image.
[0057] The second image may be the first N frames of images of the first image in the video, where N is an integer greater than 0. Optionally, the electronic device may obtain the second image in the video based on the first image and the value of N. For example, if N is 1, the second image may be the first frame of image before the first image; if N is 2, the second image may be the first frame of image before and the second frame of image before the first image; if N is 3, the second image may be the first frame of image before, the second frame of image before, and the third frame of image before the first image; if N is 4, the second image may be the first frame of image before, the second frame of image before, the third frame of image before, and the fourth frame of image before the first image.
[0058] The second image is described below with reference to FIG3 .
[0059] Figure 3 is a schematic diagram of a second image provided by an embodiment of the present disclosure. Referring to Figure 3 , a video is included. The video includes image 1, image 2, image 3, image 4, and image 5, with the five frames arranged in the order in which the video is played. If N is 2 and the first image is image 3, the second image is the first two frames of image 3. The second image may include image 1 and image 2.
[0060] The second depth image may be a depth image corresponding to the second image. For example, if the number of second images is 1, the number of second depth images is 1; if the number of second images is 2, the number of second depth images is 2. For example, if the electronic device acquires a second image A and a second image B, the electronic device may acquire a second depth image corresponding to the second image A and a second depth image corresponding to the second image B.
[0061] It should be noted that the method for the electronic device to obtain the second depth image may refer to step S201, which will not be described in detail in the embodiment of the present disclosure.
[0062] Among them, the optical flow image corresponding to the second image can indicate the pixel changes between the next frame image of the second image and the second image. For example, if the second image includes 100 pixels, the next frame image of the second image also includes 100 pixels, and the optical flow image corresponding to the second image also includes 100 values. For example, if each value in the optical flow image corresponding to the second image is +2, it means that after each pixel in the second image moves 2 pixel units to the right, the next frame image of the second image is obtained. For example, if the value of position 1 in the optical flow image corresponding to the second image is -2, it means that the pixel at position 1 in the second image moves 2 pixel units to the left in the next frame image of the second image; if the value of position 2 in the optical flow image corresponding to the second image is +10, it means that the pixel at position 2 in the second image moves 10 pixel units to the right in the next frame image of the second image.
[0063] The optical flow image corresponding to the second image is described below with reference to FIG. 4 .
[0064] FIG4 is a schematic diagram of an optical flow image corresponding to a second image provided by an embodiment of the present disclosure. FIG4 includes: a second image and an optical flow image corresponding to the second image. Taking the pixel of point A in the second image as an example, the value corresponding to the position of point A in the optical flow image is +2. Therefore, after the second image is processed using the optical flow image, the pixel of point A is shifted to the right by 2 pixels to obtain the next frame of the second image. In the next frame of the second image, the pixel of point A in the second image is shifted to the position of point a in the next frame of the second image.
[0065] Optionally, the number of second images is the same as the number of optical flow images. For example, if the electronic device acquires one second image, the electronic device can acquire the optical flow image corresponding to the second image, and perform optical flow reconstruction on the second image through the optical flow image to obtain the next frame of the second image. If the electronic device acquires two second images, the electronic device can acquire two optical flow images corresponding to the two second images, perform optical flow reconstruction on the first frame of the second image based on the optical flow image corresponding to the first frame of the second image, and obtain the optical flow reconstructed image of the current frame. Based on the optical flow image corresponding to the second frame of the second image, perform optical flow reconstruction on the second frame of the second image, and obtain the optical flow reconstructed image of the first frame. Then, based on the optical flow image of the first frame of the second image, perform optical flow reconstruction on the first frame of the second image, and obtain the optical flow reconstructed image of the first frame.
[0066] Optionally, the electronic device may obtain an optical flow image corresponding to the second image based on an optical flow algorithm. For example, the electronic device may process the video based on the optical flow algorithm to obtain an optical flow image between every two frames (or any two frames, which is not limited in the present embodiment) (the optical flow image is used as the optical flow image corresponding to the previous frame). The electronic device may store the optical flow image in a cache, and when the electronic device obtains the second image, the optical flow image corresponding to the second image may be determined in the cache.
[0067] It should be noted that the electronic device can also obtain the optical flow image corresponding to the second image based on other feasible implementation methods (for example, when rendering a video based on a rendering machine, the rendering machine can render the optical flow image between every two frames of images and store it in a cache. When the electronic device requests to obtain the optical flow image corresponding to the second image, the rendering machine can obtain the optical flow image in the cache and send the optical flow image to the electronic device). The embodiments of the present disclosure are not limited to this.
[0068] S203 : Determine a super-sampled image corresponding to the first image based on the first image, the first depth image, the previous N frames of second images, N second depth images, and N optical flow images.
[0069] The supersampled image is an image obtained by supersampling the first image. Optionally, the image resolution of the supersampled image is greater than the image resolution of the first image. For example, if the first image includes 100 pixels, then after supersampling the first image, the supersampled image corresponding to the first image may include 200 pixels. In this way, the clarity of the supersampled image corresponding to the first image is greater than that of the first image.
[0070] Specifically, the electronic device can determine the super-sampled image corresponding to the first image based on the following feasible implementation method: stitching the first image and the first depth image to obtain a first stitched image, stitching each frame of the second image and the second depth image corresponding to the second image to obtain N second stitched images, and determining the super-sampled image corresponding to the first image based on the first stitched image, the N second stitched images and the N optical flow images.
[0071] The first stitched image may be an image stitched together from the first image and the first depth image. For example, the electronic device may stitch the first image and the first depth image together vertically to obtain the first depth image, or may stitch the first image and the first depth image together horizontally to obtain the first depth image. The electronic device may also stitch the first image and the first depth image together based on other feasible implementation methods, which are not limited in the present disclosed embodiments.
[0072] The second stitched image may be an image obtained by stitching the second image and the second depth image corresponding to the second image. For example, an electronic device acquires second image A, second image B, second depth image 1, and second depth image 2. If second depth image 1 is a depth image of second image A, and second depth image 2 is a depth image of second image B, the electronic device may stitch second image A and second depth image 1 to obtain a second stitched image, and the electronic device may stitch second image B and second depth image 2 to obtain another second stitched image.
[0073] It should be noted that the electronic device can stitch the second image and the second depth image together vertically, or stitch the second image and the second depth image together left and right, or stitch the second image and the second depth image together based on other feasible implementation methods. The embodiments of the present disclosure are not limited to this. In this way, the first stitched image and the second stitched image can fuse the depth information of the image and improve the accuracy of image supersampling.
[0074] The electronic device determines a super-sampled image corresponding to the first image based on the first stitched image, N second stitched images, and N optical flow images. Specifically, the electronic device may determine at least one target optical flow image associated with each second stitched image in the N optical flow images, and determine the super-sampled image based on the N second stitched images, the at least one target optical flow image associated with each second stitched image, and the first stitched image.
[0075] The target optical flow image is used to perform optical flow reconstruction processing on the second stitched image, so that the second image in the second stitched image is reconstructed into the first image, and the second depth image is reconstructed into the first depth image.
[0076] Next, the target optical flow image is described with reference to FIG5 .
[0077] Figure 5 is a schematic diagram of a target optical flow image provided by an embodiment of the present disclosure. Referring to Figure 5 , the target optical flow image includes: Image 1, Image 2, Image 3, and Image 4; an optical flow image A between Image 1 and Image 2; an optical flow image B between Image 2 and Image 3; and an optical flow image C between Image 3 and Image 4. If N is 3 and the first image is 4, then the second image is determined to include Image 1, Image 2, and Image 3.
[0078] 5 , the target optical flow image a corresponding to the second stitched image of image 1 may include optical flow image A, optical flow image B, and optical flow image C. The target optical flow image b corresponding to the second stitched image of image 2 may include optical flow image B and optical flow image C. The target optical flow image c corresponding to the second stitched image of image 3 may include optical flow image C.
[0079] Optionally, the electronic device determines a super-sampled image based on the N second stitched images, at least one target optical flow image associated with each second stitched image, and the first stitched image, specifically by performing optical flow reconstruction processing on the second stitched images based on at least one target optical flow image associated with each second stitched image to obtain N third stitched images, and determining the super-sampled image based on the N third stitched images and the first stitched image.
[0080] The third stitched image is an image obtained by optical flow reconstruction of the second stitched image based on at least one target optical flow image. For example, if N is 1, the second image is the previous frame of the first image (current frame), and the electronic device performs optical flow reconstruction on the second stitched image corresponding to the previous frame based on the second stitched image corresponding to the previous frame and an optical flow image corresponding to the previous frame, to obtain a third stitched image. If N is 2, the second image is the previous first frame and the previous second frame of the first image, and the electronic device performs optical flow reconstruction on the second stitched image corresponding to the previous first frame based on the second stitched image corresponding to the previous first frame and the optical flow image corresponding to the previous first frame, to obtain a third stitched image. The electronic device performs optical flow reconstruction on the second stitched image corresponding to the previous second frame based on the second stitched image corresponding to the previous second frame, the optical flow image corresponding to the previous second frame, and the optical flow image corresponding to the previous first frame, to obtain another third stitched image.
[0081] The process of determining the third stitched image will be described below with reference to FIG. 6 .
[0082] FIG6 is a schematic diagram of a process for determining a third stitched image according to an embodiment of the present disclosure. Referring to FIG6 , an electronic device (not shown in FIG6 ) may perform optical flow processing on a stitched image of the second preceding frame image and a second depth image A corresponding to the second preceding frame image based on the optical flow image corresponding to the second preceding frame image, thereby obtaining a stitched image of the first preceding frame image reconstructed by optical flow and the second depth image B, wherein the second depth image B is a depth image corresponding to the first preceding frame image reconstructed by optical flow based on the second depth image A and the optical flow image corresponding to the second preceding frame image.
[0083] Referring to Figure 6, the electronic device can perform optical flow processing on the stitched image between the optical flow-reconstructed previous frame image and the second depth image B based on the optical flow image corresponding to the previous frame image, to obtain a stitched image between the optical flow-reconstructed current frame image and the second depth image C, wherein the second depth image C is a depth image (third stitched image) corresponding to the current frame image optically reconstructed based on the second depth image B and the optical flow image corresponding to the previous frame image. In this way, since the third stitched image includes the image information of the current frame optically reconstructed by the optical flow of the previous N frames, the third stitched image can include more prior information of the current frame, thereby improving the accuracy of supersampling.
[0084] Optionally, the electronic device may determine the supersampled image based on the following feasible implementation: inputting N third stitched images and the first stitched image into a supersampling network to obtain a supersampled image corresponding to the first image, wherein the supersampling network is configured to perform supersampling processing on the image. The last layer of the supersampling network is a pixel reassembly network, which is configured to upsample the feature image.
[0085] The structure of the oversampling network is described below with reference to FIG7 .
[0086] FIG7 is a schematic diagram of the structure of a supersampling network provided by an embodiment of the present disclosure. Please refer to FIG7 , which includes: a supersampling network. The supersampling network is a U-net structure consisting of 10 convolutional layers and 2 up / down sampling layers. For example, the number of channels of the first convolutional layer is 64, the number of channels of the second convolutional layer is 32, and so on. Specifically, the upsampling layer of the output of the supersampling network is a pixel reorganization layer based on pixel shuffle implementation, and the input of the upsampling layer is the low-resolution first spliced image and the third spliced image, and the output is a high-resolution supersampling image. In this way, the resolution of the feature image processed by the intermediate layer of the supersampling network is relatively low, which can reduce the processing time of the supersampling network and improve the efficiency of supersampling. Moreover, since the supersampling network can obtain more image information (such as depth information, pixel information, etc.), the accuracy of supersampling can be improved.
[0087] It should be noted that the supersampling network can also be a network with other similar lightweight encoder-decoder structures. It only needs to remove the batch normalization layer in the lightweight encoder-decoder structure network and replace the output layer with a pixel shuffle layer.
[0088] The disclosed embodiments provide an image processing method, in which an electronic device can obtain a first image of a video and a first depth image corresponding to the first image, obtain the first N frames of second images of the first image, a second depth image corresponding to each frame of the second image, and an optical flow image, stitch the first image and the first depth image to obtain a first stitched image, stitch each frame of the second image and the second depth image corresponding to the second image to obtain N second stitched images, and determine a supersampled image corresponding to the first image based on the first stitched image, the N second stitched images, and the N optical flow images. In this way, the supersampling network of the electronic device can directly process low-resolution images, and the feature images processed by the intermediate layer of the supersampling network have a lower resolution, thereby improving the efficiency of supersampling. Moreover, because the first stitched image and the N second stitched images can include more depth information and pixel information of the first image, the electronic device can accurately supersample the first image, thereby improving the accuracy of the supersampled image.
[0089] Based on the embodiment shown in FIG. 2 , the process of the above-mentioned image processing method will be described below in conjunction with FIG. 8 .
[0090] Figure 8 is a process diagram of an image processing method provided by an embodiment of the present disclosure. Please refer to Figure 8, including a rendering machine. Among them, the rendering machine can render a low-resolution RGB image of the current frame (with a size of H×W×3) and a first depth image corresponding to the low-resolution RGB image of the current frame. The rendering machine can render a low-resolution RGB image of the previous frame (with a size of H×W×3), a second depth image corresponding to the low-resolution RGB image of the previous frame, and an optical flow image (with a size of H×W×2). Among them, the optical flow image indicates the displacement of corresponding pixels between the current frame and the previous frame, the first channel represents the offset direction and size of the image in the x direction, and the second channel represents the offset and size of the image in the y direction.
[0091] Referring to Figure 8 , the low-resolution RGB image and the first depth image of the current frame are stitched together to obtain a first stitched image, which includes the low-resolution RGB image and the first depth image of the current frame. The low-resolution RGB image and the second depth image of the previous frame are stitched together to obtain a second stitched image, which includes the low-resolution RGB image and the second depth image of the previous frame.
[0092] Please refer to Figure 8. Optical flow processing is performed on the second stitched image based on the optical flow image to obtain a third stitched image. The third stitched image includes an RGB image of the current frame reconstructed by the optical flow and a second depth image of the current frame reconstructed by the optical flow. The first stitched image and the second stitched image are input into the supersampling network, and the supersampling network can output a high-resolution RGB image of the current frame (size is 2H×2W×3). In this way, the resolution of the feature image processed by the intermediate layer of the supersampling network is lower, thereby improving the efficiency of supersampling. Moreover, since the first stitched image and the third stitched image can include more depth information and pixel information of the first image, the electronic device can accurately perform supersampling processing on the first image, thereby improving the accuracy of the supersampling image.
[0093] Based on any of the above embodiments, the above image processing method also includes a training method for a super-sampling network. The training method for the super-sampling network is described below with reference to FIG9 .
[0094] FIG9 is a schematic diagram of a training method for a supersampling network provided by an embodiment of the present disclosure. Referring to FIG9 , the method flow includes:
[0095] S901: Acquire multiple frames of sample images in a sample video, and a sample depth image and a sample optical flow image corresponding to each frame of the sample image.
[0096] Optionally, the sample video may be a rendered video. For example, the sample video may be a game animation video, a virtual character video, or the like. The electronic device may receive sample videos sent by other devices. For example, the electronic device may be connected to a rendering machine, which may render the sample video and then send the sample video to the electronic device.
[0097] It should be noted that during the training phase, the electronic device can obtain the sample image of each frame of the sample video, the sample depth image and the sample optical flow image corresponding to each frame of the sample image. The method of obtaining the sample image, the sample depth image and the sample optical flow image corresponding to the sample image can refer to the embodiment shown in Figure 2, and the embodiment of the present disclosure will not be repeated here.
[0098] S902: Obtain a sample super-sampled image corresponding to each frame of the sample image.
[0099] The sample supersampled image is a supersampled image corresponding to the sample image. The resolution of the sample image is lower than the resolution of the sample supersampled image corresponding to the sample image. For example, an electronic device may obtain two images with the same image content, one of which has a lower resolution and the other has a higher resolution. The lower-resolution image may be used as the sample image, and the higher-resolution image may be used as the sample supersampled image corresponding to the sample image. For example, in actual applications, each frame of a standard-definition sample video may be used as a sample image, and each frame of an ultra-high-definition sample video corresponding to the standard-definition sample video may be used as a sample supersampled image.
[0100] It should be noted that the electronic device may also obtain the sample super-sampled image corresponding to each frame of the sample image based on other feasible implementation methods, and the embodiments of the present disclosure are not limited to this.
[0101] S903. Train the supersampling network based on multiple frames of sample images, images of the M frames before each sample frame, sample depth images and sample supersampling images of each sample frame, and sample depth images and sample optical flow images corresponding to the images of the M frames before each sample frame.
[0102] Wherein, M is an integer greater than or equal to N. Specifically, for the sample image of the current frame, the electronic device may train the supersampling network based on the following feasible implementation method: performing splicing processing on the sample image and the sample depth image of the sample image to obtain a first sample spliced image, performing splicing processing on the image M frames before the sample image and the sample depth image corresponding to the image M frames before the sample image to obtain an M-frame sample second spliced image, performing optical flow processing on the M-frame sample second spliced image based on the M-frame sample optical flow images corresponding to the image M frames before the sample image to obtain an M-frame sample third spliced image, and training the supersampling network based on the first sample spliced image, the M-frame sample third spliced image, and the sample supersampled image corresponding to the sample image.
[0103] The second sample stitched image includes an image M frames preceding a sample image and a sample depth image corresponding to the image M frames preceding the sample image. It should be noted that the method for stitching the sample image and the sample depth image of the sample image, and the method for stitching the image M frames preceding the sample image and the sample depth image corresponding to the image M frames preceding the sample image, can refer to the embodiment shown in FIG. 2 , and this embodiment of the present disclosure will not be further described.
[0104] The third sample stitched image is an image obtained by optical flow reconstruction of the second sample stitched image. It should be noted that the method for the electronic device to obtain the third sample stitched image can refer to the embodiment shown in FIG2 , which will not be described in detail in this embodiment.
[0105] Optionally, the electronic device trains a supersampling network based on the sample first stitched image, the M-frame sample third stitched image, and the sample supersampled image corresponding to the sample image. Specifically, the electronic device processes the sample first stitched image and the M-frame sample third stitched image based on the supersampling network to obtain a predicted supersampled image, and trains the supersampling network based on a loss between the predicted supersampled image and the sample supersampled image. For example, the electronic device may construct a loss function based on the predicted supersampled image predicted by the supersampling network and the actual sample supersampled image, and then update network parameters in the supersampling network using the loss function.
[0106] Optionally, the electronic device can also assist in the training of the supersampling network based on a discriminator. For example, the discriminator can be composed of four convolutional layers, and the discriminator can judge the authenticity of the predicted supersampling image output by the supersampling network, and then train the supersampling network based on the judgment results. For example, in actual application, the true and false discriminator can determine that the image output by the supersampling network is the predicted image. During the training process, the image output by the supersampling network is made close to the real image (that is, the discriminator cannot determine whether the image output by the supersampling network is the predicted image or the real image).
[0107] Optionally, after the electronic device obtains multiple frames of sample images in the sample video, the electronic device may further preprocess the multiple frames of sample images. The preprocessing may include at least one of the following processing methods: blur processing, noise processing, compression distortion processing, and ringing distortion processing.
[0108] The blurring process may include Gaussian blurring and motion blurring; the noise processing may include Gaussian noise processing, Poisson noise processing, colored noise processing, and gray noise processing; the compression distortion processing may be JPEG (Joint Photographic Experts Group) compression processing; and the ringing distortion processing may be one or more ringing distortion (sinc filter). By processing the sample image in the above-mentioned preprocessing manner, the original low-resolution image can be simulated, thereby increasing the robustness of the supersampling network.
[0109] It should be noted that during the training phase, SMAA anti-aliasing processing can be performed on the sample super-sampled images obtained by the electronic device, which can enhance the anti-aliasing effect of the super-sampling network.
[0110] It should be noted that, in actual applications, the electronic device may randomly preprocess multiple frames of sample images. For example, after the electronic device acquires multiple frames of sample images, the electronic device may preprocess 30% of the sample images and not preprocess the remaining 70%. Furthermore, when preprocessing the sample images, the preprocessing method for each sample image may be randomly selected (e.g., randomly selecting one or more of the above preprocessing methods and processing the sample image). The electronic device may also preprocess the sample images based on other methods, which is not limited in the present embodiment.
[0111] Next, the training process of the supersampling network is described with reference to FIG10 .
[0112] Figure 10 is a schematic diagram of the training process of a supersampling network provided by an embodiment of the present disclosure. Referring to Figure 10 , the system includes a rendering engine. The rendering engine can render a low-resolution sample image A of the current frame and a sample first depth image corresponding to sample image A. The rendering engine can also render a low-resolution sample image B of the previous frame, a sample second depth image corresponding to sample image B, and a sample optical flow image.
[0113] Referring to Figure 10 , sample image A is preprocessed, and the preprocessed sample image A and the first depth image are stitched together to obtain a first stitched image. The first stitched image includes the preprocessed low-resolution sample image A and the sample first depth image. Sample image B is preprocessed, and the preprocessed sample image B and the sample second depth image are stitched together to obtain a second stitched image. The second stitched image includes the preprocessed low-resolution sample image B and the sample second depth image.
[0114] Referring to Figure 10, optical flow processing is performed on the second stitched image based on the optical flow image to obtain a third stitched image. The third stitched image includes a sample image B of the current frame reconstructed by optical flow and a sample second depth image of the current frame reconstructed by optical flow. The first and second stitched images are input to the supersampling network, which outputs a predicted high-resolution image.
[0115] Referring to FIG10 , an electronic device (not shown in FIG10 ) may update parameters in the supersampling network based on the loss between the predicted high-resolution image and the sample supersampled image corresponding to the low-resolution sample image A. The electronic device may process the predicted high-resolution image based on a discriminator and update parameters in the supersampling network based on the output of the discriminator.
[0116] The disclosed embodiments provide a method for training a supersampling network, which obtains multiple frames of sample images from a sample video, a sample depth image and a sample optical flow image corresponding to each frame of the sample image, obtains a sample supersampling image corresponding to each frame of the sample image, and trains the supersampling network based on the multiple frames of sample images, the images of the M frames preceding each frame of the sample image, the sample depth image and the sample supersampling image of each frame of the sample image, and the sample depth image and the sample optical flow image corresponding to the images of the M frames preceding each frame of the sample image. In this way, since the supersampling network can directly process low-resolution images, the resolution of the feature images processed by the intermediate layer of the supersampling network is low, thereby improving the training efficiency of the supersampling network. Moreover, since preprocessing the sample images can simulate the original low-definition images, the robustness of the supersampling network can be increased.
[0117] FIG11 is a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure. Referring to FIG11 , the image processing device 110 includes a first acquisition module 111, a second acquisition module 112, and a determination module 113, wherein:
[0118] The first acquisition module 111 is used to acquire a first image of a video and a first depth image corresponding to the first image;
[0119] The second acquisition module 112 is configured to acquire the first N frames of second images of the first image, and a second depth image and an optical flow image corresponding to each frame of the second image, where N is an integer greater than 0;
[0120] The determining module 113 is configured to determine a super-sampled image corresponding to the first image based on the first image, the first depth image, the first N frames of second images, N second depth images, and N optical flow images.
[0121] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:
[0122] performing stitching processing on the first image and the first depth image to obtain a first stitched image;
[0123] performing stitching processing on each frame of the second image and the second depth image corresponding to the second image to obtain N second stitched images;
[0124] A super-sampled image corresponding to the first image is determined based on the first stitched image, the N second stitched images, and the N optical flow images.
[0125] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:
[0126] Determine, from the N optical flow images, at least one target optical flow image associated with each second stitched image, where the target optical flow image is used to perform optical flow reconstruction on the second stitched image, so that the second image in the second stitched image is reconstructed into the first image, and the second depth image is reconstructed into the first depth image;
[0127] The super-sampled image is determined based on the N second stitched images, at least one target optical flow image associated with each second stitched image, and the first stitched image.
[0128] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:
[0129] performing optical flow reconstruction processing on the second stitched images based on at least one target optical flow image associated with each second stitched image to obtain N third stitched images;
[0130] The super-sampled image is determined based on the N third stitched images and the first stitched image.
[0131] According to one or more embodiments of the present disclosure, the determining module 113 is specifically configured to:
[0132] Inputting the N third stitched images and the first stitched image into a supersampling network to obtain a supersampled image corresponding to the first image;
[0133] The supersampling network is used to perform supersampling processing on the image.
[0134] According to one or more embodiments of the present disclosure, the last layer of the supersampling network is a pixel reconstruction network, which is used to perform upsampling processing on the feature image.
[0135] The image processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0136] FIG12 is a schematic diagram of the structure of another image processing device provided by an embodiment of the present disclosure. Based on the embodiment shown in FIG11 , referring to FIG12 , the image processing device 110 further includes a training module 114, which is used to:
[0137] Obtain multiple frames of sample images in the sample video, and a sample depth image and a sample optical flow image corresponding to each frame of the sample image;
[0138] Obtain a sample super-sampled image corresponding to each frame of the sample image;
[0139] The supersampling network is trained based on the multiple frames of sample images, the images of the M frames before each frame of sample image, the sample depth image and the sample supersampling image of each frame of sample image, and the sample depth image and the sample optical flow image corresponding to the images of the M frames before each frame of sample image, where M is an integer greater than or equal to N.
[0140] According to one or more embodiments of the present disclosure, the training module 114 is further configured to:
[0141] Preprocessing the multiple frames of sample images;
[0142] The pre-processing includes at least one of the following processing methods: blur processing, noise processing, compression distortion processing and ringing effect distortion processing.
[0143] The image processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0144] FIG13 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Please refer to FIG13 , which shows a schematic diagram of the structure of an electronic device 1300 suitable for implementing an embodiment of the present disclosure. The electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG13 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0145] As shown in FIG13 , the electronic device 1300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage device 1308 into a random access memory (RAM) 1303. Various programs and data required for the operation of the electronic device 1300 are also stored in the RAM 1303. The processing device 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.
[0146] Typically, the following devices may be connected to the I / O interface 1305: an input device 1306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1309. The communication device 1309 may allow the electronic device 1300 to communicate with other devices wirelessly or by wire to exchange data. Although FIG13 shows an electronic device 1300 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0147] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1309, or installed from the storage device 1308, or installed from the ROM 1302. When the computer program is executed by the processing device 1301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0148] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0149] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0150] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0151] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image processing methods that may be involved in various embodiments above are implemented.
[0152] An embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing methods that may be involved in various embodiments as described above.
[0153] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0155] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0156] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0157] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0158] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0159] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0160] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0161] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium or other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device. It can be understood that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure.
[0162] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws and regulations. Data may include information, parameters and messages, such as flow switching indication information.
[0163] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0164] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0165] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. An image processing method, include: Acquire a first image of a video and a first depth image corresponding to the first image; Acquire the first N frames of second images of the first image, and the second depth image and optical flow image corresponding to each frame of the second image, where N is an integer greater than 0; A super-sampled image corresponding to the first image is determined based on the first image, the first depth image, the first N frames of second images, N second depth images, and N optical flow images.
2. The method according to claim 1, in, The determining, based on the first image, the first depth image, the first N frames of second images, N second depth images, and N optical flow images, a super-sampled image corresponding to the first image includes: Performing stitching processing on the first image and the first depth image to obtain a first stitched image; Performing stitching processing on each frame of the second image and a second depth image corresponding to the second image to obtain N second stitched images; A super-sampled image corresponding to the first image is determined based on the first stitched image, the N second stitched images, and the N optical flow images.
3. The method according to claim 2, in, The determining, based on the first stitched image, the N second stitched images and the N optical flow images, a super-sampled image corresponding to the first image includes: Determine, among the N optical flow images, at least one frame of target optical flow image associated with each second stitched image, wherein the target optical flow image is used to perform optical flow reconstruction processing on the second stitched image, so that the second image in the second stitched image is reconstructed into the first image, and the second depth image is reconstructed into the first depth image; The super-sampled image is determined based on the N second stitched images, at least one target optical flow image associated with each second stitched image, and the first stitched image.
4. The method according to claim 3, in, The determining the super-sampled image based on the N second stitched images, at least one target optical flow image associated with each second stitched image, and the first stitched image comprises: Performing optical flow reconstruction processing on the second stitched images based on at least one target optical flow image associated with each second stitched image to obtain N third stitched images; The super-sampled image is determined based on the N third stitched images and the first stitched image.
5. The method according to claim 4, in, The determining the super-sampled image based on the N third stitched images and the first stitched image includes: Inputting the N third stitched images and the first stitched image into a supersampling network to obtain a supersampling image corresponding to the first image; The supersampling network is used to perform supersampling processing on the image.
6. The method according to claim 5, in, The last layer of the supersampling network is a pixel reorganization network, and the pixel reorganization network is used to perform upsampling processing on the feature image.
7. The method according to claim 5 or 6, in, The supersampling network is trained based on the following method: Obtain multiple frames of sample images in the sample video, and a sample depth image and a sample optical flow image corresponding to each frame of the sample image; Obtain a sample super-sampling image corresponding to each frame of sample image; The supersampling network is trained based on the multiple frames of sample images, the images of the M frames before each frame of the sample image, the sample depth image and the sample super-sampled image of each frame of the sample image, and the sample depth image and the sample optical flow image corresponding to the images of the M frames before each frame of the sample image, where M is an integer greater than or equal to N.
8. The method according to claim 7, in, After acquiring multiple frames of sample images in the sample video, the method further includes: Preprocessing the multiple frames of sample images; The preprocessing includes at least one of the following processing methods: blur processing, noise processing, compression distortion processing and ringing effect distortion processing.
9. An image processing device, comprising a first acquisition module, a second acquisition module and a determination module, in, The first acquisition module is configured to acquire a first image of a video and a first depth image corresponding to the first image; The second acquisition module is configured to acquire the first N frames of second images of the first image, a second depth image and an optical flow image corresponding to each frame of the second image, where N is an integer greater than 0; The determining module is configured to determine, based on the first image, the first depth image, the first N frames of second images, N second depth images and N optical flow images, that the first image corresponds to Supersampled image.
10. An electronic device comprising a processor and a memory, in, The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the image processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, in, The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image processing method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Image processing method and device and electronic equipment
CN118540497A
Video high-temporal-spatial-resolution signal processing method combining optical flow method and deep network
CN110634105A
Video frame insertion method and device, equipment and storage medium
CN112929689A
Depth image super-resolution method and device, training method and device, equipment and medium
CN113160044A
Image resolution improving method and device, storage medium and electronic equipment
CN114418845A
