Panoramic image generation method and apparatus, device, and medium

By obtaining the content description text and generating foreground and background images for image synthesis, it solves the problems of high cost and insufficient diversity of existing panoramic image generation methods, and achieves low-cost, high-diversity panoramic image generation.

WO2025016091A1PCT designated stage expired Publication Date: 2025-01-23BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/097861
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-18
Filing Date
2024-06-06
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

The existing panoramic images are costly and have insufficient diversity, so they cannot generate virtual panoramic images, and the panoramic images generated by the trained network model are poor in diversity.

Method used

By obtaining the content of the target panoramic image, the text is described, based on image foreground information generation image, and the background image presented in a panoramic form based on the image background information is generated, and the image synthesis processing is performed to generate the target panoramic image.

Benefits of technology

It realizes the rapid generation of panoramic images based on content description text, reduces costs, improves diversity, and can generate virtual panoramic images to meet diverse needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024097861_23012025_PF_FP_ABST
    Figure CN2024097861_23012025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure relate to a panoramic image generation method and apparatus, a device, and a medium. The method comprises: acquiring a content description text of a target panoramic image to be generated, wherein the content description text comprises image foreground information and image background information; on the basis of the image foreground information, generating a foreground image; on the basis of the image background information, generating a background image presented in a panoramic form; and on the basis of the foreground image and the background image, performing image synthesis processing to obtain a target panoramic image.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment and medium for generating panoramic images

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 18, 2023, with application number 202310883704.7 and invention name “Method, device, equipment and medium for generating panoramic images”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present disclosure relates to the field of image processing technology, and in particular to a method, device, equipment, and medium for generating a panoramic image. Background Art

[0004] Panoramic images can best represent the surrounding environment, such as a 360-degree panoramic view of the environment, giving users a certain degree of three-dimensional perception. They are well-suited for scenarios such as environmental display and virtual reality. However, existing methods for generating panoramas need to be improved.

[0005] Summary of the Invention

[0006] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, apparatus, device and medium for generating a panoramic image.

[0007] In a first aspect, an embodiment of the present disclosure provides a method for generating a panoramic image, the method comprising: obtaining content description text of a target panoramic image to be generated; the content description text comprising image foreground information and image background information; generating a foreground image based on the image foreground information; and generating a background image presented in a panoramic form based on the image background information; performing image synthesis processing based on the foreground image and the background image to obtain the target panoramic image.

[0008] In a second aspect, an embodiment of the present disclosure also provides a device for generating a panoramic image, comprising: a text acquisition module for acquiring content description text of a target panoramic image to be generated; the content description text comprises image foreground information and image background information; an image generation module for generating a foreground image based on the image foreground information; and, generating a background image presented in a panoramic form based on the image background information; an image synthesis module for performing image synthesis processing based on the background image and the foreground image to obtain a target panoramic image.

[0009] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a storage device storing a computer program; and a processing device for executing the computer program in the storage device to implement the steps of the above-mentioned method for generating a panoramic image.

[0010] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the method for generating a panoramic image as provided in an embodiment of the present disclosure.

[0011] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method for generating a panoramic image according to any one of claims 1 to 8.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0014] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0015] FIG1 is a schematic flow chart of a method for generating a panoramic image according to an embodiment of the present disclosure;

[0016] FIG2 is a schematic diagram of a flow chart of a method for generating a panoramic image according to an embodiment of the present disclosure;

[0017] FIG3 is a schematic diagram of a network model for generating a panoramic image according to an embodiment of the present disclosure;

[0018] FIG4 is a schematic structural diagram of a panoramic image generation device provided by an embodiment of the present disclosure;

[0019] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0022] There are many ways to generate panoramic images in the related art. One main method is to use a panoramic camera to generate panoramic images, but this method is expensive, and the panoramic images obtained are all real scenes, and it is impossible to obtain virtual images that are different from the real world. Another main method is to perform 3D rendering of panoramic images through three-dimensional modeling, but this method is expensive and has a long production cycle. In addition, the inventors have found through research that in the related art, if the method of directly using a trained network model to generate panoramic images still has certain problems, mainly because the number of panoramic image samples is small, and the diversity of panoramic images generated by the trained network model is poor, such as only being able to generate indoor real scene images or outdoor real scene images, and being unable to generate virtual panoramic images. In order to improve at least one of the above problems, the embodiments of the present disclosure provide a method, device, equipment and medium for generating panoramic images, which are explained in detail below.

