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

By generating and adjusting the image resolution, the display problem caused by inconsistent resolution of the original image and the display device is solved, and the full screen display effect is achieved without black edges and high definition.

WO2025152171A1PCT designated stage expired Publication Date: 2025-07-24BOE TECHNOLOGY GROUP CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/073329
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

In commercial display or information release scenarios, if the resolution of the original image is inconsistent with the resolution of the display device, the display has black edges, the image is stretched and deformed, or the display is unclear, affecting the user's visual experience.

Method used

By acquiring the resolution of the original image and the display device, generating the target image, using the image generation model and the super-resolution model, the image resolution is adjusted to adapt to the display device, and avoiding stretching deformation and unclear display.

Benefits of technology

The target image is displayed in full screen on the display device, eliminating black edges, improving the contrast and clarity of the display, and improving the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024073329_24072025_PF_FP_ABST
    Figure CN2024073329_24072025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure can be applied to the technical field of display. Provided are an image display method, apparatus and device, and an electronic device and a storage medium. The image display method comprises: acquiring an original resolution of an original image and a target resolution of a display apparatus (S310); on the basis of the original image, the original resolution and the target resolution, generating a target image (S320); and sending the target image to the display apparatus, so that the display apparatus displays the target image (S330).
Need to check novelty before this filing date? Find Prior Art

Description

Image display method, device, equipment, electronic equipment and storage medium Technical Field

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

[0002] In commercial display or information dissemination scenarios, there's a need to display original images, such as posters, on various display devices. However, when the resolution of the original image is inconsistent with the resolution of the display device, projecting the original image onto the display device can result in black edges, image distortion, or unclear display, resulting in a poor visual experience for users.

[0003] Summary of the Invention

[0004] In view of this, the present disclosure provides an image display method, apparatus, device, electronic device, and storage medium.

[0005] According to one aspect of the present disclosure, an image display method is provided, comprising: acquiring an original resolution of an original image and a target resolution of a display device; generating a target image based on the original image, the original resolution and the target resolution; and sending the target image to the display device so that the display device displays the target image.

[0006] For example, the above-mentioned original resolution includes the original pixel width and the original pixel height, and the above-mentioned target resolution includes the target pixel width and the target pixel height; the above-mentioned generating the target image based on the above-mentioned original image, the above-mentioned original resolution and the above-mentioned target resolution includes: determining the first height ratio between the above-mentioned target pixel height and the original pixel height; determining the first width ratio between the above-mentioned target pixel width and the original pixel width; determining the overlapping resolution based on the above-mentioned first height ratio, the above-mentioned first width ratio, the above-mentioned original resolution and the above-mentioned target resolution; determining the difference value based on the ratio between the above-mentioned overlapping resolution and the above-mentioned target resolution; generating the above-mentioned target image based on the above-mentioned difference value, the above-mentioned original image and the above-mentioned target resolution.

[0007] For example, the above-mentioned determination of the overlap resolution based on the above-mentioned first height ratio, the above-mentioned first width ratio, the above-mentioned original resolution and the above-mentioned target resolution includes, when the above-mentioned first height ratio is less than or equal to the above-mentioned first width ratio: determining the above-mentioned target pixel height as the height of the above-mentioned overlap resolution; and determining the width of the above-mentioned overlap resolution based on the height of the above-mentioned overlap resolution, the above-mentioned original pixel height and the above-mentioned original pixel width.

[0008] For example, the above-mentioned determination of the overlap resolution based on the above-mentioned first height ratio, the above-mentioned first width ratio, the above-mentioned original resolution and the above-mentioned target resolution also includes, when the above-mentioned first height ratio is greater than the above-mentioned first width ratio: determining the above-mentioned target pixel width as the width of the above-mentioned overlap resolution; and determining the height of the above-mentioned overlap resolution based on the width of the above-mentioned overlap resolution, the above-mentioned original pixel width and the above-mentioned original pixel height.

[0009] For example, the above-mentioned generation of the target image based on the above-mentioned difference value, the above-mentioned original image and the above-mentioned target resolution includes, when the above-mentioned difference value is less than a preset threshold value: determining the target area in the above-mentioned original image, wherein the above-mentioned target area includes target elements; generating a foreground image based on the above-mentioned target area and the above-mentioned original image; generating a background image based on the above-mentioned target area, the above-mentioned original image and the above-mentioned target resolution; splicing the above-mentioned background image and the above-mentioned foreground image to obtain a rearranged image; adjusting the resolution of the above-mentioned rearranged image based on the above-mentioned target resolution and the above-mentioned rearranged image to generate the above-mentioned target image.

[0010] For example, the above-mentioned generation of the background image based on the above-mentioned target area, the above-mentioned original image and the above-mentioned target resolution includes: inputting the above-mentioned original image and the pixel position corresponding to the above-mentioned target area into the image generation model to obtain an initial background image, wherein the resolution of the above-mentioned initial background image is equal to the above-mentioned original resolution; downsampling the above-mentioned initial background image by a first preset multiple to obtain a low-resolution background image; determining a first conversion resolution based on the width and height of the above-mentioned low-resolution background image and the above-mentioned target resolution; inputting the above-mentioned low-resolution background image and the above-mentioned first conversion resolution into the above-mentioned image generation model to generate the above-mentioned background image, wherein the resolution of the above-mentioned background image is the above-mentioned first conversion resolution.

[0011] For example, the above-mentioned determination of the first conversion resolution based on the width and height of the above-mentioned low-resolution background image and the above-mentioned target resolution includes: determining a second width ratio between the above-mentioned target pixel width and the width of the above-mentioned low-resolution background image; determining a second height ratio between the above-mentioned target pixel height and the height of the above-mentioned low-resolution background image; when the above-mentioned second height ratio is greater than or equal to the above-mentioned second width ratio, determining the height of the above-mentioned low-resolution background image as the height of the above-mentioned first conversion resolution; determining the width of the above-mentioned first conversion resolution based on the ratio between the target pixel width and the above-mentioned target pixel height and the height of the above-mentioned first conversion resolution.

[0012] For example, determining the first conversion resolution based on the width and height of the low-resolution background image and the target resolution also includes: when the second height ratio is less than the second width ratio, determining the width of the low-resolution background image as the width of the first conversion resolution; and determining the height of the first conversion resolution based on the ratio between the target pixel height and the target pixel width and the width of the first conversion resolution.

[0013] For example, generating the target image based on the original image, the original resolution and the target resolution includes: downsampling the original image by a second preset multiple to obtain a low-resolution image; determining a second conversion resolution based on the width and height of the low-resolution image and the target resolution; inputting the downsampled original image and the second conversion resolution into an image generation model to generate an intermediate conversion image, wherein the resolution of the intermediate conversion image is the second conversion resolution; adjusting the resolution of the intermediate conversion image based on the target resolution and the intermediate conversion image to generate the target image.

[0014] For example, determining the second conversion resolution based on the width and height of the low-resolution image and the target resolution includes: determining a third width ratio between the target pixel width and the width of the low-resolution image; determining a third height ratio between the target pixel height and the height of the low-resolution image; when the third height ratio is greater than or equal to the third width ratio, determining the height of the low-resolution image as the height of the second conversion resolution; and determining the width of the second conversion resolution based on the ratio between the target pixel width and the target pixel height and the height of the second conversion resolution.

[0015] For example, the above-mentioned determination of the second conversion resolution based on the width and height of the above-mentioned low-resolution image and the above-mentioned target resolution also includes, when the above-mentioned third height ratio is less than the above-mentioned third width ratio: determining the width of the above-mentioned low-resolution image as the width of the above-mentioned second conversion resolution; and determining the height of the above-mentioned second conversion resolution based on the ratio between the target pixel height and the above-mentioned target pixel width and the width of the above-mentioned second conversion resolution.

[0016] For example, the above-mentioned inputting the above-mentioned low-resolution background image and the above-mentioned first conversion resolution into the above-mentioned image generation model to generate the above-mentioned background image includes: obtaining a first preset prompt word and a first preset model parameter; inputting the above-mentioned low-resolution background image, the above-mentioned first preset prompt word, the above-mentioned first preset model parameter and the above-mentioned first conversion resolution into the above-mentioned image generation model to generate the above-mentioned background image.

[0017] For example, the above-mentioned inputting the above-mentioned downsampled original image and the above-mentioned second conversion resolution into the image generation model to generate the intermediate conversion image includes: obtaining a second preset prompt word and a second preset model parameter; inputting the above-mentioned downsampled original image, the above-mentioned second preset prompt word, the above-mentioned second preset model parameter and the above-mentioned second conversion resolution into the image generation model to generate the above-mentioned intermediate conversion image.

[0018] For example, generating the foreground image based on the target area and the original image includes: inputting the original image and the pixel position corresponding to the target area into an image segmentation model to generate the foreground image.

[0019] For example, the above method also includes: determining the above first preset model parameters, the above first preset multiple, the above first preset prompt word, the above second preset model parameters, the above second preset multiple and the above second preset prompt word based on the above original image and configuration parameters from the client related to the generation effect and generation speed of the above image generation model.

[0020] For example, the above configuration parameters include at least one of the following: generation style, generation speed, generation creativity, generated content text description, and the above target resolution; the above first preset model parameters and the above second preset model parameters both include at least one of the following: number of expanded pixels, mask blur degree, image extension direction, attenuation index, color change degree parameter, sampling method, sampling step size, denoising intensity, and prompt word correlation degree.

[0021] According to another aspect of the present disclosure, an image display device is provided, comprising: an acquisition module for acquiring the original resolution of an original image and a target resolution of a display device; a generation module for generating a target image based on the original image, the original resolution and the target resolution; and a display module for sending the target image to the display device so that the display device displays the target image.

[0022] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute any one of the above methods.

[0023] According to another aspect of the present disclosure, an image display device is provided, comprising: the electronic device described above; and a display device for acquiring a target image from the electronic device and displaying the target image.

[0024] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the instructions are executed by a processor, the processor is caused to perform any one of the above methods.

[0025] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements any one of the above methods when executed by a processor.

