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

By acquiring and processing image features, displaying the corresponding templates and performing image processing, the problem of inconvenience of user manual editing is solved and convenient image editing is achieved.

CN112330728BActive Publication Date: 2024-12-20VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011381285.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2024-12-20
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

In the prior art, users need to manually select and edit photos, but cannot flexibly edit them according to the characteristics of the photos, resulting in inconvenience in image editing.

Method used

By acquiring the image features of the to-process image, displaying the corresponding image template, and performing image processing on the image template according to user input, the generation and display of the target image is achieved.

Benefits of technology

It reduces user manual dependence, improves the convenience of image processing, allows flexible editing based on photo features, and solves the problem of inconvenience in image editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112330728B_ABST
    Figure CN112330728B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method, device, electronic device and readable storage medium, belonging to the field of image processing technology. Obtain image features of an image to be processed; display at least one image template corresponding to the image features; receive a first input acting on the at least one image template; in response to the first input, perform image processing on the image to be processed according to the image template selected by the first input to obtain a target image; and display the target image. The problem of inconvenient image editing caused by the reliance on users to manually select and edit photos in the related art and the inability to flexibly edit and layout according to the features in the photos is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device, electronic device and readable storage medium. Background Art

[0002] With the popularization and development of smart terminals, the imaging effects of smart terminal cameras have improved. Users like to use photos to record their lives and share photos or videos on social networks. Currently, most fun photos are manually synthesized in post-production, which is extremely inconvenient for some users who have no basic knowledge of photo editing. For example, to synthesize a fun heart-shaped photo, users need to manually edit the material, which is difficult for some novice users to complete the editing of fun photos.

[0003] In the process of implementing this application, the inventors found that there are at least the following problems in the prior art:

[0004] Currently, interesting photos uploaded by users to social networks are all manually selected and edited by users, which is extremely inconvenient for some people who do not know how to use image editing and layout tools. The relevant technology cannot flexibly edit and layout according to the features in the photos.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and readable storage medium, which can solve the problem of inconvenient image editing due to the reliance on users to manually select and edit photos in the related art, and the inability to flexibly edit and layout according to the features in the photos.

[0007] In order to solve the above technical problems, this application is implemented as follows:

[0008] In a first aspect, an embodiment of the present application provides an image processing method, comprising: acquiring image features of an image to be processed; displaying at least one image template corresponding to the image features; receiving a first input acting on the at least one image template; in response to the first input, performing image processing on the image to be processed according to the image template selected by the first input to obtain a target image; and displaying the target image.

[0009] In a second aspect, an embodiment of the present application provides an image processing device, comprising: an acquisition unit, used to acquire image features of an image to be processed; a first display unit, used to display at least one image template corresponding to the image features; a receiving unit, used to receive a first input acting on the at least one image template; a processing unit, used to respond to the first input and perform image processing on the image to be processed according to the image template selected by the first input to obtain a target image; and a second display unit, used to display the target image.

[0010] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the image processing method described in the first aspect.

[0011] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the image processing method described in the first aspect are implemented.

[0012] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the image processing method as described in the first aspect.

[0013] In the embodiment of the present application, the image features of the image to be processed are determined; at least one image template corresponding to the image features is displayed; a first input acting on at least one image template is received; in response to the first input, the image to be processed is processed according to the image template selected by the first input to obtain a target image; and the target image is displayed. Flexible image processing of the image to be processed according to the image features is achieved, which reduces the manual dependence on the user and improves the convenience of image processing, thereby solving the problem of inconvenient image editing caused by the reliance on the user to manually select and edit photos in the related art, and the inability to flexibly edit and layout according to the features in the photos. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a schematic diagram of a hardware environment of an optional image processing method according to an embodiment of the present invention;

[0015] Figure 2 is a flowchart of an optional image processing method according to an embodiment of the present invention;

[0016] Figure 3a is a schematic diagram of an optional image processing interface according to an embodiment of the present invention;

[0017] Figure 3b is a schematic diagram of another optional image processing interface according to an embodiment of the present invention;

[0018] Figure 4a is a schematic diagram of an optional image to be processed according to an embodiment of the present invention;

[0019] Figure 4b is a schematic diagram of another optional image processing interface according to an embodiment of the present invention;

[0020] Figure 4c is a schematic diagram of an optional target image according to an embodiment of the present invention;

