Image processing method, device and computer readable storage medium
By detecting the user's image editing operations in social applications, the image areas of the cover and avatar are automatically determined, which solves the problem of cumbersome and insufficient flexibility in setting the cover and avatar in the prior art, and achieves a more efficient and personalized setting experience .
Patent Information
- Application Number
- CN202010368185.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-04-30
AI Technical Summary
Existing social applications are cumbersome when setting covers and avatars, and it is difficult to meet the personalized needs of users.
By acquiring the target image and detecting the user's editing operation in the image editing interface, the image area of the cover and avatar is automatically determined, allowing the user to freely crop and adjust.
It simplifies the operation process of setting covers and avatars, improves operation efficiency, enhances flexibility, and better meets users' personalized needs.
Smart Images

Figure CN113592983B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an image processing method, device and computer-readable storage medium. Background Art
[0002] At present, social applications such as instant messaging have become very popular and can be said to be essential applications for user terminals such as smartphones and tablets. In order to meet the personalized needs of users, such applications usually allow users to freely set covers and avatars. However, in actual use, it is found that setting covers and avatars usually requires uploading images and cropping them separately, which makes the setting operations of covers and avatars more cumbersome. In addition, some social applications also support directly using the image area at a fixed position in the cover image as the avatar when uploading the cover image, but the generated user avatar at this time often fails to meet the user's requirements. It can be seen that how to simplify the operation of setting covers and avatars and meet the personalized needs of users has become an urgent problem to be solved. Summary of the invention
[0003] The embodiments of the present invention provide an image processing method, device and computer-readable storage medium, which can effectively simplify the operations when setting the cover and avatar, and have strong flexibility, and can fully meet the user's personalized setting needs.
[0004] In a first aspect, an embodiment of the present invention provides an image processing method, the method comprising:
[0005] Get the target image.
[0006] Detecting editing operations on the target image and / or management components in the image editing interface of the application, wherein the management components include a cover area management component and an avatar area management component.
[0007] According to the editing operation, a first image area as a cover and a second image area as an avatar are determined from the target image.
[0008] In a second aspect, an embodiment of the present invention provides an image processing device, the device comprising:
[0009] The acquisition module is used to acquire the target image.
[0010] A detection module is used to detect editing operations on the target image and / or management components in the image editing interface of the application, wherein the management components include a cover area management component and an avatar area management component.
[0011] A processing module is used to determine a first image area as a cover and a second image area as an avatar from the target image according to the editing operation.
[0012] In a third aspect, an embodiment of the present invention provides a user terminal, comprising a processor, a storage device, a network interface, and an input / output device, wherein the processor, the storage device, the network interface, and the input / output device are interconnected, wherein the network interface is controlled by the processor for sending and receiving data, the input / output device is used to detect touch operations and output images, the storage device is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the image processing method described in the first aspect.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer storage medium stores a computer program, the computer program includes program instructions, and the program instructions are executed by a processor to execute the image processing method described in the first aspect.
[0014] In an embodiment of the present invention, a user terminal obtains a target image, detects the user's editing operation on the target image and / or a management component in an image editing interface of an application, the management component includes a cover area management component and an avatar area management component, and determines a first image area as a cover and a second image area as an avatar from the target image according to the editing operation, thereby simultaneously performing cover and avatar cropping on an image submitted by the user, reducing the user's upload and cropping costs, and the user can freely crop the cover and avatar they want, which can effectively simplify the operations when setting the cover and avatar, and has strong flexibility, which can fully meet the user's personalized setting needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1a It is a schematic diagram of replacing a cover provided by the prior art;
[0017] Figure 1b It is a schematic diagram of changing an avatar provided by the prior art;
[0018] Figure 1c It is a schematic diagram of setting a cover and an avatar provided by the prior art;
[0019] Figure 1d This is a schematic diagram of the setting effect of a cover and an avatar provided by the prior art;
[0020] Figure 2 is a flowchart of an image processing method provided by an embodiment of the present invention;
[0021] Figure 3a It is a schematic diagram of a function option for setting a cover and an avatar provided by an embodiment of the present invention;
[0022] Figure 3b is a schematic diagram of selecting a target image provided by an embodiment of the present invention;
[0023] Figure 3c is a schematic diagram of an image selection interface provided by an embodiment of the present invention;
[0024] Figure 3d is a schematic diagram of another image selection interface provided by an embodiment of the present invention;
[0025] Figure 3e is a schematic diagram of an image editing interface provided by an embodiment of the present invention;
[0026] Figure 3f is a schematic diagram of another image editing interface provided by an embodiment of the present invention;
[0027] Figure 3g is a schematic diagram of another image editing interface provided by an embodiment of the present invention;
[0028] Figure 3h This is a schematic diagram of the effect of setting a cover and an avatar provided by an embodiment of the present invention;
[0029] Figure 4 is a flowchart of another image processing method provided by an embodiment of the present invention;
[0030] Figure 5a is a schematic diagram of performing a scaling operation on a target image provided by an embodiment of the present invention;
[0031] Figure 5b is a schematic diagram of performing an editing operation on an avatar area management component provided by an embodiment of the present invention;
[0032] Figure 5c is a schematic diagram of another editing operation performed on the avatar area management component provided by an embodiment of the present invention;
[0033] Figure 5d is a schematic diagram of display level division provided by an embodiment of the present invention;
[0034] Figure 5e is a schematic diagram of a management component provided by an embodiment of the present invention;
[0035] Figure 5fis a schematic diagram of another management component provided by an embodiment of the present invention;
[0036] Figure 5g is a schematic diagram of a cover area image and an avatar area image provided by an embodiment of the present invention;
[0037] Figure 5h It is a schematic diagram of a cover area management component and an avatar area management component provided by an embodiment of the present invention;
[0038] Figure 5i is a schematic diagram of another cover area management component and avatar area management component provided by an embodiment of the present invention;
[0039] Figure 5j is a schematic diagram of another cover area management component and avatar area management component provided by an embodiment of the present invention;
[0040] Figure 5k is a schematic diagram of another image editing interface provided by an embodiment of the present invention;
[0041] Figure 5l is a schematic diagram of a cover and avatar fusion display provided by an embodiment of the present invention;
[0042] Figure 5m is a schematic diagram of performing another editing operation on the avatar area management component provided by an embodiment of the present invention;
[0043] Figure 5n is a schematic diagram of another cover and avatar fusion display provided by an embodiment of the present invention;
[0044] Figure 6 This is a flow chart of setting a cover and an avatar provided by an embodiment of the present invention;
[0045] Figure 7 is a structural schematic diagram of an image processing device provided by an embodiment of the present invention;
[0046] Figure 8 It is a structural diagram of a user terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] Currently, there are usually two ways for users to set the cover and avatar on the app:
[0049] Method 1: If Figure 1a and Figure 1b As shown, users need to upload and crop images separately to set the cover and avatar. Figure 1a In the video, after the user clicks "Change Cover", they upload an image, crop the image, and then set it as the cover. Figure 1b In the , after the user clicks "Change Avatar", he uploads an image, crops the image, and then sets it as the avatar.
[0050] Method 2: If Figure 1c and Figure 1d As shown, the user uploads an image as the cover, and then uses the image area at a fixed position in the cover image as the avatar. Figure 1c In the example, the user uploads an image as the cover, and then directly uses a portion of the image area at the center of the cover image as the avatar. The setting result is as follows: Figure 1d shown.
[0051] In actual use, it was found that method one requires users to upload images multiple times for cropping, which makes the setting of cover and avatar more cumbersome and inefficient; method two has poor flexibility when setting avatars and is difficult to meet users' personalized aesthetic needs.
[0052] In view of the current problems of complicated operations, low efficiency, poor flexibility and difficulty in meeting the personalized aesthetic needs of users when setting covers and avatars, an embodiment of the present invention provides an image processing method that can effectively simplify the operations when setting covers and avatars, and has strong flexibility, which can fully meet the personalized setting needs of users.
[0053] The implementation details of the technical solution of the embodiment of the present invention are described in detail below:
[0054] See also Figure 2 , is a flow chart of an image processing method provided by an embodiment of the present invention, the image processing method comprises the following steps:
[0055] 201. A user terminal obtains a target image.
[0056] Among them, user terminals may include electronic devices such as smart phones, tablet computers, notebooks, desktop computers, and in-vehicle smart terminals.
[0057] Specifically, the application display interface may provide the user with three function options: "Set cover", "Set avatar", and "Set cover and avatar", such as Figure 3aAfter the user terminal detects that the user has triggered the function option of "setting cover and avatar", it can prompt the user to upload an image, for example, open the album manager (local album manager or cloud album manager), and the user can select a target image from multiple images displayed in the display interface of the album manager, and the user terminal obtains the target image selected by the user. Figure 3b As shown, the user selects a person image on June 27, 2016 as the target image, and the person image is used for setting both the cover and the avatar.
[0058] In some feasible implementations, the user terminal can detect the user's touch operation on the current cover or avatar in the display interface of the application. When the touch operation is detected, the three function options of "Set cover", "Set avatar", and "Set cover and avatar" are provided to the user through the display interface of the application. The touch operation can specifically be a click operation, a long press operation, a sliding operation, etc.
[0059] In some feasible implementations, after detecting that the user triggers the function option of "setting cover and avatar", the user terminal may output an image selection interface, such as Figure 3c After detecting that the user clicks the "Please select an image" button, options for selecting an image may be output, which may include "select an image from the gallery" or "take a photo", such as Figure 3d When it is detected that the user selects "Select an image from the gallery", Figure 3b The photo album manager is opened in the manner shown, and then the user selects a target image from it. When it is detected that the user selects "take a photo", the user terminal can start the camera to take a photo, for example, the user can take a selfie, and the image taken is used as the target image.
[0060] In some feasible implementations, after the user selects a target image from the album manager or obtains the target image by taking a photo, the user can personalize the target image, such as adding text content or decorations to the target image, beautifying the target image (such as beautifying) or graffiti, etc.
[0061] 202. The user terminal detects an editing operation on the target image and / or management component in the image editing interface of the application, wherein the management component includes a cover area management component and an avatar area management component.
[0062] Specifically, the user terminal can provide the user with an image editing interface, in which the target image and management components are displayed. The management components include a cover area management component and an avatar area management component. The cover area management component is used to adjust the image area used as the cover, and the avatar area management component is used to adjust the image area used as the avatar. The cover area management component is specifically a cover selection box with a default position and size; the avatar area management component is specifically an avatar selection box with a default position and size, such as Figure 3e shown.
[0063] In some feasible implementations, the editing operation may be one or both of adjusting the position and adjusting the size, that is, the user may adjust the image area serving as the cover and the image area serving as the avatar in the target image by editing the position and size of the target image and / or the management component. The editing operation may be triggered by clicking, sliding, long pressing, etc.
[0064] 203. The user terminal determines a first image area as a cover and a second image area as an avatar from the target image according to the editing operation.
[0065] Specifically, when the user terminal detects the user's editing operation on the target image and / or management component in the image editing interface of the application, the target image and / or management component is edited according to the editing operation. After the editing is completed, the first image area as the cover and the second image area as the avatar can be determined from the target image according to the positions of the cover area management component and the avatar area management component in the target image, wherein the image area surrounded by the border of the cover area management component in the target image is the cover, and the image area surrounded by the border of the avatar area management component in the target image is the avatar, and the first image area is saved as the cover and the second image area is saved as the avatar.
[0066] In some feasible implementations, the position and size of the target image, cover area management component and avatar area management component are editable. When the user crops the target image, he or she can edit one or more of the target image, cover area management component and avatar area management component according to personal habits and actual needs. This is not limited to the embodiments of the present invention.
[0067] In some feasible implementations, the functional description information of a management component can be displayed in the image editing interface. For example, when the user terminal detects that the user edits the circular avatar area management component, the functional description information "avatar" can be displayed at the location of the avatar area management component. Figure 3f shown.
[0068] In some feasible implementations, taking the avatar area management component as an example, when it is detected that the cursor moves to the edge of the avatar area management component or the internal area of the avatar area management component, its functional description information "avatar" is displayed at the location of the avatar area management component.
[0069] In some feasible implementations, the user terminal may also directly display the functional description information of each management component in the image editing interface, specifically, displaying its functional description information "cover" at the location of the management component in the cover area, and displaying its functional description information "avatar" at the location of the management component in the avatar area, such as Figure 3g As shown, it is convenient for users to intuitively understand the function of each management component.
[0070] In some feasible implementations, after the user has completed editing the target image and / or management component, the user can click Figure 3e Click the "Finish" option shown in the figure, and the user terminal can save the result as shown in the figure. Figure 3h The cover and avatar setting results shown in the figure mean that users only need to submit the image once to complete the cover and avatar settings at the same time.
[0071] In an embodiment of the present invention, a user terminal obtains a target image submitted by a user, and an image editing interface displays the target image and a management component, the management component including a cover area management component and an avatar area management component, detects the user's editing operation on the target image and / or the management component in the image editing interface, and determines a first image area as a cover and a second image area as an avatar from the target image according to the editing operation, thereby simultaneously performing cover and avatar cropping on an image submitted by the user, reducing the user's upload and cropping costs, and the user can freely crop the cover and avatar they want, which can effectively simplify the operations when setting the cover and avatar, and has strong flexibility, which can fully meet the user's personalized aesthetic needs.
[0072] See also Figure 4 , is a flow chart of an image processing method provided by an embodiment of the present invention, the image processing method comprises the following steps:
[0073] 401. A user terminal obtains a target image.
[0074] The specific implementation of step 401 can refer to the relevant description in step 201, which will not be repeated here.
[0075] 402. The user terminal outputs an image editing interface of the application through a display screen.
[0076] 403. The user terminal displays the target image and management components in the image editing interface, wherein the management components include a cover area management component and an avatar area management component.
[0077] Specifically, after obtaining the target image submitted by the user, the user terminal can output the image editing interface of the application through the display screen, and display the target image, the cover area management component and the avatar area management component in the image editing interface, such as Figure 3e shown.
[0078] In some feasible implementations, the user terminal may also first output an image editing interface through a display screen, and prompt the user to submit a target image in the image editing interface. After the target image is acquired, the target image, the cover area management component, and the avatar area management component are displayed in the image editing interface, that is, the image editing interface can also serve as the image selection interface described in step 201. Specifically, the user terminal outputs the image editing interface of the application through a display screen, detects an image selection operation input by the user in the image editing interface, determines the target image according to the image selection operation, and the target image includes an image in a gallery or an image taken by a camera of the user terminal. After the target image is acquired, the target image, the cover area management component, and the avatar area management component are displayed in the image editing interface.
[0079] 404. The user terminal detects an editing operation on the target image in the image editing interface of the application, and edits the target image according to the editing operation to adjust a first image area in the target image that serves as a cover.
[0080] Specifically, the position and size of the cover area management component can be fixed, and the user can adjust the cover by editing the target image. The editing operation can be to adjust the position and size. After the target image is edited, the image area surrounded by the border of the cover area management component in the target image will also change accordingly. Figure 5a As shown, the user can use two fingers to slide closer or farther from each other in the image editing interface to edit the size of the target image. After detecting the user's editing operation on the target image, the user terminal edits the target image. For example, if the user's two fingers are detected sliding closer to each other, the target image is reduced; if the user's two fingers are detected sliding farther from each other, the target image is enlarged; if the user is detected dragging the target image, the display position of the target image in the image editing interface is adjusted, thereby adjusting the image area in the target image that serves as the cover (i.e., the first image area corresponding to the cover area management component) through the editing operation on the target image. The reduction or enlargement multiple can be related to the sliding distance or the sliding speed.
[0081] 405. The user terminal detects an editing operation on an avatar area management component included in the management component in the image editing interface, and edits the avatar area management component according to the editing operation to adjust a second image area serving as an avatar in the target image.
[0082] Specifically, the user can adjust the avatar by editing the avatar area management component. The editing operation may be to adjust the position and / or size of the avatar area management component. After the avatar area management component is edited, the image area in the target image surrounded by the border of the avatar area management component also changes accordingly. After detecting the user's editing operation on the avatar area management component, the user terminal edits the avatar area management component to adjust the image area in the target image that serves as the avatar (i.e., the second image area corresponding to the avatar area management component).
[0083] In some possible implementations, such as Figure 5b As shown, the user can use a single finger to drag within the area of the avatar area management component to adjust the position of the avatar area management component.
[0084] In some feasible implementations, the avatar region management component may include a stretch button, and the stretch button is used to adjust the size of the avatar region management component. Figure 5c As shown, the user can use single or multiple fingers to drag the stretch button to adjust the size of the avatar area management component. Specifically, when dragging outside the area of the avatar area management component, the avatar area management component is enlarged; when dragging inside the area of the avatar area management component, the avatar area management component is reduced.
[0085] In some feasible implementations, the avatar region management component may not include a stretch button, and the size of the avatar region management component can be adjusted by dragging the border of the avatar region management component through a touch operation.
[0086] In some feasible implementations, the size of the avatar area management component can also be adjusted through contactless gesture operations. For example, when the camera detects that the user inputs a gesture operation of combining two fingers (such as the thumb and index finger), the avatar area management component is reduced; when the camera detects that the user inputs a gesture operation of separating two fingers, the avatar area management component is enlarged.
[0087] 406. After editing the target image and / or the management component according to the editing operation, the user terminal determines the first image area corresponding to the cover area management component from the target image, and determines the second image area corresponding to the avatar area management component from the first image area.
[0088] 407. The user terminal uses the first image area as a cover, and uses the second image area as an avatar.
[0089] Specifically, after the user completes editing the target image and avatar area management component, the user terminal obtains the image area surrounded by the border of the cover area management component in the target image (recorded as the first image area), and uses the first image area as the cover, and obtains the image area surrounded by the border of the avatar area management component in the first image area (recorded as the second image area), and uses the second image area as the avatar.
[0090] In some feasible implementations, the position and size of the cover area management component are also adjustable. The user can adjust the cover by editing the cover area management component, wherein the editing operation can specifically refer to the aforementioned method of adjusting the position and / or size of the avatar area management component, that is, the position and / or size of the cover area management component can be adjusted through editing operations to change the image area in the target image surrounded by the border of the cover area management component, thereby achieving adjustment of the image area corresponding to the cover.
[0091] In some feasible implementations, when adjusting the image area serving as the cover, the user may also choose to edit both the target image and the cover area management component, which is not limited in the embodiment of the present invention.
[0092] In some feasible implementations, the cover area management component may include a stretch button, which is used to adjust the size of the cover area management component. The stretch button may be distributed on the border of the cover area management component. The shape of the stretch button can refer to Figure 5c The stretch button of the avatar area management component is shown.
[0093] In some feasible implementations, the user may not perform scaling or editing operations on the target image and cover area management components, and only needs to edit the avatar area management component. That is, after the user uploads the target image, the first image area surrounded by the border of the cover area management component with the default position and size is used as the cover.
[0094] In some feasible implementations, the specific implementation method of the user terminal saving the cover and the avatar may include: the user terminal calls a background saving method, such as saveBackgroundImage(), and inputs the first image area as a parameter into the background saving method, thereby saving the first image area as the cover (or background). The user terminal calls an avatar saving method, such as saveAvatar(), and inputs the second image area as a parameter into the avatar saving method, thereby saving the second image area as the avatar.
[0095] In some possible implementations, such as Figure 5d As shown, the layer hierarchy of the image editing interface is divided. The bottom layer can be the image uploaded by the user (i.e., the target image mentioned above). In this case, the image serves as the background of the bottom layer. The middle layer can be the cover selection box (i.e., the cover area management component), and the top layer can be the avatar selection box (i.e., the avatar area management component).
[0096] In some feasible implementations, the shapes of the cover area management component and the avatar area management component can be a variety of combinations, specifically, they can be a combination of any two of the shapes of rectangle, square, circle, etc. Of course, they can also use the same shape, which is not limited in the embodiment of the present invention. Figure 5e As shown, the shape of the cover area management component can be a rectangle, and the shape of the avatar area management component can be a circle. Figure 5f As shown, the shape of the cover area management component can be a square, and the shape of the avatar area management component is also a square.
[0097] In some possible implementations, such as Figure 5g As shown, after the user completes the editing operation and clicks the "Finish" option, the user terminal obtains the cover area image and the avatar area image in the target image.
[0098] In some feasible implementations, the position and size of the avatar region management component can only be adjusted within the internal area of the cover region management component, that is, it cannot exceed the boundary of the cover region management component, such as Figure 5h As shown. Figure 5i As shown in , it is the maximum size of the avatar area management component. Of course, the minimum size of the avatar area management component can also be specified, such as 30*30 pixels. Figure 5j shown.
[0099] In some feasible implementations, the display of the cover and the avatar on the personal homepage interface may be displayed in a fusion display manner. The user terminal may obtain the position information of the second image area as the avatar in the first image area as the cover, and then display the cover and the avatar on the personal homepage interface of the application according to the position information. Specifically, the avatar is displayed at the position corresponding to the position information in the cover, so as to display the cover and the avatar in a fusion manner. Figure 5k As shown in FIG. 1 , the second image area as the avatar is located in the center of the first image area as the cover. When the cover and the avatar are displayed in the personal homepage interface of the application, the avatar can also be displayed in the center of the cover, such as Figure 5l As shown, the avatar and the cover are integrated, which increases the fun of setting the cover and avatar. Figure 5m As shown, the avatar area management component is in the middle position by default. If the user moves the position of the avatar area management component, for example, to the upper left, when the avatar area management component is moved, the avatar area in the original position will have a dotted line prompt. After the user completes the operation of the avatar area management component, the avatar area corresponding to the avatar area management component can be displayed in the middle position of the default cover to enhance the fun of setting the cover and avatar. The setting result is shown as follows: Figure 5n shown.
[0100] In an embodiment of the present invention, a user terminal obtains a target image submitted by a user, outputs an image editing interface through a display screen, and displays the target image and a management component on the image editing interface, wherein the management component includes a cover area management component and an avatar area management component. When the user terminal detects an editing operation of the user on the target image, the target image is edited according to the editing operation to adjust the first image area corresponding to the cover area management component in the target image; when the user terminal detects an editing operation of the user on the avatar area management component, the avatar area management component is edited according to the editing operation to adjust the second image area corresponding to the avatar area management component in the target image. After the editing process is completed, the user terminal determines the first image area corresponding to the cover area management component from the target image, and determines the second image area corresponding to the avatar area management component from the first image area, and then uses the first image area as the cover and the second image area as the avatar. This allows the cover and avatar to be cropped (such as adjusting the position, size, etc.) at the same time for an image submitted by the user, reducing the user's upload and cropping costs, and the user can freely crop the cover and avatar they want, which can effectively simplify the operations when setting the cover and avatar, and has strong flexibility, which can fully meet the user's personalized aesthetic needs.
[0101] In some possible implementations, such as Figure 6As shown, a process for setting a cover and avatar is provided in an embodiment of the present invention, which specifically includes: the user terminal obtains the initial size and position of the cover selection box (i.e., the above-mentioned cover area management component) and the avatar selection box (i.e., the above-mentioned avatar area management component), and displays them through the image editing interface, and then detects the user's adjustment to the image and / or avatar selection box, which adjustment includes but is not limited to operations such as zooming in, zooming out, and moving. After the user completes the adjustment, the image area in the cover selection box and the image area in the avatar selection box are obtained respectively. When it is detected that the user clicks Finish or Save, the image area in the cover selection box is automatically saved as the cover, and the image area in the avatar selection box is automatically saved as the avatar, thereby effectively simplifying the operation of setting the cover and avatar, and having strong flexibility, which can fully meet the user's personalized aesthetic needs.
[0102] See also Figure 7 , is a schematic diagram of the structure of an image processing device according to an embodiment of the present invention, the image processing device comprising:
[0103] The acquisition module 701 is used to acquire a target image.
[0104] The detection module 702 is used to detect the editing operation on the target image and / or management components in the image editing interface of the application, wherein the management components include a cover area management component and an avatar area management component.
[0105] The processing module 703 is used to determine a first image area as a cover and a second image area as an avatar from the target image according to the editing operation.
[0106] Optionally, the cover area management component is used to adjust the image area serving as the cover, and / or the avatar area management component is used to adjust the image area serving as the avatar.
[0107] Optionally, the detection module 702 is specifically configured to:
[0108] An editing operation on the target image in an image editing interface of an application is detected.
[0109] The target image is edited according to the editing operation to adjust a first image area in the target image that serves as a cover.
[0110] Detecting an editing operation on an avatar area management component included in the management components in the image editing interface.
[0111] The avatar region management component is edited according to the editing operation to adjust the second image region serving as the avatar in the target image.
[0112] The editing operation includes one or both of adjusting the position and adjusting the size.
[0113] Optionally, the detection module 702 is specifically configured to:
[0114] An editing operation on a cover area management component included in a management component in an image editing interface of an application is detected.
[0115] The cover area management component is edited according to the editing operation to adjust the first image area in the target image that serves as the cover.
[0116] Detecting an editing operation on an avatar area management component included in the management component in the image editing interface.
[0117] The avatar region management component is edited according to the editing operation to adjust the second image region serving as the avatar in the target image.
[0118] The editing operation includes one or both of adjusting the position and adjusting the size.
[0119] Optionally, the processing module 703 is specifically configured to:
[0120] After the target image and / or the management component are edited according to the editing operation, a first image area corresponding to the cover area management component is determined from the target image.
[0121] A second image area corresponding to the avatar area management component is determined from the first image area.
[0122] The first image area is used as a cover, and the second image area is used as an avatar.
[0123] Optionally, the processing module 703 is specifically configured to:
[0124] The first image area is input as a parameter into a background saving method to save the first image area as a cover.
[0125] The second image area is input as a parameter into an avatar saving method to save the second image area as an avatar.
[0126] Optionally, the image processing device further includes a display module 704, wherein:
[0127] The acquisition module 701 is further used to acquire position information of the second image area in the first image area.
[0128] The display module 704 is used to display the cover and the avatar in the personal homepage interface of the application according to the location information, so as to integrate the cover and the avatar for display.
[0129] Optionally, the avatar area management component includes a stretch button, and the stretch button is used to adjust the size of the avatar area management component.
[0130] Optionally, the cover area management component includes a stretch button, and the stretch button is used to adjust the size of the cover area management component.
[0131] Optionally, the acquisition module 701 is specifically used to:
[0132] The image editing interface of the application is outputted through the display screen of the user terminal.
[0133] An image selection operation input by a user in the image editing interface is detected.
[0134] A target image is determined according to the image selection operation, where the target image includes an image in a gallery or an image captured by a camera of the user terminal.
[0135] Optionally, the display module 704 is further used to display the target image and management components in the image editing interface, wherein the management components include a cover area management component and an avatar area management component.
[0136] Optionally, the display module 704 is further used to:
[0137] The image editing interface of the application is outputted through the display screen of the user terminal.
[0138] The target image and management components are displayed in the image editing interface, wherein the management components include a cover area management component and an avatar area management component.
[0139] Optionally, the target image is displayed at the bottom layer of the image editing interface, the cover area management component is displayed at the middle layer of the image editing interface, and the avatar area management component is displayed at the top layer of the image editing interface.
[0140] It should be noted that the functions of the various functional modules of the image processing device of the embodiment of the present invention can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0141] See also Figure 8, is a schematic diagram of the structure of a user terminal according to an embodiment of the present invention, wherein the user terminal according to the embodiment of the present invention includes a power supply module and other structures, and includes a processor 801, a storage device 802, a network interface 803, and an input / output device 804. The processor 801, the storage device 802, the network interface 803, and the input / output device 804 can exchange data.
[0142] The storage device 802 may include a volatile memory, such as a random-access memory (RAM); the storage device 802 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the storage device 802 may also include a combination of the above-mentioned types of memory.
[0143] The network interface 803 is used to send and receive data.
[0144] The input / output device 804 may be a display screen, a touch screen, a microphone, a speaker, etc., for detecting touch operations and outputting text, images, sounds, etc.
[0145] The processor 801 may be a central processing unit (CPU) 801. In one embodiment, the processor 801 may also be a graphics processing unit (GPU) 801. The processor 801 may also be a combination of a CPU and a GPU. In one embodiment, the storage device 802 is used to store program instructions. The processor 801 may call the program instructions to perform the following operations:
[0146] Get the target image.
[0147] The editing operation on the target image and / or management component in the image editing interface of the application is detected through the input / output device 804, wherein the management component includes a cover area management component and an avatar area management component.
[0148] According to the editing operation, a first image area as a cover and a second image area as an avatar are determined from the target image.
[0149] Optionally, the cover area management component is used to adjust the image area serving as the cover, and / or the avatar area management component is used to adjust the image area serving as the avatar.
[0150] Optionally, the processor 801 is specifically configured to:
[0151] An editing operation on the target image in an image editing interface of an application is detected.
[0152] The target image is edited according to the editing operation to adjust a first image area in the target image that serves as a cover.
[0153] Detecting an editing operation on an avatar area management component included in the management components in the image editing interface.
[0154] The avatar region management component is edited according to the editing operation to adjust the second image region serving as the avatar in the target image.
[0155] The editing operation includes one or both of adjusting the position and adjusting the size.
[0156] Optionally, the processor 801 is specifically configured to:
[0157] An editing operation on a cover area management component included in a management component in an image editing interface of an application is detected.
[0158] The cover area management component is edited according to the editing operation to adjust the first image area in the target image that serves as the cover.
[0159] Detecting an editing operation on an avatar area management component included in the management component in the image editing interface.
[0160] The avatar region management component is edited according to the editing operation to adjust the second image region serving as the avatar in the target image.
[0161] The editing operation includes one or both of adjusting the position and adjusting the size.
[0162] Optionally, the processor 801 is specifically configured to:
[0163] After the target image and / or the management component are edited according to the editing operation, a first image area corresponding to the cover area management component is determined from the target image.
[0164] A second image area corresponding to the avatar area management component is determined from the first image area.
[0165] The first image area is used as a cover, and the second image area is used as an avatar.
[0166] Optionally, the processor 801 is specifically configured to:
[0167] The first image area is input as a parameter into a background saving method to save the first image area as a cover.
[0168] The second image area is input as a parameter into an avatar saving method to save the second image area as an avatar.
[0169] Optionally, the processor 801 is also used to obtain position information of the second image area in the first image area, and use the input / output device 804 to display the cover and the avatar in the personal homepage interface of the application according to the position information, so as to integrate the cover and the avatar for display.
[0170] Optionally, the avatar area management component includes a stretch button, and the stretch button is used to adjust the size of the avatar area management component.
[0171] Optionally, the cover area management component includes a stretch button, and the stretch button is used to adjust the size of the cover area management component.
[0172] Optionally, the processor 801 is specifically configured to:
[0173] The image editing interface of the application is outputted through the display screen of the user terminal.
[0174] An image selection operation input by a user in the image editing interface is detected.
[0175] A target image is determined according to the image selection operation, where the target image includes an image in a gallery or an image captured by a camera of the user terminal.
[0176] Optionally, the processor 801 is further used to display the target image and management components in the image editing interface using the input / output device 804, wherein the management components include a cover area management component and an avatar area management component.
[0177] Optionally, the processor 801 is also used to output the image editing interface of the application through the display screen of the user terminal, and use the input / output device 804 to display the target image and management components in the image editing interface, wherein the management components include a cover area management component and an avatar area management component.
[0178] Optionally, the target image is displayed at the bottom layer of the image editing interface, the cover area management component is displayed at the middle layer of the image editing interface, and the avatar area management component is displayed at the top layer of the image editing interface.
[0179] In a specific implementation, the processor 801, the storage device 802, the network interface 803, and the input / output device 804 described in the embodiment of the present invention can execute the embodiment of the present invention. Figure 2 or Figure 4 The implementation method described in the related embodiments of the image processing method provided can also be used to implement the embodiments of the present invention. Figure 7 The implementation method described in the relevant embodiment of the provided image processing device will not be repeated here.
[0180] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0181] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0182] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0183] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0185] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform all or part of the steps of the above-mentioned methods of various embodiments of the present invention. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (English: Read-Only Memory, abbreviated: ROM) or random access memory (English: Random Access Memory, abbreviated: RAM) and other media that can store program codes.
[0186] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image processing method, characterized in that: Applied to a user terminal, the method comprises: Get the target image; Detecting an editing operation on the target image and / or management components in the image editing interface of the application, wherein the management components include a cover area management component and an avatar area management component; and the image editing interface displays functional description information corresponding to each of the management components; Determine a first image area as a cover from the target image according to the editing operation, and determine a second image area as an avatar on the first image area; obtain position information of the second image area in the first image area, display the cover in the personal homepage interface of the application, and display the avatar at a position corresponding to the position information in the cover, so as to integrate and display the cover and the avatar; or, When it is detected that the user clicks Finish or Save, the first image area is saved as the cover, and the second image area is saved as the avatar to complete the setting of the cover and the avatar.
2. The method according to claim 1, characterized in that The cover area management component is used to adjust the image area used as the cover, and / or the avatar area management component is used to adjust the image area used as the avatar.
3. The method according to claim 1 or 2, characterized in that: The detecting an editing operation on the target image and / or management component in the image editing interface of the application includes: Detecting an editing operation on the target image in an image editing interface of an application; Performing editing processing on the target image according to the editing operation to adjust a first image area in the target image that serves as a cover; Detecting an editing operation on an avatar area management component included in the management component in the image editing interface; Performing editing processing on the avatar region management component according to the editing operation to adjust the second image region serving as the avatar in the target image; The editing operation includes one or both of adjusting the position and adjusting the size.
4. The method according to claim 1 or 2, characterized in that: The detecting an editing operation on the target image and / or management component in the image editing interface of the application includes: Detecting an editing operation on a cover area management component included in a management component in an image editing interface of an application; Performing editing processing on the cover area management component according to the editing operation to adjust the first image area in the target image that serves as the cover; Detecting an editing operation on an avatar area management component included in the management component in the image editing interface; Performing editing processing on the avatar region management component according to the editing operation to adjust the second image region serving as the avatar in the target image; The editing operation includes one or both of adjusting the position and adjusting the size.
5. The method according to claim 1, characterized in that The step of determining a first image region as a cover from the target image according to the editing operation, and determining a second image region as an avatar on the first image region, comprises: After editing the target image and / or the management component according to the editing operation, determining a first image area corresponding to the cover area management component from the target image; Determine a second image area corresponding to the avatar area management component from the first image area; The first image area is used as a cover, and the second image area is used as an avatar.
6. The method according to claim 5, characterized in that The using the first image area as a cover and the using the second image area as an avatar comprises: Input the first image area as a parameter into a background saving method to save the first image area as a cover; The second image area is input as a parameter into an avatar saving method to save the second image area as an avatar.
7. The method according to claim 2, characterized in that The avatar area management component includes a stretch button, and the stretch button is used to adjust the size of the avatar area management component.
8. The method according to claim 2, characterized in that: The cover area management component includes a stretch button, and the stretch button is used to adjust the size of the cover area management component.
9. The method according to claim 1, characterized in that: The acquiring of the target image comprises: Outputting an image editing interface of the application through a display screen of the user terminal; Detecting an image selection operation input by a user on the image editing interface; A target image is determined according to the image selection operation, where the target image includes an image in a gallery or an image captured by a camera of the user terminal.
10. The method according to claim 9, characterized in that After determining the target image according to the image selection operation, the method further includes: The target image and management components are displayed in the image editing interface, wherein the management components include a cover area management component and an avatar area management component.
11. The method according to claim 1, characterized in that: After acquiring the target image and before detecting an editing operation on the target image and / or management component in the image editing interface of the application, the method further includes: Outputting an image editing interface of the application through a display screen of the user terminal; The target image and management components are displayed in the image editing interface, wherein the management components include a cover area management component and an avatar area management component.
12. The method according to claim 1, characterized in that The target image is displayed at the bottom layer of the image editing interface, the cover area management component is displayed at the middle layer of the image editing interface, and the avatar area management component is displayed at the top layer of the image editing interface.
13. An image processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a target image; A detection module, used to detect an editing operation on the target image and / or management components in the image editing interface of the application, wherein the management components include a cover area management component and an avatar area management component; and the image editing interface displays functional description information corresponding to each of the management components; A processing module, configured to determine a first image region as a cover from the target image according to the editing operation, and determine a second image region as a head portrait on the first image region; The acquisition module is further used to acquire position information of the second image area in the first image area; A display module is used to display the cover in the personal homepage interface of the application, and to display the avatar at the position corresponding to the position information in the cover, so as to integrate the cover and the avatar for display; or, when detecting that the user clicks Finish or Save, save the first image area as the cover and save the second image area as the avatar, so as to complete the setting of the cover and the avatar.
14. A computer-readable storage medium, characterized in that: The computer storage medium stores a computer program, wherein the computer program includes program instructions, and the program instructions are executed by a processor to execute the image processing method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Setting method for terminal and association pictures
CN103034401A