[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description.

[0027] According to an embodiment of the present disclosure, after obtaining the original resolution of the original image and the target resolution of the display device, a target image is generated based on the original image, the original resolution and the target resolution, and the original image is expanded to the target resolution based on the difference between the original resolution and the target resolution to obtain a target image with a resolution of the target resolution. When the target image is sent to the display device and the display device displays the target image, the display device can display the target image in full screen without stretching, deformation or unclear display, thereby bringing a better visual experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0029] FIG1 schematically shows a schematic diagram of a display device directly displaying an original image;

[0030] FIG2 schematically shows an application scenario diagram of the image display method according to an embodiment of the present disclosure;

[0031] FIG3 schematically shows a flow chart of an image display method according to an embodiment of the present disclosure;

[0032] FIG4(A) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure;

[0033] FIG4(B) schematically shows a schematic diagram of an original marked image according to an embodiment of the present disclosure;

[0034] FIG4(C) schematically shows a schematic diagram of a foreground image according to an embodiment of the present disclosure;

[0035] FIG4(D) schematically shows a schematic diagram of an initial background image according to an embodiment of the present disclosure;

[0036] FIG4(E) schematically shows a schematic diagram of a background image according to an embodiment of the present disclosure;

[0037] FIG4(F) schematically shows a schematic diagram of rearranging images according to an embodiment of the present disclosure;

[0038] FIG5(A) schematically shows a schematic diagram of a display device according to an embodiment of the present disclosure;

[0039] FIG5(B) schematically shows a schematic diagram of a display device directly displaying an original image according to an embodiment of the present disclosure;

[0040] FIG5(C) schematically shows a schematic diagram of a display device displaying a target image after obtaining the target image according to the image display method provided by an embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold;

[0041] FIG6(A) schematically shows a schematic diagram of a display device displaying a target image after obtaining the target image according to the image display method provided in an embodiment of the present disclosure, when the difference value is greater than or equal to a preset threshold;

[0042] FIG6(B) schematically shows a schematic diagram of a partially enlarged original image and a target image according to an embodiment of the present disclosure;

[0043] FIG7(A) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure;

[0044] FIG7(B) schematically shows a schematic diagram of a target image obtained by the image display method provided in an embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold;

[0045] FIG7(C) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure;

[0046] FIG7(D) schematically shows a schematic diagram of a target image obtained by the image display method provided in an embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold;

[0047] FIG7(E) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure;

[0048] FIG7(F) schematically shows a schematic diagram of a target image obtained by the image display method provided in an embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold;

[0049] FIG7(G) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure;

[0050] FIG7(H) schematically shows a schematic diagram of a target image obtained by the image display method provided in an embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold;

[0051] FIG8 schematically shows a system architecture diagram of an image display method according to an embodiment of the present disclosure;

[0052] FIG9 schematically shows a schematic diagram of a functional interface for AI image generation according to an embodiment of the present disclosure;

[0053] FIG10 schematically shows a schematic diagram of an image smart fill function interface according to an embodiment of the present disclosure;

[0054] FIG11 schematically shows a flow chart of an image display method according to another embodiment of the present disclosure;

[0055] FIG12 schematically shows a flow chart of an image display method according to yet another embodiment of the present disclosure;

[0056] FIG13 schematically shows a structural block diagram of an image display device according to an embodiment of the present disclosure;

[0057] FIG14 schematically shows a block diagram of an electronic device suitable for implementing an image display method according to an embodiment of the present disclosure; and

[0058] FIG15 schematically shows a schematic diagram of an image display device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of them. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure. It should be noted that throughout the drawings, the same elements are represented by the same or similar figure marks. In the following description, some specific embodiments are only for descriptive purposes and should not be understood as any limitation to the present disclosure, but are only examples of the embodiments of the present disclosure. Conventional structures or configurations will be omitted when they may cause confusion in the understanding of the present disclosure. It should be noted that the shapes and sizes of the components in the figures do not reflect the actual size and proportion, but only illustrate the contents of the embodiments of the present disclosure.

[0060] Unless otherwise defined, technical or scientific terms used in the embodiments of the present disclosure shall have the same general meaning as those skilled in the art. The terms "first," "second," and similar terms used in the embodiments of the present disclosure do not denote any order, quantity, or importance, but are merely used to distinguish different components.

[0061] FIG. 1 schematically shows a schematic diagram of a display device directly displaying an original image.

[0062] As shown in Figure 1, when the resolution of the original image 101 is inconsistent with the resolution of the display device, when the original image 101 is projected onto the display device, the original image 101 is displayed in the display area 103 of the display device, and black borders are displayed in the display areas 102 and 104 of the display device, resulting in a poor visual experience.

[0063] Furthermore, if the resolution of the original image is inconsistent with the resolution of the display device, when the original image is projected onto the display device, in addition to the problem of black edges in the display shown in Figure 1, there will also be problems with image stretching and deformation or unclear display, all of which will bring a poor visual experience to the user. If the original image is manually adjusted to make it suitable for the display device, the cost is high and the efficiency is low. Therefore, it is urgent to find a method for efficiently adjusting the original image so that the adjusted original image can be suitable for display on a display device of any scale, which can bring a better visual experience to the user.

[0064] Embodiments of the present disclosure provide an image display method, apparatus, device, electronic device, and storage medium, which can be applied in the field of display technology.

[0065] An embodiment of the present disclosure provides an image display method, including: obtaining an original resolution of an original image and a target resolution of a display device; generating a target image based on the original image, the original resolution, and the target resolution; and sending the target image to the display device so that the display device displays the target image.

[0066] FIG2 schematically shows an application scenario diagram of the image display method according to an embodiment of the present disclosure.

[0067] As shown in FIG2 , an application scenario 200 according to this embodiment may include a first terminal device 201, a second terminal device 202, a third terminal device 203, a network 204, a server 205, and a commercial display screen 206. The network 104 is a medium for providing a communication link between the first terminal device 201, the second terminal device 202, the third terminal device 203, the server 205, and the commercial display screen 206. The network 204 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0068] The user may use at least one of the first terminal device 201, the second terminal device 202, and the third terminal device 203 to interact with the server 205 via the network 204 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 201, the second terminal device 202, and the third terminal device 203, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, and messaging system web management applications (for example only).

[0069] The first terminal device 201 , the second terminal device 202 , and the third terminal device 203 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0070] Server 205 can be a server that provides various services. For example, server 205 can be a backend management server that supports the web management application of the messaging system operated by users using first terminal device 201, second terminal device 202, and third terminal device 203. The backend management server can analyze and process received data such as user requests, and feed the processing results back to the terminal device or display the processing results on the commercial display screen 206.

[0071] The commercial display screen 206 can be a single display screen, a spliced ​​screen or a curved screen, etc., and is used to display the target file or target image generated after the server 205 processes the received user request and other data.

[0072] For example, network 204 may be a communication link using a message box as an intermediate medium, wherein the message box may be a hardware terminal device that can be connected to an advertising machine, a commercial display screen 206, or other display hardware device, and message publishing terminal software may be installed in the device. A user may use the first terminal device 201, the second terminal device 202, or the third terminal device 203 to operate the message publishing system web management application, generate a file processing request or an image display request, and send the file processing request or image display request to the server 205 via the message box. The server 205 may receive the file processing request or image display request and other data sent by the user via the message box, analyze and process the data sent by the user, and feed back the processing results (e.g., a target file or target image generated according to the user request) to the terminal device. At the same time, the target file or target image may be sent to the commercial display screen 206 via the message box, and the target file or target image may be displayed on the commercial display screen 206.

[0073] It should be noted that the image display method provided in the embodiment of the present disclosure can generally be executed by the server 205. Accordingly, the image display device provided in the embodiment of the present disclosure can generally be set in the server 205. The image display method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 205 and can communicate with the first terminal device 201, the second terminal device 202, the third terminal device 203 and / or the server 205. Accordingly, the image display device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 205 and can communicate with the first terminal device 201, the second terminal device 202, the third terminal device 203 and / or the server 205.

[0074] It should be understood that the number of terminal devices, networks, and servers in Figure 2 is merely illustrative and any number of terminal devices, networks, and servers may be provided as required.

[0075] FIG3 schematically shows a flow chart of an image display method according to an embodiment of the present disclosure.

[0076] As shown in FIG. 3 , the image display method of this embodiment includes operations S310 to S330 .

[0077] In operation S310, an original resolution of an original image and a target resolution of a display device are acquired.

[0078] According to an embodiment of the present disclosure, a display device may include at least one display screen.

[0079] For example, the display device may be a single display screen, such as a digital signage, or a spliced ​​screen formed by splicing four single display screens with the same resolution.

[0080] In operation S320, a target image is generated based on the original image, the original resolution, and the target resolution.

[0081] According to an embodiment of the present disclosure, the aspect ratio difference between the original image and the target image can be first determined based on the original resolution and the target resolution, and then different strategies can be used to expand the original image to the target resolution based on the aspect ratio difference to obtain the target image, so that the target image can be better suitable for display on the display device.

[0082] According to an embodiment of the present disclosure, the resolution of the target image is the target resolution.

[0083] In operation S330, the target image is transmitted to the display device so that the display device displays the target image.

[0084] According to an embodiment of the present disclosure, the resolution of the target image is the same as the resolution of the display device, both of which are target resolutions. Therefore, the display device can display the target image in full screen without problems of stretching, deformation or unclear display.

[0085] According to an embodiment of the present disclosure, after obtaining the original resolution of the original image and the target resolution of the display device, a target image is generated based on the original image, the original resolution and the target resolution, and the original image is expanded to the target resolution based on the difference between the original resolution and the target resolution to obtain a target image with a resolution of the target resolution. When the target image is sent to the display device and the display device displays the target image, the display device can display the target image in full screen without stretching, deformation or unclear display, thereby providing a better visual experience for the user.

[0086] According to an embodiment of the present disclosure, the original resolution includes an original pixel width and an original pixel height, and the target resolution includes a target pixel width and a target pixel height. For operation S320 shown in FIG3 , generating a target image based on the original image, the original resolution, and the target resolution may include the following operations: determining a first height ratio between the target pixel height and the original pixel height; determining a first width ratio between the target pixel width and the original pixel width; determining an overlap resolution based on the first height ratio, the first width ratio, the original resolution, and the target resolution; determining a difference value based on the ratio between the overlap resolution and the target resolution; and generating the target image based on the difference value, the original image, and the target resolution.