[0021] Figure 5 is a schematic diagram of another optional image processing interface according to an embodiment of the present invention;

[0022] Figure 6 is a schematic diagram of another optional image processing interface according to an embodiment of the present invention;

[0023] Figure 7 is a schematic diagram of another optional image processing interface according to an embodiment of the present invention;

[0024] Figure 8 is a schematic structural diagram of an optional image processing device according to an embodiment of the present invention;

[0025] Fig. 9 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here. In addition, the "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.

[0028] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0029] According to one aspect of an embodiment of the present invention, an image processing method is provided. Optionally, as an optional implementation, the image processing method may be, but is not limited to, applied to Figure 1 In the environment shown, Figure 1 Schematic diagram of the hardware environment of the image processing method according to an embodiment of the present invention. Figure 1 As shown, the electronic terminal 10 includes an input component 100 , an image acquisition component 200 , a processor 300 and a display component 400 .

[0030] In this embodiment, the electronic terminal 10 inputs an image to be processed through the input component 100 or obtains an image to be processed through the image acquisition component 200, displays the image to be processed in the first preview window 410 of the display component 400, determines the image features of the image to be processed through the processor 300, and displays at least one image template corresponding to the image features in the second preview window 420 of the display component 400; receives a first input acting on at least one image template; in response to the first input, the processor 300 performs image processing on the image to be processed according to the image template selected by the first input to obtain a target image; and displays the target image in the first preview window 410. In this embodiment, flexible image processing of the image to be processed according to the image features is realized, which reduces the manual dependence on the user and improves the convenience of image processing.

[0031] In this embodiment, the terminal system of the electronic terminal includes but is not limited to Android system, iOS system, Linux system, etc. In this embodiment, no limitation is imposed on the terminal system of the electronic terminal.

[0032] According to an embodiment of the present application, an image processing method is proposed. Figure 2 As shown, the method may specifically include the following steps:

[0033] S202, obtaining image features of the image to be processed;

[0034] S204, displaying at least one image template corresponding to the image feature;

[0035] S206, receiving a first input acting on at least one image template;

[0036] S208, in response to the first input, performing image processing on the image to be processed according to the image template selected by the first input to obtain a target image;

[0037] S210, displaying a target image.

[0038] In this embodiment, the image to be processed can be an image or video frame in any format, can be acquired in real time by an electronic terminal, or can be a specified image input into a preset application. In this embodiment, there is no limitation on the acquisition method and acquisition method of the image to be processed.

[0039] In this embodiment, the image features include but are not limited to gesture features, color features, and facial features such as expression features, lip shape features, etc. The above is only an example and does not impose any limitation on the image features in this embodiment.

[0040] In this embodiment, image recognition is performed on the image to be processed to obtain image features of the image to be processed. In addition, the image features of the image to be processed are recognized in ways that include but are not limited to object recognition, text recognition, expression recognition and other image recognition methods. Specifically, there are mature methods for image feature recognition methods in the prior art, which will not be described in detail in this embodiment.

[0041] As an optional technical solution, in this embodiment, image recognition of the image to be processed includes but is not limited to: performing image recognition on multiple images to be processed to obtain the same image features of the multiple images to be processed, and determining the image template corresponding to the same image features. It should be noted that the multiple here refers to the number of images to be processed as two or more. Specifically, similar image features of multiple images to be processed are determined to be the same image features, and then the image template corresponding to the same image features is determined, and the multiple images to be processed are uniformly processed or batch processed. The multiple images to be processed include but are not limited to multiple photos obtained through the camera continuous shooting mode, or multiple photos in the album selected by the user, and multiple consecutive video frames in the video.

[0042] It should be noted that the image template is determined based on the image features of the image to be processed, and the image template is associated with the image features. For example, in one example, if the facial expression feature in the image to be processed is identified as "happy", the image template of the image to be processed is determined to be the relevant image template corresponding to "happy"; in another example, if the gesture feature to be processed is identified as "love", the image template of the image to be processed is determined to be the relevant image template corresponding to "love".

[0043] In a specific application scenario, the image features of the image to be processed are obtained and displayed in the first preview window. The first preview window can be a preview interface of a mobile phone camera, or an editing preview interface of the image to be processed in a preset application, which is used to display all or part of the image to be processed. After the image features of the image to be processed are obtained, at least one image template corresponding to the image features is displayed in the second preview window. The second preview window is used to display the image template. The image template can be a template of the target image, such as a puzzle template, a component template, a cropping template, etc. Among them, the puzzle template is a template formed by splicing multiple images, the component template is a template for adding preset components (components such as flowers, suns, text, etc.) to the image, and the cropping template is a template for cropping the image according to a preset shape or size. The above image template is only an example and does not impose any limitation on the image template in this embodiment.

