Panoramic image generation method and device, equipment and medium

By obtaining content description text and generating foreground and background images for image synthesis, the existing panoramic image generation problems are solved and the existing panoramic image generation methods are insufficient, achieving low-cost and high-diversity panoramic image generation.

CN119399037APending Publication Date: 2025-02-07BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310883704.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing panoramic image generation method is costly and cannot generate virtual panoramic images. In the prior art, the number of panoramic image samples is small, and the panoramic images generated by the trained network model are poor in diversity.

Method used

By obtaining the content description text of the target panoramic image, a foreground image is generated based on the image foreground information, a background image presented in the panoramic form is generated based on the image background information, and an image synthesis process is performed to obtain the target panoramic image.

Benefits of technology

It realizes the rapid generation of panoramic images based on content description text, which reduces costs, and the generated panoramic images are more diverse and can meet the diversity needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399037A_ABST
    Figure CN119399037A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a panoramic image generation method and device, equipment and a medium. The method comprises the steps that a content description text of a to-be-generated target panoramic image is acquired; the content description text comprises 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, and performing image synthesis processing based on the foreground image and the background image to obtain a target panoramic image. According to the embodiment of the invention, the corresponding panoramic image can be conveniently and quickly generated based on the content description text, the required cost is low, and diversified requirements can be well met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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

[0002] Panoramic images can show the surrounding environment as much as possible, such as a 360-degree panoramic display of the environment, giving users a certain degree of stereoscopic perception, and can be well applied to scenes such as environmental display and virtual reality. However, the existing method of generating panoramic images needs to be improved. Summary of the invention

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

[0004] 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.

[0005] In a second aspect, an embodiment of the present disclosure also provides 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 comprises image foreground information and image background information; an image generation module, used to generate a foreground image based on the image foreground information; and, based on the image background information, to generate a background image presented in a panoramic form; an image synthesis module, used to perform image synthesis processing based on the background image and the foreground image to obtain a target panoramic image.

[0006] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a storage device on which a computer program is stored; 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.

[0007] 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.

[0008] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including 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.

[0009] The above technical solution provided by the embodiment 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 perform image synthesis to obtain the target panoramic image. The above method can conveniently and quickly generate a corresponding panoramic image based on the content description text, without the need for panoramic cameras and other equipment, and the required cost is low. The target panoramic image synthesized by the foreground image and the background image presented in a panoramic form can also better meet the diversity needs.

[0010] 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

[0011] 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.

[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] Figure 1 A schematic diagram of a flow chart of a method for generating a panoramic image provided by an embodiment of the present disclosure;

[0014] Figure 2 A schematic diagram of a flow chart of a method for generating a panoramic image provided by an embodiment of the present disclosure;

[0015] Figure 3 A schematic diagram of a network model for generating a panoramic image provided by an embodiment of the present disclosure;

[0016] Figure 4 A schematic diagram of the structure of a panoramic image generation device provided by an embodiment of the present disclosure;

[0017] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] 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 in the embodiments can be combined with each other without conflict.

[0019] 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.

[0020] There are many ways to generate panoramic images in related technologies. One main method is to use a panoramic camera to generate panoramic images, but this method is costly 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 use three-dimensional modeling to generate panoramic images. Figure 3 3D rendering is required, but this method requires high costs and a long production cycle. In addition, the inventors have found through research that in the related art, if the method of directly using the 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 described in detail below.

[0021] Figure 1 The present invention provides a flow chart of a method for generating a panoramic image, which can be performed by a device for generating a panoramic image, wherein the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. Figure 1 As shown, the method mainly includes the following steps S102 to S106:

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

[0023] In the disclosed embodiment, the content description text is a textual description of the content in the target panoramic image, such as directly expressing "there is a sculpture on the lawn", or expressing the foreground and background of the image as "the image background is a lawn, and the image foreground is a sculpture", which can be flexibly set and is not limited here. The disclosed embodiment does not limit the method for obtaining the content description text, such as being obtained through user settings or being extracted from a specified text.

[0024] 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.

[0025] 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.