[0023] The solution provided by the embodiments of the present disclosure can directly generate a foreground image and a background image presented in a panoramic form based on the image foreground information and image background information in the content description text of the target panoramic image, and synthesize them to obtain the target panoramic image. The above method can quickly and easily generate the corresponding panoramic image based on the content description text, without the need for panoramic cameras or other equipment, and the required cost is relatively low. The target panoramic image obtained by synthesizing the foreground image and the background image presented in a panoramic form can also better meet the diversity requirements.

[0024] Figure 1 is a flow chart of a method for generating a panoramic image provided by an embodiment of the present disclosure. The method can be executed by a panoramic image generation device, wherein the device can be implemented using software and / or hardware and can generally be integrated into an electronic device. As shown in Figure 1, the method mainly includes the following steps S102 to S106:

[0025] Step S102 : obtaining content description text of the target panoramic image to be generated; the content description text includes image foreground information and image background information.

[0026] In the disclosed embodiments, the content description text is a textual description of the content in the target panoramic image. For example, it can be directly expressed as "There is a sculpture on the lawn," or it can be expressed as "The image background is a lawn, and the image foreground is a sculpture" for the foreground and background of the image, respectively. The specific configuration is flexible and is not limited here. The disclosed embodiments do not limit the method for obtaining the content description text. For example, it can be obtained through user settings or extracted from specified text.

[0027] Step S104 : generating a foreground image based on the image foreground information; and generating a background image presented in a panoramic form based on the image background information.

[0028] In practical applications, the background image is presented in a panoramic form, while the foreground image is an ordinary image presented in a non-panoramic form. The foreground image may specifically be an image containing a foreground object corresponding to the image foreground information. In some embodiments, the foreground image may only contain the foreground object, and the non-foreground object area in the foreground image is uniformly presented with a specified special pixel value to identify the foreground object area; alternatively, the foreground image may also directly carry a foreground object mask, through which the foreground object in the foreground image can be directly identified, and the subsequent synthesis processing of the foreground image and the background image based on the mask is facilitated. Specifically, the foreground object area in the foreground image is fused with the background image based on the mask.

[0029] The disclosed embodiments can utilize artificial intelligence technology to generate a foreground image that matches the image foreground information and a background image that matches the image background information. For example, a preset foreground generation network (i.e., a pretrained foreground generation network) can be used to generate a foreground image based on the image foreground information; and a preset background generation network (i.e., a pretrained background generation network) can be used to generate a panoramic background image based on the image background information. Both the foreground generation network and the background generation network are neural networks. For example, to ensure image generation quality, both can include diffusion networks. It should be noted that the diffusion networks included in each of the foreground generation network and the background generation network are independent of each other, and the diffusion network structure and parameters used by the foreground generation network can be different from those used by the background generation network. Leveraging the strong image generation capabilities of the diffusion network, more realistic foreground and background images can be stably generated. The above is merely an example, and the disclosed embodiments do not limit the specific implementation of the foreground generation network and the background generation network. For example, implementation using generative networks and other methods is also possible.

[0030] Step S106 : performing image synthesis processing based on the foreground image and the background image to obtain a target panoramic image.

[0031] In practical applications, the foreground image and the background image can be directly synthesized. In order to make the effect of the generated target panoramic image meet the requirements as much as possible, the position of the foreground object (such as a sculpture) corresponding to the foreground image in the background image (such as a lawn displayed in a panoramic form) can be further predicted, and the image synthesis can be performed based on the position, thereby ensuring the rationality and reliability of the final generated target panoramic image.

[0032] The above method can quickly and easily generate corresponding panoramic images based on content description text without the need for panoramic cameras and other equipment, and the required cost is low. The target panoramic image obtained by synthesizing the foreground image and the background image presented in panoramic form can also better meet diversity needs.