[0044] In this embodiment, the first input includes but is not limited to selection operations such as clicking, long pressing, and sliding on a virtual button or a preset control in the touch display screen. It can also be a click, long pressing, or sliding operation on a physical button. Specifically, the first input acts on the image template displayed in the second preview window. By receiving the first input, the image template selected by the user can be determined, and image processing can be performed on the image to be processed using the image template selected by the user.

[0045] Specifically, the image processing method includes but is not limited to splicing, adding components, cropping, and adding filters to the image to be processed. In this embodiment, the image processing method for the image to be processed is mainly determined based on the image template.

[0046] Finally, the target image is displayed in the first preview interface. The target image is an image obtained by processing the image to be processed according to the corresponding image template. The first preview interface also includes undo and save controls for saving the target image or undoing the editing of the image to be processed.

[0047] Through this embodiment, the image features of the image to be processed are determined; at least one image template corresponding to the image features is displayed; a first input acting on at least one image template is received; in response to the first input, image processing is performed on the image to be processed according to the image template selected by the first input to obtain a target image; and the target image is displayed. Flexible image processing of the image to be processed according to the image features is achieved, which reduces the manual dependence on the user and improves the convenience of image processing.

[0048] Optionally, in this embodiment, obtaining image features of the image to be processed includes but is not limited to: determining the image acquisition mode of a preset application in the electronic terminal; performing image acquisition according to the image acquisition mode and displaying the image to be processed; performing image recognition on the image to be processed to obtain image features.

[0049] Specifically, in this embodiment, after selecting the image acquisition mode, image acquisition is performed to obtain the image to be processed, the image to be processed is displayed in the first preview window, and image recognition is performed on the image to be processed. In one example, for example, by selecting the automatic editing shooting mode in the camera application of the mobile phone, the photo is previewed in the photo preview interface after taking the photo, and image recognition is performed on the preview photo to obtain the image features of the preview photo.

[0050] By setting the image acquisition mode and then acquiring the image, after acquiring the image, image recognition can be directly performed on the image to be processed to obtain image features. The image features of the image to be processed can be directly obtained without the user making manual selections, thereby improving the convenience of image processing.

[0051] Optionally, in this embodiment, the image feature includes at least one of the following: a gesture feature, a lip shape feature, and an expression feature.

[0052] Specifically, performing image recognition on the image to be processed to obtain image features includes but is not limited to: performing gesture recognition on the image to be processed to obtain gesture features of the image to be processed; or performing lip shape recognition on the image to be processed to obtain lip shape features of the image to be processed; or performing facial recognition on the image to be processed to obtain expression features of the image to be processed. Specifically, in the present embodiment, image recognition on the image to be processed includes but is not limited to: performing gesture recognition and lip shape recognition on the image to be processed to obtain lip shape features and facial recognition to obtain corresponding image features respectively. Through the present embodiment, different image features can be obtained based on different recognition methods respectively, and then different image templates can be obtained, which increases the diversity of image processing.

[0053] Optionally, in this embodiment, displaying at least one image template corresponding to the image feature includes but is not limited to: querying an image template matching the image feature in a preset database; if there is at least one image template matching the image feature, displaying at least one image template; if there is no image template matching the image feature, displaying a prompt message, wherein the prompt message is used to indicate that there is no image template matching the image feature.

[0054] Specifically, in the present embodiment, after determining the image features of the image to be processed, an image template matching the image features is queried in a preset database, and the image template is queried based on the image features. The preset database may be a database of a cloud server or a local database of an electronic terminal, which is not limited in the present embodiment. After finding that there is an image template matching the image features, it is displayed in the second preview window, for example, the photo template is displayed in the photo template preview interface of the camera. If not, a prompt message is displayed in the second preview window, and the prompt message is used to prompt that there is no image template matching the image features. It should be noted that, in the present embodiment, the number of image templates displayed in the second preview window is not limited, and can be set specifically according to actual experience.

