Image processing method and device, equipment and storage medium

By performing iterative fusion and decoding processing on the splicing area in the initial feature image, combined with the weight range and fusion strategy, the problem of low image quality generated by electronic equipment is solved, and the splicing effect and overall quality of the image are improved.

CN118537232APending Publication Date: 2024-08-23ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410565622.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the existing technology, the quality of images generated by electronic devices is low, especially when there are splicing traces during the image splicing process, which affects the overall quality of the image.

Method used

By obtaining the initial feature image corresponding to the image description information, determine the first splicing area and the second splicing area, and perform iterative fusion processing on them. Combined with the weight range and fusion strategy, feature fusion and decoding are performed to generate the target image and improve the image. The splicing effect and quality.

Benefits of technology

The quality and splicing effect of the target image are improved, splicing traces are reduced, and the generated image is more realistic and clear.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537232A
    Figure CN118537232A
Patent Text Reader

Abstract

The invention provides an image processing method and apparatus, a device and a storage medium. The method comprises the steps of obtaining an initial feature image corresponding to image description information; determining a first splicing area and a second splicing area in the initial feature image; and performing feature fusion processing on the first splicing area and the second splicing area to obtain a target image corresponding to the image description information. The quality of the target image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, apparatus, device and storage medium. Background Art

[0002] Intelligent generation of image content refers to generating images that meet certain conditions based on images or text as input information. For example, an electronic device can generate an image corresponding to a piece of text based on the text.

[0003] In the related art, an electronic device can generate an image that meets the conditions based on a pre-trained model. For example, an electronic device can input the text "draw a flower" into a pre-trained stable diffusion (SD) model, and the SD model can generate an image of a flower based on the text. However, in the above method, the image quality generated by the SD model is low. Summary of the invention

[0004] The present application provides an image processing method, apparatus, device and storage medium, which are used to solve the technical problem of low quality of images generated by electronic devices in the prior art.

[0005] In a first aspect, the present application provides an image processing method, the image processing method comprising:

[0006] Obtaining an initial feature image corresponding to the image description information;

[0007] Determining a first stitching area and a second stitching area in the initial feature image;

[0008] Perform feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information.

[0009] In a possible implementation, performing feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information includes:

[0010] Iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image to obtain a target feature image corresponding to the image description information;

[0011] The target image is determined according to the target feature image.

[0012] In a possible implementation, for any iterative fusion, iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area includes:

[0013] Acquire a first feature image and image description information of current iterative fusion, wherein the first feature image is a starting feature image of current iterative fusion;

[0014] According to the image description information, denoising is performed on the first feature image to obtain a second feature image;

[0015] In the second feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image for next iterative fusion or the target feature image.

[0016] In a possible implementation, fusing the feature image in the first stitching area and the feature image in the second stitching area includes:

[0017] Get the weight range;

[0018] According to the weight range, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a third feature image;

[0019] The third characteristic image covers the characteristic image in the first stitching area or the characteristic image in the second stitching area.

[0020] In a possible implementation, the first stitching area includes an edge of the initial feature image in a first direction, the second stitching area includes an edge of the initial feature image in a second direction, and the first direction is opposite to the second direction.

[0021] In a possible implementation, according to the weight range, fusing the feature image in the first stitching area and the feature image in the second stitching area to obtain a third feature image includes:

[0022] Determine a fusion strategy, wherein the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, or the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction;

[0023] According to the weight range and the fusion strategy, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain the third feature image.

[0024] In a possible implementation, overwriting the feature image in the first stitching area or the feature image in the second stitching area with the third feature image includes:

[0025] If the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the first stitching area;

[0026] If the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the second stitching area.

[0027] In a possible implementation, determining the target image according to the target feature image includes:

[0028] Iteratively decoding the target feature image to obtain a target image;

[0029] The iterative decoding includes fusing the feature image in the first stitching area with the feature image in the second stitching area.

[0030] In a possible implementation, for any iterative decoding, iteratively decoding the target feature image includes:

[0031] Acquire a fourth characteristic image of current iterative decoding, where the fourth characteristic image is a starting characteristic image of current iterative decoding;

[0032] Decoding the fourth characteristic image to obtain a fifth characteristic image;

[0033] In the fifth feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image or the target image for next iterative decoding.

[0034] In a possible implementation manner, after obtaining the target image corresponding to the image description information, the method further includes:

[0035] Performing super-resolution processing on the target image to obtain a first image;

[0036] Performing generative adversarial processing on the first image to obtain a second image;

[0037] Performing the super-resolution processing on the second image to obtain a third image;

[0038] Among them, the super-resolution processing includes feature fusion processing on the first stitching area and the second stitching area, and wherein, in the super-resolution processing, the image description information required for the feature fusion processing is the image information corresponding to the target image or the image information corresponding to the second image.

[0039] In a second aspect, the present application provides another image processing method, the method comprising:

[0040] Obtaining an initial feature image corresponding to the image description information;

[0041] Determining a first stitching area and a second stitching area in the initial feature image;

[0042] Feature fusion processing is performed on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information, where the target image is a panoramic image.

[0043] In a possible implementation, performing feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information includes:

[0044] Iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image to obtain a target feature image corresponding to the image description information;

[0045] The target image is determined according to the target feature image.

[0046] In a possible implementation, for any iterative fusion, iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area includes:

[0047] Acquire a first feature image and image description information of current iterative fusion, wherein the first feature image is a starting feature image of current iterative fusion;

[0048] According to the image description information, denoising is performed on the first feature image to obtain a second feature image;

[0049] In the second feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image for next iterative fusion or the target feature image.

[0050] In a possible implementation, fusing the feature image in the first stitching area and the feature image in the second stitching area includes:

[0051] Get the weight range;

[0052] According to the weight range, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a third feature image;

[0053] The third characteristic image covers the characteristic image in the first stitching area or the characteristic image in the second stitching area.

[0054] In a possible implementation, the first stitching area includes an edge of the initial feature image in a first direction, the second stitching area includes an edge of the initial feature image in a second direction, and the first direction is opposite to the second direction.

[0055] In a possible implementation, according to the weight range, fusing the feature image in the first stitching area and the feature image in the second stitching area to obtain a third feature image includes:

[0056] Determine a fusion strategy, wherein the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, or the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction;

[0057] According to the weight range and the fusion strategy, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain the third feature image.

[0058] In a possible implementation, overwriting the feature image in the first stitching area or the feature image in the second stitching area with the third feature image includes:

[0059] If the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the first stitching area;

[0060] If the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the second stitching area.

[0061] In a possible implementation, determining the target image according to the target feature image includes:

[0062] Iteratively decoding the target feature image to obtain a target image;

[0063] The iterative decoding includes fusing the feature image in the first stitching area with the feature image in the second stitching area.

[0064] In a possible implementation, for any iterative decoding, iteratively decoding the target feature image includes:

[0065] Acquire a fourth characteristic image of current iterative decoding, where the fourth characteristic image is a starting characteristic image of current iterative decoding;

[0066] Decoding the fourth characteristic image to obtain a fifth characteristic image;

[0067] In the fifth feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image or the target image for next iterative decoding.

[0068] In a possible implementation manner, after obtaining the target image corresponding to the image description information, the method further includes:

[0069] Performing super-resolution processing on the target image to obtain a first image;

[0070] Performing generative adversarial processing on the first image to obtain a second image;

[0071] Performing the super-resolution processing on the second image to obtain a third image;