[0033] In order to obtain a reasonable and reliable target panoramic image, the embodiment of the present disclosure provides a specific example of performing image synthesis processing based on a foreground image and a background image to obtain the target panoramic image, which can be performed with reference to the following steps A and B:

[0034] Step A, predicting the position of the foreground object corresponding to the foreground image in the background image based on the content description text and the background image. In practical applications, the reasonable position of the foreground object in the background image can be inferred based on the content description text. For example, a preset position prediction network (i.e., a pre-trained position prediction network) can be used to predict the position of the foreground object corresponding to the foreground image in the background image. The embodiments of the present disclosure do not limit the specific structure and other implementation methods of the position prediction network. The position prediction network can be a neural network, which can effectively ensure the accuracy, reliability and timeliness of position prediction by virtue of its relatively powerful learning and processing capabilities.

[0035] Step B: Based on the position of the foreground object in the background image, the background image and the foreground image are synthesized to obtain a target panoramic image.

[0036] For example, a preset synthesis network can be used to perform image synthesis processing on the background image and the foreground image. The embodiments of the present disclosure do not limit the specific structure and other implementation methods of the synthesis network, and any network that can perform image synthesis processing can be used.

[0037] Considering that the background image is a panoramic image and the foreground image is a normal image, in order to ensure the realistic appearance of the synthesized target panoramic image, step B can be performed according to the following steps B1 and B2:

[0038] Step B1: Based on the position of the foreground object in the background image, the foreground image is distorted to obtain a distorted foreground image. It is understandable that since the background image is presented in a panoramic form, thereby presenting the user with a 360-degree panoramic view, the background image usually has a certain distortion effect, and the degree of distortion varies in different areas. In order to be able to reasonably and realistically synthesize the foreground object into the background image, the embodiment of the present disclosure can determine the distortion information of the position of the foreground object in the background image (such as the degree of distortion or the type of distortion, etc.) in the background image based on the position of the foreground object in the background image, and then distort the foreground image based on the distortion information.

[0039] In step B2, the background image and the distorted foreground image are synthesized to obtain the target panoramic image. Specifically, the image synthesis process can be achieved by fusing the foreground object region in the distorted foreground image with the background image based on the position of the foreground object in the background image.

[0040] In some embodiments, the background image and the distorted foreground image may be directly synthesized. In other embodiments, because the background image and the foreground image are generated using different paths (such as using different networks), the background image and the distorted foreground image may have inconsistent styles or may not be the style required by the user. Therefore, the embodiments of the present disclosure may further perform stylization processing. Specifically, the following steps B1.1 and B2.1 may be referred to:

[0041] Step B1.1: Perform image synthesis processing on the background image and the distorted foreground image to obtain a synthesized image.

[0042] Step B2.1: Stylize the composite image based on the target style to obtain a target panoramic image. The target style can be a preset default style or a user-selected style, without limitation. Specifically, the stylized processing of the composite image can be achieved using a style transfer model, etc., so that the composite image appears in the target style. The target style can be flexibly set, such as a cute style or an artistic style, without limitation. Through the above-described method, the overall style of the target panoramic image can be unified and meet style requirements. Different target styles can be flexibly set according to requirements, further diversifying the style of the generated target panoramic image.

[0043] Based on the above, the embodiment of the present disclosure provides a flowchart of a method for generating a panoramic image as shown in FIG2 , which mainly includes the following steps S202 to S212:

[0044] Step S202 : obtaining content description text of the target panoramic image to be generated; the content description text includes image foreground information and image background information.

[0045] Step S204 : generating a foreground image based on the image foreground information; and generating a background image presented in a panoramic form based on the image background information.

[0046] Step S206 : predicting the position of the foreground object corresponding to the foreground image in the background image based on the content description text and the background image.

[0047] Step S208 : performing distortion processing on the foreground image based on the position of the foreground object in the background image to obtain a distorted foreground image.

[0048] Step S210, performing image synthesis processing on the background image and the distorted foreground image to obtain a synthesized image;

[0049] Step S212: stylize the synthesized image based on the target style to obtain a target panoramic image.