[0055] Through the above embodiment, the image template matching the image features is searched in the preset database and the query result is displayed, which can improve the matching degree between the image template used for image processing and the image to be processed, thereby realizing flexible processing of the image to be processed.

[0056] Optionally, in this embodiment, after searching for an image template that matches the image feature in a preset database, it also includes but is not limited to: if there is no image template that matches the image feature, obtaining the usage frequencies corresponding to multiple image templates in the preset database; selecting a preset number of target image templates based on the usage frequencies corresponding to the multiple image templates; and displaying a preset number of target image templates.

[0057] Specifically, in this embodiment, if there is no image template matching the image feature in the preset database, the image templates are sorted according to the usage frequency of the image templates in the preset database, and then the arrangement order of the image templates is obtained to obtain a preset number of target image templates, and the target image templates are displayed in the second preview window. It should be noted that the preset number can be set according to actual experience, and there is no limitation on this in this embodiment.

[0058] In another example, when there is no image template matching the image feature, by determining a similar image feature having a similarity with the image feature greater than a preset threshold, an image template matching the similar image feature is queried in a preset database, and an image template matching the similar image feature is displayed.

[0059] Through the above embodiments, when there is no image template matching the image feature, the usage frequency of the root image template pushes the image template, so that the pushed image template can adapt to the user's usage habits to improve the push accuracy of the image template.

[0060] Optionally, in this embodiment, the image template includes a component template, which includes at least one preset component, wherein in response to a first input, performing image processing on the image to be processed based on the image template selected by the first input includes but is not limited to: receiving a second input acting on at least one preset component, wherein the second input is used to adjust the position of the preset component; in response to the second input, determining the position of the preset component in the image to be processed based on the second input.

[0061] Specifically, in this embodiment, when the image template selected by the first input is a component template, the component template includes at least one preset component. Figure 3a In the image processing interface schematic diagram shown in the electronic terminal graphical user interface, a to-be-processed image 302 is displayed in a first preview window 310, and image templates 304, 306, and 308 are displayed in a second preview window 320. The image template selected by the first input is image template 306. Figure 3b In the process, a second input acting on a preset component 3060 in the image template 306 is received, the preset component 3060 is selected and dragged, and the position of the preset component 3060 and the image 302 to be processed is adjusted.

[0062] Through the above embodiment, by receiving the second input acting on the preset component and adjusting the position of the preset component and the image to be processed, image processing can be performed according to the user's input to enhance the user experience.

[0063] Optionally, in this embodiment, the image template includes a puzzle template, the puzzle template includes N image windows distributed according to preset positions, and the image windows are used to fill the image, wherein in response to the first input, image processing of the image to be processed according to the image template selected by the first input includes but is not limited to: receiving a third input acting on the puzzle template; in response to the third input, filling the image to be processed into N image windows respectively, wherein N is a positive integer greater than 1.

[0064] Specifically, in this embodiment, the image feature is taken as a gesture feature for example. Figure 4a As shown, image recognition is performed on the image to be processed 40 in the first preview window 410 to determine that the image feature of the image to be processed 40 is a gesture feature. Figure 4b As shown, a matching puzzle template is queried according to the gesture feature of the image to be processed 40, and a puzzle template 402 (a heart-shaped template composed of several image windows) and a puzzle template 404 (a double heart-shaped template composed of several image windows) matching the gesture feature are displayed in the second preview window 420, and a third input acting on the image template 402 is received. Figure 4cAs shown, the target image 42 processed by the puzzle template 402 is displayed in the first preview window, and the image windows in the target image 42 are filled with the images 40 to be processed.

[0065] Through the above embodiment, a puzzle template is selected through the third input, and image processing is performed on the image to be processed according to the puzzle template. This can realize image processing according to the user's input to enhance the user experience.

[0066] Optionally, in this embodiment, in response to the third input, filling the images to be processed into N image windows respectively includes but is not limited to: receiving a fourth input acting on M image windows; in response to the fourth input, filling the first image to be processed into M image windows, the first image to be processed being the current image to be processed; receiving a fifth input acting on P image windows; in response to the fifth input, controlling the electronic terminal to collect Q second images to be processed; filling the Q second images to be processed into P image windows, wherein M, P and Q are all positive integers, the sum of M and P is N, and Q is less than or equal to P.