[0087] According to an embodiment of the present disclosure, the overlap resolution represents the maximum resolution that has the same aspect ratio as the original resolution and overlaps with the target resolution in terms of pixel width or pixel height. The overlap resolution represents the maximum resolution that can be expanded to the target resolution without regenerating the content.

[0088] According to an embodiment of the present disclosure, the target pixel height may be compared with the original pixel height to obtain a first height ratio. The target pixel width may be compared with the original pixel width to obtain a first width ratio. The overlap resolution may be compared with the target resolution to obtain a difference value.

[0089] For example, the first width ratio can be obtained according to formula (1), and the first height ratio can be obtained according to formula (2).

[0090] Among them, w d Represents the target pixel width, w o Represents the original pixel width, h d Represents the target pixel height, h o Represents the original pixel height.

[0091] According to an embodiment of the present disclosure, determining the overlap resolution based on the first height ratio, the first width ratio, the original resolution and the target resolution includes: determining the target pixel height as the height of the overlap resolution when the first height ratio is less than or equal to the first width ratio; and determining the width of the overlap resolution based on the height of the overlap resolution, the original pixel height and the original pixel width.

[0092] According to an embodiment of the present disclosure, determining the width of the overlap resolution based on the height of the overlap resolution, the original pixel height and the original pixel width includes: determining the width of the overlap resolution based on the ratio between the height of the overlap resolution and the original pixel height and the original pixel width.

[0093] According to an embodiment of the present disclosure, the width of the coincidence resolution may be obtained by multiplying the ratio of the coincidence resolution height to the original pixel height by the original pixel width. The coincidence resolution may be obtained by multiplying the coincidence resolution height by the coincidence resolution width.

[0094] For example, you can In the case of , the height of the overlap resolution is determined according to formula (3), the width of the overlap resolution is determined according to formula (4), and the difference value is obtained according to formula (5). o =h d (3) w′ o =w o *h′ o / h o (4)

[0095] Where h′ o Characterizes the height of the coincidence resolution, w′ o It represents the width of the overlap resolution, and Δ represents the difference value.

[0096] According to an embodiment of the present disclosure, when the first height ratio is less than or equal to the first width ratio, the target pixel height is determined as the height of the overlap resolution, and the width of the overlap resolution is determined based on the height of the overlap resolution, the original pixel height, and the original pixel width. Thus, the overlap resolution represents the maximum resolution at which the content does not need to be regenerated when the original image is expanded to the target resolution. Subsequently, the overlap resolution is compared with the target resolution to determine a difference value, which represents the amount of data that needs to be regenerated to fill the content when the original image expanded to the overlap resolution is expanded back to the target resolution.

[0097] According to an embodiment of the present disclosure, determining the overlap resolution based on the first height ratio, the first width ratio, the original resolution and the target resolution also includes: determining the target pixel width as the width of the overlap resolution when the first height ratio is greater than the first width ratio; and determining the height of the overlap resolution based on the width of the overlap resolution, the original pixel width and the original pixel height.

[0098] According to an embodiment of the present disclosure, the height of the overlap resolution is determined based on the width of the overlap resolution, the original pixel width and the original pixel height, and the height of the overlap resolution is determined based on the ratio between the width of the overlap resolution and the original pixel width and the original pixel height.

[0099] According to an embodiment of the present disclosure, the height of the coincidence resolution may be obtained by multiplying the ratio between the width of the coincidence resolution and the original pixel width by the original pixel height.

[0100] For example, you can In the case of , the height of the overlap resolution is determined according to formula (6), the width of the overlap resolution is determined according to formula (7), and the difference value is obtained according to formula (8). o =w d (6) h′ o =h o *w′ o / w o (7)

[0101] According to an embodiment of the present disclosure, when the first height ratio is greater than the first width ratio, the target pixel width is determined as the width of the overlap resolution, and the height of the overlap resolution is determined based on the width of the overlap resolution, the original pixel width, and the original pixel height. Thus, the overlap resolution represents the maximum resolution that does not require regeneration of content when the original image is expanded to the target resolution. Subsequently, the overlap resolution is compared with the target resolution to determine a difference value, which represents the amount of data that needs to be regenerated to fill the content when the original image expanded to the overlap resolution is expanded back to the target resolution.

[0102] According to the embodiments of the present disclosure, the amount of data required to regenerate filler content is relatively large, meaning that the difference is relatively small. For example, if the aspect ratio is expanded from 9:16 to 16:9, using the image generation model to directly expand the background of the original image will result in a more uncontrollable target image and a poorer user visual experience. Furthermore, large-scale expansion can also be very unsightly in terms of layout for poster scenes. Therefore, considering both technical implementation and product requirements, content re-arrangement can be implemented for scenes like advertisements and posters that require large amounts of generated content by setting a preset threshold for judgment.

[0103] According to an embodiment of the present disclosure, generating a target image based on a difference value, an original image, and a target resolution may include, when the difference value is less than a preset threshold value: determining a target area in the original image, wherein the target area includes a target element; generating a foreground image based on the target area and the original image; generating a background image based on the target area, the original image, and the target resolution; splicing the background image and the foreground image to obtain a rearranged image; and adjusting the resolution of the rearranged image based on the target resolution and the rearranged image to generate the target image.

[0104] When the difference value is smaller than a preset threshold, it indicates that the aspect ratio between the original resolution of the original image and the target resolution is quite different, and more filling content needs to be regenerated.

[0105] The preset threshold value can be selected according to actual conditions and is not limited here. For example, the preset threshold value can be 0.5, 0.6 or 0.7.

[0106] According to an embodiment of the present disclosure, the foreground image includes the target element, but the background image does not include the target element.

[0107] According to an embodiment of the present disclosure, the target element may be a target product in a target promotion. For example, the target element may be a target advertising product in an advertising promotion.

[0108] The resolution of the background image has the same aspect ratio as the target resolution, but the resolution of the background image is smaller than the target resolution. The number of background images can be 1 or greater than or equal to 2.

[0109] If the number of background images is greater than or equal to two, multiple background images can be displayed on the client. In response to the client's selection, the client's selected background image is obtained. Subsequent splicing and resolution adjustment operations are then performed on the client's selected background image to achieve deeper interaction with the user, avoiding long wait times during the target image generation process, which can lead to a poor user experience. Therefore, this interactive design can further improve user satisfaction.

[0110] In response to the marking operation of the client, an original marked image can be obtained, and then the target area in the original image can be determined based on the original marked image.

[0111] According to an embodiment of the present disclosure, splicing a background image and a foreground image to obtain a rearranged image includes: superimposing the foreground image and the background image to obtain a superimposed image; if the ratio of the foreground image to the superimposed image is inconsistent with the ratio of the foreground image to the original image, upsampling or downsampling the background image to obtain an adjusted background image; and then superimposing the adjusted background image with the foreground image to obtain a rearranged image. If the ratio of the foreground image to the superimposed image is consistent with the ratio of the foreground image to the original image, determining the superimposed image as the rearranged image.

[0112] For example, when the ratio of the foreground image to the original image is greater than the ratio of the foreground image to the superimposed image, the background image may be downsampled to obtain an adjusted background image. When the ratio of the foreground image to the original image is less than the ratio of the foreground image to the superimposed image, the background image may be upsampled to obtain an adjusted background image.

[0113] For example, the target element in the foreground image may be a beverage, and the background image may be a beach. If the ratio of the foreground image to the background image in the original image differs significantly, the difference between the original image and the target image is less than a preset threshold, and the display device is a spliced ​​screen, the target area in the original image can be first determined, where the target area includes the target element, the beverage. Then, based on the target area and the original image, a foreground image is generated, where the foreground image includes the beverage. Based on the target area, the original image, and the target resolution, a background image is generated, where the beach does not include the beverage.

[0114] The foreground image and the background image are then superimposed to obtain a superimposed image. If the ratio of the beverage in the foreground image to the superimposed image is inconsistent with the ratio of the beverage in the foreground image to the original image, the background image is upsampled or downsampled to obtain an adjusted background image, which is then superimposed with the foreground image to obtain a rearranged image. If the ratio of the beverage in the foreground image to the superimposed image is consistent with the ratio of the beverage in the foreground image to the original image, the superimposed image is determined to be the rearranged image. The resolution of the rearranged image is then adjusted based on the target resolution and the rearranged image to generate the target image. The target image is then sent to the splicing screen so that the splicing screen can display the target image.

[0115] According to an embodiment of the present disclosure, when the ratio of the foreground image to the superimposed image is inconsistent with the ratio of the foreground image to the original image, the background image is upsampled or downsampled to obtain an adjusted background image, and then the adjusted background image is superimposed on the foreground image to obtain a rearranged image. The rearranged image can be obtained without adjusting the foreground image and only adjusting the background image, which can ensure that the content details of the target elements in the rearranged image are not lost or deformed.

[0116] The target resolution and the rearranged image can be input into an image super-resolution model, and the image super-resolution model is used to adjust the resolution of the rearranged image to the target resolution to obtain the target image.

[0117] According to the embodiments of the present disclosure, the image super-resolution model can be selected according to actual conditions and is not limited here. For example, the image super-resolution model can be a blind image super-resolution model (Real-ESRGAN, Enhanced Super-Resolution GAN).

[0118] According to an embodiment of the present disclosure, an image super-resolution model is used to adjust the resolution of the rearranged image to the target resolution to obtain a target image. This can simply and quickly obtain a super-resolution target image that is closer to the original image and has higher contrast and clarity.

[0119] According to an embodiment of the present disclosure, when the difference value is less than a preset threshold, it indicates that when the original image is expanded to the target resolution, more filling content needs to be regenerated. Therefore, the target area in the original image can be determined first, and a foreground image including the target elements can be generated based on the target area and the original image, ensuring that the target elements in the foreground image remain unchanged. A background image is generated based on the target area, the original image and the target resolution to remove the target elements in the original image, and a background image with the same aspect ratio of the resolution as the target resolution is generated based on the background area in the original image. The background image and the foreground image are then spliced ​​to obtain a rearranged image, which includes more target element details and has the same aspect ratio of the resolution as the target pixel. The resolution of the rearranged image is then adjusted based on the target resolution and the rearranged image, and the resolution of the rearranged image is quickly increased to the target resolution, thereby quickly generating the target image.