[0026] The disclosed embodiment can use artificial intelligence technology to generate a foreground image that matches the image foreground information and a background image that matches the image background information. Exemplarily, based on the image foreground information, a preset foreground generation network (i.e., a pre-trained foreground generation network) can be used to generate a foreground image; and based on the image background information, a preset background generation network (i.e., a pre-trained background generation network) can be used to generate a background image presented in a panoramic form. Among them, the foreground generation network and the background generation network are both neural networks. Exemplarily, in order to ensure the image generation effect, the foreground generation network and the background generation network can both include a diffusion network. It should be noted that the diffusion networks contained in 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 and the diffusion network structure and parameters used by the background generation network can be different. With the strong image generation capability of the diffusion network, more realistic foreground images and background images can be stably generated. The above is only an example. The disclosed embodiment does not limit the specific implementation of the foreground generation network and the background generation network, such as the generative network and other methods.

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

[0028] 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, so as to perform image synthesis based on the position, thereby ensuring the rationality and reliability of the finally generated target panoramic image.

[0029] The above method 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 synthesized by the foreground image and the background image presented in panoramic form can also better meet diversity needs.

[0030] 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 a target panoramic image, which can be performed with reference to the following steps A and B:

[0031] 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.

[0032] 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.

[0033] 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.

[0034] Considering that the background image is an image presented in a panoramic form, and the foreground image is an ordinary image, in order to ensure the realistic perception of the synthesized target panoramic image, step B can be performed according to the following steps B1 and B2:

[0035] Step B1, based on the position of the foreground object in the background image, the foreground image is distorted to obtain the distorted foreground image. It is understandable that since the background image is presented in a panoramic form, thus presenting a 360-degree panoramic view to the user, the background image usually has a certain distortion effect, and the degree of distortion in different areas is different. 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 in the background image (such as the degree of distortion or the type of distortion, etc.) based on the position of the foreground object in the background image, and then distort the foreground image based on the distortion information.

[0036] Step B2, synthesizing the background image and the distorted foreground image to obtain a target panoramic image. Specifically, the foreground object area in the distorted foreground image can be fused with the background image based on the position of the foreground object in the background image to achieve image synthesis.

[0037] In some implementations, the background image and the distorted foreground image may be directly synthesized. In other implementations, since 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 embodiment of the present disclosure may further perform stylization processing, which may be performed with reference to the following steps B1.1 and B2.1:

[0038] Step B1.1, performing image synthesis processing on the background image and the foreground image after distortion processing to obtain a synthesized image.

[0039] Step B2.1, stylize the synthesized image based on the target style to obtain the target panoramic image. The target style can be a preset default style or a style selected by the user, which is not limited here. Specifically, the stylized processing of the synthesized image can be achieved by using a style transfer model or the like, so that the image is presented in the target style. The target style can be flexibly set, such as a cute style, an artistic style, etc., which is not limited here. Through the above method, the overall style of the target panoramic image can be unified and meet the style requirements. Different target styles can be flexibly set according to the requirements, so as to further diversify the style of the generated target panoramic image.

[0040] Based on the foregoing, the present disclosure provides the following embodiments: Figure 2 The flowchart of a method for generating a panoramic image shown in FIG. 1 mainly includes the following steps S202 to S212:

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

[0042] 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.

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

[0044] Step S208, based on the position of the foreground object in the background image, the foreground image is distorted to obtain a distorted foreground image.

[0045] Step S210, performing image synthesis processing on the background image and the foreground image after the distortion processing to obtain a synthesized image;

[0046] Step S212, stylizing the synthesized image based on the target style to obtain a target panoramic image.

[0047] The specific implementation of the above steps can refer to the above-mentioned related content, which 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 based on the content description text conveniently and quickly, and the target panoramic image synthesized on a low-cost basis can also better meet the diversity needs. 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.

