Image processing method and apparatus, and electronic device and storage medium

By obtaining the original image and extended size information, an extended image related to the original image content is generated, and its image quality is adjusted to match the image quality of the original image. Finally, the two are synthesized, which solves the problem of difficult to expand content on existing images in the prior art, and achieves the improvement of image content and the matching of image quality.

WO2025108247A1PCT designated stage expired Publication Date: 2025-05-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/132805
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-22
Filing Date
2024-11-18
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively expand content on existing images to meet users' diverse image processing needs.

Method used

By obtaining the original image and extended size information, an extended image related to the original image content is generated, and its image quality is adjusted to match the image quality of the original image. Finally, the two are synthesized to obtain the processed image.

Benefits of technology

It realizes content expansion of existing images to generate larger and more complete images, meets users' diverse image processing needs, and ensures that the processed image quality is consistent with the original image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024132805_30052025_PF_FP_ABST
    Figure CN2024132805_30052025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image processing method and apparatus, and an electronic device and a storage medium. The method comprises: acquiring an original image and extension size information; generating an extended image on the basis of the original image and the extension size information, wherein the content of the extended image is related to the content of the original image; adjusting the image quality of the extended image to obtain a first image, wherein the image quality of the first image matches the image quality of the original image; and compositing the first image with the original image to obtain a processed image. The present disclosure substantially provides a method capable of extending the content of an existing image, and can meet diversified image processing requirements of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese invention patent application entitled “Image processing method, device, electronic device and storage medium” filed on November 22, 2023, with application number 202311568255.3. The entire contents of that application are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to the field of computer vision technology, and in particular to an image processing method, device, electronic device, and storage medium. Background Art

[0003] In today's digital age, image processing has permeated every aspect of our lives. Whether for work or personal enjoyment, people widely use image processing software to modify and enhance images. As technology advances, user demand for image processing continues to grow, and one of the most pressing needs is expanding the content of existing images. Summary of the Invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image processing method, apparatus, electronic device and storage medium.

[0005] In a first aspect, the present disclosure provides an image processing method, comprising: obtaining an original image and extended size information; generating an extended image based on the original image and the extended size information; the content of the extended image is related to the content of the original image; adjusting the image quality of the extended image to obtain a first image, the image quality of the first image matching the image quality of the original image; and synthesizing the first image with the original image to obtain a processed image.

[0006] In a second aspect, the present disclosure also provides an image processing device, including: an acquisition module for acquiring an original image and extended size information; a generation module for generating an extended image based on the original image and the extended size information; the content of the extended image is related to the content of the original image; an adjustment module for adjusting the image quality of the extended image to obtain a first image so that the image quality of the first image matches the image quality of the original image; and a synthesis module for synthesizing the first image with the original image to obtain a processed image.

[0007] In a third aspect, the present disclosure also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.

[0008] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the image processing method described above when the program is executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0011] FIG1 is a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0012] 2 to 4 are exemplary diagrams of image processing using the image processing method provided by the embodiments of the present disclosure;

[0013] FIG5 is a schematic structural diagram of an image processing device according to an embodiment of the present disclosure;

[0014] FIG6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

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

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

[0017] Image expansion is a technique that uses an existing image as a starting point. By increasing its size or area, it generates a new image that is related to the original image's content, resulting in a larger, more complete image that includes both the original image and the newly expanded image. Image expansion improves and completes the original image's content, while also extending the visual effect of the image.

[0018] The technical solution provided by the embodiments of the present disclosure has the following advantages over the existing technology: the technical solution provided by the embodiments of the present disclosure generates an extended image by setting information based on the original image and extended size; the content of the extended image is related to the content of the original image; the image quality of the extended image is adjusted to obtain a first image, and the image quality of the first image matches the image quality of the original image; the first image is synthesized with the original image to obtain a processed image. In essence, it provides a method for expanding the content of an existing image, which can meet the diverse image processing needs of users.

[0019] Figure 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure. This embodiment is applicable to situations where image expansion is performed on a client. The method can be executed by an image processing device, which can be implemented using software and / or hardware. The device can be configured in an electronic device, such as a terminal, including but not limited to smartphones, PDAs, tablet computers, wearable devices with displays, desktop computers, laptop computers, all-in-one computers, smart home devices, etc. Alternatively, this embodiment can be applicable to situations where image expansion is performed on a server. The method can be executed by an image processing device, which can be implemented using software and / or hardware. The device can be configured in an electronic device, such as a server.

[0020] As shown in FIG. 1 , the method may specifically include: S110 , acquiring the original image and the expanded size information.

[0021] The original image may be, for example, an image that is desired to be expanded. This application does not limit the source of the original image. For example, the original image may be taken by the user or downloaded from the network.