[0067] In the above example, when the image template is a jigsaw template according to image feature matching, the images to be processed can be filled into multiple image windows of the jigsaw template respectively. In this embodiment, different images to be processed can be filled into different image windows respectively. After determining the jigsaw template for the current image to be processed, by selecting different image windows, a pre-stored image or a real-time acquired image can be selected to fill in the image window. It should be noted that in this example, there is no limit on the number of image windows filled with the images to be processed, and it can be set according to actual experience.

[0068] In one example, for example Figure 5 In the image processing interface schematic diagram shown, the selected puzzle template 500 is displayed in the first preview window 50, and the puzzle template includes an image window 502 and an image window 504. By dragging the photo A to the image window 502, the photo A is filled into the image window 502; by clicking the image window 504, the photo window 52 and the import window 54 are displayed in the first preview window, and the camera is called to take a photo by selecting the photo window 52, ​​and then the new photo taken is filled into the window 504. By selecting the photo window 54, the photos stored in the album are accessed, and the selected photos are filled into the image window 504.

[0069] Through the above embodiments, flexible processing of the image window in the puzzle template is achieved to increase the diversity in the image processing process.

[0070] As an optional technical solution, in this embodiment, the puzzle template is determined based on the first image feature of the third image to be processed, and the third image to be processed is the current image to be processed; wherein, in response to the third input, filling the images to be processed into N image windows respectively also includes but is not limited to: obtaining R fourth images to be processed; obtaining second image features corresponding to the R fourth images to be processed respectively; determining the target puzzle template among the multiple puzzle templates based on the sum R+1 of the number of the third image to be processed and the R second images to be processed, as well as the first image feature and R of the second image features, wherein R is a positive integer.

[0071] Specifically, after determining multiple puzzle templates through the gesture features of the first photo, if R photos are taken, then after the shooting is completed, the gesture features, the image features of the R photos and the number R+1 can be combined to further screen the puzzle templates that match them, so that the number of image windows required for the puzzle template corresponds to the total number of photos R+1 actually taken by the user.

[0072] Optionally, in this embodiment, in response to the third input, filling the images to be processed into N image windows respectively includes but is not limited to: receiving a sixth input, wherein the sixth input acts on two image windows among the N image windows; in response to the sixth input, exchanging the images to be processed in the two image windows.

[0073] In specific application scenarios, such as Figure 6 The schematic diagram of the image processing interface shown in the figure shows a target image 62 edited by the puzzle template in a first preview window 60, wherein the target image includes an image window 610 and an image window 612, the image filled in the image window 610 is an image 620, and the image filled in the image window 612 is an image 622. In one example, the images in the two image windows can be exchanged by selecting the image window 610 and the image window 612 and clicking the preset virtual button 64. In another example, the image to be processed in the image window 610 can be selected and dragged to the image window 620 to exchange the images to be processed in the two image windows.

[0074] Through the above embodiment, the sixth input acting on the two image windows in the puzzle template is used to achieve the position exchange adjustment of the images to be processed in the two image windows.

[0075] Optionally, in this embodiment, in response to the first input, image processing is performed on the image to be processed according to the image template selected by the first input to obtain a target image, and also includes but is not limited to: image processing is performed on the image to be processed according to the image template selected by the first input to obtain a first image; a seventh input acting on a preset control is received, wherein the seventh input is used to select a filter for the first image; in response to the seventh input, the first image is processed according to the filter to obtain the target image.

[0076] In specific application scenarios, such as Figure 7 The image processing interface schematic diagram shown displays a first image 710 obtained after processing based on an image template in a first preview window 70, and then selects a filter in a third preview window 72 through a seventh input, and then processes the first image 710 according to the filter.

[0077] Through the above embodiment, after the image to be processed is processed based on the image template to obtain the first image, further image processing can be performed on the first image according to the filter effect selected by the seventh input, thereby enriching the image processing method.

[0078] Optionally, in this embodiment, after performing image processing on the image to be processed according to the image template selected by the first input to obtain the target image in response to the first input, it also includes but is not limited to: setting the image features and the image template selected by the first input as a common template.

[0079] Specifically, in this embodiment, after the user completes processing the image to be processed according to the image template, the user's image features and image template are saved as common templates to achieve learning of the user's habits. Specifically, the user's facial features, gesture features, and expression features can be saved, and in the subsequent image processing process, the corresponding common template can be quickly found according to the image features, thereby improving the search speed of the image template and improving the user experience.