[0120] According to an embodiment of the present disclosure, before generating a foreground image, a mask matrix can be generated based on the original image and the target area to record the pixel position of the target area in the original image in the mask matrix, wherein the size of the mask matrix is ​​the same as the original resolution, and the pixel position of the target area can be represented by 1, and the pixel position of the background can be represented by 0.

[0121] According to an embodiment of the present disclosure, generating a foreground image based on the target area and the original image includes: inputting the original image and pixel positions corresponding to the target area into an image segmentation model to generate the foreground image.

[0122] According to an embodiment of the present disclosure, inputting the original image and the pixel positions corresponding to the target area into the image segmentation model to generate the foreground image includes: inputting the original image and the mask matrix into the image segmentation model to generate the foreground image.

[0123] The image segmentation model can be selected according to actual conditions and is not limited here. For example, the image segmentation model can be a Segment Anything Model (SAM).

[0124] Figure 4(A) schematically illustrates an original image according to an embodiment of the present disclosure. Figure 4(B) schematically illustrates an original labeled image according to an embodiment of the present disclosure. Figure 4(C) schematically illustrates a foreground image according to an embodiment of the present disclosure.

[0125] As shown in FIG. 4(A) , the original image may include a foreground area 401 and a background area 402 .

[0126] According to an embodiment of the present disclosure, after a user marks an original image on a client, the original marked image shown in FIG4(B) can be obtained in response to the marking operation of the client. As shown in FIG4(B), the original marked image can include a target area 401_1 and a background area 402. Based on the original marked image shown in FIG4(B), the target area 401_1 in the original image can be determined.

[0127] According to an embodiment of the present disclosure, after the mask matrix corresponding to FIG. 4(B) and FIG. 4(A) are input into the image segmentation model, a foreground image 401_2 corresponding to the foreground area 401 in FIG. 4(A) can be obtained.

[0128] According to an embodiment of the present disclosure, by inputting the original image and the pixel positions corresponding to the target area into an image segmentation model to generate a foreground image, the foreground image can be segmented from the original image quickly and accurately.

[0129] According to an embodiment of the present disclosure, generating a background image based on a target area, an original image and a target resolution includes: inputting the original image and the pixel position corresponding to the target area into an image generation model to obtain an initial background image, wherein the resolution of the initial background image is equal to the original resolution; downsampling the initial background image by a first preset multiple to obtain a low-resolution background image; determining a first conversion resolution based on the width and height of the low-resolution background image and the target resolution; inputting the low-resolution background image and the first conversion resolution into the image generation model to generate a background image, wherein the resolution of the background image is the first conversion resolution.

[0130] The image generation model can be selected according to actual conditions and is not limited here. For example, the image generation model can be a text-image generation model SD (stable diffusion) model.

[0131] The first preset magnification can be selected based on actual circumstances and is not limited herein. For example, the first preset magnification can be determined based on the user's desired generation speed and generation quality of the image generation model. The higher the desired generation speed, the larger the first preset magnification, and the lower the quality of the generated background image. The lower the desired generation speed, the smaller the first preset magnification, and the higher the quality of the generated background image.

[0132] According to an embodiment of the present disclosure, a low-resolution background image and a first conversion resolution are input into an image generation model, and generating the background image includes: obtaining a first preset prompt word and a first preset model parameter; inputting the low-resolution background image, the first preset prompt word, the first preset model parameter and the first conversion resolution into the image generation model to generate the background image.

[0133] According to an embodiment of the present disclosure, the first preset prompt word may include a positive prompt word and a negative prompt word. The positive prompt word represents the content that the user hopes to include in the background image, and the negative prompt word represents the content that the user does not want to appear in the background image.

[0134] According to an embodiment of the present disclosure, a first preset prompt word can be determined based on an original image input by a user on a client, content that the user wishes to include in the expanded background image, and content that the user does not wish to include in the expanded background image. The first preset model parameters can also be determined based on parameters configured by the user on the client.

[0135] For example, a positive prompt word may be generated based on the original image input by the user on the client, and a negative prompt word may be generated based on the content input by the user on the client that the user does not want to appear in the expanded background image.

[0136] According to an embodiment of the present disclosure, a first preset prompt word is determined based on the original image input by the user on the client, the content that the user wants to include in the expanded background image, and the content that the user does not want to appear in the expanded background image, and a function of adding an input prompt word to the client interface is implemented, so that the user can input the prompt word on the client interface, and the prompt word intuitively represents the user's expansion needs, so that after the low-resolution background image, the first preset prompt word, the first preset model parameters and the first conversion resolution are input into the image generation model, the generated background image is more in line with the user's needs.

[0137] According to embodiments of the present disclosure, a program can also preset weights, and the preset weights, along with the low-resolution background image, the first preset prompt word, the first preset model parameters, and the first conversion resolution, can be simultaneously input into the image generation model to generate the background image. For example, the weight corresponding to the prompt word included in the content input by the user can be set to 0.6, and the weight of the prompt word generated based on the original image can be set to 0.4.

[0138] An aspect ratio of the first conversion resolution is the same as an aspect ratio of the target image, and the first conversion resolution is smaller than the target resolution.

[0139] According to an embodiment of the present disclosure, inputting the original image and pixel positions corresponding to the target area into an image generation model to obtain an initial background image includes: inputting the original image and a mask matrix into the image generation model to obtain an initial background image. The initial background image does not include the target element.

[0140] Figure 4(D) schematically illustrates an initial background image according to an embodiment of the present disclosure. Figure 4(E) schematically illustrates a background image according to an embodiment of the present disclosure. Figure 4(F) schematically illustrates a rearranged image according to an embodiment of the present disclosure.

[0141] After configuring the image generation model in the in-expansion generation mode and inputting the original image in Figure 4(A), the mask matrix corresponding to Figure 4(B), and the first preset parameters into the image generation model, the initial background image 402_1 in Figure 4(D) is obtained. In this in-expansion generation mode, the image generation model can generate in-expansion content based on the background area of ​​the original image. The image generation model can determine the target area 401_1 and the background area 402 from the original image based on the mask matrix, and generate the in-expansion content based on the background area 402, filling the target area 401_1 of the original image with the in-expansion content, resulting in the initial background image 402_1 in Figure 4(D).

[0142] After downsampling the initial background image 402_1 by a first preset multiple to obtain a low-resolution background image, and determining the first conversion resolution based on the width and height of the low-resolution background image and the target resolution, the generation model can be configured for outward expansion generation mode. The low-resolution background image, the first preset prompt word, the first preset model parameters, and the first conversion resolution are input into the image generation model to generate background image 402_2 in Figure 4(E). In outward expansion generation mode, the image generation model can generate outward expansion content based on the low-resolution background image, and then splice the outward expansion content with the low-resolution background image to obtain background image 402_2 at the first conversion resolution.

[0143] By concatenating background image 402_2 in Figure 4(E) and foreground image 401_2 in Figure 4(C), the rearranged image in Figure 4(F) can be obtained. The rearranged image in Figure 4(F) includes foreground image 401_2 and an adjusted background image 402_3 obtained by downsampling the background image in Figure 4(E). The image super-resolution model is then used to adjust the resolution of the rearranged image in Figure 4(F) to the target resolution, resulting in the target image.

[0144] According to an embodiment of the present disclosure, an original image and pixel positions corresponding to a target area are input into an image generation model to obtain an initial background image. This initial background image can have a resolution equal to the original resolution and does not include target elements. The initial background image is then downsampled by a first preset multiple to obtain a low-resolution background image. After determining a first conversion resolution based on the width and height of the low-resolution background image and the target resolution, the first conversion resolution is less than the target resolution due to the low resolution of the low-resolution background image. Subsequently, the low-resolution background image and the first conversion resolution are input into the image generation model to generate a background image having the first conversion resolution. This improves the efficiency of the image generation model in processing the low-resolution background image and allows for faster generation of the background image.

[0145] According to an embodiment of the present disclosure, determining the first conversion resolution according to the width and height of the low-resolution background image and the target resolution includes:

[0146] Determine a second width ratio between the target pixel width and the width of the low-resolution background image; determine a second height ratio between the target pixel height and the height of the low-resolution background image; when the second height ratio is greater than or equal to the second width ratio, determine the height of the low-resolution background image as the height of the first conversion resolution; determine the width of the first conversion resolution based on the ratio between the target pixel width and the target pixel height and the height of the first conversion resolution.

[0147] The ratio between the target pixel width and the width of the low-resolution background image can be used as the second width ratio. The ratio between the target pixel height and the height of the low-resolution background image can be used as the second height ratio. The width of the first conversion resolution can be obtained by multiplying the ratio between the target pixel width and the target pixel height by the height of the first conversion resolution.

[0148] For example, the second width ratio can be obtained according to formula (9), and the second height ratio can be obtained according to formula (10).

[0149] Among them, w o1 Represents the width of the low-resolution background image, h o1 Represents the height of the low-resolution background image.

[0150] For example, you can In the case of , the height of the first conversion resolution is determined according to formula (11), and the width of the first conversion resolution is determined according to formula (12). o2 =h o1 (11)

[0151] Among them, h o2 Characterizes the height of the first conversion resolution, w o2 Characterizes the width of the first conversion resolution.

[0152] According to an embodiment of the present disclosure, when the second height ratio is greater than or equal to the second width ratio, the height of the low-resolution background image is determined as the height of the first conversion resolution, and the width of the first conversion resolution is determined based on the ratio between the target pixel width and the target pixel height and the height of the first conversion resolution, so as to achieve a first conversion resolution with a lower resolution and the same aspect ratio as the target resolution, based on the height of the low-resolution background image.

[0153] According to an embodiment of the present disclosure, determining the first conversion resolution based on the width and height of the low-resolution background image and the target resolution also includes: determining the width of the low-resolution background image as the width of the first conversion resolution when the second height ratio is less than the second width ratio; and determining the height of the first conversion resolution based on the ratio between the target pixel height and the target pixel width and the width of the first conversion resolution.

