Image processing method and device and electronic equipment
By constructing a combination of image elements, users can select elements from different images to combine and generate images containing these elements or similar elements. This solves the problem of a single image processing method in the existing technology and achieves diversification and interest in image processing. promote.
Patent Information
- Application Number
- CN202410466769.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2024-09-10
AI Technical Summary
The image processing method in the existing technology is relatively single, lacks rich image processing methods, and cannot meet users' diverse image processing needs.
By receiving image input and constructing a combination of image elements for searching or editing images, users can select elements from different images to combine, generate images containing these elements or similar elements, and realize rich processing of images.
It enhances the interest and fun of image processing, provides richer image processing methods, enables users to achieve image search and editing by selecting and combining image elements, and meets diverse processing needs.
Smart Images

Figure CN118632115A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing, and specifically relates to an image processing method, device and electronic equipment. Background Art
[0002] With the popularity of electronic devices such as mobile phones and the increasing power of mobile photography functions, users often use electronic devices to take pictures and are accustomed to sharing the pictures. However, the existing technology usually only supports image retouching, beautification, puzzle making and other processing. It can be seen that the existing image processing methods are relatively simple. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an image processing method, device and electronic device, which can enrich the image processing methods.
[0004] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising:
[0005] Receiving a first input of at least one image;
[0006] In response to the first input, an image element combination is constructed according to image elements in the at least one image corresponding to the first input; the image element combination is used to perform at least one of the following: searching for an image, editing an image.
[0007] In a second aspect, an embodiment of the present application provides an image processing device, including:
[0008] A receiving module, configured to receive a first input of at least one image;
[0009] A construction module is used to construct an image element combination based on image elements in the at least one image corresponding to the first input in response to the first input; the image element combination is used for at least one of searching for an image and editing an image.
[0010] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[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 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 method described in the first aspect.
[0013] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0014] In an embodiment of the present application, a first input of at least one image is received; in response to the first input, an image element combination is constructed based on the image elements in the at least one image corresponding to the first input; the image element combination is used for at least one of searching for an image and editing an image. In this way, a user can select image elements from different images respectively, and the electronic device constructs an image element combination based on the image elements selected by the user, and uses it to search for images or edit images to obtain images containing these image elements or similar image elements, thereby enriching the image processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flowchart of an image processing method provided in an embodiment of the present application;
[0016] Figure 2 It is a schematic diagram of an interface for selecting image elements from different images to construct an image element combination provided by an embodiment of the present application;
[0017] Figure 3 This is a schematic diagram of an operation interface for replacing a certain image element in an image element combination provided by an embodiment of the present application;
[0018] Figure 4 This is a schematic diagram of an operation interface for replacing a certain image element in an image element combination provided by an embodiment of the present application;
[0019] Figure 5 It is a schematic diagram of an operation interface for replacing corresponding image elements in a certain image with one key by using image elements in an image element combination provided by an embodiment of the present application;
[0020] Figure 6 This is a schematic diagram of an image effect after replacing image elements with one click provided in an embodiment of the present application;
[0021] Figure 7 is a structural diagram of an image processing device provided in an embodiment of the present application;
[0022] Figure 8 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0023] Fig. 9 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0025] 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 terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0026] The purpose of this application is to provide a method for image processing. The improvements of the embodiments and optional implementations of this application mainly include: a search element can be constructed based on an image element; all images containing the search element can be found based on the search element, or information search can be performed; the searched images can be batch processed; the search element can be saved as a search template, and the user can edit the search template to obtain a new search element, or the image elements can be extracted and aggregated to form an integrated image.
[0027] 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.
[0028] See also Figure 1 , Figure 1 A flowchart of an image processing method provided in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0029] Step 101: Receive a first input of at least one image.
[0030] In an embodiment of the present application, users are supported to select image elements in an image, and can select image elements from different images respectively, and then perform subsequent processing based on the selected image elements, such as searching for images with similar image elements or replacing corresponding image elements in a certain image.
[0031] The at least one image may be an image in a local album or an image from a social platform. The first input may be an input that triggers the recognition of image elements in an image and the selection or extraction of image elements in the image. For example, a user clicks on an image in an album and then clicks on a function control for recognizing image elements in an image. The electronic device begins to recognize different image elements in the image, such as recognizing different objects: people, trees, buildings and other elements. It may also be recognition of a certain type of image elements, such as recognition of clothing elements of people in an image: clothes, pants, hats, glasses and other elements. After recognition, the recognized image elements in the image are in a clickable selectable / extractable state, and the user may further select some of the image elements, thereby completing the selection operation of the image elements.
[0032] Step 102: In response to the first input, construct an image element combination according to image elements in the at least one image corresponding to the first input; the image element combination is used to perform at least one of the following: searching for an image, editing an image.
[0033] The electronic device can respond to the user's first input and construct an image element combination based on the image elements selected by the user from different images. For example, the image elements selected by the user can be extracted from each image and combined to form an image element combination, which can also be called a search element combination.
[0034] For example, Figure 2 As shown, the user selected the elements of "glasses", "windbreaker" and "shoes" from three images 21 of different dressing styles in the album, and put these three elements together into a frame to form an image element combination 22.
[0035] In an embodiment of the present application, the image element combination can be used for subsequent image searching, image editing and other processing. Specifically, after the image element combination is determined, it is possible to search for images containing all image elements in the image element combination based on the image elements in the image element combination, or to search for images containing all image elements that are respectively similar to each image element in the image element combination. For example, if the image element combination includes a first image element, a second image element and a third image element, it is possible to determine an image containing an image element similar to the first image element, an image element similar to the second image element and an image element similar to the third image element; it is also possible to apply a one-click replacement of the corresponding image element to the image element in the image element combination for a certain image.
[0036] Optionally, the image element combination is used to search for images;
[0037] The method further comprises:
[0038] The first image is obtained by searching using the image element combination, wherein the first image includes each image element in the image element combination, or the first image includes an image element whose similarity with each image element in the image element combination satisfies a first condition.
[0039] In one embodiment, the image element combination can be used to search for images containing similar image elements, that is, after the image element combination is constructed, the first image including these image elements or including image elements whose similarity with these image elements meets a certain condition can be searched based on the image elements in the image element combination, and the first condition can be that the similarity is higher than a certain value, or not lower than a certain value, such as higher than 80%, 90%, etc. Exemplarily, if the image element combination includes the elements "glasses", "windbreaker", and "shoes", images including these elements at the same time or including elements with similar styles to these elements can be searched.
[0040] Through this implementation, users can be supported to perform image search processing on selected image elements, making the image processing method richer and more interesting than the existing one, which can enhance users' interest in image processing and allow them to experience the fun of image interactive operations.
[0041] Optionally, the image element combination is used to edit an image;
[0042] The method further comprises:
[0043] For each image element in the image element combination, the image element is used to replace the corresponding image element in the third image to obtain a fourth image.
[0044] In another embodiment, image element replacement processing can be performed on a certain image based on the image elements in the image element combination, such as performing one-click replacement of image elements in the image corresponding to each image element in the image element combination with image elements in the image element combination, thereby generating an interesting image, such as replacing selected dressing elements on a certain character in the image, and generating a dressing effect of the character trying on the selected dressing elements.
[0045] Through this implementation, users can be supported to process selected image elements by replacing image elements, making the image processing method richer and more interesting, which can enhance users' interest in image processing and allow them to experience the fun of image interaction operations.
[0046] Optionally, the at least one image is an image in an album, and the image element combination is used for at least one of searching for an image and editing an image from the album or a social platform;
[0047] Alternatively, the at least one image is an image in a social platform, and the image element combination is used for at least one of searching for an image from an album and editing an image.
[0048] In some embodiments, an image can be selected from an album to select an image element as a search element, and images containing similar image elements can be searched from the album, or image elements of an image in the album can be replaced. Network information can also be searched based on the search elements. For example, outfits similar to the search element can be searched from a social platform for reference, or image elements can be replaced for an image in a social platform.
[0049] In other embodiments, users may also generate search elements based on images on social platforms, and search for similar items they already have in their albums based on the search elements. They may also obtain image elements from social platforms and replace the images in the albums, such as applying the outfits of interest obtained on the social platform to their own images in the local albums to view the user's own trying-on effects.
[0050] In this way, users can apply the embodiments of the present application to perform interesting processing on images in different application scenarios.
[0051] Optionally, the obtaining the first image by searching using the image element combination includes:
[0052] For each image element in the image element combination, use the image element to perform image search to obtain a second image, wherein the second image includes the image element, or the second image includes an image element whose similarity with the image element meets a second condition;
[0053] The first image is generated according to the second image corresponding to each image element.
[0054] In some embodiments, it may not be possible to search for an image that contains all the image elements or similar image elements in the image element combination, so another search method can be used to search and generate such an image.
[0055] Specifically, each image element in the image element combination can be used as a search element to search for a second image that contains the corresponding image element or an image element whose similarity with the image element satisfies a second condition. The second condition can also be that the similarity is higher than a certain value, such as higher than 80%, 90%, etc. For each image element in the image element combination, at least one second image can be searched for separately. The second images searched with different image elements contain different image elements. Then, based on the second images corresponding to the image elements obtained by the search, a first image containing all the image elements of the image element combination, or containing image elements that are similar to each image element of the image element combination, can be generated by aggregation.
[0056] For example, the search elements generated based on the social platform are windbreaker, pants, and shoes, but the three search elements cannot be aligned in the album, that is, no image includes these three items at the same time. At this time, the corresponding search image can be displayed for each search element, and the user can select image elements from the search images corresponding to each search element for aggregation, thereby showing the user the dressing effect in the aggregated image.
[0057] This implementation can solve the problem of not being able to search for images that simultaneously contain all the image elements or similar image elements in the image element combination, and present the final searched image effect to the user by searching for image elements separately and aggregating and generating images.
[0058] Optionally, generating the first image according to the second image corresponding to each image element includes:
[0059] Image elements are extracted from the second image corresponding to each image element and aggregated to generate the first image.
[0060] In some embodiments, for the second image obtained by searching with each image element, the corresponding image elements in each image can be extracted respectively, and the extracted image elements can be aggregated to generate a first image containing all image elements or all similar image elements in the image element combination.
[0061] Through this implementation, an image containing all image elements or all similar image elements in the image element combination can be quickly and accurately aggregated and generated.
[0062] Optionally, the method further comprises:
[0063] receiving a second input for an image element in the image element combination, wherein the second input comprises at least one of a delete input, an edit input, and a replace input;
[0064] In response to the second input, the image element combination is updated.
[0065] In some embodiments, the user can be supported to perform some operations on the image elements in the image element combination, such as deletion, replacement, editing, etc., and the search or editing results based on the image element combination can be synchronously updated according to the operation on the image element, that is, the image is re-searched based on the updated image element combination or the image elements in the image are replaced with the updated image elements with one key. Among them, the deletion input can be to delete one or some image elements in the image element combination, the editing input can be to edit and adjust one or some image elements in the image element combination, such as changing the style, and the replacement input can be to replace one or some image elements in the image element combination with other image elements.
[0066] In this way, users can flexibly modify the image elements in the image element combination according to their needs. If the user is not satisfied with the effect of the currently searched or generated image, the user can return to make relevant changes to the image elements in the image element combination and then search or replace them again to obtain a new image.
[0067] Optionally, in response to the second input, updating the image element combination includes at least one of the following:
[0068] In response to a deletion input of a first image element in the image element combination, deleting the first image element from the image element combination, wherein the updated target image does not include an image element that is identical to the first image element or whose similarity satisfies a first condition, and the first image element is any image element in the image element combination;
[0069] In response to an edit input to a second image element in the image element combination, the second image element is edited to obtain a third image element, and the second image element in the image element combination is updated to the third image element, wherein the updated target image includes an image element that is identical to the third image element or that has a similarity that satisfies a first condition, and does not include an image element that is identical to the second image element or that has a similarity that satisfies the first condition, and the second image element is any image element in the image element combination;
[0070] In response to a replacement input of a fourth image element in the image element combination, searching for K image elements whose similarity to the fourth image element satisfies a third condition, and in response to a selection input of a fifth image element in the K image elements, replacing the fourth image element in the image element combination with the fifth image element, wherein the updated target image includes an image element that is identical to the fifth image element or whose similarity satisfies a first condition, and does not include an image element that is identical to the fourth image element or whose similarity satisfies the first condition, wherein K is a positive integer, the fourth image element is any image element in the image element combination, and the fifth image element is any image element among the K image elements;
[0071] The target image is a first image obtained by searching for a combination of original image elements or a fourth image obtained by replacing corresponding image elements in a third image with a combination of original image elements.
[0072] In some embodiments, the user can delete an image element in the image element combination to remove the image element from the original image element combination, and then update the target image based on the updated image element combination so that the updated target image does not contain the image element or an image element similar to the image element.
[0073] For example, when an image element is sensitive information, or the user does not like these local elements and needs to delete them, the image element can be deleted; the user can also delete all image elements, delete some image elements, or select some or all image elements to generate an image element collection.
[0074] For example, the original search for similar outfits was based on the image element combination of "glasses + jacket + shoes". After the deletion operation, the search for similar outfits is now based on the image element combination of "glasses + jacket".
[0075] In some embodiments, a user may edit an image element in the image element combination to make edit adjustments to the image element, such as changing the style of the image element, thereby obtaining a new image element, and then updating the target image based on the updated image element combination so that the updated target image includes image elements similar to the new image element.
[0076] For example, if an original image element is a pair of low-top shoes, the user can change the style of the shoes by manually editing, turning them into high-top shoes, or turning running shoes into basketball shoes, thereby achieving refined search of different styles.
[0077] In some embodiments, a user may replace an image element in the image element combination to replace the image element with another image element to obtain a new image element, and then update the target image based on the updated image element combination so that the updated target image includes image elements similar to the replaced image elements.
[0078] For example, the user needs to replace a certain image element in the image element combination with an image element in another image. After the user performs this operation, all images in the album can be analyzed to find images similar to the image element, and the images can be displayed for the user to select. After the user selects the image element to be replaced, the similar elements of some or all image elements are replaced. The interactive interface of the replacement operation can be as follows: Figure 3 and Figure 4 As shown, Figure 3 As shown, the user clicks on the "glasses" element 31 in the image element combination to replace the element, and the electronic device searches for glasses images similar to the "glasses" element from the album and displays the searched similar glasses image elements 32, as shown in FIG. Figure 4 As shown, the user can click on one of the glasses image elements to replace the "glasses" element in the image element combination. In some embodiments, two application options may pop up, such as option 41 of "Apply to all" and option 42 of "Select images to apply". When the user selects option 41 of "Apply to all", it will trigger all target images containing the "glasses" element to be uniformly replaced with glasses of the selected replacement style. When the user selects option 42 of "Select images to apply", the image to be replaced will pop up for the user to select and apply. After selection, it will trigger only the selected image containing the "glasses" element to be replaced with glasses of the selected replacement style.
[0079] This implementation can meet the user's need to return for modification when the user is not satisfied with the image processing result, until a target image that meets the user's needs is generated.
[0080] Optionally, the method further comprises:
[0081] receiving a third input of a first image element in the image element combination, wherein the third input is an input of dragging the first image element to a fifth image;
[0082] In response to the third input, a corresponding image element in the fifth image is replaced by the first image element.
[0083] That is, in some embodiments, the user can trigger the process of replacing the corresponding image elements in the image with the dragged image elements by dragging an image element or some image elements in the image element combination onto the image that needs to be replaced.
[0084] For example, if a user drags a "windbreaker" element in the image element combination to an image of a person wearing a short coat, the "short coat" element in the image of the person is replaced with the "windbreaker" element, and the effect of the image of the person trying on the "windbreaker" is obtained.
[0085] Through this implementation, users can realize quick image element replacement processing by dragging and selecting image elements to the desired replacement image, which not only enriches the image processing methods but also makes the operation simple and interesting.
[0086] Optionally, after step 101, the method further includes:
[0087] Displaying the image elements in the image element combination in the first area;
[0088] The step of replacing a corresponding image element in the third image with each image element in the image element combination to obtain a fourth image includes:
[0089] In response to the image selection input, determining a third image to be processed;
[0090] In response to an input of dragging the third image to the first area, each image element in the third image is replaced by a corresponding image element in the image element combination.
[0091] In some embodiments, when an image containing each image element of the image element combination is generated by replacing image elements of an image with one click, the function of replacing image elements with one click can be triggered by dragging the image element combination into the image to be processed with one click.
[0092] Specifically, when selecting an image element, the selected image element can be added to the display area where the image element combination is located on the interface, such as Figure 5 As shown, each image element in the image element combination is displayed together in the area frame 51, and then the user can select the image whose image elements he wants to replace with one key, such as selecting an image from an album, and dragging the image into the display area where the image element combination is located. The electronic device responds to the user operation and replaces each image element in the dragged image that corresponds to each image element in the image element combination one by one with each image element in the image element combination. For example, if the user selects a person image 52, after dragging the image into the display area frame 51 where the image element combination is located, the dressing elements in the person image 52 are replaced with the corresponding dressing elements in the image element combination. The dressing effect image generated after the replacement is shown in FIG. Figure 6 As shown, in this way, the user can see the dressing effect of the selected character after wearing the dressing elements of his choice.
[0093] In this implementation, the user can select an image and drag it into the image to replace related image elements in the image with one click, and the interaction method is simple and fast.
[0094] Optionally, the image element is a dressing element.
[0095] In one application scenario, the embodiments of the present application can be used to perform specific processing on the dressing elements in the image, helping the user to obtain images of the selected dressing style, or search whether the selected dressing items already exist, or preview the dressing effect of trying on the selected dressing style. This achieves novel and unique processing of the image, and enhances the user's interest and fun in processing the image.
[0096] The image processing method in the embodiment of the present application receives a first input of at least one image; in response to the first input, an image element combination is constructed based on the image elements in the at least one image corresponding to the first input; the image element combination is used for at least one of searching for an image and editing an image. In this way, the user can select image elements from different images respectively, and the electronic device constructs an image element combination based on the image elements selected by the user, and uses it to search for images or replace images to obtain images containing these image elements or similar image elements, thereby enriching the image processing method.
[0097] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the image processing device provided in the embodiment of the present application.
[0098] See also Figure 7 , Figure 7 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the image processing device 700 includes:
[0099] The receiving module 701 is used to receive a first input of at least one image;
[0100] The construction module 702 is used to construct an image element combination according to the image elements in the at least one image corresponding to the first input in response to the first input; the image element combination is used for at least one of searching for an image and editing an image.
[0101] Optionally, the image element combination is used to search for images;
[0102] The image processing apparatus 700 further includes:
[0103] The search module is used to search for a first image using the image element combination, wherein the first image includes each image element in the image element combination, or the first image includes an image element whose similarity with each image element in the image element combination satisfies a first condition.
[0104] Optionally, the search module includes:
[0105] A search unit, configured to perform an image search using each image element in the image element combination to obtain a second image, wherein the second image includes the image element, or the second image includes an image element whose similarity with the image element satisfies a second condition;
[0106] A generating unit is used to generate the first image according to the second image corresponding to each image element.
[0107] Optionally, the generating unit is used to extract image elements from the second image corresponding to each image element, perform aggregation processing, and generate the first image.
[0108] Optionally, the image element combination is used to edit an image;
[0109] The image processing apparatus 700 further includes:
[0110] The first replacement module is used to replace the corresponding image element in the third image with each image element in the image element combination to obtain a fourth image.
[0111] Optionally, the receiving module is further used to receive a second input for the image element in the image element combination, wherein the second input includes at least one of a deletion input, an editing input and a replacement input;
[0112] The image processing apparatus 700 further includes:
[0113] An updating module is used to update the image element combination in response to the second input.
[0114] Optionally, the update module includes at least one of the following:
[0115] a deleting unit, configured to delete a first image element in the image element combination in response to a deletion input to the first image element in the image element combination, wherein the updated target image does not include an image element that is identical to the first image element or whose similarity satisfies a first condition, and the first image element is any image element in the image element combination;
[0116] an editing unit, configured to edit a second image element in the image element combination in response to an editing input to the second image element to obtain a third image element, and update the second image element in the image element combination to the third image element, wherein the updated target image includes an image element that is identical to the third image element or whose similarity satisfies a first condition, and does not include an image element that is identical to the second image element or whose similarity satisfies the first condition, and the second image element is any image element in the image element combination;
[0117] a first replacement unit, configured to, in response to a replacement input of a fourth image element in the image element combination, search for K image elements whose similarity to the fourth image element satisfies a third condition, and, in response to a selection input of a fifth image element among the K image elements, replace the fourth image element in the image element combination with the fifth image element, wherein the updated target image includes an image element that is identical to the fifth image element or whose similarity satisfies the first condition, and does not include an image element that is identical to the fourth image element or whose similarity satisfies the first condition, wherein K is a positive integer, the fourth image element is any image element in the image element combination, and the fifth image element is any image element among the K image elements;
[0118] The target image is a first image obtained by searching for a combination of original image elements or a fourth image obtained by replacing corresponding image elements in a third image with a combination of original image elements.
[0119] Optionally, the receiving module is further used to receive a third input of the first image element in the image element combination, wherein the third input is an input of dragging the first image element to a fifth image;
[0120] The image processing apparatus 700 further includes:
[0121] The second replacement module is used to replace the corresponding image element in the fifth image with the first image element in response to the third input.
[0122] Optionally, the image element is a dressing element.
[0123] Optionally, the at least one image is an image in an album, and the image element combination is used for at least one of searching for an image and editing an image from the album or a social platform;
[0124] Alternatively, the at least one image is an image in a social platform, and the image element combination is used for at least one of searching for an image from an album and editing an image.
[0125] The image processing device 700 in the embodiment of the present application receives a first input of at least one image; in response to the first input, an image element combination is constructed based on the image elements in the at least one image corresponding to the first input; the image element combination is used for at least one of searching for an image and editing an image. In this way, the user can select image elements from different images respectively, and the electronic device constructs an image element combination based on the image elements selected by the user, and uses it to search for images or edit images to obtain images containing these image elements or similar image elements, thereby enriching the image processing method.
[0126] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0127] 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.
[0128] The image processing device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.
[0129] Alternatively, if Figure 8As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0130] 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.
[0131] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0132] 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.
[0133] 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.
[0134] The user input unit 907 is used for:
[0135] Receiving a first input of at least one image;
[0136] The processor 910 is configured to:
[0137] In response to the first input, an image element combination is constructed according to image elements in the at least one image corresponding to the first input; the image element combination is used to perform at least one of the following: searching for an image, editing an image.
[0138] Optionally, the image element combination is used to search for images;
[0139] The processor 910 is further configured to:
[0140] The first image is obtained by searching using the image element combination, wherein the first image includes each image element in the image element combination, or the first image includes an image element whose similarity with each image element in the image element combination satisfies a first condition.
[0141] Optionally, the processor 910 is further configured to:
[0142] For each image element in the image element combination, use the image element to perform image search to obtain a second image, wherein the second image includes the image element, or the second image includes an image element whose similarity with the image element meets a second condition;
[0143] The first image is generated according to the second image corresponding to each image element.
[0144] Optionally, the processor 910 is further configured to:
[0145] Image elements are extracted from the second image corresponding to each image element and aggregated to generate the first image.
[0146] Optionally, the image element combination is used to edit an image;
[0147] The processor 910 is further configured to:
[0148] For each image element in the image element combination, the image element is used to replace the corresponding image element in the third image to obtain a fourth image.
[0149] Optionally, the user input unit 907 is used to:
[0150] receiving a second input for an image element in the image element combination, wherein the second input comprises at least one of a delete input, an edit input, and a replace input;
[0151] The processor 910 is further configured to:
[0152] In response to the second input, the image element combination is updated.
[0153] Optionally, the user input unit 907 is used to:
[0154] receiving a third input of a first image element in the image element combination, wherein the third input is an input of dragging the first image element to a fifth image;
[0155] The processor 910 is further configured to: in response to the third input, replace a corresponding image element in the fifth image with the first image element.
[0156] Optionally, the image element is a dressing element.
[0157] Optionally, the at least one image is an image in an album, and the image element combination is used for at least one of searching for an image and editing an image from the album or a social platform;
[0158] Alternatively, the at least one image is an image in a social platform, and the image element combination is used for at least one of searching for an image from an album and editing an image.
[0159] The electronic device in the embodiment of the present application can realize Figure 1 The various processes implemented by the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.
[0160] 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 at least one of 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, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0161] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0162] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
[0163] 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 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.
[0164] The processor is the 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.
[0165] 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 above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0166] 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.
[0167] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0168] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are 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 "comprise 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 methods and devices in the embodiments 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.
[0169] 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 computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0170] 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, characterized in that: include: Receiving a first input of at least one image; In response to the first input, an image element combination is constructed according to image elements in the at least one image corresponding to the first input; the image element combination is used to perform at least one of the following: searching for an image, editing an image.
2. The method according to claim 1, characterized in that The image element combination is used to search for images; The method further comprises: The first image is obtained by searching using the image element combination, wherein the first image includes each image element in the image element combination, or the first image includes an image element whose similarity with each image element in the image element combination satisfies a first condition.
3. The method according to claim 2, characterized in that The step of using the image element combination to search and obtain the first image comprises: For each image element in the image element combination, use the image element to perform image search to obtain a second image, wherein the second image includes the image element, or the second image includes an image element whose similarity with the image element meets a second condition; The first image is generated according to the second image corresponding to each image element.
4. The method according to claim 3, characterized in that The generating the first image according to the second image corresponding to each image element includes: Image elements are extracted from the second image corresponding to each image element and aggregated to generate the first image.
5. The method according to claim 1, characterized in that The image element combination is used to edit the image; The method further comprises: For each image element in the image element combination, the image element is used to replace the corresponding image element in the third image to obtain a fourth image.
6. The method according to claim 1, characterized in that The method further comprises: receiving a second input for an image element in the image element combination, wherein the second input comprises at least one of a delete input, an edit input, and a replace input; In response to the second input, the image element combination is updated.
7. The method according to claim 1, characterized in that The method further comprises: receiving a third input of a first image element in the image element combination, wherein the third input is an input of dragging the first image element to a fifth image; In response to the third input, a corresponding image element in the fifth image is replaced by the first image element.
8. The method according to claim 1, characterized in that: The image elements are dressing elements.
9. The method according to claim 1, characterized in that: The at least one image is an image in an album, and the image element combination is used for at least one of searching for an image from an album or a social platform and editing an image; Alternatively, the at least one image is an image in a social platform, and the image element combination is used for at least one of searching for an image from an album and editing an image.
10. An image processing device, characterized in that: include: A receiving module, configured to receive a first input of at least one image; A construction module is used to construct an image element combination based on image elements in the at least one image corresponding to the first input in response to the first input; the image element combination is used for at least one of searching for an image and editing an image.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, 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 9 are implemented.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the image processing method according to any one of claims 1 to 9 are implemented.
13. A computer program product, characterized in that The program product is stored in a storage medium, and the program product is executed by at least one processor to implement the image processing method according to any one of claims 1 to 9.