[0080] Optionally, in this embodiment, after the image features and the image template selected by the first input are set as a common template, it also includes but is not limited to: when the image features corresponding to the third image to be processed are the same as the image features corresponding to the common template, the common template is displayed in the second preview window.

[0081] In a specific application scenario, after the image features and the image template selected by the first input are set as the commonly used template, in the subsequent image processing process, if the image features of the image to be processed are the same as the corresponding image features in the commonly used template, the commonly used template is directly displayed in the second preview window. It should be noted that in this embodiment, the third image to be processed is used to indicate the image to be processed after the image template is saved as the commonly used template, that is, before the third image to be processed is processed, other images to be processed with the same image features as the third image to be processed have already completed the image processing.

[0082] As another optional method, in this embodiment, when the image features corresponding to the third image to be processed are the same as the image features corresponding to the commonly used templates, the commonly used templates are preferentially displayed or highlighted in the second preview window to improve the push efficiency of the image templates.

[0083] By displaying the common template in the second preview window when the image features corresponding to the third image to be processed are the same as the image features corresponding to the common template, the push efficiency of the common template is improved, thereby improving the user experience.

[0084] Through this embodiment, the image features of the image to be processed are determined; at least one image template corresponding to the image features is displayed in the second preview window; a first input acting on at least one image template is received; in response to the first input, the image to be processed is processed according to the image template selected by the first input to obtain a target image; and the target image is displayed in the first preview window. Flexible image processing of the image to be processed according to the image features is achieved, which reduces the manual dependence on the user and improves the convenience of image processing, thereby solving the problem of inconvenient image editing caused by the reliance on the user to manually select and edit photos in the related art, and the inability to flexibly edit and layout according to the features in the photos.

[0085] It should be noted that the image processing method provided in the embodiment of the present application can be executed by an image processing device or a control module in the image processing device for executing the method for loading image processing. In the embodiment of the present application, the image processing method provided in the embodiment of the present application is described by taking the method for loading image processing executed by an image processing device as an example.

[0086] According to another aspect of the embodiment of the present application, an image processing device is provided. Figure 8 As shown, the image processing device may specifically include:

[0087] 1) An acquisition unit 802, used to acquire image features of an image to be processed;

[0088] 2) A first display unit 804, configured to display at least one image template corresponding to the image feature;

[0089] 3) A receiving unit 806, configured to receive a first input acting on the at least one image template;

[0090] 4) a processing unit 808, configured to, in response to the first input, perform image processing on the image to be processed according to the image template selected by the first input to obtain a target image;

[0091] 5) A second display unit 810, used to display the target image.

[0092] Optionally, in this embodiment, the image feature includes at least one of the following: gesture feature, lip shape feature, expression feature

[0093] Optionally, in this embodiment, the first display unit 804 includes:

[0094] 1) A query module, used to query an image template matching the image feature in a preset database;

[0095] 2) a second display module, configured to display at least one image template matching the image feature in the second preview window if there is at least one image template matching the image feature;

[0096] 3) A prompt module, used for displaying a prompt message in the preset window if there is no image template matching the image feature, wherein the prompt message is used to indicate that there is no image template matching the image feature.

[0097] Optionally, in this embodiment, the first display unit 804 further includes:

[0098] 1) A second determination module, configured to obtain usage frequencies corresponding to a plurality of image templates in the preset database respectively if there is no image template matching the image feature after searching the preset database for the image template matching the image feature;

[0099] 2) a selection module, configured to select a preset number of target image templates according to the usage frequencies corresponding to the plurality of image templates;

[0100] 3) A third display module, configured to display the preset number of target image templates in the second preview window.

[0101] Optionally, in this embodiment, the image template includes a preset component, wherein the processing unit 808 includes:

[0102] 1) A first receiving module, configured to receive a second input acting on the preset component, wherein the second input is used to adjust the position of the preset component;

[0103] 2) A third determination module, configured to respond to the second input and determine, according to the second input, the position of the preset component in the image to be processed.

[0104] Optionally, in this embodiment, the image template includes a jigsaw template, the jigsaw template includes N image windows distributed according to preset positions, and the image windows are used to fill the image, wherein the processing unit 808 includes:

[0105] 1) A second receiving module, configured to receive a third input acting on the puzzle template;

[0106] 2) A filling module, configured to fill the to-be-processed images into the N image windows respectively in response to the third input, wherein N is a positive integer greater than 1.