[0050] The specific implementation of the above steps can refer to the aforementioned related content and will not be repeated here. Through the above-mentioned panoramic image generation method provided by the embodiment of the present disclosure, the corresponding panoramic image can be generated quickly and conveniently based on the content description text, and the target panoramic image obtained by synthesis at a low cost can also better meet the diversity requirements. Moreover, by predicting the position of the foreground object in the background image and distorting the foreground image based on this, after the background image and the distorted foreground image are synthesized, they will be further stylized, which can fully guarantee the realistic effect of the generated target panoramic image and meet the required style requirements.

[0051] Furthermore, the embodiments of the present disclosure do not restrict the application scenarios of the panoramic image generation method. For example, the panoramic image generation method described above can be applied in VR (Virtual Reality) scenarios, specifically VR live broadcast scenarios, VR gaming scenarios, and the like. For ease of understanding, the following is an exemplary description of applying the panoramic image generation method provided by the embodiments of the present disclosure in a VR scenario: In response to receiving a background adjustment request, content description text is obtained. According to the panoramic image generation method provided by the embodiments of the present disclosure, a target panoramic image corresponding to the content description text is generated, and the VR live broadcast background is updated based on the target panoramic image. The background adjustment request can come from the host, the audience, or the operation and maintenance personnel of the VR live broadcast scenario, and there is no restriction on the originator of the background adjustment request. Furthermore, the content description text can be text entered by the originator of the background adjustment request or directly selected from an existing text description library, and there is no restriction on the source of the content description text. It should be noted that the above example uses updating the VR live broadcast background as an example for simple illustration. In actual applications, VR game backgrounds can also be updated, and the specific settings can be flexible based on the actual application scenario. Through the above method, panoramic images can be generated quickly and conveniently, and can be applied to various scenes to better meet diverse needs.

[0052] Based on the aforementioned panoramic image generation method, the present disclosure provides a panoramic image generation network model. Referring to FIG3 , a schematic diagram of a panoramic image generation network model is shown. The model mainly includes the following foreground generation network, background generation network, position prediction network, and synthesis network, which are described below:

[0053] The foreground generation network is used to generate a foreground image based on the image foreground information in the content description text. Specifically, it can be implemented using a diffusion network, for example. In practical applications, the initial foreground generation network can be trained based on the image foreground sample information and the corresponding foreground image samples. The parameters of the foreground generation network are adjusted based on the difference between the foreground image output by the foreground generation network and the foreground image samples until the foreground generation network can output a foreground image that meets the expectations. In specific implementation, a panoramic sample image and the content description text corresponding to the panoramic sample image can also be obtained first. The image foreground sample information is extracted from the content description text, and the foreground image samples corresponding to the panoramic sample image are generated to train the foreground generation network.

[0054] The background generation network is used to generate a background image presented in a panoramic form based on the image background information in the content description text. In practical applications, the initial background generation network can be trained based on the image background sample information and the corresponding background image samples, and the parameters of the background generation network can be adjusted based on the difference between the background image output by the background generation network and the background image samples, until the background generation network can output a background image that meets the expectations. In specific implementation, it is also possible to first obtain a panoramic sample image and the content description text corresponding to the panoramic sample image, extract the image background sample information from the content description text, and generate background image samples corresponding to the panoramic sample image, thereby training the foreground generation network.

[0055] The position prediction network is used to predict the position of the foreground object corresponding to the foreground image in the background image.

[0056] In some specific implementation examples, the position prediction network is trained according to the following steps: obtaining a panoramic sample image and generating a foreground sample image and a background sample image corresponding to the panoramic sample image; inputting the foreground sample image and the background sample image into an initial neural network model (i.e., an untrained position prediction network) to obtain a position prediction result of a foreground object in the background sample image corresponding to the foreground sample image output by the neural network model; and training the neural network model based on the position prediction result and the panoramic sample image to obtain a position prediction network. Specifically, based on the difference between the position prediction result output by the initial neural network model and the actual position of the foreground object determined based on the panoramic sample image, the parameters of the neural network model are adjusted until a preset condition is met (such as the difference being less than a preset threshold) and the training is terminated, thereby obtaining a position prediction network that can output a relatively accurate position prediction result.

