Image processing method, apparatus, and device, computer readable storage medium, and product
By providing dimension adjustment controls and description information determination controls in the image processing page, users can customize target size and description information, solving the problem of single operation of existing image expansion methods, realizing personalized processing of image expansion, and improving user experience.
Patent Information
- Application Number
- PCT/CN2024/133542
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-23
- Filing Date
- 2024-11-21
- Publication Date
- 2025-05-30
AI Technical Summary
The existing image expansion method has a relatively single image processing effect and cannot meet the personalized needs of users.
By setting up image processing controls associated with images to be processed in the content display page, the user can trigger an operation to display an image processing page, the page contains dimension adjustment controls and description information determination controls, and the user can customize the target size and target description information for image expansion.
The personalized processing of image expansion is realized, and users can flexibly adjust image size and description information according to actual needs, thereby generating target images that are more in line with user needs and improving user experience.
Smart Images

Figure CN2024133542_30052025_PF_FP_ABST
Abstract
Description
Image processing method, device, equipment, computer-readable storage medium and product
[0001] This application claims priority to Chinese Patent Application No. 202311576691.5 filed on November 23, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The embodiments of the present disclosure relate to an image processing method, apparatus, device, computer-readable storage medium, and product. Background Art
[0003] Users can capture images on their devices or generate them over the network. To make the images more personalized, users can also expand them to get larger images and improve image quality.
[0004] However, the current image expansion method generally expands the image to a preset size, and the image processing effect is often relatively simple and cannot meet the actual needs of users. Summary of the Invention
[0005] The embodiments of the present disclosure provide an image processing method, apparatus, device, computer-readable storage medium, and product, which are used to solve the technical problem that the existing image enlargement methods have relatively single image processing effects.
[0006] In a first aspect, an embodiment of the present disclosure provides an image processing method, comprising:
[0007] Displaying the image to be processed and the image processing controls associated with the image to be processed on the content display page;
[0008] In response to a user triggering operation on the image processing control, displaying an image processing page, wherein the image processing page includes the image to be processed, a size adjustment control, and a description information determination control;
[0009] Acquire a target size determined by the user based on the size adjustment control, and acquire target description information determined by the user based on the description information determination control;
[0010] A size expansion operation is performed on the image to be processed according to the target size and the target description information to obtain a target image of the target size.
[0011] In a second aspect, an embodiment of the present disclosure provides an image processing device, including:
[0012] A display module, configured to display the image to be processed and the image processing controls associated with the image to be processed on the content display page;
[0013] a processing module, configured to display an image processing page in response to a user triggering operation on the image processing control, wherein the image processing page includes the image to be processed, a size adjustment control, and a description information determination control;
[0014] an acquisition module, configured to acquire a target size determined by the user based on the size adjustment control, and acquire target description information determined by the user based on the description information determination control;
[0015] The expansion module is used to perform a size expansion operation on the image to be processed according to the target size and the target description information to obtain a target image of the target size.
[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0017] The memory stores computer-executable instructions;
[0018] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the image processing method described in the first aspect and various possible designs of the first aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the image processing method described in the first aspect and various possible designs of the first aspect is implemented.
[0020] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing method described in the first aspect and various possible designs of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] FIG1 is a schematic diagram of a flow chart of an image processing method provided by an embodiment of the present disclosure;
[0023] FIG2 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure;
[0024] FIG3 is a schematic diagram of a display interface provided by an embodiment of the present disclosure;
[0025] FIG4 is a schematic flow chart of an image processing method provided by yet another embodiment of the present disclosure;
[0026] FIG5 is a schematic diagram of another display interface provided by an embodiment of the present disclosure;
[0027] FIG6 is another schematic diagram of an interface interaction provided by another embodiment of the present disclosure;
[0028] FIG7 is a schematic diagram of another display interface provided by an embodiment of the present disclosure;
[0029] FIG8 is a schematic diagram of another display interface provided by an embodiment of the present disclosure;
[0030] FIG9 is a schematic flow chart of an image processing method provided by yet another embodiment of the present disclosure;
[0031] FIG10 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure;
[0032] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0034] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0035] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0036] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0038] In order to solve the technical problem that the existing image enlargement methods have relatively single image processing effects, the present disclosure provides an image processing method, device, equipment, computer-readable storage medium and product.
[0039] It should be noted that the image processing method, apparatus, device, computer-readable storage medium, and product provided by the present disclosure can be applied in application scenarios where the size of any image is expanded.
[0040] Current image expansion methods generally only expand images to a specified size, such as double or triple the original size. However, these expansion methods are often limited and cumbersome, failing to meet users' personalized needs.
[0041] In the process of solving the above technical problems, the inventors discovered through research that an image processing control associated with the image to be processed can be set in the content display page. Thus, the user can quickly implement the image expansion operation by triggering the image processing control. In addition, in response to the user's triggering operation of the image processing control, it is possible to jump to the image processing page, where the size adjustment control and the description information determination control are displayed. Thus, the user can customize the target size based on the size adjustment control, and thus the size of the target image obtained by the image expansion operation can be more in line with the user's personalized needs. In addition, the target description information can be determined through the description information determination control, so that the generated target image is more in line with the user's target description information, thereby improving the user experience.
[0042] FIG1 is a flow chart of an image processing method provided by an embodiment of the present disclosure. As shown in FIG1 , the method includes:
[0043] Step 101: Display an image to be processed and an image processing control associated with the image to be processed on a content display page.
[0044] The executor of this embodiment is an image processing device, which can be coupled to a terminal device, so that it can determine the target size and target description information based on the human-computer interaction operation between the user and the terminal device, and perform expansion operations on the image to be processed based on the target size and target description information.
[0045] Optionally, the image processing device can be coupled to a server, which can communicate with the terminal device, so as to obtain the target size and target description information determined by the user on the terminal device, perform image expansion operations based on the target size and target description information, and control the terminal device to display the generated target image.
[0046] In this embodiment, the content display page may display an image to be processed. The image to be processed may be an image captured by the user in real time, or an image uploaded by the user to a preset storage path, or an image selected by the user from at least one generated image historically generated based on the description information, and this disclosure does not impose any restrictions on this.
[0047] Furthermore, in order to facilitate the user's editing operation on the image to be processed, an image processing control associated with the processed image may be displayed in the content display page.
[0048] Step 102: In response to a user triggering operation on the image processing control, an image processing page is displayed, wherein the image processing page includes the image to be processed, a size adjustment control, and a description information determination control.
[0049] In this embodiment, in response to the user's triggering operation on the image processing control, an image processing page may be displayed, so that the user can perform an image expansion operation on the image to be processed on the image processing page.
[0050] Optionally, the image processing page includes an image to be processed, a size adjustment control, and a description information determination control. The image to be processed can be displayed on the upper side of the image processing page, and the size adjustment control and the description information determination control can be displayed in sequence on the lower side of the image to be processed.
[0051] The user can determine the target size using the resize control, and then expand the image to be processed based on the target size. The control also determines the target description information based on the description information. The target description information is used to constrain the target image during the image expansion process, so that the expanded target image better meets the user's personalized needs.
[0052] Step 103: Obtain a target size determined by the user based on the size adjustment control, and obtain target description information determined by the user based on the description information determination control.
[0053] In this embodiment, after displaying the resize control and description information determination control on the image processing page, the user can trigger the resize control to determine the target size, and then perform an expansion operation on the image to be processed based on the target size to obtain a processed image of the target size. In addition, the user can also trigger the description information determination control to determine the target description information, thereby generating a target image associated with the target description information.
[0054] Step 104: Perform a size expansion operation on the image to be processed according to the target size and the target description information to obtain a target image of the target size.
[0055] In this embodiment, after the target size and the target description information are determined respectively, a size expansion operation can be performed on the image to be processed based on the target size and the target description information to obtain a target image of the target size.
[0056] FIG2 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure. As shown in FIG2 , a content display page 21 may display an image 22 to be processed and an image processing control 23 associated with the image 22 to be processed. In response to a user triggering the image processing control 23, an image processing page 24 may be displayed. The image processing page 24 may display the image 22 to be processed, a size adjustment control 25, and a description information determination control 26. The user can thereby determine the target size based on actual needs using the size adjustment control 25 and determine the target description information using the description information determination control 26. Furthermore, the user can perform a size expansion operation on the image to be processed based on the target size and target description information to obtain a target image of the target size.
[0057] The image processing method provided by this embodiment pre-sets an image processing control associated with the image to be processed, so that the user can quickly implement the expansion processing of the image to be processed based on the image processing control. Furthermore, by setting a size adjustment control and a description information determination control in the image processing page, the user can more flexibly customize the expansion size based on the size adjustment control. In addition, the user can also customize the description information based on the description information determination control, and then the target image obtained after expanding the image to be processed based on the target size and the target description information can better meet the user's personalized needs. It can improve the user experience on the basis of improving the expansion efficiency.
[0058] Optionally, based on any of the above embodiments, step 101 includes:
[0059] At least one generated image is displayed on the content display page, wherein the at least one generated image is generated based on the description information input by the user.
[0060] In response to a user triggering operation on the generated image, the target generated image triggered by the user is determined as the image to be processed.
[0061] The image to be processed and the image processing control are displayed on the content display page.
[0062] In this embodiment, the user may determine the description information according to actual needs and generate at least one generated image based on the description information. For example, after determining the description information, the user may input the description information into a preset text-based image model to obtain at least one generated image.
[0063] Optionally, at least one generated image may be displayed on the content display page. In response to a user triggering an operation on any generated image, the generated image triggered by the user may be determined as the image to be processed. To facilitate user editing operations on the image to be processed, the image to be processed and image processing controls may be displayed on the content display page.
[0064] The image processing method provided in this embodiment displays the image to be processed and the image processing controls on the content display page in response to the user's triggering operation on at least one generated image, so that the user can expand the historically generated images according to actual needs to improve the content quality of the generated images.
[0065] Furthermore, based on any of the above embodiments, after step 102, the following steps may be further included:
[0066] A background canvas of a preset size is displayed in a first display area of the image processing page, and the image to be processed is displayed on the background canvas according to a preset display ratio between the canvas and the image to be processed.
[0067] The size adjustment control and the description information determination control are displayed in a second display area in the image processing page.
[0068] In this embodiment, the image processing page includes a first display area and a second display area. The image to be processed can be displayed in the first display area. In order to allow the user to more intuitively view the effect of image expansion, a background canvas of a preset size can also be displayed in the first display area of the image processing page, and the image to be processed is displayed on the background canvas according to a preset display ratio between the canvas and the image to be processed. The display ratio between the image to be processed and the background canvas can be 1:1.5, or the display ratio can be 1:2, or the user can adjust the display ratio according to actual needs, and the present disclosure does not impose any restrictions on this.
[0069] Optionally, the image to be processed can be displayed at the center of the background canvas. The user can adjust the display position of the image to be processed in the background canvas according to actual needs. For example, the user can adjust the image to be processed to a specified position in the background canvas by dragging the image to be processed. Alternatively, a position adjustment control can be provided in the image processing page, and the user can trigger the position adjustment control to input position information to adjust the display position of the image to be processed based on the position information.
[0070] Furthermore, the size adjustment control and the description information determination control may be displayed in the second display area, wherein the size adjustment control may be displayed above the description information determination control.
[0071] Optionally, the first display area and the second display area can be arranged vertically, for example, the first display area is displayed above the second display area. Alternatively, the first display area and the second display area can be arranged horizontally, for example, the first display area is displayed to the left of the second display area. Alternatively, the user can adjust the display position, display size, and other parameters of the first display area and the second display area according to actual needs, and this disclosure does not impose any restrictions on this.
[0072] FIG3 is a schematic diagram of a display interface provided by an embodiment of the present disclosure. As shown in FIG3 , an image processing page 31 includes a first display area 32 and a second display area 33. A background canvas 34 of a preset size can be displayed in the first display area 32, and an image 35 to be processed is displayed on the background canvas 34 at a preset display ratio between the canvas and the image to be processed. A size adjustment control 36 and a description information confirmation control 37 are displayed in the second display area 33.
[0073] The image processing method provided in this embodiment displays a background canvas of a preset size within the first display area of the image processing page, and then displays the image to be processed on the background canvas according to a preset display ratio between the canvas and the image to be processed, thereby allowing the user to initially review the effect of the image expansion. Furthermore, by displaying size adjustment controls and description information determination controls within the second display area of the image processing page, the user can easily determine the target size and target description content according to actual needs, making the generated target image more personalized to the user.
[0074] FIG4 is a flowchart of an image processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG4 , step 103 includes:
[0075] Step 401: In response to the user triggering operation on the size adjustment control, determine the current size adjustment type.
[0076] Step 402: Display the size adjustment area corresponding to the size adjustment type.
[0077] Step 403: Obtain the target size determined by the user in the size adjustment area.
[0078] In this embodiment, to enrich the effects of image expansion, different resizing types can be pre-set. These resizing types include, but are not limited to, equal-proportional resizing and altered-proportional resizing. Therefore, to more accurately determine the target size, the current resizing type can be determined first.
[0079] Optionally, a resizing control may be displayed on the content processing page. In response to a user triggering the resizing control, the current resizing type is determined. After the resizing type is determined, a resizing area corresponding to the resizing type may be displayed. Within the resizing area, an adjustment control matching the resizing type may be provided. Thus, the user can determine a target size within the resizing area and perform an expansion operation on the image to be processed based on the target size.
[0080] The image processing method provided by this embodiment can further improve the diversity of image expansion by presetting different resizing types. In addition, after determining the resizing type, the target size can be determined more accurately based on the resizing type.
[0081] Optionally, based on any of the above embodiments, the size adjustment control includes a first adjustment type control and a second adjustment type control. Step 401 includes:
[0082] In response to the user triggering operation on the first adjustment type control or the second adjustment type control, the first adjustment type control or the second adjustment type control currently triggered by the user is determined as the current size adjustment type.
[0083] FIG5 is another schematic diagram of a display interface provided by an embodiment of the present disclosure. As shown in FIG5 , an image processing page 51 may be provided with a first adjustment type control 52 and a second adjustment type control 53. The first adjustment type control 52 can be used to expand the image to be processed according to its original proportions, while the second adjustment type control 53 can be used to adjust the proportions and expand the image to the adjusted proportions. Users can select the appropriate adjustment type for image processing based on their actual needs.
[0084] In this embodiment, the image processing method can be implemented on a handheld terminal device. When implemented on the handheld terminal device, the size adjustment control includes a first adjustment type control and a second adjustment type control. The first adjustment type control can be used to proportionally expand the image to be processed, while the second adjustment type control can be used to change the proportion and expand the image.
[0085] Optionally, the first adjustment type control and the second adjustment type control may be displayed simultaneously on the content processing page. In response to a user triggering operation on the first adjustment type control or the second adjustment type control, the first adjustment type control or the second adjustment type control currently triggered by the user is determined as the current size adjustment type.
[0086] Alternatively, step 401 includes:
[0087] In response to the user's triggering operation on the size adjustment control, a preset first adjustment type control and a second adjustment type control are displayed.
[0088] In response to the user triggering operation on the first adjustment type control or the second adjustment type control, the first adjustment type control or the second adjustment type control currently triggered by the user is determined as the current size adjustment type.
[0089] In this embodiment, the image processing method can be implemented on a large-screen device such as a computer. When implemented on a large-screen device, in response to a user triggering a resizing control, a preset first adjustment type control and a preset second adjustment type control are displayed. The first adjustment type control can be used to proportionally expand the image to be processed, while the second adjustment type control can be used to change the proportions and expand the image. In response to a user triggering the first adjustment type control or the second adjustment type control, the first adjustment type control or the second adjustment type control currently triggered by the user is determined as the current resizing type.
[0090] Figure 6 is another interface interaction diagram provided by another embodiment of the present disclosure. As shown in Figure 6, a resize control 62 may be provided in an image processing page 61. In response to a user triggering resize control 62, a first adjustment type control 63 and a second adjustment type control 64 may be displayed. The first adjustment type control 63 may be used to expand the image to its original proportions, while the second adjustment type control 64 may be used to adjust the proportions and expand the image to the adjusted proportions. Users can select the appropriate adjustment type for image processing based on their actual needs.
[0091] The image processing method provided in this embodiment can improve the applicability of the image processing method by setting different adjustment type determination methods for different terminal devices, so that users can perform image expansion operations on handheld terminal devices or web terminals.
[0092] Optionally, based on any of the above embodiments, step 402 includes:
[0093] A ratio adjustment slide bar is displayed in the size adjustment area, wherein the ratio adjustment slide bar includes at least one adjustment ratio.
[0094] In this embodiment, the resizing type includes a proportional resizing type. In this proportional resizing type, the image to be processed can be proportionally expanded. For example, the original scale of the image to be processed may be 1:1, and the image to be processed can be expanded to 2 times the scale to obtain a target image with the same scale as the original scale, which is still 1:1.
[0095] Optionally, in order to facilitate the user's expansion operation on the image to be processed, a ratio adjustment slider may be displayed in the size adjustment area, wherein the ratio adjustment slider includes at least one adjustment ratio.
[0096] The ratio adjustment slider can support adjusting the adjustment ratio from 1 to 3. On the ratio adjustment slider, adjustment ratio nodes of 1.5, 2, 2.5, and 3 can be set respectively to allow the user to understand the current adjustment size more intuitively.
[0097] The image processing method provided in this embodiment displays a ratio adjustment slider in the size adjustment area, thereby enabling the user to quickly determine a target adjustment ratio based on the ratio adjustment slider.
[0098] Further, based on any of the above embodiments, step 403 includes:
[0099] In response to the user's adjustment operation on the ratio adjustment slide bar, a target adjustment ratio determined by the user is determined.
[0100] The target size is determined based on the target adjustment ratio and an image size corresponding to the image to be processed.
[0101] Alternatively, step 403 includes:
[0102] In response to the user's dragging operation on the size frame at the edge of the image to be processed, the size frame is expanded in proportion based on the dragging operation.
[0103] The size of the size frame when the drag operation stops is determined, and the size of the size frame is determined as the target size.
[0104] In this embodiment, after displaying the scale adjustment slider within the size adjustment area, the user can determine the target scale adjustment ratio by sliding the scale adjustment slider. The scale adjustment slider can support adjustment ratios from 1x to 3x. Alternatively, the adjustment range of the scale adjustment slider can be set by the user based on actual needs, and this disclosure does not impose any restrictions on this.
[0105] Optionally, in response to the user adjusting the ratio adjustment slider, a target adjustment ratio determined by the user is determined. A target size is determined based on the target adjustment ratio and an image size corresponding to the image to be processed.
[0106] As an implementable manner, after the image to be processed is displayed in the content processing page, the user can also determine the target size based on a drag operation of a size box set on the edge of the image to be processed.
[0107] Optionally, in response to a user dragging a size box around an edge of the image to be processed, the size box is expanded proportionally based on the dragging operation. The size of the size box when the dragging operation stops is determined, and the size of the size box is determined as the target size. The user can drag any vertex of the size box.
[0108] As one possible implementation, during the dragging process, the sizing box maintains the same ratio as the image to be processed. Alternatively, the user can adjust the ratio of the sizing box by dragging. For example, the original ratio of the image to be processed may be 1:1. In response to the user-triggered dragging operation, the ratio of the sizing box can be adjusted to 3:4. Subsequently, the target size can be determined based on the adjusted sizing box, thereby obtaining a target image with a 3:4 ratio.
[0109] FIG7 is another schematic diagram of a display interface provided by an embodiment of the present disclosure. As shown in FIG7 , a first adjustment type control 72 and a second adjustment type control 73 may be provided on an image processing page 71. When a user triggers the first adjustment type control 72, a scale adjustment slider 74 may be displayed on the image processing page 71. The user can thereby determine the target size by adjusting the scale adjustment slider 74.
[0110] The image processing method provided in this embodiment can quickly and accurately determine the target size based on a sliding operation for adjustment or a manual drag operation, and then can perform an image expansion operation on the image to be processed based on the target size, so that the generated target image is more in line with the user's personalized needs.
[0111] Optionally, the size adjustment type includes a ratio adjustment type, and step 402 includes:
[0112] At least one canvas ratio to be selected is displayed in the size adjustment area.
[0113] In this embodiment, the resizing type includes a scale adjustment type. Under the scale adjustment type, the user can adjust the image enlargement ratio based on actual needs, making it different from the original scale of the image being processed. For example, the original scale of the image being processed may be 1:1. Under the scale adjustment type, the user can select a target canvas scale of 3:4, thereby subsequently generating a target image with a 3:4 scale based on the user-selected target canvas scale.
[0114] Optionally, to facilitate user resizing, when the user selects the resizing type of changing the ratio, at least one canvas ratio to select may be displayed in the resizing area. The canvas ratios to select include, but are not limited to, 1:1, 3:4, 16:9, 4:3, and 9:16.
[0115] Optionally, a content input control may be displayed in the size adjustment area to allow the user to manually input a target canvas ratio based on actual needs. This disclosure does not impose any restrictions on this.
[0116] The image processing method provided in this embodiment displays at least one canvas ratio to be selected in the resizing area, allowing the user to more flexibly select the canvas ratio to be selected according to actual needs. This makes the ratio of the generated target image more tailored to the user's personalized needs, thereby improving the user experience.
[0117] Furthermore, based on any of the above embodiments, after step 402, the following steps may be further included:
[0118] In response to the user's selection operation on the to-be-selected canvas scale, a target canvas scale selected by the user is determined.
[0119] A background canvas matching the target canvas ratio is displayed, and the image to be processed is displayed on the background canvas according to a preset display ratio between the image to be processed and the background canvas.
[0120] In this embodiment, in order to allow the user to more intuitively view the image expansion effects corresponding to the selected canvas sizes, after the user selects the target canvas ratio, the display effect of the image to be processed can be adjusted based on the target canvas ratio.
[0121] Optionally, in response to a user selecting a canvas ratio to be selected, the user's currently selected canvas ratio can be determined as the target canvas ratio. A background canvas matching the target canvas ratio is displayed on the content processing page, and the image to be processed is displayed on the background canvas according to a preset display ratio between the image to be processed and the background canvas. The display ratio between the image to be processed and the background canvas can be 1:1.5, or 1:2, or the user can adjust the display ratio according to actual needs, and this disclosure does not impose any restrictions on this.
[0122] The image processing method provided in this embodiment displays the image to be processed and the background canvas according to the target canvas ratio selected by the user based on the user's triggering operation on the canvas ratio to be selected, thereby enabling the user to more intuitively view the image expansion effect corresponding to each canvas size to be selected.
[0123] Further, based on any of the above embodiments, step 402 includes:
[0124] In response to the user's selection operation on the to-be-selected canvas scale, a target canvas scale selected by the user is determined.
[0125] The target size is determined based on the target canvas ratio and the display size of the display interface, so that the length or width of the target image expanded based on the target size can fill the display interface.
[0126] In this embodiment, after the target canvas ratio is determined, the target size can be accurately determined based on the target canvas ratio.
[0127] Optionally, in response to a user selecting a desired canvas scale, the user's currently selected canvas scale can be determined as a target canvas scale. The target size is determined based on the target canvas scale and a display size of a display interface, wherein after the image to be processed is expanded to the target size, the length or width of the target image can fill the display interface.
[0128] Figure 8 is a schematic diagram of another display interface provided by an embodiment of the present disclosure. As shown in Figure 8 , an image processing page 81 may be provided with a first adjustment type control 82 and a second adjustment type control 83. When a user triggers the second adjustment type control 83, at least one candidate canvas scale 84 may be displayed on the image processing page 81. This allows the user to select a candidate canvas scale based on actual needs, and then determine the target size based on the user-selected target canvas scale.
[0129] The image processing method provided in this embodiment determines the target canvas ratio selected by the user in response to the user's selection operation on the to-be-selected canvas ratio, thereby accurately determining the target size based on the target canvas ratio, and further performing an image enlargement operation on the image to be processed based on the target size, so that the generated target image better meets the user's personalized needs.
[0130] Furthermore, based on any of the above embodiments, step 103 includes:
[0131] The historical description information associated with the image to be processed is displayed in the description information determination control.
[0132] In response to an editing operation triggered by the user on the historical description information, the description information edited by the user is acquired, and the edited description information is determined as the target description information.
[0133] If the user does not perform an editing operation on the historical description information, the historical description information is determined as the target description information.
[0134] In this embodiment, a description information determination control may be displayed on the content display page. The description information determination control may be a content input box.
[0135] Optionally, the description information determination control may display historical description information associated with the image to be processed. The historical description information may be text content used to generate the image to be processed. The user may edit the historical description information according to actual needs.
[0136] Optionally, in response to a user triggering an operation on the description information determination control, the historical description information within the description information determination control may be switched to an editable state. In the editable state, the user may edit the historical description information of the description information determination control. Editing operations include, but are not limited to, adding, deleting, modifying, and recreating.
[0137] Optionally, if the user edits the historical description information, the edited description information may be determined as the target description information. Conversely, if the user does not edit the historical description information, the historical description information may be determined as the target description information.
[0138] The image processing method provided in this embodiment determines the target description information by triggering the control based on the user's determination of the description information, so that the target description information can be more in line with the user's personalized needs. Furthermore, during the image expansion process, the target image can be constrained based on the target description information to generate a target image that is more in line with the user's actual needs.
[0139] FIG9 is a flowchart of an image processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG9 , step 104 includes:
[0140] Step 901: Input the target size and the target description information into a preset image generation model to obtain an image to be edited of the target size output by the image generation model.
[0141] Step 902: Based on the image to be processed, a replacement operation is performed on a display area in the image to be edited that matches the image to be processed to obtain the target image.
[0142] In this embodiment, after the user has determined the target size and target description information, a preset image generation model can be constrained based on the target size and target description information to generate an image to be edited with the target size that matches the target description information. The target description information can be text, and the image generation model can be a text-based graph model that generates the image to be edited based on the user-determined target description information. Furthermore, the generated content of the text-based graph model can be constrained based on the target size so that it generates an image to be edited that matches the target size.
[0143] Furthermore, in order to improve the relevance between the target image and the image to be processed, a replacement operation may be performed on the display area of the image to be edited that matches the image to be processed based on the image to be processed to obtain the target image.
[0144] The image processing method provided in this embodiment generates an image to be edited based on the target size and target description information, and replaces the matching area in the image to be edited with the image to be processed, thereby improving the correlation between the target image and the image to be processed on the basis of expanding the image to be processed.
[0145] Figure 10 is a schematic structural diagram of the image processing device provided by an embodiment of the present disclosure. As shown in Figure 10, the device includes: a display module 1001, a processing module 1002, an acquisition module 1003, and an expansion module 1004. The display module 1001 is used to display the image to be processed and the image processing control associated with the image to be processed in the content display page. The processing module 1002 is used to display the image processing page in response to the user's triggering operation on the image processing control, wherein the image processing page includes the image to be processed, a size adjustment control, and a description information determination control. The acquisition module 1003 is used to obtain the target size determined by the user based on the size adjustment control, and to obtain the target description information determined by the user based on the description information determination control. The expansion module 1004 is used to perform a size expansion operation on the image to be processed according to the target size and the target description information to obtain a target image of the target size.
[0146] Furthermore, based on any of the above embodiments, the display module is configured to: display at least one generated image on the content display page, wherein the at least one generated image is generated based on the descriptive information input by the user; in response to a user triggering operation on the generated image, determine the user-triggered target generated image as the image to be processed; and display the image to be processed and the image processing control on the content display page.
[0147] Furthermore, based on any of the above embodiments, the apparatus further includes: a display module configured to display a background canvas of a preset size in a first display area of the image processing page, and to display the image to be processed on the background canvas according to a preset display ratio between the canvas and the image to be processed; and a display module configured to display the size adjustment control and the description information determination control in a second display area of the image processing page.
[0148] Furthermore, based on any of the above embodiments, the acquisition module is configured to: in response to the user triggering the resizing control, determine a current resizing type, display a resizing area corresponding to the resizing type, and acquire a target size determined by the user within the resizing area.
[0149] Furthermore, based on any of the above embodiments, the size adjustment control includes a first adjustment type control and a second adjustment type control. The acquisition module is configured to: in response to the user triggering the first adjustment type control or the second adjustment type control, determine the first adjustment type control or the second adjustment type control currently triggered by the user as the current size adjustment type. Alternatively, the acquisition module is configured to: in response to the user triggering the size adjustment control, display a preset first adjustment type control and a preset second adjustment type control. In response to the user triggering the first adjustment type control or the second adjustment type control, determine the first adjustment type control or the second adjustment type control currently triggered by the user as the current size adjustment type.
[0150] Furthermore, based on any of the above embodiments, the acquisition module is configured to: display a ratio adjustment slider in the size adjustment area, wherein the ratio adjustment slider includes at least one adjustment ratio.
[0151] Further, based on any of the above embodiments, the acquisition module is configured to: in response to the user adjusting the ratio adjustment slider, determine the target adjustment ratio determined by the user. Determine the target size based on the target adjustment ratio and the image size corresponding to the image to be processed. Alternatively, the acquisition module is configured to: in response to the user dragging a size frame around an edge of the image to be processed, expand the size frame proportionally based on the dragging operation. Determine the size of the size frame when the dragging operation stops, and determine the size of the size frame as the target size.
[0152] Further, based on any of the above embodiments, the size adjustment type includes a ratio change adjustment type, and the acquisition module is used to: display at least one canvas ratio to be selected in the size adjustment area.
[0153] Furthermore, based on any of the above embodiments, the acquisition module is configured to: determine a target canvas ratio selected by the user in response to the user selecting the candidate canvas ratio; display a background canvas that matches the target canvas ratio; and display the image to be processed on the background canvas according to a preset display ratio between the image to be processed and the background canvas.
[0154] Furthermore, based on any of the above embodiments, the acquisition module is configured to: determine a target canvas ratio selected by the user in response to the user selecting the candidate canvas ratio, and determine the target size based on the target canvas ratio and a display size of a display interface so that the length or width of the target image, after expansion based on the target size, fills the display interface.
[0155] Furthermore, based on any of the above embodiments, the acquisition module is configured to: display historical description information associated with the image to be processed in the description information determination control; in response to an edit operation triggered by the user on the historical description information, acquire the user-edited description information and determine the edited description information as the target description information; and if the user has not edited the historical description information, determine the historical description information as the target description information.
[0156] Furthermore, based on any of the above embodiments, the expansion module is configured to: input the target size and the target description information into a preset image generation model to obtain an image to be edited of the target size output by the image generation model; and replace a display area of the image to be edited that matches the image to be processed based on the image to be processed to obtain the target image.
[0157] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0158] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the image processing method described in any of the above embodiments is implemented.
[0159] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the image processing method as described in any of the above embodiments when executed by a processor.
[0160] In order to implement the above embodiment, the present disclosure further provides an electronic device, including: a processor and a memory;
[0161] The memory stores computer-executable instructions;
[0162] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the image processing method as described in any of the above embodiments.
[0163] FIG11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, wherein the electronic device 1100 may be a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG11 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0164] As shown in FIG11 , the electronic device 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 into a random access memory (RAM) 1103. Various programs and data required for the operation of the electronic device 1100 are also stored in the RAM 1103. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0165] Typically, the following devices may be connected to the I / O interface 1105: an input device 1106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109. The communication device 1109 may allow the electronic device 1100 to communicate with other devices wirelessly or by wire to exchange data. Although FIG11 shows an electronic device 1100 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0166] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1109, or installed from the storage device 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0167] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0168] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0169] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0170] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0171] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0172] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0173] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0174] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0175] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0176] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0177] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. An image processing method, comprising: Displaying the image to be processed and the image processing controls associated with the image to be processed on the content display page; In response to a user triggering operation on the image processing control, displaying an image processing page, wherein the image processing page includes the image to be processed, a size adjustment control, and a description information determination control; Acquire a target size determined by the user based on the size adjustment control, and acquire target description information determined by the user based on the description information determination control; A size expansion operation is performed on the image to be processed according to the target size and the target description information to obtain a target image of the target size.
2. The method according to claim 1, wherein: The displaying of the image to be processed and the image processing control associated with the image to be processed in the content display page includes: Displaying at least one generated image in the content display page, wherein the at least one generated image is generated based on the description information input by the user; In response to a triggering operation of the user on the generated image, determining the target generated image triggered by the user as the image to be processed; The image to be processed and the image processing control are displayed in the content display page.
3. The method according to claim 1 or 2, further comprising: Displaying a background canvas of a preset size in a first display area of the image processing page, and displaying the image to be processed on the background canvas according to a preset display ratio between the canvas and the image to be processed; The size adjustment control and the description information determination control are displayed in a second display area in the image processing page.
4. The method according to any one of claims 1 to 3, wherein: The obtaining of the target size determined by the user based on the size adjustment control includes: In response to a trigger operation of the user on the size adjustment control, determining a current size adjustment type; Displaying a size adjustment area corresponding to the size adjustment type; The target size determined by the user in the size adjustment area is obtained.
5. The method according to claim 4, wherein: The size adjustment control includes a first adjustment type control and a second adjustment type control; The determining, in response to the user's triggering operation on the size adjustment control, a current size adjustment type includes: In response to a triggering operation of the first adjustment type control or the second adjustment type control by the user, determining the first adjustment type control or the second adjustment type control currently triggered by the user as a current size adjustment type; Alternatively, the determining the current size adjustment type in response to the user's triggering operation on the size adjustment control includes: In response to the user's triggering operation on the size adjustment control, displaying a preset first adjustment type control and a second adjustment type control; In response to the user's triggering operation on the first adjustment type control or the second adjustment type control, the first adjustment type control or the second adjustment type control currently triggered by the user is determined as the current size adjustment type.
6. The method according to claim 4 or 5, wherein: The displaying of the size adjustment area corresponding to the size adjustment type includes: A ratio adjustment slide bar is displayed in the size adjustment area, wherein the ratio adjustment slide bar includes at least one adjustment ratio.
7. The method according to claim 6, wherein: The obtaining of the target size determined by the user in the size adjustment area includes: In response to the user's adjustment operation on the ratio adjustment slide bar, determining a target adjustment ratio determined by the user; Determine the target size based on the target adjustment ratio and the image size corresponding to the image to be processed; Alternatively, obtaining the target size determined by the user in the size adjustment area includes: In response to the user's dragging operation on the size frame at the edge of the image to be processed, performing an expansion operation on the size frame in proportion to the dragging operation; The size of the size box when the drag operation stops is determined, and the size of the size box is determined as the target size.
8. The method according to any one of claims 4 to 7, wherein: The size adjustment type includes a change ratio adjustment type, and the displaying of a size adjustment area corresponding to the size adjustment type includes: At least one canvas ratio to be selected is displayed in the size adjustment area.
9. The method according to claim 8, wherein: After displaying the size adjustment area corresponding to the size adjustment type, the method further includes: In response to the user's selection operation on the to-be-selected canvas ratio, determining a target canvas ratio selected by the user; A background canvas matching the target canvas ratio is displayed, and the image to be processed is displayed on the background canvas according to a preset display ratio between the image to be processed and the background canvas.
10. The method according to claim 8 or 9, wherein: The obtaining of the target size determined by the user in the size adjustment area includes: In response to the user's selection operation on the to-be-selected canvas ratio, determining a target canvas ratio selected by the user; The target size is determined based on the target canvas ratio and the display size of the display interface, so that the length or width of the target image expanded based on the target size can fill the display interface.
11. The method according to any one of claims 1 to 10, wherein: The obtaining the target description information determined by the user based on the description information to determine the control includes: Displaying historical description information associated with the image to be processed in the description information determination control; In response to an editing operation triggered by the user on the historical description information, acquiring the description information edited by the user, and determining the edited description information as the target description information; If the user does not perform an editing operation on the historical description information, the historical description information is determined as the target description information.
12. The method according to any one of claims 1 to 11, wherein: The step of performing a size expansion operation on the image to be processed according to the target size and the target description information to obtain a target image of the target size includes: Inputting the target size and the target description information into a preset image generation model to obtain an image to be edited of the target size output by the image generation model; Based on the image to be processed, a replacement operation is performed on a display area in the image to be edited that matches the image to be processed to obtain the target image.
13. An image processing device, comprising: A display module, configured to display the image to be processed and the image processing controls associated with the image to be processed in the content display page; A processing module, configured to display an image processing page in response to a user triggering operation on the image processing control, wherein the image processing page includes the image to be processed, a size adjustment control, and a description information determination control; an acquisition module, configured to acquire a target size determined by the user based on the size adjustment control, and to acquire target description information determined by the user based on the description information determination control; The expansion module is configured to perform a size expansion operation on the image to be processed according to the target size and the target description information to obtain a target image of a target size.
14. An electronic device, comprising: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the image processing method according to any one of claims 1 to 12.
15. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image processing method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Method and device for presenting image
CN101582254A
Image processing method and device, electronic equipment and storage medium
CN116543074A
Image size adjustment method and device, equipment, readable storage medium and product
CN116661930A
Image processing method, device and equipment, computer readable storage medium and product
CN117573013A