CN-122023555-A - Image processing method, electronic device, readable storage medium, and program product
Abstract
The present application relates to the field of image processing technology, and in particular, to an image processing method, an electronic device, a readable storage medium, and a program product. The method comprises the steps of detecting a user operation (recorded as a first user operation) for starting quick coloring in an interface of a drawing application running on the electronic equipment, displaying M frame images recommended to a user, and further determining at least one frame of reference frame image from the M frame images based on user selection, wherein the frame images are used as coloring references. The electronic equipment can perform batch coloring on the images to be colored in the multi-frame images of the first animation according to at least one frame of reference frame image selected by the user, and generate colored images corresponding to the multi-frame images of the first animation. Thus, the application can improve the efficiency of coloring processing when coloring processing is carried out on an image sequence containing a plurality of frames of images (such as cartoon line manuscript and the like).
Inventors
- WANG CHAOQUN
- XIAO YIWEN
- LU NING
- ZHANG XINYUE
- YANG XUEGUO
Assignees
- 华为技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251106
Claims (19)
- 1. An image processing method, applied to an electronic device, comprising: Running a painting application, and displaying a first interface of the painting application, wherein the first interface comprises at least one frame of image in multiple frames of images of a first animation; Responding to a first user operation for indicating to start quick coloring, displaying M frame images and a target image, wherein the M frame images are thumbnail images of at least one frame of images in multiple frames of images in the first animation, and the target image is an image to be colored in the multiple frames of images of the first animation or an enlarged image of any other image in the M frame images; acquiring at least one frame of reference frame image selected from the M frame images by a user, wherein the at least one frame of reference frame image comprises coloring information; And generating a colored image corresponding to the multi-frame image of the first animation based on the at least one frame of reference frame image.
- 2. The method of claim 1, wherein the first animated multi-frame image is a continuous multi-frame image having continuously varying image content, wherein the first animated multi-frame image comprises a thumbnail of the target image.
- 3. The method according to claim 1 or 2, wherein the M-frame image comprises the target image, all or part of the region of the target image having coloring information.
- 4. A method according to claim 3, wherein the at least one frame of reference frame image comprises the target image, and The generating a colored image corresponding to the multi-frame image of the first animation based on the at least one frame of reference frame image comprises the following steps: And carrying out batch coloring treatment on all or part of the multi-frame images of the first animation according to the coloring information in the target image.
- 5. The method according to any one of claims 1 to 4, wherein the images to be colored in the multi-frame image comprise images to be colored in at least two image sets, each of the at least two image sets comprising a frame of reference frame image, respectively; The generating a colored image corresponding to the multi-frame image of the first animation based on the at least one frame of reference frame image comprises the following steps: And respectively generating coloring images corresponding to the images to be colored in each image set based on the reference frame images in the at least two image sets.
- 6. The method of any of claims 2 to 4, wherein the displaying the first interface of the drawing application comprises: And responding to a second user operation of opening an animation function on the drawing application, and displaying the first interface, wherein the first interface comprises a thumbnail of the continuous multi-frame image and the target image, the target image is an enlarged image of a first image in the continuous multi-frame image of the first animation, and the first image is an image selected to be checked by a user from a layer where the continuous multi-frame image is located or the thumbnail of the continuous multi-frame image.
- 7. The method of claim 6, wherein the successive multi-frame images include N-frame images, the M-frame images being images to be recommended determined from the N-frame images, wherein N is a positive integer, M is a positive integer less than N, and The M frame images are images, in the continuous multi-frame images, of which the content difference degree compared with the adjacent frame images meets the recommended condition.
- 8. The method of claim 7, wherein the M-frame image is an image to be recommended determined from N-frame images, comprising: The M frame images are images determined from the N frame images based on the sequence result of the frame number M of the image to be recommended and the weighting score of the N frame images, wherein the frame number M of the image to be recommended is related to the total change amplitude of the N frame images and the frame number N of the images included in the continuous multi-frame images, the total change amplitude of the N frame images is the accumulation result of the first change amplitude of (N-1) frame pairs determined based on the N frame images, and each frame pair of the (N-1) frame pairs comprises two adjacent frame images in the continuous multi-frame images, and the first change amplitude is used for indicating the content difference degree of the two adjacent frame images.
- 9. The method according to claim 8, wherein the number of images M to be recommended is related to a total variation amplitude of the N frames of images, the number of images N included in the continuous multi-frame images, comprising: the image frame number M to be recommended is the minimum value of the first image frame number and the second image frame number, wherein, The first image frame number is determined based on the total variation amplitude and a first reference coefficient, and the second image frame number is determined based on the image frame number N included in the continuous multi-frame image and a second reference coefficient.
- 10. The method according to claim 8 or 9, wherein the M-frame image is determined from the N-frame image based on a ranking result of the number M of images to be recommended and a weighted score for the N-frame image, comprising: The M frame images are images corresponding to the first M weighted scores in the first scoring sequence, wherein, The first scoring sequence is a result of the weighted scores of the N frames of images arranged in descending order from high to low, and the weighted scores of the N frames of images are related to a first variation amplitude between each frame of image in the continuous multi-frame images and a previous frame of image and a sequence position of each frame of image in the continuous multi-frame images.
- 11. The method of claim 10, wherein the at least one frame of reference frame images comprises a first frame of reference image and a second frame of reference image, the sequence position of the first frame of reference image in the consecutive plurality of frames of images being located before the sequence position of the second frame of reference image in the consecutive plurality of frames of images, The generating, based on the reference frame images in the at least two image sets, a coloring image corresponding to an image to be colored in each image set includes: Determining the first reference frame image and a multi-frame image with sequence positions positioned before the second reference frame image in the continuous multi-frame images as a first image set; Determining the second reference frame image and multi-frame images with sequence positions positioned behind the second reference frame image in the continuous multi-frame images as a second image set; Generating a coloring image corresponding to an image to be colored in the first image set based on the first reference frame image; and generating a coloring image corresponding to the image to be colored in the second image set based on the second reference frame image.
- 12. The method of claim 11, wherein the at least one frame of reference frame image further comprises a third reference frame, The generating, based on the reference frame images in the at least two image sets, a coloring image corresponding to an image to be colored in each image set includes: Determining a multi-frame image with sequence positions between the second reference frame image and the third reference frame image in the second reference frame image and the continuous multi-frame image as the second image set; Determining the third reference frame image and multi-frame images with sequence positions positioned behind the third reference frame image in the continuous multi-frame images as a third image set; The method comprises the steps of generating a coloring image corresponding to an image to be colored in a first image set based on the first reference frame image, generating a coloring image corresponding to the image to be colored in a second image set based on the second reference frame image, and generating a coloring image corresponding to the image to be colored in a third image set based on the third reference frame.
- 13. The method according to any one of claims 7 to 12, wherein N is ≡3 and M is ≡n/3.
- 14. The method of claim 13, wherein M is 10.
- 15. The method according to any one of claims 1 to 14, wherein said acquiring at least one frame of reference frame image selected by a user from the M frame images comprises: detecting a selection operation of a user on at least one frame of the M frames of images, and detecting a confirmation operation of the user on a selection result; the at least one frame image is determined as the at least one frame reference frame image.
- 16. The method of claim 15, wherein prior to said acquiring at least one frame of reference frame image selected by a user from said M frames of images, the method further comprises: detecting that at least one frame of reference frame image selected by a user from the M frames of images is an image to be colored; and outputting first prompt information, wherein the first prompt information is used for prompting a user to color the at least one frame of reference frame image.
- 17. An electronic device comprising one or more processors, one or more memories, the one or more memories storing one or more programs that, when executed by the one or more processors, cause the electronic device to perform the image processing method of any of claims 1-16.
- 18. A computer readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the image processing method of any of claims 1 to 16.
- 19. A computer program product comprising computer programs/instructions which when executed by a processor implement the image processing method of any of claims 1 to 16.
Description
Image processing method, electronic device, readable storage medium, and program product Technical Field The present application relates to the field of image processing technology, and in particular, to an image processing method, an electronic device, a readable storage medium, and a program product. Background With the rapid development of digital image processing technology, various graphic tools are available for users (such as plotters). For example, a plotter may draw an image on an electronic canvas using a professional drawing tool, and may use an image processing tool to assist in completing the image coloring. While drawing production may involve a large number of coloring objects, this requires the plotter to color each coloring object one by one, thus requiring great labor and time expenditure. Therefore, how to improve the efficiency of the coloring process on the image is a problem to be solved. Disclosure of Invention The application provides an image processing method, electronic equipment, a readable storage medium and a program product, which are used for improving the efficiency and accuracy of coloring an image. The application provides an image processing method which is applied to electronic equipment and comprises the steps of running a drawing application, displaying a first interface of the drawing application, displaying at least one frame of image in multiple frames of images of a first animation, responding to a first user operation for starting quick coloring, displaying M frames of images and a target image, wherein the M frames of images are thumbnails of at least one frame of image in multiple frames of images of the first animation, the target image is an enlarged image of an image to be colored in the multiple frames of images of the first animation or any other image in the M frames of images, acquiring at least one frame of reference frame image selected by a user from the M frames of images, wherein the at least one frame of reference frame image comprises coloring information, and generating a coloring image corresponding to the multiple frames of images of the first animation based on the at least one frame of reference frame image. For example, the electronic device may be an electronic device with a drawing tool (such as Application (APP)) installed, such as a tablet, a mobile phone (such as a folding screen mobile phone), and the like. The first interface may be, for example, a drawing interface displayed by the electronic device that includes controls that support rapid coloring. The first user operation may be, for example, a click operation for the control supporting quick coloring. The electronic device, in response to the first user operation, may display a drawing interface including the recommended M-frame image and prompting a user to select a reference frame image from the recommended multi-frame images. The drawing interface can display an image recommended by the electronic equipment based on the image processing method (such as the M frame image) as an alternative of the reference frame image. The user may select a part or an image from the recommended M frame images in the first interface as the reference frame image, i.e. the at least one frame reference frame image. Wherein the reference frame image needs to be a colored image. Therefore, the electronic equipment can divide the image sets of other images to be colored based on the reference frame image selected by the user and perform coloring treatment, so that the efficiency of the coloring treatment is improved. It can be understood that the M frame image recommended by the electronic device may include a colored image or an uncolored image. If the user selects the uncolored image as the reference frame image, the electronic device may output related prompt information to prompt the user to color (e.g., manually color) the uncolored image selected as the reference frame image, and then select the colored image as the reference frame image. In some embodiments, the target image may be an enlarged image of a currently drawn or selected image displayed by the system of the electronic device according to an operation of opening the animation function instructed by the user, or an image in a layer where the user stops at the time of opening the animation function for the first time. In other embodiments, the target image may be an enlarged image of any frame image determined from the recommended M frame images according to an operation of opening the animation function instructed by the user. In other embodiments, the target image may be an enlarged image of an image selected by the user from the M frame images, where the system of the electronic device opens the animation function according to the user instruction and the user clicks on the displayed thumbnail. Among the above-mentioned recommended M-frame images, the other images than the target image may be images displayed in a small image (e.g., t