[0107] Optionally, in this embodiment, the filling module includes:

[0108] 1) A first receiving submodule, configured to receive a fourth input acting on the M image windows;

[0109] 2) a first filling submodule, configured to fill the M image windows with a first image to be processed in response to the fourth input, wherein the first image to be processed is a current image to be processed;

[0110] 3) a second receiving submodule, configured to receive a fifth input acting on the P image windows;

[0111] 4) an image acquisition submodule, configured to control the electronic terminal to acquire Q second images to be processed in response to the fifth input;

[0112] 5) a second filling submodule, used to fill the Q second to-be-processed images into the P image windows,

[0113] Wherein, M, P and Q are all positive integers, wherein the sum of M and P is N, and Q is less than or equal to P.

[0114] The image processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0115] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0116] The image processing device provided in the embodiment of the present application can achieve Figures 1 to 7 To avoid repetition, the various processes implemented by the image processing device in the method embodiment will not be described here.

[0117] Through the image processing device proposed in this embodiment, the image features of the image to be processed are determined; at least one image template corresponding to the image features is displayed; a first input acting on at least one image template is received; in response to the first input, the image to be processed is processed according to the image template selected by the first input to obtain a target image; and the target image is displayed. Flexible image processing of the image to be processed according to the image features is achieved, which reduces the manual dependence on the user and improves the convenience of image processing, thereby solving the problem of inconvenient image editing caused by the reliance on the user to manually select and edit photos in the related art, and the inability to flexibly edit and layout according to the features in the photos.

[0118] Optionally, an embodiment of the present application also provides an electronic device, including a processor 910, a memory 909, and a program or instruction stored in the memory 909 and executable on the processor 910. When the program or instruction is executed by the processor 910, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0119] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0120] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0121] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.

[0122] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0123] Processor 910, used to obtain image features of an image to be processed;

[0124] A display unit 906, configured to display at least one image template corresponding to the image feature;

[0125] A user input unit 907, configured to receive a first input acting on the at least one image template;

[0126] The processor 910 is configured to, in response to the first input, perform image processing on the image to be processed according to the image template selected by the first input to obtain a target image;

[0127] The display unit 906 is configured to display the target image.

[0128] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 909 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 910 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 910.

[0129] Through the electronic device proposed in this embodiment, the image features of the image to be processed are obtained; at least one image template corresponding to the image features is displayed; a first input acting on at least one image template is received; in response to the first input, the image to be processed is processed according to the image template selected by the first input to obtain a target image; and the target image is displayed. Flexible image processing of the image to be processed according to the image features is achieved, which reduces the manual dependence on the user and improves the convenience of image processing, thereby solving the problem of inconvenient image editing caused by the reliance on the user to manually select and edit photos in the related art, and the inability to flexibly edit and layout according to the features in the photos.

[0130] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the method embodiment of the above-mentioned image processing method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0131] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0132] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the method embodiment of the above-mentioned image processing method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0133] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0134] It should be noted that, in this article, the term "comprises", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0136] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, It is characterized in that The method comprises: Obtaining image features of the image to be processed; Display at least one image template corresponding to the image feature; receiving a first input applied to the at least one image template; In response to the first input, performing image processing on the image to be processed according to the image template selected by the first input to obtain a target image; displaying the target image; The display of at least one image template corresponding to the image feature comprises: Searching a preset database for an image template that matches the image feature; If there is at least one image template matching the image feature, displaying the at least one image template; If there is no image template matching the image feature, a prompt message is displayed, and the usage frequencies corresponding to the plurality of image templates in the preset database are obtained, a preset number of target image templates are selected according to the usage frequencies corresponding to the plurality of image templates, and the preset number of target image templates are displayed; or, similar image features having a similarity with the image feature greater than a preset threshold are determined, image templates matching the similar image features are searched in the preset database, and image templates matching the similar image features are displayed; The prompt information is used to indicate that there is no image template matching the image feature.

2. The method according to claim 1, It is characterized in that The image features include at least one of the following: Gesture features, mouth shape features, and facial expression features.

3. The method according to claim 1, It is characterized in that After searching the preset database for an image template matching the image feature, the method further includes: If there is no image template matching the image feature, obtaining usage frequencies corresponding to a plurality of image templates in the preset database; Selecting a preset number of target image templates according to usage frequencies corresponding to the plurality of image templates; The preset number of target image templates are displayed.