[0022] It is defined that the image obtained after image expansion is performed on the original image is the processed image.

[0023] The expanded size information may, for example, be information describing the size difference between the original image and the processed image. Based on the expanded size information, the sizes and relative positions of the original and processed images can be determined. For example, the expanded size information may be the ratio or length of the original image in the four directions of upward, downward, left, and right, based on the original image size.

[0024] S120: Generate an extended image based on the original image and the extended size information; the extended image content is related to the original image content.

[0025] "The extended image content is related to the original image content" may, for example, mean that the extended image content and the original image content have a certain visual or thematic connection or similarity. This connection may be based on the continuity or change of the image's color, shape, theme, texture, etc.

[0026] There are many ways to implement this step, which are not limited in this application. In one embodiment, the method for implementing this step includes: determining a mask of the area to be expanded based on the size of the original image and the expanded size information; and generating an expanded image based on the original image using the mask.

[0027] For example, if the expanded size information includes the ratios of expansion in the four directions of upward, downward, left, and right based on the original image size, the size and shape of the area to be expanded, the relative position of the area to be expanded with respect to the original image, and the mask of the area to be expanded can be obtained based on the original image size and the ratios of expansion in the four directions of upward, downward, left, and right.

[0028] For example, Figure 2 shows an original image. If the expansion size information includes the expansion ratios in the four directions of up, down, left and right based on the original image size, based on these ratios, see Figure 3, the dimensions a, b, c and d of the area to be expanded in the four directions of up, down, left and right relative to the original image can be obtained, that is, the mask of the area to be expanded in the canvas can be obtained.

[0029] “Based on the original image, using a mask to generate an extended image” can specifically be inputting the original image and the mask of the area to be expanded into the image generation model to obtain an extended image. The extended image is an image drawn in the area to be expanded. The content of the extended image is a continuation and completion of the original image. For example, referring to Figures 2 and 4, the original image in Figure 2 reflects two people walking on a road with a row of trees on both sides of the road. In the extended image, the road is extended, the existing trees are improved, new trees are formed, and the sun is added in the upper right corner of the image. Optionally, the image generation model can be, for example, a generative adversarial model or an image diffusion generation model.

[0030] Furthermore, “generating an extended image based on the original image using a mask” may include: inputting the original image and the mask into a first image generation model to obtain an intermediate image; the content of the intermediate image is related to the content of the original image; inputting the intermediate image and the mask into a second image generation model to obtain an extended image, wherein the extended image is an optimization result of the intermediate image.

[0031] Optionally, the first image generation model is a generative adversarial model, and the second image generation model is an image diffusion generation model. The generative adversarial model has a stronger control over the subject or content of the image, while the image diffusion generation model generates higher quality images and is more flexible in handling noise and randomness.

[0032] The original image and the mask are input into a first image generation model to generate an intermediate image; the intermediate image and the mask are then input into a second image generation model to generate an extended image. Essentially, the first image generation model ensures that the generated intermediate image is content-related to the original image, rather than images such as picture frames, walls, or puzzles that are irrelevant to the original image. This ensures that the subsequently generated extended image is content-related to the original image. The second image generation model is used to optimize and further extend the intermediate image, thereby improving the quality of the extended image.

[0033] In another embodiment, the method further includes: obtaining generation prompt information; the implementation method of this step includes: determining a mask of the area to be expanded based on the size of the original image and the expanded size information; based on the original image, using the mask to generate an extended image, including: generating an extended image based on the generation prompt information, the original image and the expanded size information.

[0034] The generation prompt information can be, for example, a constraint condition on the image generation model. In other words, the generation prompt information can be regarded as an image generation requirement, which is used to constrain the extended image generated by the image generation model to meet the image generation requirement (ie, the generation prompt information).

[0035] In practice, the generated prompt information can be positive prompt information or negative prompt information. Positive prompt information can, for example, define what the generated extended image should include, while negative prompt information can, for example, define what the generated extended image should not include.

[0036] The generated prompt information may be input by the user, or the optional items may be given in advance, and the user's selection result from the optional items is used as the generated prompt information.

[0037] When generating the extended image, part or all of the generation prompt information may be input into the first image generation model; and / or part or all of the generation prompt information may be input into the second image generation model.

[0038] S130: Adjust the image quality of the extended image to obtain a first image, where the image quality of the first image matches the image quality of the original image.

[0039] In practice, the quality of the generated extended image may not match that of the original image. This mismatch can manifest in a variety of ways: resolution mismatch, color mismatch, and dynamic range mismatch. These inconsistencies or mismatches can lead to unnatural transitions and poor overall visual quality when directly compositing the extended image with the original.