[0072] Among them, the super-resolution processing includes feature fusion processing on the first stitching area and the second stitching area, and wherein, in the super-resolution processing, the image description information required for the feature fusion processing is the image information corresponding to the target image or the image information corresponding to the second image.

[0073] In a third aspect, the present application provides another image processing method, the image processing method comprising:

[0074] Generate a virtual reality image or an augmented reality image according to the target image;

[0075] The target image is an image generated according to the method described in the first aspect or the method described in the second aspect.

[0076] In a fourth aspect, the present application provides an electronic device, including: a processor and a memory;

[0077] The memory stores computer-executable instructions;

[0078] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method as described in any one of the first aspect, any one of the second aspect, or any one of the third aspect.

[0079] In a fifth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspect, any one of the second aspect, or any one of the third aspect.

[0080] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any one of the first aspect, any one of the second aspect, or any one of the third aspect.

[0081] The present application provides an image processing method, apparatus, device and storage medium, wherein the electronic device can obtain an initial feature image corresponding to image description information, determine a first stitching area and a second stitching area in the initial feature image, and perform feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information. In the above method, since the electronic device can perform feature fusion processing on the first stitching area and the second stitching area in the initial feature image, the fusion degree of the first stitching area and the second stitching area in the target image generated by the electronic device is relatively high, thereby improving the quality of the target image and improving the stitching effect of the target image. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0083] Figure 2 A flowchart of an image processing method provided in an embodiment of the present application;

[0084] Figure 3 A processing process of a stable diffusion model provided in an embodiment of the present application;

[0085] Figure 4 A schematic diagram of a first splicing area and a second splicing area provided in an embodiment of the present application;

[0086] Figure 5 A schematic diagram of an iterative fusion process provided in an embodiment of the present application;

[0087] Figure 6 A schematic diagram of a method for fusing feature images provided in an embodiment of the present application;

[0088] Figure 7 A schematic diagram of a third characteristic image provided in an embodiment of the present application;

[0089] Figure 8 A schematic diagram of a process for determining a third characteristic image provided in an embodiment of the present application;

[0090] Fig. 9 A schematic diagram of a process of covering a feature image provided in an embodiment of the present application;

[0091] Fig.10 A schematic diagram of an iterative decoding method provided in an embodiment of the present application;

[0092] Fig.11 A schematic diagram of an iterative decoding process provided in an embodiment of the present application;

[0093] Fig.12 A schematic diagram of another iterative decoding process provided by an embodiment of the present application;

[0094] Fig.13 A schematic diagram of a super-resolution processing method provided in an embodiment of the present application;

[0095] Fig.14 A schematic diagram of a process of super-resolution processing of a target image provided in an embodiment of the present application;

[0096] Fig.15 A schematic diagram of an image processing method provided in an embodiment of the present application;

[0097] Fig.16 A schematic diagram of another image processing method provided in an embodiment of the present application;

[0098] Fig.17 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;

[0099] Fig.18 A schematic diagram of the structure of another image processing device provided in an embodiment of the present application;

[0100] Fig.19 A schematic diagram of the hardware structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0101] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0102] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0103] The user information (including but not limited to user device information such as location information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0104] Next, combine Figure 1 , the application scenarios involved in the embodiments of the present application are described.

[0105] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , including: text of a user describing an image and a preset model. The preset model may be a pre-trained text-to-image model, and the training sample of the preset model may include multiple sample texts and a sample panoramic image corresponding to each sample text. The electronic device ( Figure 1 (not shown) can obtain text of the user describing the image and input the text of the user describing the image into a preset model. The preset model can output a panoramic image associated with the text, and the electronic device can perform image processing on the panoramic image to obtain a virtual reality image or an augmented reality image.

[0106] It should be noted that Figure 1 The examples are merely illustrative of the application scenarios of the embodiments of the present application and are not intended to limit the application scenarios of the embodiments of the present application.

[0107] In the related art, the preset model can learn the training samples and then have the ability to convert text into images. However, since the construction of a visual stereo model involves image stitching (such as left and right stitching of a panoramic image), after the electronic device constructs a visual stereo model based on the image generated by the preset model, there are traces of image stitching in the stereo model. For example, after the panoramic image generated by the preset model is converted into a stereo model, there are traces of image stitching at the position where the left side of the panoramic image and the right side of the panoramic image corresponding to the stereo model are stitched. Therefore, how to generate an image for constructing a stereo model is a technical problem that needs to be solved urgently.

[0108] In order to solve the technical problems in the related art, the embodiment of the present application provides an image processing method, in which an electronic device can obtain an initial feature image corresponding to image description information, and determine a first stitching area and a second stitching area in the initial feature image, and the electronic device can iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image to obtain a target feature image corresponding to the image description information, and determine the target image according to the target feature image. In the above method, since the electronic device can iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area, in the target feature image (the first stitching area and the second stitching area have the same position in the initial feature image and the target feature image), the feature image in the first stitching area has a high similarity with the feature image in the second stitching area, thereby improving the image quality of the target image, and when the electronic device stitches the target image, the image stitching effect is better.

[0109] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0110] Figure 2 This is a flowchart of an image processing method provided in an embodiment of the present application. Figure 2 , the method may include:

[0111] S201. Obtain an initial feature image corresponding to image description information.

[0112] The execution subject of the embodiment of the present application 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 may be implemented based on a combination of software and hardware, which is not limited in the embodiment of the present application. For ease of understanding, the following description is made by taking the execution subject as an electronic device as an example.

[0113] The image description information may indicate image information. For example, the image description information may include text, which may indicate image information such as objects included in the image to be generated, positions of objects, and sizes of objects. For example, the image description information may be text: a bedroom of 10 square meters, a bedroom including a window, a bedside including a bed, and a table including a bedside. For example, the image description information may include voice, which may indicate image information such as objects included in the image to be generated, positions of objects, and sizes of objects.

[0114] Optionally, the electronic device may obtain image description information according to the following feasible implementation method: displaying an information input area, wherein the information input area includes a text input bar, a voice input control and / or an image input control, and obtaining the image description information in response to operations on the text input bar, the voice input control and / or the image input control.

[0115] For example, the display page of the electronic device may include an information input area (for the user to input information), and the information input area may include a text input bar. The user enters text in the text input bar, and the electronic device can determine that the image description information includes the text. The information input area may also include a voice input control, and the user may click the voice input control. The electronic device can collect the user's voice, and the electronic device can determine that the image description information may include the user's voice. The text input area may also include an image input control, and the user may click the image input control and select at least one image from the images pre-stored in the electronic device. The electronic device can determine that the image description information may include at least one image selected by the user. It should be noted that the image description information may include any type of information such as text, voice and / or image, and the embodiments of the present application are not limited to this.

[0116] It should be noted that the electronic device can obtain the image description information according to any feasible implementation method, and the embodiments of the present application are not limited to this.

[0117] It should be noted that if the user inputs text and voice in the information input area, the electronic device can process the voice based on the voice recognition algorithm, obtain the text corresponding to the voice, and determine that the image description information can include the text corresponding to the voice and the text input by the user; if the user inputs text and an image in the information input area, the electronic device can process the image based on the image recognition algorithm, obtain the text corresponding to the image (i.e., the text describing the image information), and determine that the image description information can include the text corresponding to the image and the text input by the user.

[0118] The initial feature image may include image description information and noise information. For example, the initial feature image may be a feature image generated by a convolutional neural network, and the input of the convolutional neural network may include a noise image corresponding to the noise information (exemplarily, the aspect ratio of the noise image may be 2:1) and image description information, wherein the noise information may be random Gaussian noise or arbitrary noise, which is not limited in the embodiments of the present application.