[0154] According to an embodiment of the present disclosure, the height of the first conversion resolution may be obtained by multiplying the ratio between the target pixel height and the target pixel width by the width of the first conversion resolution.

[0155] For example, you can In the case of , the width of the first conversion resolution is determined according to formula (13), and the height of the first conversion resolution is determined according to formula (14). 02 =w 01 (13)

[0156] According to an embodiment of the present disclosure, when the second height ratio is smaller than the second width ratio, the width of the low-resolution background image is determined as the width of the first conversion resolution, and the height of the first conversion resolution is determined based on the ratio between the target pixel height and the target pixel width and the width of the first conversion resolution, so as to achieve a first conversion resolution with a lower resolution and the same aspect ratio as the target resolution, based on the width of the low-resolution background image.

[0157] According to an embodiment of the present disclosure, when the amount of data requiring regeneration of filler content is small, for example, when the aspect ratio is extended from 9:16 to 12:16, the image generation model can be used to directly perform background expansion on the original image.

[0158] According to an embodiment of the present disclosure, generating a target image based on an original image, an original resolution, and a target resolution includes: downsampling the original image by a second preset multiple to obtain a low-resolution image; determining a second conversion resolution based on the width and height of the low-resolution image and the target resolution; inputting the downsampled original image and the second conversion resolution into an image generation model to generate an intermediate conversion image, wherein the resolution of the intermediate conversion image is the second conversion resolution; and adjusting the resolution of the intermediate conversion image based on the target resolution and the intermediate conversion image to generate the target image.

[0159] According to an embodiment of the present disclosure, it is also possible to first determine the relationship between the difference value and a preset threshold, and then directly perform background filling on the original image to generate a target image.

[0160] For example, generating a target image based on an original image, an original resolution, and a target resolution may include, when a difference value is greater than or equal to a preset threshold, downsampling the original image by a second preset multiple to obtain a low-resolution image; determining a second conversion resolution based on the width and height of the low-resolution image and the target resolution; inputting the downsampled original image and the second conversion resolution into an image generation model to generate an intermediate conversion image, wherein the resolution of the intermediate conversion image is the second conversion resolution; and adjusting the resolution of the intermediate conversion image based on the target resolution and the intermediate conversion image to generate the target image. When the difference value is greater than or equal to the preset threshold, it indicates that the difference in aspect ratio between the original resolution and the target resolution of the original image is small, and less padding content needs to be regenerated.

[0161] The second preset magnification can be selected based on actual circumstances and is not limited herein. For example, the second preset magnification can be determined based on the user's desired generation speed and generation quality of the image generation model. The higher the desired generation speed, the larger the second preset magnification, but the lower the quality of the generated target image. The lower the desired generation speed, the smaller the second preset magnification, but the higher the quality of the generated target image.

[0162] The aspect ratio of the second conversion resolution may be the same as the aspect ratio of the target image, and the second conversion resolution may be smaller than the target resolution.

[0163] According to an embodiment of the present disclosure, the downsampled original image and the second conversion resolution are input into the image generation model to generate an intermediate conversion image, which includes: obtaining a second preset prompt word and a second preset model parameter; and inputting the downsampled original image, the second preset prompt word, the second preset model parameter and the second conversion resolution into the image generation model to generate an intermediate conversion image.

[0164] According to an embodiment of the present disclosure, the second preset prompt word may include a positive prompt word and a negative prompt word. The positive prompt word represents the content that the user hopes to include in the target image, and the negative prompt word represents the content that the user does not want to appear in the target image.

[0165] According to an embodiment of the present disclosure, the method for generating the second preset prompt word is similar to the method for generating the first preset prompt word, and can achieve the same effect. The method for generating the second preset model parameter is similar to the method for generating the first preset model parameter, and can achieve the same effect.

[0166] According to embodiments of the present disclosure, a program can also preset weights, and the preset weights, along with the downsampled original image, the second preset prompt word, the second preset model parameters, and the second conversion resolution, can be input into an image generation model to generate an intermediate conversion image. For example, the weight corresponding to the prompt word included in the user input content can be set to 0.6, while the weight of the prompt word generated based on the original image can be set to 0.4.

[0167] According to an embodiment of the present disclosure, the generation model can be first configured as an outward expansion generation mode, and then the downsampled original image, the second preset prompt word, the second preset model parameters, and the second conversion resolution are input into the image generation model. The generation model can use the downsampled original image as a reference to generate outward expansion content, and splice the outward expansion content with the downsampled original image to obtain an intermediate conversion image of the second conversion resolution size.

[0168] The number of intermediate conversion images can be one or two or more. If the number of intermediate conversion images is two or more, multiple intermediate conversion images can be displayed on the client. In response to the client's selection, the client-selected intermediate conversion image is obtained. Subsequent splicing and resolution adjustment are then performed on the client-selected intermediate conversion images, enabling deeper user interaction and avoiding prolonged user wait times during target image generation, which can negatively impact the user experience. Therefore, this interactive design can further improve user satisfaction.

[0169] According to an embodiment of the present disclosure, the target resolution and the intermediate conversion image may be input into an image super-resolution model, and the image super-resolution model may be used to adjust the resolution of the intermediate conversion image to the target resolution to obtain the target image.

[0170] According to an embodiment of the present disclosure, an image super-resolution model is used to adjust the resolution of the intermediate conversion image to the target resolution to obtain a target image. This can simply and quickly obtain a super-resolution target image that is closer to the original image and has higher contrast and clarity.

[0171] According to an embodiment of the present disclosure, when the difference value is greater than or equal to a preset threshold, it indicates that less filler content needs to be regenerated when expanding the original image to the target resolution. Therefore, the original image can be directly downsampled by a second preset multiple based on the original image to obtain a low-resolution image, and the second conversion resolution can be determined based on the width and height of the low-resolution image and the target resolution. Since the resolution of the low-resolution image is low, the second conversion resolution is smaller than the target resolution. In the process of subsequently inputting the downsampled original image and the second conversion resolution into the image generation model to generate an intermediate conversion image with a resolution of the second conversion resolution, the efficiency of the image generation model in processing low-resolution images can be improved, and the intermediate conversion image can be generated more quickly. Then, based on the target resolution and the intermediate conversion image, the resolution of the intermediate conversion image is adjusted to generate a target image with a resolution of the target resolution, thereby obtaining a target image with higher contrast and clarity.

[0172] According to an embodiment of the present disclosure, determining the second conversion resolution based on the width and height of the low-resolution image and the target resolution includes: determining a third width ratio between the target pixel width and the width of the low-resolution image; determining a third height ratio between the target pixel height and the height of the low-resolution image; when the third height ratio is greater than or equal to the third width ratio, determining the height of the low-resolution image as the height of the second conversion resolution; and determining the width of the second conversion resolution based on the ratio between the target pixel width and the target pixel height and the height of the second conversion resolution.

[0173] According to an embodiment of the present disclosure, the target pixel width may be divided by the width of the low-resolution image to obtain a third width ratio. The target pixel height may be divided by the height of the low-resolution image to obtain a third height ratio. The ratio between the target pixel width and the target pixel height may be multiplied by the height of the second conversion resolution to obtain the width of the second conversion resolution.

[0174] For example, the third width ratio can be obtained according to formula (15), and the third height ratio can be obtained according to formula (16).

[0175] Among them, w o3 Characterizes the width of the low-resolution image, h o3 Represents the height of the low-resolution image.

[0176] For example, you can In the case of , the height of the second conversion resolution is determined according to formula (17), and the width of the second conversion resolution is determined according to formula (18). o4 =h o3 (17)

[0177] Among them, h o4 Characterizes the height of the second conversion resolution, w o4 Characterizes the width of the second conversion resolution.

[0178] According to an embodiment of the present disclosure, when the third height ratio is greater than or equal to the third width ratio, the height of the low-resolution image is determined as the height of the second conversion resolution, and the width of the second conversion resolution is determined based on the ratio between the target pixel width and the target pixel height and the height of the second conversion resolution, so as to achieve a second conversion resolution with a lower resolution and the same aspect ratio as the target resolution, based on the height of the low-resolution image.

[0179] According to an embodiment of the present disclosure, determining the second conversion resolution according to the width and height of the low-resolution image and the target resolution further includes, when the third height ratio is less than the third width ratio:

[0180] The width of the low-resolution image is determined as the width of the second conversion resolution; and the height of the second conversion resolution is determined according to a ratio between the target pixel height and the target pixel width and the width of the second conversion resolution.

[0181] According to an embodiment of the present disclosure, the ratio between the target pixel height and the target pixel width may be multiplied by the width of the second conversion resolution to obtain the height of the second conversion resolution.

[0182] For example, you can In the case of , the width of the second conversion resolution is determined according to formula (19), and the height of the second conversion resolution is determined according to formula (20). 04 =w 03 (19)

[0183] According to an embodiment of the present disclosure, when the third height ratio is smaller than the third width ratio, the width of the low-resolution image is determined as the width of the second conversion resolution, and the height of the second conversion resolution is determined based on the ratio between the target pixel height and the target pixel width and the width of the second conversion resolution, so as to achieve a second conversion resolution with a lower resolution and the same aspect ratio as the target resolution, based on the width of the low-resolution image.

[0184] Figure 5(A) schematically illustrates a display device according to an embodiment of the present disclosure. Figure 5(B) schematically illustrates a display device according to an embodiment of the present disclosure directly displaying an original image. Figure 5(C) schematically illustrates a display device displaying a target image after obtaining the target image according to the image display method provided in an embodiment of the present disclosure, when a difference value is greater than or equal to a preset threshold.

[0185] As shown in FIG5(A), the display device includes a display screen 501, a display screen 502, a display screen 503, and a display screen 504. Display screen 502 is located on the right side of display screen 501 and above display screen 504, and display screen 503 is located on the bottom side of display screen 501 and on the left side of display screen 504.

[0186] As shown in FIG5(B), when the original image is directly displayed on the display device shown in FIG5(A), the original image is displayed in the middle area of ​​the display device, and black edges are displayed in display areas 505 and 506 of the display device, resulting in a poor visual experience.