[0040] To this end, the implementation method of this step may optionally include: performing super-resolution processing on the expanded image to obtain the first image. Super-resolution processing refers to processing a low-resolution, blurry image into a high-resolution, clear image. In practice, a trained super-resolution model can be used to perform super-resolution processing on the expanded image. In practice, the super-resolution model can be, for example, a convolutional neural network.

[0041] Furthermore, before super-resolution processing is performed on the extended image to obtain the first image, the method further includes: adding details to the extended image to obtain the second image; and super-resolution processing is performed on the extended image to obtain the first image, including: super-resolution processing is performed on the second image to obtain the first image.

[0042] Adding details to the extended image may include adding textures, geometric shapes, drawing edges of objects, adding local features of objects, adding colors or lighting effects, etc. For example, if the extended image includes a desert, the texture of a sand pile may be added to the desert; or if the extended image includes a window or door, the outline of the window or door may be drawn to make it easier to distinguish; or light and shadow may be added to the objects in the extended image.

[0043] By adding details to the extended image, the extended image (or the second image) can be made more realistic and vivid.

[0044] S140: Synthesize the first image and the original image to obtain a processed image.

[0045] The above technical solution generates an extended image by setting information based on the original image and the extended size; the content of the extended image is related to the content of the original image; the image quality of the extended image is adjusted to obtain a first image, and the image quality of the first image matches the image quality of the original image; the first image is synthesized with the original image to obtain a processed image. In essence, it provides a method for expanding the content of an existing image, which can meet the diverse image processing needs of users.

[0046] On the basis of the above technical solution, optionally, after S130, it further includes: if the first image includes the target object, repairing the target object in the first image; S140 is replaced by: synthesizing the repaired first image with the original image to obtain a processed image.

[0047] The target object is the object to be repaired. This application does not limit the specific object referred to by the target object. In some scenarios, the target object can be the subject of the first image, or a portion of the subject. The subject of the first image can be, for example, a person, an animal, a building, etc., or the target object can be the face of a person or an animal, etc.

[0048] In practice, the target object refers to different things, and the repair methods used to repair the target object in the first image are different. For example, if the target object is a face, repairing the target object in the first image includes: regenerating the face in the first image. The purpose of this setting is to improve facial distortion. Optionally, repairing the target object in the first image may also include: performing beautification processing on the face in the first image. The beautification processing may specifically include at least one of the following: whitening processing, skin resurfacing processing, freckle and acne removal processing, face slimming processing, eye enlargement processing, eye brightening processing, dark circle removal processing, and teeth whitening processing.

[0049] In one embodiment, repairing the target object in the first image may include repairing the target object in the first image based on global features of the first image. Specifically, when repairing the target object, the overall features of the first image (including the features of the target object and features of objects other than the target object) are considered to determine the specific repair method and degree of repair. This decision is not based solely on the features of the target object. This arrangement can result in a more harmonious overall repaired first image with a better visual effect.

[0050] Optionally, based on the global features of the first image, the target object in the first image is repaired, including: based on the global features of the first image, repairing the first image to obtain a third image; intercepting the area where the target object is located in the third image to obtain a fourth image; and synthesizing the fourth image with the first image to obtain a repaired first image.

[0051] It should also be noted that the reason for repairing the target object in the first image after adjusting the image quality of the expanded image is that if the target object in the first image is repaired first, the target object may become blurred during the subsequent adjustment of the image quality of the expanded image. However, adjusting the image quality of the expanded image first and then repairing the target object in the first image will not cause this problem.

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

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

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

[0055] It is understandable that the above notification and user authorization process are merely illustrative and do not limit 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.

[0056] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0057] FIG5 is a schematic diagram of the structure of an image processing device in an embodiment of the present disclosure. The image processing device provided by the embodiment of the present disclosure can be configured in a client, or can be configured in a server. Referring to FIG5 , the image processing device specifically includes: an acquisition module 310 for acquiring an original image and extended size information; a generation module 320 for generating an extended image based on the original image and the extended size information; the extended image content is related to the original image content; an adjustment module 330 for adjusting the image quality of the extended image to obtain a first image so that the image quality of the first image matches the image quality of the original image; and a synthesis module 340 for synthesizing the first image with the original image to obtain a processed image.

[0058] Furthermore, the generation module 320 is configured to: determine a mask for the area to be expanded based on the size of the original image and the expansion size information; and generate the expanded image based on the original image using the mask. Furthermore, the acquisition module 310 is further configured to acquire generation prompt information; and the generation module 320 is configured to: generate the expanded image based on the original image using the mask, including: generating the expanded image based on the generation prompt information and the original image using the mask.

[0059] Furthermore, the generation module 320 is used to: input the original image and the mask into a first image generation model to obtain an intermediate image; the content of the intermediate image is related to the content of the original image; input the intermediate image and the mask into a second image generation model to obtain an extended image; the extended image is an optimization result of the intermediate image.