4. The method according to claim 1, It is characterized in that The image template includes a component template, and the component template includes at least one preset component, wherein: In response to the first input, performing image processing on the image to be processed according to the image template selected by the first input includes: Receiving a second input acting on the at least one preset component, wherein the second input is used to adjust a position of the preset component; In response to the second input, the location of the preset component in the image to be processed is determined according to the second input.

5. The method according to claim 1, It is characterized in that The image template includes a jigsaw template, wherein the jigsaw template includes N image windows distributed according to preset positions, and the image windows are used to fill the image, wherein: In response to the first input, performing image processing on the image to be processed according to the image template selected by the first input includes: receiving a third input acting on the puzzle template; In response to the third input, the to-be-processed images are filled into the N image windows respectively, where N is a positive integer greater than 1.

6. The method according to claim 5, It is characterized in that In response to the third input, filling the to-be-processed images into the N image windows respectively comprises: receiving a fourth input acting on the M image windows; In response to the fourth input, filling the M image windows with a first image to be processed, wherein the first image to be processed is a current image to be processed; receiving a fifth input acting on P of the image windows; In response to the fifth input, controlling the electronic terminal to collect Q second images to be processed; Filling the Q second to-be-processed images into the P image windows; Among them, M, P and Q are all positive integers, the sum of M and P is N, and Q is less than or equal to P.

7. An image processing device, It is characterized in that The device comprises: An acquisition unit, used for acquiring image features of an image to be processed; A first display unit, used to display at least one image template corresponding to the image feature; A receiving unit, configured to receive a first input acting on the at least one image template; a processing unit, configured to, in response to the first input, perform image processing on the image to be processed according to the image template selected by the first input to obtain a target image; A second display unit, used for displaying the target image; The first display unit comprises: A query module, used to query an image template matching the image feature in a preset database; a second display module, configured to display at least one image template matching the image feature if there is at least one image template; A prompt module, used for displaying a prompt message if there is no image template matching the image feature, and obtaining the usage frequencies corresponding to multiple image templates in the preset database, selecting a preset number of target image templates according to the usage frequencies corresponding to the multiple image templates, and displaying the preset number of target image templates, or determining similar image features with a similarity to the image feature greater than a preset threshold, querying the preset database for image templates matching the similar image features, and displaying image templates matching the similar image features; wherein the prompt message is used to indicate that there is no image template matching the image feature.

8. The device according to claim 7, It is characterized in that The image features include at least one of the following: Gesture features, mouth shape features, and facial expression features.

9. The device according to claim 7, It is characterized in that The first display unit further includes: A second determination module is used to obtain usage frequencies corresponding to multiple image templates in the preset database after searching for an image template matching the image feature in the preset database, if there is no image template matching the image feature; A selection module, configured to select a preset number of target image templates according to usage frequencies corresponding to the plurality of image templates; The third display module is used to display the preset number of target image templates.

10. The device according to claim 7, It is characterized in that The image template includes a preset component, wherein the processing unit includes: A first receiving module, configured to receive a second input acting on the preset component, wherein the second input is used to adjust the position of the preset component; A third determining module is configured to respond to the second input and determine, according to the second input, the position of the preset component in the image to be processed.

11. The device according to claim 7, It is characterized in that The image template includes a jigsaw template, the jigsaw template includes N image windows distributed according to preset positions, and the image windows are used to fill the image, wherein the processing unit includes: A second receiving module, used for receiving a third input acting on the puzzle template; A filling module is used for filling the to-be-processed images into the N image windows respectively in response to the third input, wherein N is a positive integer greater than 1.

12. The device according to claim 11, It is characterized in that The filling module comprises: A first receiving submodule, configured to receive a fourth input acting on the M image windows; A first filling submodule is used for filling a first image to be processed into the M image windows in response to the fourth input, wherein the first image to be processed is a current image to be processed; A second receiving submodule, configured to receive a fifth input acting on the P image windows; An image acquisition submodule, configured to control the electronic terminal to acquire Q second images to be processed in response to the fifth input; A second filling submodule, used for filling the Q second to-be-processed images into the P image windows; Among them, M, P and Q are all positive integers, the sum of M and P is N, and Q is less than or equal to P.

13. An electronic device, It is characterized in that The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the image processing method according to any one of claims 1 to 6.

14. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the image processing method according to any one of claims 1 to 6 are implemented.