[0057] For ease of understanding, the disclosed embodiments further propose a method for generating the aforementioned foreground sample image and background sample image. For example, the foreground object in the panoramic sample image can be extracted, and the area corresponding to the foreground object in the panoramic sample image can be repaired or filled so that the area also appears as a background effect, thereby obtaining a background sample image. For example, assuming that the panoramic sample image is a sculpture standing in a lawn, the sculpture in the panoramic sample image is extracted and filled with lawn, and the obtained background sample image is a panoramic image of the lawn. Based on the extracted foreground object, a foreground sample image can be directly generated, such as the obtained foreground sample image is a sculpture image, and the foreground object can be set at a specified position such as the middle of the foreground sample image, and the non-foreground object area in the foreground sample image can be set to a special pixel value to identify the foreground object area; the foreground object area can also be directly identified by the mask of the foreground object, which is not limited here.

[0058] The synthesis network is used to perform image synthesis processing on the background image and the foreground image based on the position of the foreground object in the background image to obtain a target panoramic image. Specifically, it is used to distort the foreground image based on the position of the foreground object in the background image to obtain a distorted foreground image, perform image synthesis processing on the background image and the distorted foreground image to obtain a synthesized image, and stylize the synthesized image based on the target style to obtain a target panoramic image.

[0059] In summary, the panoramic image generation method provided by the embodiments of the present disclosure can quickly and easily generate corresponding panoramic images based on content description texts, requires low costs, and can better meet diversity requirements.

[0060] Corresponding to the aforementioned method for generating a panoramic image, an embodiment of the present disclosure further provides a device for generating a panoramic image. FIG4 is a schematic structural diagram of a device for generating a panoramic image provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. As shown in FIG4 , the device includes:

[0061] The text acquisition module 402 is used to acquire the content description text of the target panoramic image to be generated; the content description text includes image foreground information and image background information;

[0062] An image generation module 404 is configured to generate a foreground image based on the image foreground information; and to generate a background image presented in a panoramic form based on the image background information;

[0063] The image synthesis module 406 is configured to perform image synthesis processing based on the background image and the foreground image to obtain a target panoramic image.

[0064] The above-mentioned device can easily and quickly generate corresponding panoramic images based on content description text, without the need for panoramic cameras and other equipment, and the required cost is low. The target panoramic image obtained by synthesizing the foreground image and the background image presented in panoramic form can also better meet diversity needs.

[0065] In some embodiments, the image synthesis module 406 is specifically used to: predict the position of the foreground object corresponding to the foreground image in the background image based on the content description text and the background image; and perform image synthesis processing on the background image and the foreground image based on the position of the foreground object in the background image to obtain a target panoramic image.

[0066] In some embodiments, the image synthesis module 406 is specifically used to: distort the foreground image based on the position of the foreground object in the background image to obtain a distorted foreground image; and synthesize the background image and the distorted foreground image to obtain a target panoramic image.

[0067] In some embodiments, the image synthesis module 406 is specifically configured to: perform image synthesis processing on the background image and the distorted foreground image to obtain a synthesized image; and perform stylization processing on the synthesized image based on a target style to obtain a target panoramic image.

[0068] In some embodiments, the image synthesis module 406 is specifically used to: use a preset position prediction network to predict the position of the foreground object corresponding to the foreground image in the background image; and use a preset synthesis network to perform image synthesis processing on the background image and the foreground image.

[0069] In some embodiments, the position prediction network is trained according to the following steps: obtaining a panoramic sample map and generating a foreground sample image and a background sample image corresponding to the panoramic sample map; inputting the foreground sample image and the background sample image into an initial neural network model to obtain a position prediction result of the foreground object corresponding to the foreground sample image output by the neural network model in the background sample image; based on the position prediction result and the panoramic sample map, training the neural network model to obtain a position prediction network.

[0070] In some embodiments, the image generation module 404 is specifically configured to: generate a foreground image based on the image foreground information using a preset foreground generation network; and generate a background image presented in a panoramic form based on the image background information using a preset background generation network.

[0071] In some embodiments, the foreground generation network and the background generation network both include diffusion networks.