[0060] Furthermore, the adjustment module 330 is configured to perform super-resolution processing on the extended image to obtain a first image.

[0061] Furthermore, the adjustment module 330 is configured to: perform super-resolution processing on the extended image to add details to the extended image to obtain a second image before obtaining the first image; and perform super-resolution processing on the second image to obtain the first image.

[0062] Furthermore, if the first image includes a target object, the adjustment module 330 is used to: adjust the image quality of the extended image, and after obtaining the first image, repair the target object in the first image; and synthesize the repaired first image with the original image to obtain a processed image.

[0063] Furthermore, the adjustment module 330 is configured to repair the target object in the first image based on the global features of the first image.

[0064] The image processing device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image processing method provided in the embodiment of the method of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.

[0065] Figure 6 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. Specific reference will be made below to Figure 6, which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing an embodiment of the present disclosure. The electronic device 1000 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), wearable electronic devices, and the like, as well as fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The electronic device shown in Figure 6 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0066] As shown in FIG6 , the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes to implement the image processing method of the embodiment described in the present disclosure according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and information required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0067] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although FIG. 6 shows the electronic device 1000 with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may alternatively be implemented or have.

[0068] 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, thereby implementing the image processing method described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0069] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include an information signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0070] In some embodiments, the client and server can communicate using any known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.

[0071] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0072] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: obtain an original image and extended size information; generate an extended image based on the original image and the extended size information; the content of the extended image is related to the content of the original image; adjust the image quality of the extended image to obtain a first image, and the image quality of the first image matches the image quality of the original image; synthesize the first image with the original image to obtain a processed image.

[0073] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0074] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0075] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0076] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0077] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0078] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0079] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement any image processing method provided by the present disclosure.

[0080] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any image processing method provided by the present disclosure.

[0081] An embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the image processing method described above is implemented.

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

[0083] 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. An image processing method, comprising: Get the original image and expanded size information; Generate an extended image based on the original image and the extended size information; The extended image content is related to the original image content; Adjusting the image quality of the extended image to obtain a first image, wherein the image quality of the first image matches the image quality of the original image; as well as The first image is synthesized with the original image to obtain a processed image.

2. The method according to claim 1, wherein generating the extended image based on the original image and the extended size information comprises: Determining a mask of the area to be expanded based on the size of the original image and the expanded size information; as well as Based on the original image, an extended image is generated using the mask.

3. The method according to claim 2, further comprising: Get the generated prompt information; as well as Based on the original image, using the mask to generate an extended image includes: based on the generation prompt information and the original image, using the mask to generate an extended image.

4. The method according to claim 2, wherein the step of generating an extended image based on the original image using the mask comprises: Inputting the original image and the mask into a first image generation model to obtain an intermediate image; The intermediate image content is related to the original image content; as well as The intermediate image and the mask are input into a second image generation model to obtain an extended image; the extended image is an optimization result of the intermediate image.

5. The method according to claim 1, wherein adjusting the image quality of the extended image to obtain the first image comprises: The extended image is subjected to super-resolution processing to obtain a first image.

6. The method according to claim 5, wherein before the super-resolution processing is performed on the extended image to obtain the first image, the method further comprises: adding details to the extended image to obtain a second image; as well as The super-resolution processing of the extended image to obtain the first image includes: super-resolution processing of the second image to obtain the first image.

7. The method according to claim 5, wherein after adjusting the image quality of the extended image to obtain the first image, the method further comprises: If the first image includes a target object, repairing the target object in the first image; as well as The synthesizing the first image with the original image to obtain a processed image includes: synthesizing the restored first image with the original image to obtain a processed image.

8. The method according to claim 7, wherein the repairing of the target object in the first image comprises: Based on the global features of the first image, the target object in the first image is repaired.

9. An image processing device, comprising: The acquisition module is used to obtain the original image and the expanded size information; A generating module, configured to generate an extended image based on the original image and the extended size information; The extended image content is related to the original image content; an adjustment module, configured to adjust the image quality of the extended image to obtain a first image, so that the image quality of the first image matches the image quality of the original image; and A synthesis module is used to synthesize the first image with the original image to obtain a processed image.

10. An electronic device, comprising: one or more processors; A storage device for storing one or more programs; as well as When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image processing method and device, computer equipment and storage medium

    CN111047508A

  • Image expansion method and device

    CN112785599A

  • Image processing method and device, electronic equipment and storage medium

    CN116884004A

  • Image processing method and device, electronic equipment and storage medium

    CN117611463A

  • Image transform method for obtaining expanded image data, image processing apparatus and image display device therefor

    US20020076121A1