[0187] As shown in FIG5(C), when the difference value is greater than or equal to the preset threshold, the original image in FIG5(B) is processed according to the image display method provided in the embodiment of the present disclosure to obtain the target image. The target image can then be displayed full-screen on the display device shown in FIG5(A), eliminating the black edge display effect while improving the contrast and clarity of the display, thereby achieving the best display effect. Furthermore, as can be seen from FIG5(C), when the difference value is greater than or equal to the preset threshold, in the process of obtaining the target image according to the image display method provided in the embodiment of the present disclosure, the image display method provided in the embodiment of the present disclosure expands the target images displayed on display screen 501 and displayed on display screen 502.

[0188] Figure 6(A) schematically illustrates a display device displaying a target image after obtaining the target image according to the image display method provided in accordance with an embodiment of the present disclosure, when the difference value is greater than or equal to a preset threshold. Figure 6(B) schematically illustrates a partially enlarged original image and target image according to an embodiment of the present disclosure.

[0189] As shown in Figure 6(A), when the difference value is greater than or equal to a preset threshold, after obtaining the target image according to the image display method provided by the embodiment of the present disclosure, the target image can be displayed full-screen on the display device, eliminating the black edge display effect. After partially zooming in on the target image displayed in display area 601 in Figure 6(A), image 601_2 is obtained as shown in Figure 6(B). After partially zooming in on the portion of the original image corresponding to the target image displayed in display area 601, image 601_1 is obtained as shown in Figure 6(B).

[0190] Since the target image displayed in the display area 601 in Figure 6(A) is obtained by super-resolution enhancement through the image super-resolution model, according to the images 601_1 and 601_2 shown in Figure 6(B), the contrast and clarity of image 601_2 are both higher than those of image 601_1, indicating that after processing the original image using the image display method provided by the embodiment of the present disclosure, a target image with higher contrast and clarity can be obtained, which can bring a better visual experience to the user.

[0191] Figure 7(A) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure. Figure 7(B) schematically shows a schematic diagram of a target image obtained by the image display method provided by the embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold. Figure 7(C) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure. Figure 7(D) schematically shows a schematic diagram of a target image obtained by the image display method provided by the embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold. Figure 7(E) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure. Figure 7(F) schematically shows a schematic diagram of a target image obtained by the image display method provided by the embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold. Figure 7(G) schematically shows a schematic diagram of an original image according to an embodiment of the present disclosure. Figure 7(H) schematically shows a schematic diagram of a target image obtained by the image display method provided by the embodiment of the present disclosure when the difference value is greater than or equal to a preset threshold.

[0192] According to an embodiment of the present disclosure, when the difference value is greater than or equal to a preset threshold, the original image in Figure 7(A) can be processed according to the image display method provided in an embodiment of the present disclosure to obtain the target image in Figure 7(B). As shown in Figure 7(B), the image display method provided in an embodiment of the present disclosure primarily performs background filling on the portion of the target image corresponding to display area 701 and display area 702 of the display device.

[0193] According to an embodiment of the present disclosure, if the difference value is greater than or equal to a preset threshold, the original image in Figure 7(C) can be processed according to the image display method provided in an embodiment of the present disclosure to obtain the target image in Figure 7(D). As shown in Figure 7(D), the image display method provided in an embodiment of the present disclosure primarily performs background filling on the portion of the target image corresponding to display area 703 and display area 704 of the display device.

[0194] According to an embodiment of the present disclosure, if the difference value is greater than or equal to a preset threshold, the original image in Figure 7(E) can be processed according to the image display method provided in an embodiment of the present disclosure to obtain the target image in Figure 7(F). As shown in Figure 7(F), the image display method provided in an embodiment of the present disclosure primarily performs background filling on the portion of the target image corresponding to display area 705 and display area 706 of the display device.

[0195] According to an embodiment of the present disclosure, if the difference value is greater than or equal to a preset threshold, the original image in Figure 7(G) can be processed according to the image display method provided in an embodiment of the present disclosure to obtain the target image in Figure 7(H). As shown in Figure 7(H), the image display method provided in an embodiment of the present disclosure primarily performs background filling on the portion of the target image corresponding to display areas 707 and 708 of the display device.

[0196] According to Figures 7(A) to (H), for different application scenarios, the original image content is different, and the original resolution of the original image is different from the aspect ratio of the target resolution. However, when the difference values ​​corresponding to each original image are greater than or equal to the preset threshold, the image display method provided by the embodiment of the present disclosure can obtain a target image with high contrast and clarity after processing the original image, indicating that the image display method provided by the embodiment of the present disclosure has high applicability and practicality.

[0197] According to an embodiment of the present disclosure, the image display method shown in FIG3 may further include the following operations:

[0198] According to the original image and configuration parameters related to the generation effect and generation speed of the image generation model from the client, the first preset model parameters, the first preset multiple, the first preset prompt word, the second preset model parameters, the second preset multiple and the second preset prompt word are determined.

[0199] According to an embodiment of the present disclosure, the configuration parameters may include at least one of the following:

[0200] Generation style, generation speed, generation creativity, generated content text description, target resolution;

[0201] The first preset model parameter and the second preset model parameter each include at least one of the following:

[0202] The number of expanded pixels, mask blur level, image extension direction, attenuation index, color change parameters, sampling method, sampling step size, denoising strength and the degree of relevance of the prompt word.

[0203] According to an embodiment of the present disclosure, in addition to the target resolution, the configuration parameters may also include, when the display device includes at least one display screen, the single-screen resolution, the number of horizontal devices, and the number of vertical devices. The number of horizontal devices represents the number of display screens arranged horizontally in the display device, and the number of vertical devices represents the number of display screens arranged vertically in the display device.

[0204] According to an embodiment of the present disclosure, when the display device includes one display screen, the number of expanded pixels is equal to the target resolution. When the display device includes at least two display screens, the number of expanded pixels is equal to the number of horizontal devices multiplied by the number of vertical devices times the single-screen resolution.

[0205] The image stretch direction can be determined based on the number of horizontal and vertical devices configured by the user. For example, if the number of horizontal devices is greater than or equal to 2, the image stretch direction can be determined to include horizontal stretching, while if the number of vertical devices is greater than or equal to 2, the image stretch direction can be determined to include vertical stretching. The image stretch direction can also be determined based on the original resolution and target resolution of the original image, where the image stretch direction includes horizontal stretching and vertical stretching.

[0206] The smaller the value of the attenuation index, the richer the generated target image. The color variation degree parameter represents the parameter for adjusting the degree of color variation. The larger the value of the color variation degree parameter, the richer the degree of variation. The more sampling steps are set, the higher the quality of the generated target image will be, but the slower the generation speed will be. The sampling step can be determined based on the generation speed and generation creativity configured by the user. The denoising strength represents the degree of influence of the original image on the target image. The smaller the value of the denoising strength, the greater the influence. The higher the value of the prompt word relevance degree, the more relevant the content in the generated target image is to the prompt word, and the lower the creativity of the generated target image. The prompt word relevance degree can be determined based on the generation creativity configured by the user.

[0207] In the first preset model parameters and the second preset model parameters, parameters such as the number of expanded pixels, image extension direction, sampling step, and prompt word relevance are determined by user configuration parameters, and other parameters can be preset by the system.

[0208] For commonly used scenes, such as landscapes, people, and architecture, multiple representative original images can be selected for each scene and model parameter tests can be performed separately. This allows the selection of system preset configurations in addition to the parameters configured by the user through the interactive interface. Ultimately, each application scenario corresponds to a corresponding configuration parameter file. When the user selects a style corresponding to a specific application scenario through the client, the corresponding model configuration parameters are loaded and input into the model.

[0209] According to an embodiment of the present disclosure, the first preset prompt word and the second preset prompt word both include a positive prompt word and a negative prompt word.

[0210] According to an embodiment of the present disclosure, a method for generating a positive prompt word includes:

[0211] 1) Input the original image into the CLIP model (Contrastive Language-Image Pre-Training, a multimodal model based on contrastive learning) to identify the text description of the original image, i.e., converting the image into text. For example, if the input contains an original image of a dog, the CLIP model may output "A photo of a dog."

[0212] 2) Based on the user-configured generation style, for example, a commonly used poster background image generation style, obtain pre-set positive prompt words. For example, if three styles are preset: "Landscape, People, Architecture," the corresponding prompt words for each style might be: Landscape: "Best quality, Ultra high res, Poster, Projected inset, Gradient, Gradient background, Oekaki, Vector trace, Masterpiece, Illustration, Widescreen"; People: "Best quality, Ultra high res, (Photorealistic: 1.4), Photo_\(Medium\), Realistic, 8K UHD, DSLR, Soft lighting, High quality, Film grain"; Architecture: "Dynamic posture, 8K UHD, DSLR, Soft lighting, High quality, Film grain," and so on.

[0213] 3) The image text description prompts generated by CLIP in 1) and the general style description prompts in 2) are combined as positive prompts for the model. The model then expands the context of the image content and style based on the positive prompts to maintain consistency with the content and style of the original image.

[0214] According to an embodiment of the present disclosure, a method for generating reverse prompt words includes: obtaining preset reverse prompt words corresponding to content to be avoided in a target image based on a user-configured text description of generated content. For example, for content such as undesirable text or watermarks, the preset reverse prompt words may include: "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, JPEG artifacts, signature, watermark, username, blurry, parody."

[0215] FIG8 schematically shows a system architecture diagram of an image display method according to an embodiment of the present disclosure.

[0216] As shown in Figure 8, the messaging system 810 includes a business server 811 and an AI server 812. The business server 811 and the AI ​​server 812 in the messaging system 810 can replace the server 205 in Figure 2 to be applied to the application scenario in Figure 2.

[0217] The service server 811 includes modules for program production management, program review, broadcast plan management and production, data statistics and dashboards, device management, and system user management. In response to client programming operations, the service server 811 programs original or target images, such as posters and advertisements, and then sends them to the sender box.