[0048] In addition, the embodiment of the present disclosure does not limit the application scenario of the method for generating a panoramic image. For example, the above-mentioned method for generating a panoramic image can be applied to a VR (Virtual Reality) scene, specifically to a VR live broadcast scene, a VR game scene, and the like. For ease of understanding, the following is an exemplary description of the method for generating a panoramic image provided by the embodiment of the present disclosure in a VR scene: in response to receiving a background adjustment request, obtaining a content description text, generating a target panoramic image corresponding to the content description text according to the method for generating a panoramic image provided by the embodiment of the present disclosure, and updating the VR live broadcast background based on the target panoramic image. Among them, the above-mentioned background adjustment request can come from the anchor, from the audience, or from the operation and maintenance personnel of the VR live broadcast scene, and the initiator of the background adjustment request is not limited here; in addition, the content description text can be the text entered by the initiator of the background adjustment request, or it can be the text item directly selected by the initiator of the background adjustment request from the existing text description library, and the source of the content description text is not limited here. It should also be noted that the above is only a simple illustration of updating the VR live broadcast background as an example. In actual applications, the VR game background can also be updated, and it can be flexibly set according to the actual application scenario. Through the above method, panoramic images can be generated conveniently and quickly, and can be applied to various scenes to better meet diverse needs.

[0049] Based on the aforementioned method for generating a panoramic image, the present disclosure provides a generation network model for a panoramic image, see Figure 3 The schematic diagram of a panorama image generation network model shown in the figure mainly includes the following foreground generation network, background generation network, position prediction network and synthesis network, which are described below respectively:

[0050] The foreground generation network is used to generate a foreground image based on the image foreground information in the content description text, and can be implemented by, for example, a diffusion network. In practical applications, the initial foreground generation network can be trained based on the image foreground sample information and the corresponding foreground image samples, and the parameters of the foreground generation network can be 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 expectations. In specific implementation, a panoramic sample image and a content description text corresponding to the panoramic sample image can also be obtained first, the image foreground sample information can be extracted from the content description text, and a foreground image sample corresponding to the panoramic sample image can be generated, so as to train the foreground generation network.

[0051] 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 expectations. In specific implementation, a panoramic sample image and a content description text corresponding to the panoramic sample image can also be obtained first, the image background sample information is extracted from the content description text, and a background image sample corresponding to the panoramic sample image is generated, thereby training the foreground generation network.

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

[0053] 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 a background sample image corresponding to the foreground sample image output by the neural network model; 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 the preset conditions (such as the difference being less than a preset threshold) are met to terminate the training, and a position prediction network capable of outputting a relatively accurate position prediction result is obtained.

[0054] 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 presents 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 removed and filled with lawn, and the obtained background sample image is a panoramic image of the lawn. The foreground sample image can be directly generated based on the extracted foreground object, 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.

[0055] 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 perform stylization processing on the synthesized image based on the target style to obtain a target panoramic image.

[0056] In summary, the panoramic image generation method provided by the embodiments of the present disclosure can conveniently and quickly generate corresponding panoramic images based on content description texts, with low costs, and can also better meet diverse needs.

[0057] Corresponding to the aforementioned method for generating a panoramic image, the embodiment of the present disclosure further provides a device for generating a panoramic image. Figure 4 A schematic diagram of the structure of a panoramic image generation device provided by an embodiment of the present disclosure, the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device, such as Figure 4 As shown, including:

[0058] 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;

[0059] An image generation module 404 is used 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;

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

[0061] 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 synthesized by the foreground image and the background image presented in panoramic form can also better meet the diversity needs.

[0062] 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.

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

[0064] In some implementations, the image synthesis module 406 is specifically used 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.

[0065] 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.

[0066] 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 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 map, training the neural network model to obtain a position prediction network.

[0067] In some implementations, the image generation module 404 is specifically used 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.

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

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

[0070] 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.

[0071] An embodiment of the present disclosure provides an electronic device, which includes: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any method in the present disclosure.

[0072] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is 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), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0073] like Figure 5 As shown, 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. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. 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.

[0074] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, 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 Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0075] 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 contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a 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 executed.

[0076] 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 a user computing device, partially on a user device, as an independent software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0077] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. 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.

[0078] 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 include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. 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 of the above.

[0079] The embodiments of the present disclosure also 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.

[0080] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present 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.

[0081] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0082] As an optional but non-limiting implementation, in response to receiving an active request from the user, 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. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

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

[0084] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0085] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be 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 will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a panoramic image, characterized in that: include: 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that 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, characterized in that The foreground generation network and the background generation network both include diffusion networks.

9. A device for generating a panoramic image, characterized in that: include: 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, characterized in that: The electronic device comprises: 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, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method for generating a panoramic image as described in any one of claims 1 to 8.

12. A computer program product, characterized in that The invention comprises 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.