[0072] The panoramic image generation device provided by the embodiment of the present disclosure can execute the panoramic image generation method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0073] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.

[0074] An embodiment of the present disclosure provides an electronic device, which includes: a storage device storing a computer program; and a processing device configured to execute the computer program in the storage device to implement the steps of any one of the methods in the present disclosure.

[0075] Reference is now made to FIG5 , which illustrates a schematic diagram of the structure of an electronic device 500 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG5 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.

[0076] As shown in Figure 5, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0077] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0078] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0079] In addition to the above-mentioned methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to perform the image processing method provided by the embodiments of the present disclosure. The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present disclosure, the programming languages ​​including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0080] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the method for generating a panoramic image provided by the embodiment of the present disclosure.

[0081] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0082] The embodiments of the present disclosure further provide a computer program product, including a computer program / instruction, which implements the method for generating a panoramic image in the embodiments of the present disclosure when executed by a processor.

[0083] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0084] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0085] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0086] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0087] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0088] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a panoramic image, comprising: Obtaining content description text of the target panoramic image to be generated; The content description text includes image foreground information and image background information; generating a foreground image based on the image foreground information; and generating a background image presented in a panoramic form based on the image background information; An image synthesis process is performed based on the foreground image and the background image to obtain a target panoramic image.

2. The method according to claim 1, wherein: The performing image synthesis processing based on the foreground image and the background image to obtain a target panoramic image includes: Predicting a position of a foreground object corresponding to the foreground image in the background image according to the content description text and the background image; Based on the position of the foreground object in the background image, the background image and the foreground image are subjected to image synthesis processing to obtain a target panoramic image.

3. The method according to claim 2, wherein: The step of performing image synthesis processing on the background image and the foreground image based on the position of the foreground object in the background image to obtain a target panoramic image includes: Based on the position of the foreground object in the background image, the foreground image is distorted to obtain a distorted foreground image; The background image and the distorted foreground image are synthesized to obtain a target panoramic image.

4. The method according to claim 3, wherein: The step of performing image synthesis processing on the background image and the distorted foreground image to obtain a target panoramic image includes: Performing image synthesis processing on the background image and the foreground image after the distortion processing to obtain a synthesized image; The synthesized image is stylized based on the target style to obtain a target panoramic image.

5. The method according to claim 2, wherein: The predicting the position of the foreground object corresponding to the foreground image in the background image comprises: predicting the position of the foreground object corresponding to the foreground image in the background image using a preset position prediction network; The performing image synthesis processing on the background image and the foreground image includes: performing image synthesis processing on the background image and the foreground image using a preset synthesis network.

6. The method according to claim 5, wherein: The position prediction network is trained according to the following steps: Obtaining a panoramic sample image, and generating a foreground sample image and a background sample image corresponding to the panoramic sample image; Inputting the foreground sample image and the background sample image into an initial neural network model to obtain a position prediction result of a foreground object in the background sample image corresponding to the foreground sample image output by the neural network model; Based on the position prediction result and the panoramic sample image, the neural network model is trained to obtain a position prediction network.

7. The method according to claim 1, wherein: Generating a foreground image based on the image foreground information includes: generating a foreground image based on the image foreground information using a preset foreground generation network; The generating of the background image presented in a panoramic form based on the image background information includes: based on the image background information, generating the background image presented in a panoramic form by using a preset background generation network.

8. The method according to claim 7, wherein: The foreground generation network and the background generation network both include diffusion networks.

9. A device for generating a panoramic image, comprising: A text acquisition module, used to acquire a content description text of a target panoramic image to be generated; The content description text includes image foreground information and image background information; An image generation module, configured to generate a foreground image based on the image foreground information; and to generate a background image presented in a panoramic form based on the image background information; The image synthesis module is used to perform image synthesis processing based on the background image and the foreground image to obtain a target panoramic image.

10. An electronic device comprising: a storage device having a computer program stored thereon; A processing device, used to execute the computer program in the storage device to implement the steps of the method for generating a panoramic image according to any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method for generating a panoramic image according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating a panoramic image according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Scene graph generation method, device and equipment

    CN115810062A

  • Image composites using a generative adversarial neural network

    US20190251401A1