[0218] The AI ​​server 812 includes a material management module and an intelligent image processing module. The material management unit is used to store the original image uploaded by the client and the target image generated according to the image display method provided in the embodiment of the present disclosure. The intelligent image processing module is used to implement the image display method provided in the embodiment of the present disclosure. Among them, the intelligent image processing module includes a prompt word generation unit, a model parameter generation unit, a filling method selection unit and a model processing unit. The model processing unit includes an image segmentation model, an image generation model and an image super-resolution model. The image segmentation model is used to segment the original image and generate a foreground image. The image generation model is used to perform image expansion generation on the original image input by the client. The image super-resolution model is used to further improve the display quality of the image generated by the image generation model, increase the image resolution, etc.

[0219] For example, a user can use a messaging box to send a pre-made original image to the material management module in AI server 812. The material management module has no restrictions on the resolution and aspect ratio of the original image. In response to the user's request to process the original poster image, AI server 812 can display the functional interface generated by the AI ​​image on the client.

[0220] FIG9 schematically shows a schematic diagram of a functional interface for AI image generation according to an embodiment of the present disclosure.

[0221] As shown in Figure 9, the AI ​​image generation function interface includes a selection box AI image generation 901. In response to a user clicking on the selection box AI image generation 901, the client displays the original images that the user has entered into the material management module. In response to a user clicking on any original image, the original image is determined as the original image to be processed by the image display method provided in the embodiments of the present disclosure. At the same time, the AI ​​server 812 generates an image smart fill function interface and sends the image smart fill function interface to the client via a message box for display.

[0222] FIG10 schematically shows a schematic diagram of an image smart fill function interface according to an embodiment of the present disclosure.

[0223] As shown in Figure 10, the original image selected by the user is displayed in the image smart fill function interface. At the same time, the user can configure the parameters generation style 1001, generation speed 1002, generation creativity 1003, single screen resolution 1004, number of horizontal devices 1005 and number of vertical devices 1006 in the image smart fill interface.

[0224] For example, in Figure 10, the generation style 1001 can be selected from posters, milk tea, coconut trees or sea, the generation speed 1002 can be selected from low, medium or high, the generation creativity 1003 can be selected from low, medium or high, the single screen resolution 1004 can be set to width 960px and width 540px, the number of horizontal devices 1005 can be set to 2 and the number of vertical devices 1006 can be set to 2.

[0225] According to an embodiment of the present disclosure, the generation style 1001 for configuration may be determined as a positive prompt word.

[0226] In the case of a single-screen display device, the horizontal device number 1005 and the vertical device number 1006 default to 1.

[0227] According to an embodiment of the present disclosure, when configuring the generation speed 1002, the lower the generation speed 1002, the higher the quality and the richer the details of the target image generated by the model, while the higher the generation speed 1002, the lower the quality and the coarser the details of the generated image. When configuring the generation creativity 1003, the lower the generation creativity 1003, the simpler the background content generated by the model, while the higher the generation creativity 1003, the richer the background content generated by the model. When configuring the generation style 1001, a generation style preset in the information distribution system 810 can be selected, such as posters, landscapes, characters, etc.

[0228] According to an embodiment of the present disclosure, FIG10 may also include parameters for generating a text description of the content, so that the AI ​​server can determine the content that the user wants to appear and the content that the user does not want to appear in the target image based on the generated text description of the content, and determine the positive prompt words and the reverse prompt words based on the generated text description of the content.

[0229] In response to the operation generated by the user clicking the button, the client sends the user configuration parameters to the AI ​​server 812 through the message box. Then, the AI ​​server 812 processes the original image based on the original image and the configuration parameters related to the generation effect and generation speed of the image generation model from the client, according to the image display method provided in the embodiment of the present disclosure, to obtain the target image.

[0230] FIG11 schematically shows a flow chart of an image display method according to another embodiment of the present disclosure.

[0231] In Figure 11, the material management module 1110 sends the stored original image from the client to the intelligent image processing module 1120. The intelligent image processing module 1120 includes a prompt word generation unit 1121, a model parameter generation unit 1122, a filling method selection unit 1123, an image generation model 1124, an image segmentation model 1125, and an image super-resolution model 1126. Based on the original image, the prompt word generation unit 1121 determines a positive prompt word from among the first and second preset prompt words.

[0232] The intelligent image processing module 1120 receives configuration parameters 1130 related to the generation effect and generation speed of the image generation model from the client. The intelligent image processing module 1120 determines the positive prompt words and the negative prompt words, the first preset multiples and the second preset multiples in the first preset prompt words and the second preset prompt words according to the configuration parameters 1130, and sends the positive prompt words and the negative prompt words, the first preset multiples and the second preset multiples in the first preset prompt words and the second preset prompt words to the image generation model 1124.

[0233] The model parameter generation unit 1122 determines first preset model parameters and second preset model parameters according to the configuration parameters 1130 , and sends the first preset model parameters and the second preset model parameters to the image generation model 1124 .

[0234] The filling method selection unit 1123 obtains the original resolution and the target resolution according to the configuration parameters 1130, and determines the difference value according to the original resolution and the target resolution. When the difference value is greater than or equal to the preset threshold, it determines to use the image generation model 1124 to directly expand the original image, and then uses the image super-resolution model 1126 to adjust the resolution of the image expanded by the image generation model 1124 to generate the target image, and stores the target image in the material management module 1110.

[0235] When the difference value is less than a preset threshold, the filling method selection unit 1123 determines to first use the image segmentation model 1125 to segment the original image to obtain a foreground image, and uses the image generation model 1124 to expand the background in the original image to obtain a background image. The intelligent image processing module 1120 splices the background image and the foreground image to obtain a rearranged image, and then uses the image super-resolution model 1126 to adjust the resolution of the rearranged image to generate a target image, and stores the target image in the material management module 1110.

[0236] As shown in Figures 8 to 11, the image display method provided by the embodiments of the present disclosure can obtain a difference value representing the difference in aspect ratio between the original resolution and the target resolution after determining a difference value based on the original resolution and the target resolution. Then, when the difference value takes different values, different strategies are used to expand the original image to the target resolution. When the target image is sent to a display device, the display device can display the target image in full screen without stretching, distortion, or unclear display issues, thereby providing a better visual experience for the user.

[0237] FIG12 schematically shows a flow chart of an image display method according to yet another embodiment of the present disclosure.

[0238] According to an embodiment of the present disclosure, the specific implementation method of each module and each unit in FIG11 can be seen in FIG12 .

[0239] As shown in FIG. 12 , the image display method in this embodiment includes operations S1210 to S1270 , wherein operation S1250 includes sub-operations S1251 to S1257 , and operation S1260 includes sub-operations S1261 to S1264 .

[0240] In operation S1210, an original image and configuration parameters related to a generation effect and a generation speed of an image generation model are acquired from a client.

[0241] Then, based on the original image and the configuration parameters related to the generation effect and generation speed of the image generation model from the client, in operation S1220, the original resolution of the original image and the target resolution of the display device are obtained, and in operation S1270, the first preset model parameters, the first preset magnification, the first preset prompt word, the second preset model parameters, the second preset magnification, and the second preset prompt word are determined.

[0242] In operation S1230, a difference value is determined according to the original resolution and the target resolution.

[0243] In operation S1240, it is determined whether the difference value is less than a preset threshold.

[0244] If so, execute operation S1250; if not, execute operation S1260.

[0245] When operation S1250 is performed, in sub-operation S1251, a foreground image is generated based on the target area and the original image.

[0246] In sub-operation S1252, the original image, the pixel positions corresponding to the target area, and the first preset model parameters are input into the image generation model to obtain an initial background image.

[0247] In sub-operation S1253, the initial background image is down-sampled by a first preset multiple to obtain a low-resolution background image.

[0248] In sub-operation S1254, a first conversion resolution is determined according to the width and height of the low-resolution background image and the target resolution.

[0249] In sub-operation S1255, the low-resolution background image, the first preset prompt word, the first preset model parameter, and the first conversion resolution are input into the image generation model to generate the background image.

[0250] In sub-operation S1256, the background image and the foreground image are spliced ​​to obtain a rearranged image.

[0251] In sub-operation S1257, the resolution of the rearranged image is adjusted according to the target resolution and the rearranged image to generate the target image.

[0252] When operation S1260 is performed, in sub-operation S1261 , the original image is down-sampled by a second preset multiple to obtain a low-resolution image.

[0253] In sub-operation S1262, a second conversion resolution is determined according to the width and height of the low-resolution image and the target resolution.

[0254] In sub-operation S1263, the downsampled original image, the second preset prompt word, the second preset model parameter, and the second conversion resolution are input into the image generation model to generate an intermediate conversion image.

[0255] In sub-operation S1264, the resolution of the intermediate conversion image is adjusted according to the target resolution and the intermediate conversion image to generate the target image.

[0256] As shown in Figure 12, the image display method provided by the embodiments of the present disclosure can obtain a difference value representing the difference in aspect ratio between the original resolution and the target resolution after determining a difference value based on the original resolution and the target resolution. Depending on the difference value, different strategies are then employed to scale the original image to the target resolution. This allows the display device to display the target image full-screen without distortion or unclear display issues when the target image is sent to the display device, thereby providing a better visual experience for the user.

[0257] According to the embodiments of the present disclosure, as can be seen from Figure 12, the difference value between the original resolution and the target resolution reflects different product requirements, that is, when the difference value is greater than or equal to the preset threshold, the product requirement is to directly expand the background of the original image; when the difference value is less than the preset threshold, the product requirement is to expand the background image and then rearrange the content of the expanded background image and foreground image.

[0258] Based on the above image display method, the present disclosure further provides an image display device, which will be described in detail below with reference to FIG13 .

[0259] FIG13 schematically shows a structural block diagram of an image display device according to an embodiment of the present disclosure.

[0260] As shown in FIG. 13 , the image display device 1300 includes an acquisition module 1310 , a generation module 1320 , and a display module 1330 .

[0261] The acquisition module 1310 is configured to acquire the original resolution of the original image and the target resolution of the display device. In one embodiment, the acquisition module 1310 may be configured to execute the operation S310 described above, which will not be described in detail herein.

[0262] The generating module 1320 is configured to generate a target image according to the original image, the original resolution, and the target resolution. In one embodiment, the generating module 1320 may be configured to perform the operation S320 described above, which will not be described in detail herein.