[0119] Optionally, the electronic device may obtain an initial feature image corresponding to the image description information based on a text-to-image model. For example, the text-to-image model may be a stable diffusion (SD) model, and the electronic device may fine-tune the SD model based on multiple high-definition images to obtain a text-to-image model. For example, a training sample may include 2,000 high-definition 360-degree panoramic images and text information corresponding to each 360-degree panoramic image. After the SD model is trained based on the training sample, the obtained SD model may generate a high-definition 360-degree panoramic image based on any random code and text information.

[0120] In order to facilitate the understanding of the initial feature image, below, combined with Figure 3 , the processing of the stable diffusion model is explained.

[0121] Figure 3 A processing process of a stable diffusion model provided in the embodiment of the present application. Figure 3 , including steady-state diffusion models. Electronic devices ( Figure 3 (not shown) an image and image description information corresponding to the image can be input into the stable diffusion model. The stable diffusion model can perform noise processing on the image through the noisy convolution network 1 to obtain a noisy image A, perform noise processing on the noisy image A through the noisy convolution network 2 to obtain a noisy image B, and perform noise processing on the noisy image B through the noisy convolution network 3 to obtain a completely noisy image.

[0122] See also Figure 3 The stable diffusion model can denoise the completely noisy image through the denoising convolution network 4 and the image description information to obtain the denoised image C. The denoised image C is denoised through the denoising convolution network 5 and the image description information to obtain the denoised image D. The denoised image D is denoised through the denoising convolution network 6 and the image description information to obtain the image corresponding to the image description information. In this way, based on the above training process, the stable diffusion model can have the ability to restore the noisy image to the image corresponding to the image description information based on the image description information.

[0123] exist Figure 3In the embodiment shown, the initial feature image may be a feature image obtained by fusing the complete noise image with the image description information. Figure 3 In the illustrated embodiment, the denoising convolutional network 4 may include a plurality of convolutional layers. The first convolutional layer may process a completely noisy image and image description information to obtain conditioned noise, which may be an initial feature image. The stable diffusion model may obtain an image corresponding to the image description information by gradually denoising the initial feature image.

[0124] It should be noted that in the denoising process of the SD model, the SD model can generate a conditional vector based on the text (image description information), and the conditional vector can encode the information included in the text. The conditional vector is used to guide the image generation process. In addition, the SD model can sample a random noise image from a Gaussian distribution as the initial noise image, and combine the conditional vector with the noise image based on a convolutional neural network to obtain an initial feature image.

[0125] S202: Determine a first stitching region and a second stitching region in the initial feature image.

[0126] The first stitching area includes the edge of the initial feature image in the first direction, and the second stitching area includes the edge of the initial feature image in the second direction. The first direction is opposite to the second direction. For example, taking the center of the initial feature image as a reference, if the first direction can be the left side of the center and the second direction can be the right side of the center, the first stitching area can include the left edge of the initial feature image and the second stitching area can include the right edge of the initial feature image. If the first direction can be the upper side of the center and the second direction can be the lower side of the center, the first stitching area can include the upper edge of the initial feature image and the second stitching area can include the lower edge of the initial feature image.

[0127] Next, combine Figure 4 , the first stitching area and the second stitching area are described.

[0128] Figure 4 A schematic diagram of a first splicing area and a second splicing area provided in an embodiment of the present application. Figure 4 , including an initial feature image. Wherein, with the center of the initial feature image as a reference, the first direction may be the left side of the center, and the second direction may be the right side of the center. The leftmost area of ​​the initial feature image may be the first stitching area, and the rightmost area of ​​the initial feature image may be the second stitching area. Wherein, the sizes of the first stitching area and the second stitching area may be the same or different, and the embodiment of the present application is not limited to this.

[0129] It should be noted that the size of the first stitching area and the size of the second stitching area can be preset sizes, and the electronic device can also determine the size of the first stitching area and the size of the second stitching area according to any other feasible implementation method (for example, determining the size of the first stitching area and the size of the second stitching area based on the width of the initial feature image), and the embodiments of the present application are not limited to this.

[0130] S203: Perform feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information.

[0131] The target image can be used for image stitching. For example, the target image can be a panoramic image, and the electronic device can stitch the left and right sides of the panoramic image to obtain a virtual reality image or an augmented reality image.

[0132] The electronic device may obtain the target image corresponding to the image description information according to the following feasible implementation method: according to the initial feature image, iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area to obtain the target feature image corresponding to the image description information, and determine the target image according to the target feature image. In this way, in the process of generating the target image, the electronic device may iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area to improve the quality of the target image.

[0133] The target feature image may include image information corresponding to the image description information. For example, the electronic device may decode the target feature image to obtain the target image corresponding to the image description information.

[0134] Among them, for any iterative fusion, the electronic device iteratively fuses the feature image in the first stitching area and the feature image in the second stitching area, and specifically can be: obtaining the first feature image and image description information of the current iterative fusion, denoising the first feature image according to the image description information to obtain the second feature image, in the second feature image, fusing the feature image in the first stitching area and the feature image in the second stitching area to obtain the starting feature image or target feature image for the next iterative fusion.

[0135] The first feature image may be the starting feature image of the current iterative fusion. For example, the first feature image may be the input image of the iterative fusion. For example, for the first iterative fusion, the first feature image may be the initial feature image, and for the second iterative fusion, the first feature image may be the feature image output by the first iterative fusion.

[0136] The noise information in the second feature image is less than the noise information in the first feature image. For example, the electronic device can add features matching the image description information to the first feature image according to the image description information, reduce the noise information in the first feature image, and then obtain the second feature image. Therefore, the image information included in the second feature image is greater than the image information included in the first feature image, and the noise information included in the second feature image is less than the noise information included in the first feature image.

[0137] Optionally, the electronic device may fuse the feature image in the first stitching area and the feature image in the second stitching area according to the fusion weight. For example, the electronic device may determine the fusion weight occupied by the feature image in the first stitching area and the fusion weight occupied by the feature image in the second stitching area, and then fuse the feature image in the first stitching area and the feature image in the second stitching area according to the fusion weight occupied by the feature image in the first stitching area and the fusion weight occupied by the feature image in the second stitching area, and cover the feature image in the first stitching area or the feature image in the second stitching area with the fused feature image.

[0138] If the current iterative fusion is not the last iterative fusion, the feature image output by the current iterative fusion can be the starting feature image for the next iterative fusion. For example, if the number of iterative fusions is 5 and the current iterative fusion is the second iterative fusion, the feature image output by the current iterative fusion can be the feature image input by the third iterative fusion.

[0139] If the current iterative fusion is the last iterative fusion, the feature image output by the current iterative fusion may be the target feature image. For example, if the number of iterative fusions is 5 and the current iterative fusion is the 5th iterative fusion, the feature image output by the current iterative fusion may be the target feature image.

[0140] It should be noted that the electronic device can determine the number of iterative fusions according to any feasible implementation method (eg, presetting the number of iterative fusions), and the embodiments of the present application are not limited to this.

[0141] Optionally, the electronic device may iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area according to a neural network. For example, the neural network may include multiple sub-networks, wherein each sub-network may perform an iterative fusion process. For example, the neural network may iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image in a latent space to obtain a target feature image. For example, the latent space may represent the latent features or structure of the input data, and the latent features may include key information of the data. The electronic device may iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area in the latent space to improve the accuracy of the iterative fusion.

[0142] Among them, the electronic device iteratively fuses the feature image in the first stitching area and the feature image in the second stitching area according to the neural network, which can be specifically as follows: during the first iterative fusion, the electronic device can perform denoising on the initial feature image according to the image description information and the first sub-network to obtain the second feature image fused for the first iterative fusion, and fuse the feature image in the first stitching area and the feature image in the second stitching area in the second feature image fused for the first iterative fusion to obtain the first feature image fused for the second iterative fusion; during the i-th iterative fusion, the electronic device can perform denoising on the first feature image fused for the i-th iterative fusion (the feature image output by the i-1-th iterative fusion) according to the image description information and the i-th sub-network to obtain the second feature image fused for the i-th iterative fusion, and fuse the feature image in the first stitching area and the feature image in the second stitching area in the second feature image fused for the i-th iterative fusion, wherein i is 2, 3, ..., N (the number of sub-networks of the neural network) in sequence.

[0143] Next, combine Figure 5 , taking a neural network consisting of two sub-networks as an example, the process of iterative fusion is explained.

[0144] Figure 5 A schematic diagram of an iterative fusion process provided in an embodiment of the present application. Figure 5 , including: initial feature image, image description information, sub-network 7 and sub-network 8. Electronic device ( Figure 5 The sub-network 7 may input an initial feature image and image description information (not shown), and the sub-network 7 may perform denoising on the initial feature image according to the image description information to obtain a feature image E. The electronic device may fuse the feature image in the first stitching area and the feature image in the second stitching area in the feature image E to obtain a feature image F.

[0145] See also Figure 5 , the electronic device can perform denoising on the feature image F through the sub-network 8 and the image description information to obtain the feature image G. The electronic device can fuse the feature image in the first stitching area and the feature image in the second stitching area in the feature image G to obtain the target feature image. In this way, the electronic device can perform multiple iterative fusions on the feature image in the first stitching area and the feature image in the second stitching area based on the neural network to obtain a target feature image with higher accuracy. Therefore, the electronic device can accurately generate the target image according to the target feature image and improve the quality of the target image.

[0146] The embodiment of the present application provides an image processing method, in which an electronic device can obtain an initial feature image corresponding to image description information, and determine a first stitching area and a second stitching area in the initial feature image, and the electronic device can iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image to obtain a target feature image corresponding to the image description information, and determine the target image according to the target feature image. Wherein, for any iterative fusion, the electronic device can obtain the first feature image and image description information input for the current iterative fusion, and perform denoising processing on the first feature image according to the image description information to obtain a second feature image, and the electronic device can fuse the feature image in the first stitching area and the feature image in the second stitching area in the second feature image to obtain a starting feature image or a target feature image for the next iterative fusion. In this way, since the electronic device can perform multiple iterative fusions on the feature image in the first stitching area and the feature image in the second stitching area to obtain the target feature image, the fusion degree of the feature image in the first stitching area and the feature image in the second stitching area in the target feature image is high, and the electronic device can accurately generate the target image according to the target feature image to improve the quality of the target image.

[0147] exist Figure 2 Based on the embodiment shown below, combined with Figure 6 , in the above-mentioned image processing method, a method for fusing the feature image in the first stitching area and the feature image in the second stitching area is described.

[0148] Figure 6 A schematic diagram of a method for fusion of feature images provided in an embodiment of the present application. Figure 6 , the method flow includes:

[0149] S601: Obtain a weight range.

[0150] The weight range may be any preset range, for example, the weight range may be 0-1.

[0151] S602 : According to the weight range, the feature image in the first stitching area and the feature image in the second stitching area are merged to obtain a third feature image.

[0152] The third characteristic image may be a characteristic image obtained by fusing the characteristic image in the first stitching area and the characteristic image in the second stitching area. For example, the size of the third characteristic image is the same as the size of the first stitching area or the size of the second stitching area.

[0153] Next, combine Figure 7 , the third characteristic image is explained.

[0154] Figure 7 A schematic diagram of a third characteristic image provided in an embodiment of the present application. Figure 7 , including a second feature image (a feature image obtained by denoising the input first feature image according to the image description information in the iterative fusion step). The second feature image includes a first stitching area and a second stitching area, and the electronic device ( Figure 7 (not shown), the feature image in the first stitching area and the feature image in the second stitching area may be fused to obtain a third feature image.

[0155] Among them, the electronic device can determine the third feature image according to the following feasible implementation method: determine a fusion strategy, and fuse the feature image in the first stitching area and the feature image in the second stitching area according to the weight range and the fusion strategy to obtain the third feature image.

[0156] Optionally, the fusion strategy may be that the fusion weight of the first stitching area increases from the first direction to the second direction. For example, when the electronic device fuses the feature image in the first stitching area and the feature image in the second stitching area, if the weight range is 0-1, the sum of the fusion weight of the first stitching area and the fusion weight of the second stitching area is 1, therefore, if the fusion weight of the first stitching area increases from the first direction to the second direction, the fusion weight of the second stitching area decreases from the first direction to the second direction.

[0157] Optionally, the fusion strategy may be that the fusion weight of the second stitching area increases from the first direction to the second direction. For example, if the fusion weight of the second stitching area increases from the first direction to the second direction, the fusion weight of the first stitching area decreases from the first direction to the second direction.

[0158] Optionally, the fusion weight can be increased or decreased proportionally from the first direction to the second direction. For example, if the width of the first stitching area is 11 pixels, the width of the second stitching area is also 11 pixels, the weight range is 0-1, and the fusion weight of the first stitching area increases from left to right, then the fusion weight corresponding to the first column of pixels in the first stitching area can be 0, the fusion weight corresponding to the second column of pixels can be 0.1, ..., and the fusion weight corresponding to the 11th column of pixels can be 1. Conversely, the fusion weight corresponding to the first column of pixels in the second stitching area can be 1, the fusion weight corresponding to the second column of pixels can be 0.9, ..., and the fusion weight corresponding to the 11th column of pixels can be 0.

[0159] For example, if the first stitching area can be equally divided into four areas in the horizontal direction, the second stitching area can also be equally divided into four areas in the horizontal direction, the weight range is 0-1, and the fusion weight of the first stitching area increases from left to right, then the fusion weight of the first area in the first stitching area can be 0.2, the fusion weight of the second area can be 0.4, the fusion weight of the third area can be 0.6, and the fusion weight of the fourth area can be 0.8. Conversely, the fusion weight of the first area in the second stitching area can be 0.8, the fusion weight of the second area can be 0.6, the fusion weight of the third area can be 0.4, and the fusion weight of the fourth area can be 0.2.

[0160] For example, if the first stitching area can be evenly divided into 4 areas in the horizontal direction, and the second stitching area can also be evenly divided into 4 areas in the horizontal direction, and the weight range is 0-1, the electronic device can evenly divide the weight range into 0-0.25, 0.25-0.5, 0.5-0.75, and 0.75-1, and the fusion weight corresponding to the first area in the first stitching area can be any value between 0-0.25 (correspondingly, the fusion weight corresponding to the first area in the second stitching area is the difference between 1 and this value), the fusion weight corresponding to the second area in the first stitching area can be any value between 0.25-0.5, the fusion weight corresponding to the third area in the first stitching area can be any value between 0.5-0.75, and the fusion weight corresponding to the fourth area in the first stitching area can be any value between 0.75-1.

[0161] Among them, since the first stitching area or the second stitching area is in different areas, the corresponding fusion weight is also different. Therefore, the electronic device fuses the feature image in the first stitching area and the feature image in the second stitching area according to the weight range and the fusion strategy. Specifically, it can be: for any first area in the first stitching area, determine the second area corresponding to the first area in the second stitching area, obtain the fusion weight corresponding to the first area and the fusion weight corresponding to the second area, and fuse the feature image of the first area and the feature image of the second area according to the fusion weight corresponding to the first area and the fusion weight corresponding to the second area. For example, if the fusion weight corresponding to the first area is 0.2 and the fusion weight corresponding to the second area is 0.8, the electronic device can perform weighted processing on the feature image of the first area according to 0.2 to obtain feature image a, and perform weighted processing on the feature image of the second area according to 0.8 to obtain feature image b. The electronic device can fuse feature image a and feature image b to obtain a feature image (a part of the third feature image) after the feature image in the first area and the feature image in the second area are fused.

[0162] It should be noted that the electronic device can determine the second area corresponding to the first area according to any feasible implementation method (for example, determining the second area in the second stitching area according to the position of the first area in the first stitching area), and the embodiments of the present application are not limited to this.

[0163] Optionally, taking the first direction as the left side, the second direction as the right side, and the fusion weight of the first stitching area increasing from left to right as an example, the electronic device may fuse the feature image in the first area of ​​the first stitching area and the feature image in the second area of ​​the second stitching area according to the following formula:

[0164] A=w*left+(1-w)*right

[0165] Among them, A is the fused feature image (part of the third feature image); w is the fusion weight corresponding to the first area, 1-w is the fusion weight corresponding to the second area, left is the feature image in the first area, and right is the feature image in the second area.

[0166] Next, combine Figure 8 , the process of determining the third characteristic image is explained.

[0167] Figure 8 A schematic diagram of a process for determining a third characteristic image provided by an embodiment of the present application. Figure 8, including: a feature image in a first stitching area and a feature image in a second stitching area. The first stitching area includes area a, area b, area c and area d, and the second stitching area includes area e, area f, area g and area h. Area a corresponds to area e, area b corresponds to area f, area c corresponds to area g, and area d corresponds to area h.

[0168] See also Figure 8 , weight range is 0-1, electronic equipment ( Figure 8 (not shown) It can be determined that the fusion weight corresponding to area a is 0.2, the fusion weight corresponding to area e is 0.8; the fusion weight corresponding to area b is 0.4, the fusion weight corresponding to area f is 0.6; the fusion weight corresponding to area c is 0.6, the fusion weight corresponding to area g is 0.4; the fusion weight corresponding to area d is 0.8, and the fusion weight corresponding to area h is 0.2.

[0169] See also Figure 8 , the electronic device can fuse the feature image in area a with the feature image in area e according to the above fusion weights to obtain feature image j; fuse the feature image in area b with the feature image in area f to obtain feature image k; fuse the feature image in area c with the feature image in area g to obtain feature image l; fuse the feature image in area d with the feature image in area h to obtain feature image m.

[0170] See also Figure 8 , the electronic device can obtain a third feature image according to feature image j, feature image k, feature image I and feature image m. In this way, the electronic device can fuse the feature image of the first splicing area and the feature image of the second splicing area based on the adaptive weight, thereby improving the accuracy of feature image fusion and improving the quality of the third feature image.

[0171] S603: Overwrite the feature image in the first stitching area or the feature image in the second stitching area with the third feature image.

[0172] The electronic device covers the feature image in the first stitching area or the feature image in the second stitching area with the third feature image, and there are two situations as follows:

[0173] Case 1: The fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction.

[0174] If the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, the electronic device can overwrite the feature image in the first stitching area with the third feature image.

[0175] Case 2: The fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction.

[0176] If the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction, the electronic device can overwrite the feature image in the second stitching area with the third feature image.

[0177] Next, combine Fig. 9 , the process of covering the feature image in case 1 is explained.

[0178] Fig. 9 A schematic diagram of a process for covering a feature image provided by an embodiment of the present application. Fig. 9 , including a characteristic image 9 and a third characteristic image. Among them, the characteristic image 9 may be the second characteristic image in iterative fusion, and the characteristic image 9 may include a first stitching area and a second stitching area, and the corresponding fusion weight in the first stitching area increases from left to right. The electronic device may cover the characteristic image in the first stitching area with the third characteristic image to obtain a characteristic image 10. In this way, in the characteristic image 10, the proportion of the third characteristic image in the second stitching area gradually decreases from left to right. Therefore, when the electronic device generates a target image based on the characteristic image 10 (which may be a target characteristic image), the quality of the target image is higher. After the target image is stitched left and right, the obtained virtual reality image or augmented reality image has a higher image quality.

[0179] It should be noted that in Fig. 9 In the illustrated embodiment, if it is situation 2, the electronic device can cover the second stitching area in the characteristic image 9 with the third characteristic image, and the embodiment of the present application will not be described in detail here.

[0180] The embodiment of the present application provides a method for fusing feature images. The electronic device can obtain a weight range and determine a fusion strategy. According to the weight range and the fusion strategy, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a third feature image. If the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, the electronic device can cover the feature image in the first stitching area with the third feature image. If the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction, the electronic device can cover the feature image in the second stitching area with the third feature image. In this way, the electronic device can fuse the feature image in the first stitching area and the feature image in the second stitching area according to the adaptive weight, improve the accuracy of the feature image fusion, and thus improve the quality of the target image.

[0181] Based on any one of the above embodiments, in the above image processing method, when the electronic device determines the target image according to the target feature image, the electronic device may iteratively decode the target feature image to obtain the target image, wherein the iterative decoding may include fusing the feature image in the first stitching area with the feature image in the second stitching area. Fig.10 , a detailed description of any iterative decoding is given.

[0182] Fig.10 A schematic diagram of an iterative decoding method provided in an embodiment of the present application. Fig.10 ,include:

[0183] S1001. Obtain a fourth feature image of current iterative decoding.

[0184] The fourth feature image may be a starting feature image of the current iterative decoding. For example, the fourth feature image may be an input image of the iterative decoding. For example, for the first iterative decoding, the fourth feature image may be a target feature image, and for the second iterative decoding, the fourth feature image may be a feature image output by the first iterative decoding.

[0185] S1002: Decode the fourth feature image to obtain a fifth feature image.

[0186] The fifth feature image may be a feature image corresponding to the fourth feature image after decoding. For example, the electronic device may decode the fourth feature image according to a preset decoder to obtain the fifth feature image. For example, the preset decoder may be a variational autoencoder (VAE) decoder, which may be used to generate a model and a probability model for unsupervised learning, and the VAE decoder may learn the latent features representation of the input data.

[0187] S1003: In the fifth feature image, the feature image in the first stitching area and the feature image in the second stitching area are merged to obtain a starting feature image or a target image for next iterative decoding.

[0188] If the current iterative decoding is not the last iterative decoding, the feature image output by the current iterative decoding may be the starting feature image for the next iterative decoding. For example, if the number of iterative decoding is 5 and the current iterative decoding is the second iterative decoding, the feature image output by the current iterative decoding may be the feature image input by the third iterative decoding.

[0189] If the current iterative decoding is the last iterative decoding, the feature image output by the current iterative decoding may be the target image. For example, if the number of iterative decoding is 5 times and the current iterative decoding is the 5th iterative decoding, the feature image output by the current iterative decoding may be the target image.

[0190] It should be noted that the electronic device can determine the number of iterative decodings according to any feasible implementation method (eg, presetting the number of iterative decodings), and this is not limited in the embodiments of the present application.

[0191] Optionally, the electronic device may iteratively decode the target feature image according to a preset decoder. For example, the preset decoder may include multiple decoding layers, wherein each decoding layer may perform an iterative decoding process. For example, the preset decoder may iteratively decode the target feature image in a latent space to obtain a target image.

[0192] Wherein, the electronic device performs iterative decoding on the target feature image according to the preset decoder, which can be specifically: during the first iterative decoding, the electronic device can decode the target feature image according to the first decoding layer to obtain the fifth feature image of the first decoding, and in the fifth feature image of the first decoding, the feature image in the first splicing area and the feature image in the second splicing area are merged to obtain the fourth feature image of the second iterative decoding; for the pth iterative decoding, the electronic device can decode the fourth feature image of the pth iterative decoding (the feature image output by the p-1th iterative decoding) according to the pth decoding layer to obtain the fifth feature image of the pth iterative decoding, and in the fifth feature image of the pth iterative decoding, the feature image in the first splicing area and the feature image in the second splicing area are merged, wherein p is 2, 3, ..., Q (the number of decoding layers of the preset decoder) in sequence. In this way, after the electronic device performs p-times iterative decoding on the target feature image according to the preset decoder, the target image can be obtained.

[0193] It should be noted that in Fig.10 In the illustrated embodiment, the method for fusing the feature image in the first stitching area and the feature image in the second stitching area may refer to the method in the above embodiment, and the embodiment of the present application will not be described in detail here.

[0194] Next, combine Fig.11 , the process of iterative decoding is explained.

[0195] Fig.11 A schematic diagram of an iterative decoding process provided by an embodiment of the present application. Fig.11, including a target feature image, a decoding layer 11 and a decoding layer 12. Electronic device ( Fig.11 The target feature image can be input to the decoding layer 11 (not shown), and the decoding layer 1 can decode the target feature image to obtain a feature image H. The electronic device can fuse the feature image in the first splicing area and the feature image in the second splicing area in the feature image H to obtain a feature image I. The electronic device can decode the feature image I through the decoding layer 12 to obtain a target image. In this way, in the process of iteratively decoding the target feature image, the electronic device can fuse the feature image in the first splicing area and the feature image in the second splicing area, thereby improving the quality of the target image.

[0196] Optionally, since the preset decoder can perform iterative decoding processing on the target feature image in the latent space, before the preset decoder performs iterative decoding on the target feature image, the electronic device can horizontally divide the target feature image into multiple sub-feature images, so that the preset decoder can perform iterative decoding on each sub-feature image respectively to obtain a sub-image corresponding to each sub-feature image, and the electronic device can perform splicing processing on the multiple sub-images to obtain the target image. In this way, the preset decoder can perform iterative decoding on the target feature image by region, which can improve the decoding efficiency.

[0197] Next, combine Fig.12 , the process of iterative decoding of multiple sub-feature images by an electronic device is explained.

[0198] Fig.12 This is another schematic diagram of the iterative decoding process provided by the embodiment of the present application. Fig.12 , including: a target feature image, a decoding layer 15 and a decoding layer 20. Electronic device ( Fig.12 The target feature image may be horizontally divided into a sub-feature image 13 and a sub-feature image 14 (not shown), and the sub-feature image 13 and the sub-feature image 14 are input to the decoding layer 15. The decoding layer 15 may decode the sub-feature image 13 to obtain a sub-feature image 16, and the decoding layer 15 may decode the sub-feature image 14 to obtain a sub-feature image 17.

[0199] See also Fig.12, the electronic device can determine the sub-region located in the first stitching region and the sub-region located in the second stitching region in the sub-feature image 16 and the sub-feature image 17. The electronic device can fuse the feature image in the sub-region located in the first stitching region and the feature image in the sub-region located in the second stitching region in the sub-feature image 16 to obtain the sub-feature image 18. The electronic device can fuse the feature image in the sub-region located in the first stitching region and the feature image in the sub-region located in the second stitching region in the sub-feature image 17 to obtain the sub-feature image 19.

[0200] See also Fig.12 , the electronic device can decode the sub-feature image 18 through the decoding layer 20 to obtain the sub-image 21, and decode the sub-feature image 19 through the decoding layer 20 to obtain the sub-image 22. The electronic device can splice the sub-image 21 and the sub-image 22 up and down to obtain the target image. In this way, the preset decoder can iteratively decode the target feature image by region, thereby improving the decoding efficiency.

[0201] The embodiment of the present application provides a method for iterative decoding, wherein the electronic device can obtain the fourth characteristic image of the current iterative decoding, and perform decoding processing on the fourth characteristic image to obtain the fifth characteristic image, and the electronic device can fuse the characteristic image in the first splicing area and the characteristic image in the second splicing area in the fifth characteristic image, and if the current iterative decoding is not the last iterative decoding, the characteristic image output by the current iterative decoding can be the starting characteristic image of the next iterative decoding, and if the current iterative decoding is the last iterative decoding, the characteristic image output by the current iterative decoding can be the target image. In this way, in the process of iterative decoding of the target characteristic image by the electronic device, the characteristic image in the first splicing area and the characteristic image in the second splicing area can be fused, thereby improving the quality of the target image, and the electronic device can perform iterative decoding on the target characteristic image by region, thereby improving the decoding efficiency.

[0202] After the electronic device obtains the target image corresponding to the image description information, the electronic device can also perform super-resolution processing on the target image, thereby increasing the resolution of the target image. Fig.13 , a method for an electronic device to perform super-resolution processing on a target image is described.

[0203] Fig.13 A schematic diagram of a super-resolution processing method provided in an embodiment of the present application. Fig.13 The method flow includes:

[0204] S1301. Perform super-resolution processing on a target image to obtain a first image.

[0205] The resolution of the first image is greater than the resolution of the target image, and the image content of the first image is the same as the image content of the target image. For example, if the resolution of the target image is 512*1024, the resolution of the first image may be 1024*2048. For example, if the target image includes a table, the first image may also include a table.

[0206] The super-resolution processing performed by the electronic device on the target image may include feature fusion processing on the first stitching area and the second stitching area, and in the super-resolution processing performed on the target image, the image description information required for the feature fusion processing may be image information corresponding to the target image. For example, in the process of the electronic device performing super-resolution processing on the target image, the super-resolution processing includes iterative fusion, and in the iterative fusion, the image description information may be image information corresponding to the target image (which may be obtained through a convolutional neural network).

[0207] S1302: Perform generative adversarial processing on the first image to obtain a second image.

[0208] Generative adversarial methods are used to improve the realism of an image. For example, the realism of the second image is greater than that of the first image.

[0209] Optionally, the electronic device may perform generative adversarial processing on the first image according to any feasible implementation method, which is not limited in the embodiments of the present application.

[0210] S1303: Perform super-resolution processing on the second image to obtain a third image.

[0211] The resolution of the third image is greater than that of the second image, and the image content of the third image is the same as that of the second image. For example, if the resolution of the second image is 1024*2048, the resolution of the third image may be 3072*6144. For example, if the second image includes a table, the third image may also include the table.

[0212] The super-resolution processing performed by the electronic device on the second image may include feature fusion processing on the first stitching area and the second stitching area, and in the super-resolution processing performed on the second image, the image description information required for the feature fusion processing may be image information corresponding to the second image. For example, in the process of the electronic device performing super-resolution processing on the second image, the super-resolution processing includes iterative fusion, and in the iterative fusion, the image description information may be image information corresponding to the second image (which may be obtained through a convolutional neural network).

[0213] Optionally, the electronic device may process the target image according to a preset super-resolution model to obtain a first image, determine a second image according to the first image, and determine a third image according to the second image. The preset super-resolution model may include a first module, a second module, and a third module, and the second module is connected to the first module and the third module respectively.

[0214] Among them, the first module, the second module and the third module can all increase the resolution of the target image.

[0215] Optionally, the second module may be a super-resolution model of a generative adversarial network (Rea l ESRGAN), which may increase the realism of the target image and improve the display effect of the target image.

[0216] The structure of the first module and the structure of the third module may be the same. For example, the first module and the third module may be a ControlNet-T i le model based on SD, wherein the first module and the third module both have the function of performing feature fusion processing on the first splicing area and the second splicing area. Figure 5 The network structure shown and Fig.11 The network structure shown.

[0217] Among them, the inputs of the first module and the third module are both images, so in the process of iterative fusion, the image description information may include a feature image corresponding to the image. For example, for the first module, the electronic device may process the target image according to a convolutional neural network to obtain at least one feature image corresponding to the target image, and the electronic device may merge at least one feature image with a Gaussian noise image to obtain an initial feature image corresponding to the first module (the first stitching area and the second stitching area in the initial feature image corresponding to the first module may be the same as the first stitching area and the second stitching area in the initial feature image corresponding to the image description information), and the first module may perform feature fusion processing on the first stitching area and the second stitching area to obtain a first image. It should be noted that for the third module, the processing process of the electronic device is similar to that of the first module (the image description information includes at least one feature image corresponding to the second image), and the embodiments of the present application will not be repeated here.

[0218] Next, combine Fig.14 , the process of obtaining the target image with increased resolution is explained.

[0219] Fig.14 A schematic diagram of a process for super-resolution processing of a target image provided by an embodiment of the present application. Fig.14, including: image 23, a first module, a second module and a third module. The resolution of image 23 can be 512*1024. Electronic device ( Fig.14 (not shown) The image 23 can be input to the first module, and the first module performs super-resolution processing on the image 23 to obtain the image 24, and the resolution of the image 24 is greater than the resolution of the image 23.

[0220] See also Fig.14 The electronic device can input image 24 to the second module, and the second module can perform generative adversarial processing on image 2 to obtain image 25, wherein the resolution of image 25 is greater than the resolution of image 24, and the realism of image 25 is greater than the realism of image 24.

[0221] See also Fig.14 , the electronic device can input the image 25 to the third module, and the third module can perform super-resolution processing on the image 25 to obtain the image 26, wherein the resolution of the image 26 can be 3072*6144. In this way, the electronic device can perform feature fusion on the first stitching area and the second stitching area during the process of performing super-resolution on the target image and the second image, thereby improving the quality of the third image.

[0222] The embodiment of the present application provides a method for super-resolution processing, where an electronic device can perform super-resolution processing on a target image to obtain a first image, perform generative adversarial processing on the first image to obtain a second image, and perform super-resolution processing on the second image to obtain a third image, wherein in the super-resolution processing, the image description information required for feature fusion processing is the image information corresponding to the target image or the image information corresponding to the second image. In this way, the electronic device can improve the realism of the second image through generative adversarial processing, and when super-resolution processing is performed on the target image and the second image, feature fusion can be performed on the first splicing area and the second splicing area, thereby improving the quality of the third image.

[0223] Based on any of the above embodiments, Fig.15 , the process of the above-mentioned image processing method is explained.

[0224] Fig.15 This is a schematic diagram of an image processing method provided in an embodiment of the present application. Fig.15 , including: an image processing model, a preset super-resolution model, an initial feature image and image description information. The image processing model may include a sub-network 27, a sub-network 30, a decoding layer 32 and a decoding layer 35. The electronic device ( Fig.15(not shown) the initial feature image and image description information can be input into the sub-network 27, the sub-network 27 can denoise the initial feature image based on the image description information to obtain the feature image 28, the electronic device can fuse the feature image in the first stitching area and the feature image in the second stitching area in the feature image 28 to obtain the feature image 29, and input the feature image 29 into the sub-network 30.

[0225] See also Fig.15 , the subnetwork 30 can perform denoising on the feature image 29 to obtain a feature image 31, and the electronic device can fuse the feature image in the first stitching area and the feature image in the second stitching area in the feature image 31 to obtain a target feature image. The electronic device can input the target feature image to the decoding layer 32, and the decoding layer 32 can decode the target feature image to obtain a feature image 33. The electronic device can fuse the feature image in the first stitching area and the feature image in the second stitching area in the feature image 33 to obtain a feature image 34, and input the feature image 34 to the decoding layer 35. The decoding layer 35 can decode the feature image 34 to obtain a panoramic image 36.

[0226] See also Fig.15 , the resolution of panoramic image 36 is 512*1024, the electronic device can input panoramic image 36 to the first module, and the first module can perform super-resolution processing on panoramic image 36 to obtain panoramic image 37. The electronic device can perform generative adversarial processing on panoramic image 37 through the second module to obtain panoramic image 38. The electronic device can perform super-resolution processing on panoramic image 38 through the third module to obtain panoramic image 39, wherein the resolution of panoramic image 39 is 3072*6144.

[0227] In this way, since the electronic device performs feature fusion processing on the first stitching area and the second stitching area in the initial feature image, the electronic device can iteratively fuse the feature image in the first stitching area and the feature image in the second stitching area to improve the accuracy of the target feature image, and the electronic device can iteratively decode the target feature image and fuse the feature image in the first stitching area and the feature image in the second stitching area to improve the quality of the target image, and the electronic device can improve the realism and resolution of the panoramic image according to the second module, and improve the details and resolution of the panoramic image according to the first module and the third module, thereby improving the quality of the panoramic image.

[0228] Based on any of the above embodiments, Fig.16 , another image processing method is described.

[0229] Fig.16 A schematic diagram of another image processing method provided in an embodiment of the present application. Fig.16 , the image processing method comprises:

[0230] S1601. Obtain an image to be processed.

[0231] The image to be processed may be an image obtained by the electronic device according to the method described in any of the above embodiments. For example, the image to be processed may be the target image or the third image in the above embodiments.

[0232] S1602: Generate a virtual reality image or an augmented reality image according to the image to be processed.

[0233] The image to be processed may be a panoramic image, and the electronic device may stitch the first stitching area and the second stitching area in the image to be processed, thereby obtaining a virtual reality image or an augmented reality image.

[0234] The embodiment of the present application provides an image processing method, whereby an electronic device can obtain an image to be processed, and generate a virtual reality image or an augmented reality image according to the image to be processed. The image to be processed can be a panoramic image generated by the electronic device according to the method of any of the above embodiments, and since the image in the first stitching area and the image in the second stitching area have a high degree of fusion, the electronic device stitches the first stitching area and the second stitching area in the image to be processed, and the obtained virtual reality image or augmented reality image has a high image quality.

[0235] Fig.17 This is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. Fig.17 The image processing device 170 includes an acquisition module 171, a determination module 172 and a processing module 173, wherein:

[0236] The acquisition module 171 is used to acquire an initial feature image corresponding to the image description information;

[0237] The determination module 172 is used to determine a first stitching area and a second stitching area in the initial feature image;

[0238] The processing module 173 is used to perform feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information.

[0239] In one implementation, the processing module 173 is specifically configured to:

[0240] Iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image to obtain a target feature image corresponding to the image description information;

[0241] The target image is determined according to the target feature image.

[0242] In one implementation, the processing module 173 is specifically configured to:

[0243] Acquire a first feature image and image description information of current iterative fusion, wherein the first feature image is a starting feature image of current iterative fusion;

[0244] According to the image description information, denoising is performed on the first feature image to obtain a second feature image;

[0245] In the second feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image for next iterative fusion or the target feature image.

[0246] In one implementation, the processing module 173 is specifically configured to:

[0247] Get the weight range;

[0248] According to the weight range, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a third feature image;

[0249] The third characteristic image covers the characteristic image in the first stitching area or the characteristic image in the second stitching area.

[0250] In one embodiment, the first stitching area includes an edge of the initial feature image in a first direction, and the second stitching area includes an edge of the initial feature image in a second direction, and the first direction is opposite to the second direction.

[0251] In one implementation, the processing module 173 is specifically configured to:

[0252] Determine a fusion strategy, wherein the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, or the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction;

[0253] According to the weight range and the fusion strategy, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain the third feature image.

[0254] In one implementation, the processing module 173 is specifically configured to:

[0255] If the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the first stitching area;

[0256] If the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the second stitching area.

[0257] In one implementation, the processing module 173 is specifically configured to:

[0258] Iteratively decoding the target feature image to obtain a target image;

[0259] The iterative decoding includes fusing the feature image in the first stitching area with the feature image in the second stitching area.

[0260] In one implementation, the processing module 173 is specifically configured to:

[0261] Acquire a fourth characteristic image of current iterative decoding, where the fourth characteristic image is a starting characteristic image of current iterative decoding;

[0262] Decoding the fourth characteristic image to obtain a fifth characteristic image;

[0263] In the fifth feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image or the target image for next iterative decoding.

[0264] In one implementation, the processing module 173 is further configured to:

[0265] Performing super-resolution processing on the target image to obtain a first image;

[0266] Performing generative adversarial processing on the first image to obtain a second image;

[0267] Performing the super-resolution processing on the second image to obtain a third image;

[0268] Among them, the super-resolution processing includes feature fusion processing on the first stitching area and the second stitching area, and wherein, in the super-resolution processing, the image description information required for the feature fusion processing is the image information corresponding to the target image or the image information corresponding to the second image.

[0269] The image processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0270] The image processing device shown in the embodiment of the present application may be a chip, a hardware module, a processor, etc. The image processing device may be in other forms, which are not specifically limited in the embodiment of the present application.

[0271] Fig.18 This is a schematic diagram of the structure of another image processing device provided in an embodiment of the present application. Fig.18 , the image processing device 180 includes an acquisition module 181 and a generation module 182, wherein:

[0272] The acquisition module 181 is used to acquire the image to be processed;

[0273] The generating module 182 is used to generate a virtual reality image or an augmented reality image according to the image to be processed;

[0274] The image to be processed is an image generated according to the method described in any one of the above embodiments.

[0275] The image processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0276] The image processing device shown in the embodiment of the present application may be a chip, a hardware module, a processor, etc. The image processing device may be in other forms, which are not specifically limited in the embodiment of the present application.

[0277] Fig.19 Schematic diagram of the hardware structure of the electronic device provided for this application. Fig.19 The electronic device 190 may include: a processor 191 and a memory 192, wherein the processor 191 and the memory 192 can communicate; exemplarily, the processor 191 and the memory 192 communicate via a communication bus 193, the memory 192 is used to store program instructions, and the processor 191 is used to call the program instructions in the memory to execute the method for determining a traffic event shown in any of the above method embodiments.

[0278] Optionally, the electronic device 190 may further include a communication interface, which may include a transmitter and / or a receiver.

[0279] Optionally, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the present application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0280] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, various methods that may be involved in the above embodiments may be performed.

[0281] The embodiments of the present application may also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it performs various methods that may be involved in the above embodiments.

[0282] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-on ly memory, abbreviated: ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disk (English: optical disk) and any combination thereof.

[0283] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable electronic device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable electronic device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0284] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0285] These computer program instructions may also be loaded onto a computer or other programmable electronic device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0286] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0287] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

Claims

1. An image processing method, characterized in that: include: Obtaining an initial feature image corresponding to the image description information; Determining a first stitching area and a second stitching area in the initial feature image; Perform feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information.

2. The method according to claim 1, characterized in that Performing feature fusion processing on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information includes: Iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area according to the initial feature image to obtain a target feature image corresponding to the image description information; The target image is determined according to the target feature image.

3. The method according to claim 2, characterized in that For any iterative fusion, iteratively fusing the feature image in the first stitching area and the feature image in the second stitching area includes: Acquire a first feature image and image description information of current iterative fusion, wherein the first feature image is a starting feature image of current iterative fusion; According to the image description information, denoising is performed on the first feature image to obtain a second feature image; In the second feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image for next iterative fusion or the target feature image.

4. The method according to claim 3, characterized in that The step of fusing the feature image in the first stitching area and the feature image in the second stitching area includes: Get the weight range; According to the weight range, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a third feature image; The third characteristic image covers the characteristic image in the first stitching area or the characteristic image in the second stitching area.

5. The method according to claim 4, characterized in that The first stitching area includes an edge of the initial feature image in a first direction, and the second stitching area includes an edge of the initial feature image in a second direction, and the first direction is opposite to the second direction.

6. The method according to claim 5, characterized in that According to the weight range, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a third feature image, including: Determine a fusion strategy, wherein the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, or the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction; According to the weight range and the fusion strategy, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain the third feature image.

7. The method according to claim 6, characterized in that Overlaying the third characteristic image on the characteristic image in the first stitching area or the characteristic image in the second stitching area comprises: If the fusion strategy is that the fusion weight of the first stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the first stitching area; If the fusion strategy is that the fusion weight of the second stitching area increases from the first direction to the second direction, the third feature image covers the feature image in the second stitching area.

8. The method according to any one of claims 2 to 7, characterized in that: Determining the target image according to the target feature image includes: Iteratively decoding the target feature image to obtain a target image; The iterative decoding includes fusing the feature image in the first stitching area with the feature image in the second stitching area.

9. The method according to claim 8, characterized in that For any iterative decoding, iterative decoding of the target feature image includes: Acquire a fourth characteristic image of current iterative decoding, where the fourth characteristic image is a starting characteristic image of current iterative decoding; Decoding the fourth characteristic image to obtain a fifth characteristic image; In the fifth feature image, the feature image in the first stitching area and the feature image in the second stitching area are fused to obtain a starting feature image or the target image for next iterative decoding.

10. The method according to any one of claims 1 to 7, characterized in that: After obtaining the target image corresponding to the image description information, the method further includes: Performing super-resolution processing on the target image to obtain a first image; Performing generative adversarial processing on the first image to obtain a second image; Performing the super-resolution processing on the second image to obtain a third image; Among them, the super-resolution processing includes feature fusion processing on the first stitching area and the second stitching area, and wherein, in the super-resolution processing, the image description information required for the feature fusion processing is the image information corresponding to the target image or the image information corresponding to the second image.

11. An image processing method, characterized in that: include: Obtaining an initial feature image corresponding to the image description information; Determining a first stitching area and a second stitching area in the initial feature image; Feature fusion processing is performed on the first stitching area and the second stitching area to obtain a target image corresponding to the image description information, where the target image is a panoramic image.

12. An image processing method, characterized in that: include: Get the image to be processed; Generate a virtual reality image or an augmented reality image according to the image to be processed; The image to be processed is an image generated by the method according to any one of claims 1 to 10, or the method according to claim 11.

13. An electronic device, characterized in that: include: Processor, memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 10, or the method according to claim 11, or the method according to claim 12.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method according to any one of claims 1 to 10, or the method according to claim 11, or the method according to claim 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 10, or the method according to claim 11, or the method according to claim 12.

Citation Information

Patent Citations

  • Image fusion processing method and device

    CN110298812A

  • Image description generation method and device, electronic equipment and storage medium

    CN114648631A