[0263] The display module 1330 is configured to send the target image to the display device so that the display device displays the target image. In one embodiment, the display module 1330 may be configured to perform the operation S330 described above, which will not be described in detail herein.

[0264] According to an embodiment of the present disclosure, any multiple modules in the acquisition module 1310, the generation module 1320, and the display module 1330 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 1310, the generation module 1320, and the display module 1330 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable method of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the acquisition module 1310, the generation module 1320, and the display module 1330 can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is executed.

[0265] FIG14 schematically shows a block diagram of an electronic device suitable for implementing an image display method according to an embodiment of the present disclosure.

[0266] As shown in Figure 14, the electronic device 1400 according to an embodiment of the present disclosure includes a processor 1401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage portion 1408 into a random access memory (RAM) 1403. The processor 1401 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1401 may also include an onboard memory for caching purposes. The processor 1401 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0267] Various programs and data required for the operation of the electronic device 1400 are stored in the RAM 1403. The processor 1401, the ROM 1402, and the RAM 1403 are connected to each other via a bus 1404. The processor 1401 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 1402 and / or the RAM 1403. It should be noted that the programs may also be stored in one or more memories other than the ROM 1402 and the RAM 1403. The processor 1401 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0268] According to an embodiment of the present disclosure, electronic device 1400 may further include an input / output (I / O) interface 1405, which is also connected to bus 1404. Electronic device 1400 may also include one or more of the following components connected to I / O interface 1405: an input section 1406 including a keyboard, mouse, etc.; an output section 1407 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 1408 including a hard disk; and a communication section 1409 including a network interface card such as a LAN card or modem. Communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to I / O interface 1405 as needed. Removable media 1411, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 1410 as needed, so that computer programs read from the removable media can be installed into storage section 1408 as needed.

[0269] The present disclosure also provides a non-transitory computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0270] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as but not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1402 and / or RAM 1403 described above and / or one or more memories other than ROM 1402 and RAM 1403.

[0271] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the image display method provided by the embodiments of the present disclosure.

[0272] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 1401 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0273] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 1409, and / or installed from removable media 1411. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0274] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1409 and / or installed from the removable medium 1411. When the computer program is executed by the processor 1401, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0275] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0276] FIG15 schematically shows a schematic diagram of an image display device according to an embodiment of the present disclosure.

[0277] As shown in Figure 15, the image display device 1500 includes an electronic device 1501 and a display apparatus 1502. The display apparatus 1502 is configured to acquire a target image from the electronic device 1501 and display the target image.

[0278] In Figure 15, electronic device 1501 and display device 1502 communicate via network 1503. Network 1503 is a medium for providing a communication link between electronic device 1501 and display device 1502. Network 1503 can include various connection types, such as wired or wireless communication links or fiber optic cables.

[0279] According to an embodiment of the present disclosure, electronic device 1501 may be electronic device 1400 in FIG14 . Display device 1502 may include at least one display screen. For example, display device 1502 may be a single display screen or a display screen composed of four single display screens of the same resolution.

[0280] It should be noted that the original images involved in Figures 1 to 15 are all from public libraries and are free public resources.

[0281] 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 above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from 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 or flowchart, and the combination of boxes in the block diagram 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.

[0282] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.

[0283] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. An image display method, comprising: Obtaining the original resolution of the original image and the target resolution of the display device; Generating a target image according to the original image, the original resolution, and the target resolution; And Sending the target image to the display device so that the display device displays the target image.

2. The method according to claim 1, wherein The original resolution includes an original pixel width and an original pixel height, and the target resolution includes a target pixel width and a target pixel height; The generating a target image according to the original image, the original resolution, and the target resolution includes: Determining a first height ratio between the target pixel height and the original pixel height; Determining a first width ratio between the target pixel width and the original pixel width; Determining a coincidence resolution according to the first height ratio, the first width ratio, the original resolution, and the target resolution; Determining a difference value according to the ratio between the coincidence resolution and the target resolution; Generating the target image according to the difference value, the original image, and the target resolution.

3. The method according to claim 2, wherein, The determining a coincidence resolution according to the first height ratio, the first width ratio, the original resolution, and the target resolution includes, when the first height ratio is less than or equal to the first width ratio: Determining the target pixel height as the height of the coincidence resolution; Determining the width of the coincidence resolution according to the height of the coincidence resolution, the original pixel height, and the original pixel width.

4. The method according to claim 2 or 3, wherein, The determining a coincidence resolution according to the first height ratio, the first width ratio, the original resolution, and the target resolution further includes, when the first height ratio is greater than the first width ratio: Determining the target pixel width as the width of the coincidence resolution; and Determining the height of the coincidence resolution according to the width of the coincidence resolution, the original pixel width, and the original pixel height.

5. The method according to claim 2 or 3, wherein The generating the target image according to the difference value, the original image, and the target resolution includes, when the difference value is less than a preset threshold: Determining a target area in the original image, where the target area includes target elements; Generating a foreground image according to the target area and the original image; Generating a background image according to the target area, the original image, and the target resolution; Stitching the background image and the foreground image to obtain a rearranged image; Adjusting the resolution of the rearranged image according to the target resolution and the rearranged image to generate the target image.

6. The method according to claim 5, wherein The generating a background image according to the target area, the original image, and the target resolution includes: Inputting the original image and the pixel positions corresponding to the target area into an image generation model to obtain an initial background image, where the resolution of the initial background image is equal to the original resolution; Performing downsampling of a first preset multiple on the initial background image to obtain a low-resolution background image; Determine a first conversion resolution according to the width and height of the low-resolution background image and the target resolution; Input the low-resolution background image and the first conversion resolution into the image generation model to generate the background image, where the resolution of the background image is the first conversion resolution.

7. The method according to claim 6, wherein The determining the first conversion resolution according to the width and height of the low-resolution background image and the target resolution includes: Determine a second width ratio between the target pixel width and the width of the low-resolution background image; Determine a second height ratio between the target pixel height and the height of the low-resolution background image; When the second height ratio is greater than or equal to the second width ratio, determine the height of the low-resolution background image as the height of the first conversion resolution; Determine the width of the first conversion resolution according to the ratio between the target pixel width and the target pixel height and the height of the first conversion resolution.

8. The method according to claim 7, wherein The determining the first conversion resolution according to the width and height of the low-resolution background image and the target resolution further includes: When the second height ratio is less than the second width ratio, determine the width of the low-resolution background image as the width of the first conversion resolution; Determine the height of the first conversion resolution according to the ratio between the target pixel height and the target pixel width and the width of the first conversion resolution.

9. The method according to claim 1, wherein, The generating the target image according to the original image, the original resolution and the target resolution includes: Perform downsampling on the original image by a second preset multiple to obtain a low-resolution image; Determine a second conversion resolution according to the width and height of the low-resolution image and the target resolution; Input the downsampled original image and the second conversion resolution into the image generation model to generate an intermediate conversion image, where the resolution of the intermediate conversion image is the second conversion resolution; Adjust the resolution of the intermediate conversion image according to the target resolution and the intermediate conversion image to generate the target image.

10. The method according to claim 9, wherein, The determining the second conversion resolution according to the width and height of the low-resolution image and the target resolution includes: Determine a third width ratio between the target pixel width and the width of the low-resolution image; Determine a third height ratio between the target pixel height and the height of the low-resolution image; When the third height ratio is greater than or equal to the third width ratio, determine the height of the low-resolution image as the height of the second conversion resolution; and Determine the width of the second conversion resolution according to the ratio between the target pixel width and the target pixel height and the height of the second conversion resolution.

11. The method according to claim 10, wherein, The determining the second conversion resolution according to the width and height of the low-resolution image and the target resolution further includes when the third height ratio is less than the third width ratio: Determine the width of the low-resolution image as the width of the second conversion resolution; Determine the height of the second conversion resolution based on the ratio between the target pixel height and the target pixel width, and the width of the second conversion resolution.

12. The method according to claim 6, wherein, The generating of the background image by inputting the low-resolution background image and the first conversion resolution into the image generation model includes: Obtain a first preset prompt and first preset model parameters; Input the low-resolution background image, the first preset prompt, the first preset model parameters, and the first conversion resolution into the image generation model to generate the background image.

13. The method according to claim 9, wherein, The generating of the intermediate conversion image by inputting the downsampled original image and the second conversion resolution into the image generation model includes: Obtain a second preset prompt and second preset model parameters; Input the downsampled original image, the second preset prompt, the second preset model parameters, and the second conversion resolution into the image generation model to generate the intermediate conversion image.

14. The method according to claim 5, wherein, The generating of the foreground image according to the target area and the original image includes: Input the original image and the pixel positions corresponding to the target area into an image segmentation model to generate the foreground image.

15. The method according to any one of claims 6 to 8, 10 to 14, wherein, Further includes: Determine the first preset model parameters, the first preset multiple, the first preset prompt, the second preset model parameters, the second preset multiple, and the second preset prompt according to the original image and configuration parameters related to the generation effect and generation speed of the image generation model from the client.

16. The method according to claim 15, wherein, The configuration parameters include at least one of the following: Generation style, generation speed, generation creativity, generated content text description, the target resolution; Both the first preset model parameters and the second preset model parameters include at least one of the following: Number of expanded pixels, mask blur degree, image extension direction, attenuation exponent, color change degree parameter, sampling method, sampling step, denoising intensity, and prompt word correlation degree.

17. An image display device, comprising: An acquisition module for acquiring the original resolution of the original image and the target resolution of the display device; A generation module for generating a target image according to the original image, the original resolution, and the target resolution; And A display module for sending the target image to the display device so that the display device displays the target image.

18. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 16.

19. An image display device, comprising: The electronic device according to claim 18; And A display device for acquiring the target image from the electronic device and displaying the target image.

20. A computer-readable storage medium, having executable instructions stored thereon, which when executed by a processor cause the processor to execute the method according to any one of claims 1 to 16.

21. A computer program product, comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Image processing method, device and apparatus

    CN113989113A

  • Image resolution ratio adjusting method and device, storage medium and electronic equipment

    CN114494000A

  • Image processing method and device, computer readable storage medium and smart television

    CN114697533A

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

    CN116884004A

  • Forward and backward image resizing method

    US20110129164A1