Image editing prompting method and device, electronic equipment and readable storage medium
By acquiring the contour data of image objects, identifying and prompting deformation in adjacent areas, the problem of accidental deformation of adjacent objects in image editing is solved, thus achieving image quality preservation and convenient repair.
Patent Information
- Application Number
- CN202110693749.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-22
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2041-06-22
AI Technical Summary
During image editing, changing the shape of a target object can cause other adjacent objects to be deformed due to misoperation, affecting image quality.
By acquiring the contour data of each object in the image to be edited, the deformed area of the object after the deformation operation is identified, and prompt information is displayed in the adjacent area, allowing users to repair or automatically repair the deformed area and restore it to its original state.
It effectively prevents accidental deformation of adjacent objects, maintains image quality, and provides user interaction for convenient repair of deformed areas.
Smart Images

Figure CN114004732B_ABST
Abstract
Description
Technical Field
[0001] This application relates to image processing technology, and more particularly to an image editing prompting method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Users can input deformation operations on target objects in the image editing interface of an electronic device. The electronic device can respond to these deformation operations, changing the shape of the target object to improve its visual appearance. For example, the electronic device can respond to a user's input of a "slimming face" operation on the face area of a person in the image to make the face appear thinner and more aesthetically pleasing; similarly, the electronic device can respond to a user's input of a "slimming legs" operation on the legs of a person in the image to make the legs appear thinner and more aesthetically pleasing.
[0003] Currently, when electronic devices change the shape of a target object in an image being edited, they also change the shapes of other objects adjacent to the target object. However, changing the shapes of these adjacent object regions is not the user's intention; that is, the objects whose shapes are changed are accidental. This can lead to a decrease in image quality. Summary of the Invention
[0004] This application provides an image editing prompting method, apparatus, electronic device, and readable storage medium, which enables the quality of the image to be edited to remain unaffected when the electronic device changes the first region of the first object in response to a first deformation operation of the first region of the first object in the image to be edited by a user.
[0005] In a first aspect, embodiments of this application provide an image editing prompting method, comprising: an electronic device displaying an image editing interface, wherein the image editing interface displays an image to be edited; the electronic device acquiring first contour data of each of a plurality of objects included in the image to be edited; the electronic device changing the shape of an image region including the first region in response to a user's first deformation operation on a first region of the first object among the plurality of objects; the electronic device acquiring second contour data of each object in the image to be edited after the first deformation operation; the electronic device determining, based on the second contour data and the first contour data, that a second region of a second object has undergone deformation before and after the first deformation operation, wherein the second object is located near the first object, and the second region is adjacent to the first region; the electronic device displaying first prompting information near the second region of the second object, the first prompting information indicating that the second region has undergone deformation; or, the first prompting information indicating that the second region of the second object has been restored to its shape before the first deformation operation.
[0006] In this way, the electronic device displays a first prompt near the second area of the second object, alerting the user that the second area of the second object has been deformed due to accidental operation. If the user feels that the deformation of the second object will significantly affect the quality of the image to be edited, they can input a repair operation into the second area of the second object. Then, the electronic device can respond to the user's repair operation by replacing the second contour data of the second object with the first contour data to display the second object. This achieves shape repair of the second area of the second object, eliminating the adverse effects of deformation on the quality of the image to be edited. Alternatively, the electronic device can also replace the second contour data of the second object with the first contour data to display the second object, achieving automatic repair of the deformed second area of the second object, thus ensuring that the quality of the image to be edited is not affected. The user can also perceive the automatic repair of the deformed second area of the second object through the first prompt.
[0007] In one possible implementation, the first object is a person, the first region is a face region, and the second object is an object; or, the first object is a person and the second object is a person.
[0008] In one possible implementation, after the electronic device displays the first prompt information near the second area of the second object, the writing and editing prompt method provided in this application further includes: the electronic device, in response to a user's repair operation on the second area of the second object, displaying the second object with the first outline data of the second object. Thus, the electronic device can, in response to a user's repair operation on the second area of the second object, replace the second outline data of the second object with the first outline data of the second object to display the second object.
[0009] In this way, the shape of the second region of the second object is restored, eliminating the adverse effects of the deformation of the second region of the second object on the quality of the image to be edited.
[0010] Furthermore, in response to a user's repair operation on a second region of a second object, the electronic device displays the second object in the form of a first outline of the second object, including: in response to a user's trigger operation on a second region of the second object, the electronic device displays a first repair button near the second region of the second object; in response to a user's trigger operation on the first repair button, the electronic device displays the second object in the form of a first outline of the second object.
[0011] Thus, the user only needs to trigger the first repair button displayed near the second area to complete the first outline display of the second object, thereby repairing the shape of the second area, which is convenient and quick. The first repair button is the repair button in the following embodiment.
[0012] Alternatively, further, the number of second objects is multiple, and the electronic device, in response to a user's repair operation on a second region of the second object, displays the second object in the first outline data of the second object, including: the electronic device displays a second repair button on the image editing interface; and the electronic device, in response to a user's trigger operation on the second repair button, displays each of the multiple second objects in the first outline data of the second object.
[0013] Thus, users only need to trigger the second repair button to complete the shape repair of the second region of multiple second objects with one click, which is convenient and quick. The second repair button is the one-click repair button in the following embodiment.
[0014] In another possible implementation, the first prompt message is used to indicate that the second area has been deformed. After the electronic device displays the first prompt message near the second area of the second object, the image editing prompt method provided in this application further includes: the electronic device cancels the display of the first prompt message in response to the user's non-repair operation on the second area of the second object.
[0015] In this way, after canceling the display of the first prompt message, the interference caused by the first prompt message to the user in browsing the image to be edited can be eliminated. The "do not repair" operation is the triggering operation of the "do not repair" button in the following embodiments.
[0016] In one possible implementation, there are multiple second regions. The electronic device displays a first prompt message near the second region of the second object, including: the electronic device calculating the importance of each of the multiple second regions; the electronic device ranking the importance of the multiple second regions; and the electronic device displaying the first prompt message near the second region of each second object according to the ranking result, wherein the first prompt message displayed near different second regions is identified with different markers.
[0017] In this way, users can decide on different processing methods for different second areas based on the different markers that are displayed in the first prompt information near different second areas.
[0018] In one possible implementation, after the electronic device displays the first prompt information near the second region of the second object, the image editing prompting method provided in this application further includes: the electronic device responding to a second deformation operation by the user on the third region of the first object among a plurality of objects, changing the shape of an image region including the third region; the electronic device acquiring third contour data of each object in the image to be edited after the second deformation operation; the electronic device determining, based on the third contour data and the first contour data, that the fourth region of the third object has undergone deformation before and after the first deformation operation, wherein the third object is located near the first object and the fourth region is adjacent to the third region; the electronic device displaying the second prompt information near the fourth region of the third object, the second prompt information indicating that the fourth region has undergone deformation; or, the second prompt information indicating that the fourth region of the third object has recovered its shape before the first deformation operation.
[0019] In this way, the electronic device can also restore the shape of the fourth region of the third object, eliminating the adverse effects of deformation in the fourth region of the third object on the quality of the image to be edited. Alternatively, the electronic device can replace the second contour data of the third object with the first contour data to display the third object, achieving automatic restoration of the deformed fourth region of the third object, thus ensuring that the quality of the image to be edited is not affected. The user can also perceive the automatic restoration of the deformed fourth region of the third object through the first prompt information.
[0020] In one possible implementation, determining that a second region of a second object has deformed before and after the first deformation operation, based on second contour data and first contour data, includes: the electronic device calculating the second contour data of the second object relative to the deformation degree value of the first contour data of the second object; and the electronic device determining that the second region of the second object has deformed before and after the first deformation operation if the deformation degree value is greater than a deformation threshold.
[0021] Only when the deformation degree value exceeds the deformation threshold can the user visually perceive that the second region of the second object has deformed. In this way, the electronic device can determine that the second region of the second object has deformed before and after the first deformation operation, more accurately matching the user's visual perception.
[0022] In one possible implementation, since the user inputs a first deformation operation on the first object to change its shape, the first object can be considered a highly relevant object for the user. The closer the second object is to the first object, the higher the likelihood of it being noticed by the user; conversely, the farther the second object is from the first object, the lower the likelihood of it being noticed. Furthermore, before determining that the second region of the second object has undergone deformation before and after the first deformation operation, the image editing prompting method provided in this application further includes: the electronic device can calculate a first distance between the geometric center of the second object and the geometric center of the first object, and look up a deformation threshold from a pre-stored first mapping table based on the calculated distance. In the pre-stored first mapping table, the magnitude of the first distance and the deformation threshold have a one-to-one correspondence and are positively correlated.
[0023] In this way, the electronic device uses the deformation threshold found by the first distance to determine whether the second region of the second object has deformed before and after the first deformation operation, which more accurately matches the user's visual perception.
[0024] Alternatively, in another possible implementation, if the area of the second object is large, even if the deformation value of the second object is large, the user will visually perceive that the second object has not deformed; conversely, if the area of the second object is small, even if the deformation value of the second object is small, the user will visually perceive that the second object has deformed. Therefore, the electronic device can calculate the area of the second object and look up the deformation threshold from a pre-stored first mapping table based on the calculated area. In the pre-stored first mapping table, there is a one-to-one correspondence and positive correlation between the area size and the deformation threshold.
[0025] In this way, the electronic device uses the deformation threshold found by the area of the second object to determine whether the second region of the second object has deformed before and after the first deformation operation, which more accurately matches the user's visual perception.
[0026] Alternatively, in another possible implementation, users typically pay more attention to objects closer to the image edge and less to objects farther away. Thus, if a second object is close to the image edge, even with a large deformation value, the user will visually perceive it as undistorted; conversely, if a second object is far from the image edge, even with a small deformation value, the user will visually perceive it as deformed. The electronic device can then calculate a second distance between the geometric center of the second object and the image edge, and look up a deformation threshold from a pre-stored first mapping table based on this calculated second distance. In this pre-stored first mapping table, there is a one-to-one, negatively correlated relationship between the second distance to the image edge and the deformation threshold.
[0027] In this way, the electronic device uses the deformation threshold found by the second distance to determine whether the second region of the second object has deformed before and after the first deformation operation, which more accurately matches the user's visual perception.
[0028] In one possible implementation, the degree of deformation is the difference between the area of the second contour data and the area of the first contour data; or, the degree of deformation is the difference between the perimeter of the second contour data and the perimeter of the first contour data.
[0029] Secondly, this application also provides an image editing prompting device, comprising: a display unit for displaying an image editing interface, wherein the image editing interface displays an image to be edited; a processing unit for acquiring first contour data of each of a plurality of objects included in the image to be edited; the processing unit is further configured to change the shape of an image region including the first region in response to a first deformation operation performed by a user on a first region of the first object among the plurality of objects; the processing unit is further configured to acquire second contour data of each object in the image to be edited after the first deformation operation; the processing unit is further configured to determine, based on the second contour data and the first contour data, that a second region of a second object has undergone deformation before and after the first deformation operation, wherein the second object is located near the first object and the second region is adjacent to the first region; the display unit is further configured to display first prompt information near the second region of the second object, the first prompt information indicating that the second region has undergone deformation; or, the first prompt information indicating that the second region of the second object has been restored to its shape before the first deformation operation.
[0030] In one possible implementation, the first object is a person, the first region is a face region, and the second object is an object; or, the first object is a person and the second object is a person.
[0031] In one possible implementation, the processing unit is further configured to respond to a user's repair operation on a second region of the second object by displaying the second object as a first outline of the second object.
[0032] In one possible implementation, the processing unit is further configured to respond to a user's triggering operation on a second region of the second object, and the display unit is further configured to display a first repair button near the second region of the second object; the processing unit is further configured to respond to a user's triggering operation on the first repair button, and the display unit is further configured to display the second object in the form of a first outline of the second object.
[0033] In one possible implementation, there are multiple second objects, and the display unit is specifically used to display a second repair button in the image editing interface; the processing unit is also used to respond to the user's triggering operation on the second repair button, and the display unit is also used to display each second object in the first outline data of the multiple second objects.
[0034] In one possible implementation, the processing unit is further configured to respond to the user's non-repair operation on the second area of the second object, and the display unit is further configured to cancel the display of the first prompt information.
[0035] In one possible implementation, there are multiple second regions. The processing unit is also used to calculate the importance of each of the multiple second regions in the electronic device; the electronic device sorts the importance of the multiple second regions; and the electronic device displays a first prompt message near the second region of each second object according to the sorting result, wherein the first prompt message displayed near different second regions is identified with different markers.
[0036] In one possible implementation, the processing unit is further configured to change the shape of an image region, including the third region, in response to a second deformation operation by the user on a third region of a first object among a plurality of objects; the processing unit is further configured to acquire third contour data of each object in the image to be edited after the second deformation operation; the processing unit is further configured to determine, based on the third contour data and the first contour data, that a fourth region of the third object has been deformed before and after the first deformation operation, wherein the third object is located near the first object and the fourth region is adjacent to the third region; the display unit is further configured to display a second prompt message near the fourth region of the third object, the second prompt message indicating that the fourth region has been deformed; or, the second prompt message indicating that the fourth region of the third object has recovered its shape before the first deformation operation.
[0037] In one possible implementation, the processing unit is specifically used to calculate the second contour data of the second object relative to the deformation degree value of the first contour data of the second object; if the deformation degree value is greater than the deformation threshold, it is determined that the second region of the second object has been deformed before and after the first deformation operation.
[0038] In one possible implementation, the processing unit is further configured to calculate a first distance between the geometric center of the second object and the geometric center of the first object, and to find a deformation threshold from a pre-stored first mapping table based on the first distance, wherein the magnitude of the first distance and the existence of the deformation threshold are in a one-to-one correspondence and positively correlated in the pre-stored first mapping table.
[0039] Alternatively, the processing unit is also used to calculate the area of the second object and find the deformation threshold from the pre-stored first mapping table based on the area, wherein the size of the area and the existence of the deformation threshold are in a one-to-one correspondence and positive correlation in the pre-stored first mapping table.
[0040] Alternatively, the processing unit is also used to calculate a second distance between the geometric center of the second object and the edge of the image, and to find a deformation threshold from a pre-stored first mapping table based on the second distance, wherein the magnitude of the second distance and the existence of the deformation threshold are in a one-to-one correspondence and negatively correlated in the pre-stored first mapping table.
[0041] In one possible implementation, the degree of deformation is the difference between the area of the second contour data and the area of the first contour data; or, the degree of deformation is the difference between the perimeter of the second contour data and the perimeter of the first contour data.
[0042] Thirdly, this application also provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to perform an image editing prompting method as described in the first aspect or any implementation thereof.
[0043] Fourthly, this application also provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the image editing prompting method as described in the first aspect or any implementation thereof.
[0044] Fifthly, this application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the image editing prompting method as described in the first aspect or any implementation thereof.
[0045] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0046] Figure 1 A schematic diagram illustrating how, while slimming down the arm area of woman A, the arm area of man B also undergoes deformation.
[0047] Figure 2 A schematic diagram of the hardware system architecture of the terminal device;
[0048] Figure 3 A schematic diagram of the software system architecture of a terminal device;
[0049] Figure 4 One of the flowcharts for the image editing prompting method provided in the embodiments of this application;
[0050] Figure 5 A schematic diagram of the interface for prompting the user whether to repair the arm area of man b, provided in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram of the interface of a mobile phone responding to the triggering operation of the repair button to repair the arm area of man b, as provided in an embodiment of this application.
[0052] Figure 7 This is a schematic diagram of the interface of a mobile phone responding to the triggering operation of the "Do Not Repair" button, and not repairing the arm area of the man b.
[0053] Figure 8 A schematic diagram showing the interface where the handhold area of bar c is deformed while slimming down the face area of woman a.
[0054] Figure 9 This is a schematic diagram of the interface provided in this application embodiment, showing how a mobile phone responds to the triggering operation of the one-click repair button to repair the arm area of man b and the handhold area of bar c.
[0055] Figure 10 This is a schematic diagram of the interface provided in this application embodiment of the mobile phone responding to the triggering operation of the one-click non-repair button, and not repairing the arm area of man b and the handhold area of bar c.
[0056] Figures 11-12 The diagram shows the interface of the phone responding to the triggering of the repair button, repairing the arm area of man B, and the interface of the phone responding to the triggering of the non-repair button, not repairing the arm area of man B.
[0057] Figure 13The second flowchart of the image editing prompting method provided in the embodiments of this application;
[0058] Figure 14 This is a schematic diagram of the structure of an image editing prompting device provided in an embodiment of this application;
[0059] Figure 15 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0060] Figure 16 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0061] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. For example, the first value and the second value are only used to distinguish different values and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0062] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0063] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0064] Currently, users can input deformation operations on target objects in the image editing interface of electronic devices. The electronic device can respond to the deformation operation, changing the shape of the target object to improve its visual effect. For example, Figure 1As shown, the electronic device can respond to the user's action of opening the photo album application, enter the photo album preview interface, and display thumbnails of multiple photos that have been taken. Figure 1 (Not shown in the image). The electronic device can enter the first operation interface in response to a user's triggering action on a thumbnail of one of the captured photos.
[0065] like Figure 1 As shown in (a), the photos in the first operating interface 201 include a woman (a) and a man (b). When the user observes that the woman's arm appears thicker in the photo, the electronic device can respond to the user's triggering of the return button 202 in the first operating interface 201 and enter the second operating interface 203. Figure 1 As shown in (b) above, the second operation interface 203 displays... Icon 204 indicates that an electronic device can respond to user input. The trigger action of icon 204 leads to the third operation interface. Figure 1 (Not shown in the image), a photo addition button is displayed on the third operation interface. The electronic device can enter the image editing interface 205 in response to the user's triggering operation of the photo addition button.
[0066] like Figure 1 As shown in (c), the image editing interface 205 displays the photo from the first operation interface 201 and a slimming button 206. In response to a user's triggering of the slimming button 206, the electronic device can display an adjustment ring 206 in the image editing interface 205 to indicate the slimming area when the photo is triggered once. The electronic device can decrease the area of the adjustment ring 206 in response to a user's triggering of the adjustment ring; the electronic device can also increase the area of the adjustment ring 206 in response to a user's triggering of the adjustment ring 206. Furthermore, as... Figure 1 As shown in (d), the electronic device can determine the slimming area in response to a user's triggering operation on the adjusted adjustment ring 206. Thus, as... Figure 1 As shown in (e), the electronic device can respond to a user's trigger action on Ms. A's arm and adjust the arm's slimming effect according to the determined area to be slimmed. See also... Figure 1 In (f), the outline of Ms. a's arm changes from the dashed line in rectangle P to the solid line, indicating that Ms. a's arm has been slimmed down.
[0067] However, while Ms. A's arm was slimmed down, the outline of Mr. B's arm, located to the side of Ms. A's arm, changed from the dotted line in rectangle q to the solid line, indicating that Mr. B's arm also underwent deformation. Understandably, changing the shape of Mr. B's arm was not the user's intention; that is, the shape of Mr. B's arm was distorted by accident. This may affect the quality of the photo.
[0068] In view of this, embodiments of this application provide an image editing prompting method. An electronic device acquires first contour data of each object in the image to be edited. After the electronic device responds to a user's first deformation operation on a first region of the first object in the image to be edited, it acquires second contour data of each object after the first deformation operation. Based on the second contour data and the first contour data, the electronic device determines that a second region of the second object has undergone deformation before and after the first deformation operation. Thus, the electronic device displays a first prompt message near the second region of the second object, indicating that the second region has undergone deformation, thus prompting the user. After the user perceives the first prompt message, they can trigger the electronic device to restore the shape of the second region before the first deformation operation, so that the quality of the image to be edited is not affected. Alternatively, the first prompt message can indicate that the second region of the second object has been restored to its shape before the first deformation operation, reminding the user that the electronic device has restored the shape of the second region before the first deformation operation, also ensuring that the quality of the image to be edited is not affected.
[0069] It is understood that the aforementioned electronic devices can be mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on. The embodiments of this application do not limit the specific technology or device form used in the terminal devices.
[0070] To better understand the embodiments of this application, the structure of the electronic device of the embodiments of this application is described below. Figure 2 This is a schematic diagram of the structure of an electronic device to which embodiments of this application apply. For example... Figure 2As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0071] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, display processing units (DPUs), and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. In some embodiments, electronic device 100 may also include one or more processors 110. The processor may serve as the nerve center and command center of electronic device 100. The processor can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have been used or repeatedly used by processor 110. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the electronic device 100.
[0072] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The USB interface 130 is a USB standard-compliant interface, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback.
[0073] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0074] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 100 via the power management module 141.
[0075] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0076] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0077] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier, etc. The mobile communication module 150 can receive electromagnetic waves via the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0078] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0079] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), NFC, and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0080] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The aforementioned GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0081] Electronic device 100 can realize display functions through GPU, display screen 194, and application processor. The application processor may include NPU and DPU. GPU is a microprocessor for image processing, connecting display screen 194 and the application processor. GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute instructions to generate or modify display information. NPU is a neural network (NN) computing processor that, by borrowing from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, quickly processes input information and can continuously learn itself. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, speech recognition, and text understanding. DPU, also known as Display Sub-System (DSS), is used to adjust the colors of display screen 194. DPU can adjust the colors of the display screen through a 3D look-up table (3D LUT). DPU can also perform image scaling, noise reduction, contrast enhancement, backlight brightness management, HDR processing, and Gamma adjustment of display parameters.
[0082] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0083] Electronic device 100 can perform shooting functions through ISP, one or more cameras 193, video codec, GPU, one or more displays 194, and application processor.
[0084] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, data files such as music, photos, and videos can be stored on the external memory card.
[0085] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the instructions stored in internal memory 121, thereby enabling electronic device 100 to perform various functional applications and data processing. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system; it may also store one or more application programs (such as a gallery, contacts, etc.). The data storage area may store data created during the use of electronic device 100 (such as photos, contacts, etc.). In addition, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. In some embodiments, processor 110 can execute instructions stored in internal memory 121 and / or instructions stored in memory disposed in processor 110 to enable electronic device 100 to perform various functional applications and data processing.
[0086] The internal memory 121 is used to store the first contour data of each of a plurality of objects in the image to be edited before deformation and the second contour data of each of a plurality of objects after deformation in the image to be edited in the embodiments of this application. Additionally, the internal memory 121 can also be used to store a first mapping table and a second mapping table in the embodiments of this application. The first mapping table may include a one-to-one correspondence between a first distance and a deformation threshold, wherein the first distance is the distance between the geometric center of the object that did not receive deformation operation and the geometric center of the object that did receive deformation operation; a one-to-one correspondence between the area of the object that did not receive deformation operation and the deformation threshold; and a one-to-one correspondence between a second distance and the deformation threshold, wherein the second distance is the distance between the object that did not receive deformation operation and the edge of the image. The second mapping table may include a one-to-one correspondence between a first distance and an importance value, wherein the first distance is the distance between the geometric center of the object that did not receive deformation operation and the geometric center of the object that did receive deformation operation; and a one-to-one correspondence between a second distance and an importance value, wherein the second distance is the distance between the object that did not receive deformation operation and the edge of the image.
[0087] Electronic device 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor. Examples include music playback and recording. The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be located in the processor 110, or some functional modules of the audio module 170 can be located in the processor 110. The speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music or receive hands-free calls through the speaker 170A. The receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. When electronic device 100 receives a phone call or voice message, it can listen to the voice by bringing the receiver 170B close to the user's ear. Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc. Headphone jack 170D is used to connect wired headphones. Headphone jack 170D can be a USB interface 130, a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, or a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0088] Sensor 180 may include pressure sensor 180A, gyroscope sensor 180B, barometric pressure sensor 180C, magnetic sensor 180D, accelerometer sensor 180E, distance sensor 180F, proximity sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light sensor 180L, bone conduction sensor 180M, etc.
[0089] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the touch position based on the detection signal from the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.
[0090] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation, motion-sensing game scenarios, etc.
[0091] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0092] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0093] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0094] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and detach from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card, which can be embedded within the electronic device 100.
[0095] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100. Figure 3 This is a software architecture block diagram of an electronic device to which embodiments of this application apply. The layered architecture divides the software system of the electronic device 100 into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into five layers: applications, application framework, Android runtime and system libraries, hardware abstraction layer (HAL), and kernel.
[0096] The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. For example... Figure 3 As shown, the application package may include applications such as Meitu Xiu Xiu, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0097] The application framework layer provides APIs and a programming framework for applications within the application layer. The application framework layer includes predefined functions. For example... Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0098] The window manager manages window programs. It can obtain screen size, determine the presence of a status bar, lock the screen, and capture screenshots. The content provider stores and retrieves data, making it accessible to applications. Data can include video, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon can include views for displaying text and views for displaying images. The phone manager provides communication functionality for the electronic device 100. For example, it manages call status (including connection, hang-up, etc.). The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify of download completion, message alerts, etc. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, and flashing indicator lights.
[0099] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java calls, and the other part consists of the Android core libraries. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. System libraries can include multiple functional modules. Examples include: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL).
[0100] The Surface Manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The Media Library supports playback and recording of various common audio and video formats, as well as still image files. The Media Library supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D Graphics Processing Library implements 3D graphics drawing, image rendering, compositing, and layer processing. The 2D Graphics Engine is the drawing engine for 2D graphics.
[0101] The Hardware Abstraction Layer (HAL) can contain multiple library modules, such as camera and motor libraries. The Android system loads the corresponding library modules for the device hardware, enabling the application framework layer to access the device hardware. Device hardware can include components such as motors and cameras in electronic devices.
[0102] The kernel layer is the layer between hardware and software. It drives the hardware, enabling it to function. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, motor drivers, etc., but this application's embodiments do not impose limitations on this.
[0103] The image editing prompting method provided in this application embodiment will be described below using a mobile phone 200 as an example. This example does not constitute a limitation on the embodiments of this application. The following embodiments can be combined with each other, and the same or similar concepts or processes will not be described again. Figure 4 This is a flowchart illustrating one embodiment of the image editing prompting method provided in this application. It should be noted that, for ease of reading, Figure 4 The application interfaces that may be involved in the steps will be described in detail in subsequent embodiments. Figure 4 The corresponding implementation examples will not be described in detail. Figure 4 As shown, the image editing prompting method provided in this application embodiment may include:
[0104] S401: Mobile phone 200 displays an image editing interface. This interface shows images to be edited.
[0105] The image to be edited can be a photo taken instantly by the camera application of mobile phone 200, or an image saved in the photo album application of mobile phone 200, etc., without limitation. The image to be edited includes multiple objects, which are different things. For example, multiple objects may include lady a, man b, the sun, and a horizontal bar, etc.; or multiple objects may include person 1, a podium, a blackboard, and a projector, etc., without limitation.
[0106] For example, when the image to be edited is an image captured instantly by a camera application, after the camera application captures the image, the mobile phone 200 enters the image browsing interface of the camera application, and displays the captured image in the image preview interface. The mobile phone 200 can respond to editing operations input by the user in the image browsing interface by displaying an image editing interface. The captured image is the image to be edited.
[0107] For example, when the image to be edited is an image saved in a photo album application, the mobile phone 200 can respond to the user's trigger operation on the image editing application and enter the main page of the image editing application. A photo addition button is displayed on the main page of the image editing application. The mobile phone 200 can respond to the user's trigger operation on the photo addition button, add a photo from the photo album application, and display the image editing interface. The image editing interface displays the photo added from the photo album application; the added photo is the image to be edited.
[0108] S402: Mobile phone 200 acquires the first contour data of each of the multiple objects included in the image to be edited.
[0109] The mobile phone 200 can use an image segmentation algorithm to segment each of the multiple objects in the image to be edited. The mobile phone 200 then uses an edge detection algorithm to detect the edge pixels of each of the multiple objects. The mobile phone 200 connects the pixel coordinates of the edge pixels to form geometric data, which is the first contour data. Optionally, the image segmentation algorithm described above can be a semantic segmentation algorithm.
[0110] For example, when multiple objects include woman a, man b, the sun, and a horizontal bar, mobile phone 200 can use an image segmentation algorithm to segment woman a, man b, the sun, and the horizontal bar from the image to be edited. Furthermore, mobile phone 200 can use an edge detection algorithm to detect the first contour data corresponding to woman a, man b, the sun, and the horizontal bar respectively.
[0111] S403: The mobile phone 200 responds to a user's first deformation operation on a first region of a first object among a plurality of objects, and changes the shape of an image region including the first region.
[0112] A user can input a first deformation operation into a first region of a first object among multiple objects. The mobile phone 200 responds to this first deformation operation by changing the shape of the first region of the first object. Simultaneously, the mobile phone 200 may also change the shape of a second region of a second object located near the first region. It should be noted that the aforementioned first deformation operation can be a single trigger operation, or it can include multiple consecutive trigger operations with intervals shorter than a preset duration; this is not limited here.
[0113] For example, in the case of multiple objects including woman A, man B, the sun, and a horizontal bar, taking the first region of the first object as the arm region of woman A and the second region of the second object as the arm region of man B as an example, the shape of the first region is explained. The mobile phone 200 can respond to a user's trigger operation on the arm region of woman A by shrinking the outline of the arm region of woman A, thus achieving a slimming operation on the arm region of woman A. The trigger operation is the first deformation operation described above. Furthermore, while shrinking the outline of the arm region of woman A, the mobile phone 200 may also cause the outline of the arm region of man B, located near the arm region of woman A, to also deform; that is, the arm region of man B may be accidentally deformed. It is understood that the first object is a person, the first region is an arm region, and the second object is also a person.
[0114] S404: Mobile phone 200 acquires the second contour data of each object in the image to be edited after the first deformation operation.
[0115] The method by which the mobile phone 200 obtains the second contour data of each object in the image to be edited after the first deformation operation can be the same as the method by which the mobile phone 200 obtains the first contour data of each of multiple objects in S402 above. For details, please refer to the description in S402 above, which will not be repeated here.
[0116] It should be noted that, due to the deformation of the first region of the first object, the second contour data of the first object is different from the first contour data of the first object. Furthermore, when the second region of the second object located near the first region of the first object does not deform, the second contour data of the second object is the same as the first contour data of the second object; when the second region of the second object located near the first region of the first object deforms, the second contour data of the second object is different from the first contour data of the second object.
[0117] For example, based on the example in S403 above, since the arm region of woman a is deformed, the second contour data of woman a is different from the first contour data of woman a. Furthermore, if the arm region of man b, located near the arm region of woman a, is not deformed, then the second contour data of man b is the same as the first contour data of man b; if the arm region of man b, located near the arm region of woman a, is deformed, then the second contour data of man b is different from the first contour data of man b.
[0118] S405: Based on the second contour data and the first contour data, the mobile phone 200 determines that the second region of the second object undergoes deformation before and after the first deformation operation. The second object is located near the first object, and the second region is adjacent to the first region.
[0119] Specifically, the mobile phone 200 can calculate the degree of deformation of the second contour data of multiple objects (excluding the first object) in the image to be edited relative to their corresponding first contour data. When the degree of deformation of the second contour data of the second object (excluding the first object) relative to its first contour data exceeds a deformation threshold, the mobile phone 200 determines that the second object has deformed before and after the first deformation operation. Furthermore, the mobile phone 200 can identify the area where the second contour data of the second object differs from the first contour data as the second deformed area. Only when the degree of deformation exceeds the deformation threshold can the user visually perceive that the second area of the second object has deformed. In this way, the electronic device more accurately matches the user's visual perception by determining that the second area of the second object has deformed before and after the first deformation operation.
[0120] The aforementioned deformation value can be the difference between the area of the second contour data and the area of the first contour data, or the difference between the perimeter of the second contour data and the perimeter of the first contour data, etc., and is not limited here.
[0121] For example, based on the example in S403, the mobile phone 200 compares the deformation degree value of the second contour data of man b relative to the first contour data of man b to see if it is greater than a deformation threshold. It also compares the deformation degree value of the second contour data of the sun relative to the first contour data of the sun, and the deformation degree value of the second contour data of the horizontal bar relative to the first contour data of the horizontal bar to see if it is greater than a deformation threshold. If the second contour data of man b relative to the first contour data of man b is greater than the deformation threshold, the mobile phone 200 determines that man b has undergone deformation before and after the first deformation operation. Furthermore, the mobile phone 200 can determine the area where the second contour data of man b differs from the first contour data as the second area where deformation has occurred.
[0122] S406: Mobile phone 200 displays a first prompt message near the second area of the second object, the first prompt message being used to indicate that the second area has been deformed.
[0123] For example, the first prompt message could be text messages such as "Deformation has occurred," "Editing error," or "An error has occurred here." In this way, the user can perceive the deformation of the second region of the second object through the first prompt message displayed on the mobile phone 200. Subsequently, the mobile phone 200 can process the second region of the second object according to the user's operation to ensure the quality of the image to be edited.
[0124] It should be noted that when there are multiple deformed second regions in the image to be edited, a first prompt message can be displayed near each second region. This allows the user to be notified that deformation has occurred in different second regions. The deformed second regions can be located on the same object or on different objects; this is not limited to these locations.
[0125] Furthermore, the mobile phone 200 can calculate the importance of each of the multiple second regions; the mobile phone 200 ranks the importance of the multiple second regions; then, based on the ranking result, the mobile phone 200 displays a first prompt message near the second region of each second object. The first prompt messages displayed near different second regions are marked with different symbols, which indicate the importance of the corresponding second region. For example, the first prompt messages displayed near different second regions may be marked with different colors, or the color depth of the first prompt messages displayed near different second regions may be different, etc., without limitation. In this way, the user can decide on different processing methods for different second regions based on the different symbols marked on the first prompt messages near different second regions.
[0126] On one hand, for example, the specific method by which the mobile phone 200 determines the importance level can be as follows: the mobile phone 200 calculates a first distance between the geometric center of each second region and the geometric center of the first object; the mobile phone 200 looks up the importance value from a pre-stored second mapping table based on the calculated first distance. In the second mapping table, there is a one-to-one correspondence and positive correlation between the magnitude of the first distance and the importance value.
[0127] On the other hand, for example, the specific method by which the mobile phone 200 calculates the importance can also be as follows: the mobile phone 200 calculates a second distance between the geometric center of each second region and the image edge; based on the calculated second distance, it looks up the importance value from a pre-stored second mapping table. In the second mapping table, there is a one-to-one correspondence and a negative correlation between the magnitude of the second distance and the importance value.
[0128] Optionally, the image editing prompting method provided in this application embodiment may further include:
[0129] S407: In response to the user's repair operation on the second area of the second object, the mobile phone 200 displays the second object with the first outline data of the second object.
[0130] If a user feels that the deformation of a second object will significantly impact the quality of the image being edited, they can input a repair operation into the second region of the second object. The phone 200 then responds to this repair operation by replacing the second object's second outline data with the first outline data to display the second object. This restores the shape of the second region of the second object, eliminating the negative impact of deformation on the image quality. Furthermore, the user only needs to trigger the first repair button near the second region to display the second object's first outline data, thus repairing the shape of the second region—a quick and convenient process.
[0131] For example, if a user feels that the deformation of the man's arm (b) will significantly affect the quality of the image to be edited, they can input a repair operation into the arm area of the man's arm. Then, in response to the user's repair operation on the arm area of the man's arm, the mobile phone 200 replaces the second contour data of the man's arm with the first contour data of the man's arm to display the man's arm. In this way, the shape of the arm area of the man's arm is repaired, eliminating the adverse effects of the deformation on the quality of the image to be edited.
[0132] In summary, the image editing prompting method provided in this application embodiment allows the mobile phone 200 to change the shape of an image region, including the first region, in response to a user's first deformation operation on a first region of a first object among multiple objects. The mobile phone 200 identifies whether the second contour data of multiple objects other than the first object has changed after the first deformation operation relative to the corresponding first contour data before the first deformation operation. If the second contour data of the second object among the multiple objects other than the first object has changed relative to the corresponding first contour data, the mobile phone 200 determines that the second region of the second object has been deformed before and after the first deformation operation. Then, the mobile phone 200 displays a first prompt message near the second region of the second object to alert the user that the second region of the second object has been deformed due to accidental operation. When the user feels that the deformation of the second object will significantly affect the quality of the image to be edited, they can input a repair operation on the second region of the second object. Then, in response to the user's repair operation on the second region of the second object, the mobile phone 200 replaces the second contour data of the second object with the first contour data of the second object to display the second object. In this way, the shape of the second region of the second object is repaired, eliminating the adverse effects of the deformation of the second region of the second object on the quality of the image to be edited.
[0133] Optionally, after S407, if the user still feels that the third region of the first object among multiple objects needs to be reshaped, the image editing prompting method provided in this application embodiment may further include:
[0134] S408: Mobile phone 200 responds to a user's second deformation operation on the third region of the first object among multiple objects, changing the shape of the image region including the third region.
[0135] Similar to S403 above, while changing the third region of the first object, the mobile phone 200 may also change the shape of the fourth region of the third object located near the first region.
[0136] For example, in the case of multiple objects including woman A, man B, the sun, and a horizontal bar, taking the third region of the first object as the face region of woman A and the fourth region of the third object as the handheld region of the horizontal bar as an example, the shape of the third region is explained. The mobile phone 200 can respond to a user's trigger operation on the face region of woman A by shrinking the outline of the face region of woman A, thus achieving a face-slimming operation on the face region of woman A. The trigger operation is the second deformation operation mentioned above. Furthermore, while the mobile phone 200 shrinks the outline of the face region of woman A, it may cause the handheld region of the horizontal bar located above the face region of woman A to bend, resulting in deformation of the handheld region of the horizontal bar; that is, the handheld region of the horizontal bar is deformed due to accidental operation. It can be understood that the first object mentioned above is a person, the third region is the face region, and the third object is an object.
[0137] S409: Mobile phone 200 acquires the third contour data of each object in the image to be edited after the second deformation operation.
[0138] The method by which the mobile phone 200 obtains the third contour data of each object in the image to be edited after the second deformation operation is the same as the method by which the mobile phone 200 obtains the first contour data of each of the multiple objects in S402. For details, please refer to the description in S402 above, which will not be repeated here.
[0139] S410-1: Based on the third contour data and the first contour data, the mobile phone 200 determines that the fourth region of the third object is deformed before and after the first deformation operation, wherein the third object is located near the first object and the fourth region is adjacent to the third region.
[0140] In this process, the mobile phone 200 determines the deformation method of the fourth region of the third object before and after the second deformation operation based on the third contour data and the first contour data. This is the same as in S405 above, where the mobile phone 200 determines the deformation method of the second region of the second object before and after the first deformation operation based on the second contour data and the first contour data. Therefore, it will not be described again here.
[0141] For example, based on the example of S408, when the third contour data of the bar changes relative to the first contour data of the bar, the mobile phone 200 determines that the bar has deformed before and after the second deformation operation. Furthermore, the mobile phone 200 can determine the region where the third contour data of the bar differs from the first contour data as the fourth region where deformation has occurred.
[0142] In addition, the above-mentioned S4010-1 can also be replaced with:
[0143] S410-2: Based on the third contour data and the second contour data, the mobile phone 200 determines that the fourth region of the third object undergoes deformation before and after the second deformation operation. The third object is located near the first object, and the fourth region is adjacent to the third region. Understandably, the implementation principle of S4011-2 is the same as that of S4011-1, and will not be elaborated further here.
[0144] S411: Mobile phone 200 displays a second prompt message near the fourth area of the third object, the second prompt message being used to indicate that the fourth area has been deformed.
[0145] The second prompt message can also be a text prompt such as "Deformation Occurred," "Editing Error," or "A Misoperation Occurred Here." For example, based on the embodiments of S4010-1 or S4010-2 described above, the mobile phone 200 can display "Deformation Occurred" near the handheld area of the horizontal bar to prompt the user that the handheld area of the horizontal bar has been deformed. In this way, the user can also perceive the deformation of the handheld area of the horizontal bar through the second prompt message displayed by the mobile phone 200. Furthermore, the mobile phone 200 can process the deformation of the handheld area of the horizontal bar according to the user's operation to ensure the quality of the image to be edited.
[0146] Furthermore, in the embodiment corresponding to S405 described above, the degree of attention paid to multiple objects in the image to be edited varies. Consequently, the user's visual judgment criteria for deformation of different objects also differ. For example, for objects with high user attention, even a small deformation value may be perceived as deformed; conversely, for objects with low user attention, even a large deformation value may be perceived as undeformed. Therefore, different deformation thresholds need to be set for different objects so that the mobile phone 200 can more accurately match the user's visual perception to determine whether each object has undergone deformation. Below, we introduce three methods for the mobile phone 200 to specifically set the deformation threshold corresponding to the second object.
[0147] The first setup: Since the user inputs a first deformation operation on the first object to change its shape, the first object can be considered an object of high user attention. The closer the second object is to the first object, the higher the likelihood of it being noticed by the user; conversely, the farther the second object is from the first object, the lower the likelihood of it being noticed. Therefore, the mobile phone 200 can calculate a first distance between the geometric center of the second object and the geometric center of the first object, and look up a deformation threshold from a pre-stored first mapping table based on the calculated distance. In the pre-stored first mapping table, the magnitude of the first distance and the deformation threshold have a one-to-one correspondence and are positively correlated. In this way, the electronic device uses the deformation threshold looked up based on the first distance to determine whether the second region of the second object has deformed before and after the first deformation operation, more accurately matching the user's visual perception.
[0148] The second setting is as follows: When the area of the second object is large, even if the deformation value of the second object is large, the user will visually perceive that the second object has not deformed; when the area of the second object is small, even if the deformation value of the second object is small, the user will visually perceive that the second object has deformed. Therefore, the mobile phone 200 can calculate the area of the second object and look up the deformation threshold from the pre-stored first mapping relationship table based on the calculated area. In the pre-stored first mapping relationship table, there is a one-to-one correspondence and positive correlation between the area size and the deformation threshold. In this way, the electronic device uses the deformation threshold looked up based on the area of the second object to determine whether the second region of the second object has deformed before and after the first deformation operation, more accurately matching the user's visual perception.
[0149] The third setting: Generally, users pay more attention to objects closer to the image edge; conversely, they pay less attention to objects farther from the image edge. Thus, if the second object is close to the image edge, even with a large deformation value, the user will visually perceive that the second object is not deformed; conversely, if the second object is far from the image edge, even with a small deformation value, the user will visually perceive that the second object is deformed. The phone 200 can then calculate the second distance between the geometric center of the second object and the image edge, and look up the deformation threshold from a pre-stored first mapping table based on the calculated second distance. In the pre-stored first mapping table, there is a one-to-one correspondence and a negative correlation between the second distance to the image edge and the deformation threshold. In this way, the electronic device uses the deformation threshold looked up using the second distance to determine whether the second region of the second object has deformed before and after the first deformation operation, more accurately matching the user's visual perception.
[0150] The following example uses an image to be edited containing multiple objects, including woman A, man B, the sun, and a horizontal bar. The first area of the first object is woman A's arm area, the second area of the second object is man B's arm area, the third area of the first object is woman A's face area, and the fourth area of the third object is the hand holding the horizontal bar. Figure 1 , Figure 5 Figure 12 is a schematic diagram of the interface operation, illustrating how to achieve the following. Figure 4 The corresponding embodiment of the image editing prompting method.
[0151] For example, combined Figure 1 , Figures 5-7 After the first deformation operation of the arm area of Ms. a in the S401-S408 mobile phone 200 described above, it is explained how the user is notified that the arm area of Mr. b has been deformed due to accidental operation.
[0152] Please see Figure 1 (a)-(e) and the above pairs Figure 1 As explained in (a)-(e), if the user observes that the arm area of woman A in the image to be edited is captured as thicker, the mobile phone 200 can respond to the user's trigger operation on woman A's arm, causing woman A's arm to be slimmed down. Simultaneously, while woman A's arm is slimmed down, the shape of man B's arm is also mistakenly deformed.
[0153] Furthermore, the mobile phone 200 can identify that the second contour data of man b after responding to the aforementioned trigger operation is greater than the deformation threshold compared to the first contour data of man b before responding to the aforementioned trigger operation. Thus, the mobile phone 200 determines that man b underwent deformation before and after responding to the aforementioned trigger operation. The mobile phone 200 can identify the arm region where the second contour data of man b differs from the first contour data as the deformed region.
[0154] Furthermore, such as Figure 5 As shown in (a), mobile phone 200 can display a first prompt message 410 indicating "deformation has occurred" near the area of man b's arm to alert the user that the area of man b's arm has been deformed. To help the user locate the deformed area, mobile phone 200 uses a rectangle to surround the area of man b's arm to indicate to the user that the area within the rectangle is the deformed area.
[0155] like Figure 5 As shown in (b) and (c), the mobile phone 200 can respond to the user's trigger operation on the arm area of man b by displaying a repair button 502 and a non-repair button 503. When the user feels that the arm area of man b is deformed and will affect the quality of the image to be edited, such as... Figure 6As shown in (a), you can click the repair button 502. Thus, as... Figure 6 As shown in (b), in response to the user's triggering operation of the repair button 502, the mobile phone 200 replaces the second contour data of man b with the first contour data of man b to display man b. In this way, the shape repair of the arm area of man b is achieved, eliminating the adverse effects of the deformation of the arm area of man b on the quality of the image to be edited.
[0156] Alternatively, if the user feels that the deformation of the male character (b) will not affect the quality of the edited image, or even improve the image quality, then... Figure 7 As shown in (a), the "Do Not Repair" button 503 can be triggered. Furthermore, in response to the user's triggering of the "Do Not Repair" button 503, the phone 200 can still display the second outline of man b as the image. Thus, even if the arm area of man b is deformed, the quality of the image to be edited will not be affected. Additionally, the phone 200 can also cancel the display of the first prompt message to eliminate interference with the user's browsing of the image to be edited.
[0157] Below, in conjunction with Figure 8 After describing the second deformation operation of the face area of Ms. a in the S409-S4011 mobile phone 200, it is explained how the user is prompted that the handheld area of the bar has been deformed due to accidental operation.
[0158] exist Figure 5 Based on the image editing interface 205 shown in (a), if the user observes that the facial area of woman a in the image to be edited is captured as large, such as Figure 8 As shown in (a) and (b), the mobile phone 200 responds to a user's trigger operation on the face area of Ms. a, causing the facial contour of Ms. a to shrink from the solid line to the dotted line, thus realizing the face slimming operation on the face area of Ms. a.
[0159] Please continue reading. Figure 8 In (b), while the mobile phone 200 shrinks the contour of the woman a's face area, the handheld area of the horizontal bar bends from the solid line to the dotted line, causing the handheld area of the horizontal bar c, located above the woman a's face area, to bend. That is, the handheld area of the horizontal bar c is deformed due to accidental operation. Thus, the mobile phone 200 can recognize that the second contour data of the horizontal bar c after responding to the aforementioned trigger operation has changed relative to the first contour data of the horizontal bar c before responding to the aforementioned trigger operation. Furthermore, the mobile phone 200 determines that the horizontal bar c deformed before and after responding to the aforementioned trigger operation. The mobile phone 200 can identify the arm area where the second contour data of the horizontal bar c differs from the first contour data as the deformed area.
[0160] Furthermore, such as Figure 8 As shown in (a), the mobile phone 200 can display a second prompt message 802 indicating "deformation has occurred" near the handheld area of the bar c to alert the user that the handheld area of the bar c has been deformed. To help the user locate the deformed area, the mobile phone 200 uses a rectangle 801 to surround the handheld area of the bar c, indicating to the user that the area within the rectangle 801 is the deformed area.
[0161] exist Figure 8 Based on the corresponding embodiments, the following is combined with Figures 9-12 This paper introduces three different ways that a mobile phone can process images to be edited when the arm area of man b in the image to be edited is deformed due to accidental operation, and the hand area of bar c is deformed due to accidental operation.
[0162] Figure 9 This is a schematic diagram of the interface for one-click repair of the arm area of man b and the handhold area of bar c provided in this embodiment of the application. Figure 8 Based on the corresponding image editing interface 205, such as Figure 9 As shown in (a), the mobile phone 200 can respond to a user's trigger operation at any location of the image to be edited, displaying a one-click repair button 901 and a one-click non-repair button 902 in the image to be edited. If the user feels that the deformation in the arm area of man b and the hand area of bar c will affect the quality of the image to be edited, such as... Figure 9 As shown in (b), the one-click repair button 901 can be triggered. In response to the user's triggering operation of the one-click repair button 901, the mobile phone 200 replaces the second outline data of the man b with the first outline data of the man b to display the man b; and replaces the second outline data of the single bar c with the first outline data of the single bar c to display the single bar c.
[0163] In this way, the shape of the arm area of man B is restored, eliminating the adverse effects of deformation in the arm area on the quality of the image to be edited; and the shape of the hand area of bar C is restored, eliminating the adverse effects of deformation in the hand area on the quality of the image to be edited. Furthermore, the user only needs to trigger the one-click repair button 901 once, and the mobile phone 200 can complete the shape restoration of both the arm area of man B and the hand area of bar C, which is highly efficient and convenient. In addition, the mobile phone 200 eliminates the display of the first and second prompt messages, thus eliminating interference with the user's browsing of the image to be edited.
[0164] Figure 10 This is a schematic diagram of the interface of a mobile phone 200 that provides one-click non-repair of the arm area of man b and the handhold area of bar c in an embodiment of this application. Figure 9 (a) Based on the corresponding image editing interface 205, if the user feels that the deformation of the arm area of man b and the handhold area of bar c will not affect the quality of the image to be edited, such as... Figure 10 As shown in (a), the one-click non-repair button 902 can be triggered. In response to the user's triggering of the one-click non-repair button 902, the mobile phone 200 still displays the second outline of man b as man b; and still displays the second outline of bar c as bar c. Thus, even if the arm area of man b and the hand area of bar c are deformed, the quality of the image to be edited will not be affected. Furthermore, the mobile phone 200 also cancels the display of the first and second prompt messages, eliminating interference with the user's browsing of the image to be edited.
[0165] Figures 11-12 This is a schematic diagram of the interface of the mobile phone 200 that repairs the handheld area of the horizontal bar c and does not repair the arm area of the man b, as provided in this embodiment of the application. Figure 8 (a) Based on the corresponding image editing interface 205, when the user feels that the handheld area of the single bar c has been deformed, it will affect the quality of the image to be edited, such as... Figure 11 As shown in (a), the handheld area of bar c can be triggered. Then, the mobile phone 200 responds to the user's triggering operation on the handheld area of bar c, as follows: Figure 11 As shown in (b), the first "Deformation Occurred" prompt message near the handheld area of the bar c is removed, and a repair button 1101 and a non-repair button 1102 are displayed near the handheld area of the bar c. By removing the first "Deformation Occurred" prompt message, the phone 200 eliminates interference with the user's browsing of the image to be edited. Figure 11 As shown in (c) and (d), in response to the user's triggering operation of the repair button 1101, the mobile phone 200 replaces the second contour data of the single bar c with the first contour data of the single bar c to display the single bar c. In this way, the shape of the arm region of the single bar c is repaired, eliminating the adverse effects of the deformation of the arm region of the single bar c on the quality of the image to be edited.
[0166] If the user feels that the deformation of the arm area of man B will not affect the quality of the image being edited, such as... Figure 12 As shown in (a), the mobile phone 200 can respond to the user's trigger operation on the arm area of man b by displaying a repair button 1201 and a non-repair button 1202. When the user feels that the deformation of the arm area of man b will not affect the quality of the image being edited, such as... Figure 12 As shown in (a), you can click the "Do Not Repair" button 1202. Thus, as... Figure 12As shown in (c), in response to the user's triggering of the "Do Not Repair" button 1202, the mobile phone 200 still displays the second outline of man b. Thus, even if the arm area of man b is deformed, the quality of the image to be edited will not be affected. Furthermore, the mobile phone 200 also eliminates the display of the first prompt message, thus eliminating interference with the user's browsing of the image to be edited.
[0167] Understandably, through the above Figures 11-12 The mobile phone 200 can selectively repair the shape of objects that the user wants to repair from multiple objects that have been deformed due to accidental operation, and selectively not repair the shape of objects that the user does not want to repair. This high flexibility in image editing further ensures the quality of the image being edited.
[0168] Figure 13 This is a flowchart illustrating another embodiment of the image editing prompting method provided in this application. It should be noted that the image editing prompting method provided in this application has the same basic principle and technical effects as the above embodiments. For the sake of brevity, any parts not mentioned in the embodiments of this application can be referred to the corresponding content in the above embodiments. For example... Figure 13 As shown, another embodiment of the image editing prompting method provided in this application may include:
[0169] S131: Mobile phone 200 displays an image editing interface, in which images to be edited are displayed.
[0170] The implementation principle of S131 is the same as described above. Figure 4 The S401 implementation principle is the same, so it will not be repeated here.
[0171] S132: Mobile phone 200 acquires the first contour data of each of the multiple objects included in the image to be edited.
[0172] The implementation principle of S132 is the same as described above. Figure 4 The S402 implementation principle is the same, so it will not be repeated here.
[0173] S133: The mobile phone 200 responds to the user's first deformation operation on the first region of the first object among multiple objects, and changes the shape of the image region including the first region.
[0174] The implementation principle of S133 is the same as described above. Figure 4 The implementation principle of the provided S403 is the same, so it will not be repeated here.
[0175] S134: Mobile phone 200 acquires the second contour data of each object in the image to be edited after the first deformation operation.
[0176] The implementation principle of S134 is the same as described above. Figure 4 The S404 implementation principle is the same, so it will not be repeated here.
[0177] S135: Based on the second contour data and the first contour data, the mobile phone 200 determines that the second region of the second object undergoes deformation before and after the first deformation operation. The second object is located near the first object, and the second region is adjacent to the first region.
[0178] The implementation principle of S135 is the same as described above. Figure 4 The S405 implementation principle is the same, so it will not be repeated here.
[0179] S136: Mobile phone 200 displays the second object by replacing the second outline data of the second object with the first outline data of the second object.
[0180] and Figure 4 The image editing prompts provided differ in that, after determining that the second region of the second object has been deformed before and after the first deformation operation, the mobile phone 200 replaces the second contour data of the second object with the first contour data to display the second object. This achieves automatic repair of the deformed second region of the second object, thus ensuring that the quality of the image to be edited is not affected.
[0181] S137: Mobile phone 200 displays a first prompt message near the second area of the second object.
[0182] and Figure 4 The image editing prompts provided differ in that the first prompt indicates that the second region of the second object has been restored to its shape before the first deformation operation. For example, the first prompt could be text such as "Repaired after deformation" or "Repair successful." In this way, the user can perceive through the first prompt that the second region of the second object has been deformed and repaired, without affecting the quality of the image to be edited.
[0183] In addition, the triggering operations mentioned in the above-described image editing prompting method provided in the embodiments of this application may include: click operation, long press operation, and gesture triggering operation, etc., which are not limited here.
[0184] Furthermore, in the image editing prompting method provided in the above-described embodiments of this application, the image to be edited can also be replaced with a process component image. When the mobile phone 200 responds to the user's first deformation operation on the first region of the first component in the process component image, while changing the shape of the first component, the second region of the second component is also mistakenly deformed. At this time, a first prompt message can be displayed near the second region. Thus, the user can input a repair operation on the second region of the second component. Subsequently, in response to the user's repair operation on the second region of the second component, the mobile phone 200 replaces the second contour data of the second component with the first contour data of the second component to display the second object. In this way, the shape repair of the second region of the component is achieved, eliminating the adverse effects of the deformation of the second region of the second component on the quality of the image to be edited. Thus, the quality of the process component manufactured based on the process component image is guaranteed.
[0185] like Figure 14 As shown, Figure 14 The diagram shows a schematic of an image editing prompting device provided in an embodiment of this application. The image editing prompting device may be an electronic device in the embodiment of this application, or it may be a chip or chip system within an electronic device.
[0186] For example, taking the image editing prompting device as an electronic device or a chip or chip system applied in an electronic device, the display unit 1401 is used to support the image editing prompting device in performing the display steps in the above embodiments, and the processing unit 1402 is used to support the image editing prompting device in performing the processing steps in the above embodiments.
[0187] The processing unit 1402 may be integrated with the display unit 1401, and the processing unit 1402 and the display unit 1401 may communicate with each other.
[0188] In one possible implementation, the image editing prompting device may further include a storage unit 1403. The storage unit 1403 may include one or more memories, which may be devices in one or more devices or circuits used for storing programs or data.
[0189] The storage unit 1403 can exist independently or be connected to the processing unit 1402 via a communication bus. Alternatively, the storage unit 1403 can be integrated with the processing unit 1402.
[0190] Taking the image editing prompting device as an example, which can be a chip or chip system of the electronic device in the embodiments of this application, the storage unit 1403 can store computer-executable instructions for the method of the electronic device, so that the processing unit 1402 can execute the method of the electronic device in the above embodiments. The storage unit 1403 can be a register, cache, or random access memory (RAM), etc., and the storage unit 1403 can be integrated with the processing unit 1402. The storage unit 1403 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1403 can be independent of the processing unit 1402.
[0191] This application provides an image editing prompting device, including: a display unit 1401 for displaying an image editing interface, wherein the image editing interface displays an image to be edited; a processing unit 1402 for acquiring first contour data of each of a plurality of objects included in the image to be edited; the processing unit 1402 is further configured to change the shape of an image region including the first region in response to a first deformation operation performed by a user on a first region of the first object among the plurality of objects; the processing unit 1402 is further configured to acquire second contour data of each object in the image to be edited after the first deformation operation; the processing unit 1402 is further configured to determine, based on the second contour data and the first contour data, that a second region of a second object has undergone deformation before and after the first deformation operation, wherein the second object is located near the first object and the second region is adjacent to the first region; the display unit 1401 is further configured to display first prompt information near the second region of the second object, the first prompt information indicating that the second region has undergone deformation; or, the first prompt information indicating that the second region of the second object has been restored to its shape before the first deformation operation.
[0192] In one possible implementation, the first object is a person, the first region is a face region, and the second object is an object; or, the first object is a person and the second object is a person.
[0193] In one possible implementation, the processing unit 1402 is further configured to respond to a user's repair operation on a second region of the second object by displaying the second object as a first outline of the second object.
[0194] In one possible implementation, the processing unit 1402 is further configured to respond to a user's trigger operation on a second region of the second object, and the display unit 1401 is further configured to display a first repair button near the second region of the second object; the processing unit 1402 is further configured to respond to a user's trigger operation on the first repair button, and the display unit 1401 is further configured to display the second object in the first outline of the second object.
[0195] In one possible implementation, there are multiple second objects, and the display unit 1401 is specifically used to display a second repair button in the image editing interface; the processing unit 1402 is also used to respond to the user's trigger operation on the second repair button, and the display unit 1401 is also used to display each second object in the first outline data of the multiple second objects.
[0196] In one possible implementation, the processing unit 1402 is further configured to respond to the user's non-repair operation on the second area of the second object, and the display unit 1401 is further configured to cancel the display of the first prompt information.
[0197] In one possible implementation, there are multiple second regions. The processing unit 1402 is further used to calculate the importance of each of the multiple second regions in the electronic device; the electronic device sorts the importance of the multiple second regions; and the electronic device displays a first prompt message near the second region of each second object according to the sorting result, wherein the first prompt message displayed near different second regions is identified with different markers.
[0198] In one possible implementation, the processing unit 1402 is further configured to change the shape of an image region, including the third region, in response to a second deformation operation by the user on a third region of a first object among a plurality of objects; the processing unit 1402 is further configured to acquire third contour data of each object in the image to be edited after the second deformation operation; the processing unit 1402 is further configured to determine, based on the third contour data and the first contour data, that a fourth region of the third object has undergone deformation before and after the first deformation operation, wherein the third object is located near the first object and the fourth region is adjacent to the third region; the display unit 1401 is further configured to display a second prompt message near the fourth region of the third object, the second prompt message indicating that the fourth region has undergone deformation; or, the second prompt message indicating that the fourth region of the third object has recovered its shape before the first deformation operation.
[0199] In one possible implementation, the processing unit 1402 is specifically used to calculate the second contour data of the second object, relative to the deformation degree value of the first contour data of the second object; if the deformation degree value is greater than the deformation threshold, it is determined that the second region of the second object has been deformed before and after the first deformation operation.
[0200] In one possible implementation, the processing unit 1402 is further configured to calculate a first distance between the geometric center of the second object and the geometric center of the first object, and to find a deformation threshold from a pre-stored first mapping table based on the first distance, wherein the magnitude of the first distance and the existence of the deformation threshold are in a one-to-one correspondence and positively correlated in the pre-stored first mapping table.
[0201] Alternatively, the processing unit 1402 is further configured to calculate the area of the second object and find the deformation threshold from a pre-stored first mapping table based on the area, wherein the size of the area and the existence of the deformation threshold are in a one-to-one correspondence and positive correlation in the pre-stored first mapping table.
[0202] Alternatively, the processing unit 1402 is further configured to calculate a second distance between the geometric center of the second object and the edge of the image, and to find a deformation threshold from a pre-stored first mapping table based on the second distance, wherein the magnitude of the second distance and the existence of the deformation threshold are in a one-to-one correspondence and negatively correlated in the pre-stored first mapping table.
[0203] In one possible implementation, the degree of deformation is the difference between the area of the second contour data and the area of the first contour data; or, the degree of deformation is the difference between the perimeter of the second contour data and the perimeter of the first contour data.
[0204] For example, Figure 15 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application, such as... Figure 15 As shown, the electronic device includes a processor 1501, a communication line 1504, and at least one communication interface. Figure 15 (The example described uses communication interface 1503 as an example).
[0205] The processor 1501 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0206] Communication line 1504 may include circuitry for transmitting information between the aforementioned components.
[0207] Communication interface 1503 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.
[0208] Possibly, the electronic device may also include a memory 1502.
[0209] The memory 1502 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via communication line 1504. The memory may also be integrated with the processor.
[0210] The memory 1502 stores computer execution instructions for implementing the scheme of this application, and the processor 1501 controls the execution. The processor 1501 executes the computer execution instructions stored in the memory 1502, thereby implementing the image editing prompting method provided in the embodiments of this application.
[0211] It is possible that the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.
[0212] In a specific implementation, as one example, the processor 1501 may include one or more CPUs, for example... Figure 15 CPU0 and CPU1 in the CPU.
[0213] In a specific implementation, as one example, an electronic device may include multiple processors, for example... Figure 15 Processors 1501 and 1505 are mentioned. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0214] For example, Figure 16 This is a schematic diagram of a chip structure provided in an embodiment of this application. The chip 160 includes one or more processors 1610 and a communication interface 1630.
[0215] In some implementations, memory 1640 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof.
[0216] In this embodiment, memory 1640 may include read-only memory and random access memory, and provides instructions and data to processor 1610. A portion of memory 1640 may also include non-volatile random access memory (NVRAM).
[0217] In this embodiment, the memory 1640, the communication interface 1630, and the memory 1640 are coupled together via a bus system 1620. The bus system 1620 includes a data bus, and may also include a power bus, a control bus, and a status signal bus, etc. For ease of description, in... Figure 16 The general labeled all buses as Bus System 1620.
[0218] The methods described in the embodiments of this application can be applied to, or implemented by, processor 1610. Processor 1610 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 1610 or by instructions in software form. Processor 1610 may be a general-purpose processor (e.g., a microprocessor or conventional processor), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates, transistor logic devices, or discrete hardware components. Processor 1610 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention.
[0219] The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in mature storage media in the art, such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read-only memory (EEPROM). This storage medium is located in memory 1640, and processor 1610 reads information from memory 1640 and, in conjunction with its hardware, completes the steps of the above method.
[0220] In the above embodiments, the instructions stored in the memory for execution by the processor can be implemented in the form of a computer program product. This computer program product can be pre-written into the memory, or it can be downloaded and installed into the memory as software.
[0221] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. For example, available media may include magnetic media (e.g., floppy disks, hard disks, or magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0222] This application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. The computer-readable medium may include computer storage media and communication media, and may also include any medium capable of transferring a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0223] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may also include disk storage or other disk storage devices. Furthermore, any connecting cable may also be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. As used herein, disks and optical discs include optical discs (CD), laser discs, optical discs, digital versatile discs (DVD), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers.
[0224] The above combinations should also be included within the scope of computer-readable media. The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An image editing prompting method, characterized in that, include: An electronic device displays an image editing interface, wherein the image editing interface displays an image to be edited; The electronic device acquires first contour data of each of the multiple objects included in the image to be edited; The electronic device responds to a user’s first deformation operation on a first region of a first object among the plurality of objects, changing the shape of an image region including the first region. The electronic device acquires the second contour data of each object in the image to be edited after the first deformation operation; The electronic device calculates the second contour data of the second object, relative to the deformation degree value of the first contour data of the second object, and if the deformation degree value is greater than the deformation threshold, determines that the second region of the second object has deformed before and after the first deformation operation; wherein the second object is located near the first object, and the second region is adjacent to the first region; The electronic device calculates a first distance between the geometric center of the second object and the geometric center of the first object, and finds a deformation threshold from a pre-stored first mapping table based on the first distance. In the pre-stored first mapping table, the magnitude of the first distance and the existence of the deformation threshold are in a one-to-one correspondence and positively correlated. The number of the second region is multiple; The electronic device calculates the importance of each of the multiple second regions; The electronic device ranks the importance of multiple second regions; According to the sorting result, the electronic device displays a first prompt message near the second region of each second object. The first prompt messages displayed near different second regions are marked with different labels, and the different labels are used to indicate the importance of the corresponding second regions. The first prompt message is used to indicate that the second region has been deformed. Based on the different labels marked on the first prompt messages near different second regions, different processing methods are determined for different second regions. The electronic device responds to a user's repair operation on a second region of the second object by displaying the second object in a first outline format; The electronic device calculates the importance of each of the multiple second regions, including: The electronic device calculates a first distance between the geometric center of each second region and the geometric center of the first object, and looks up an importance value from a pre-stored second mapping table based on the first distance. In the pre-stored second mapping table, the magnitude of the first distance and the importance value have a one-to-one correspondence and are positively correlated. Alternatively, the electronic device calculates a second distance between the geometric center of each second region and the edge of the image; and retrieves an importance value from a pre-stored second mapping table based on the second distance, wherein the magnitude of the second distance and the existence of the importance value are in a one-to-one correspondence and negatively correlated in the pre-stored second mapping table.
2. The method according to claim 1, characterized in that, The first object is a person, the first region is a face region, and the second object is an object; or, the first object is a person and the second object is a person.
3. The method according to claim 1, characterized in that, The electronic device, in response to a user's repair operation on a second region of the second object, displays the second object with a first contour data display, including: The electronic device responds to a user's triggering operation on the second area of the second object by displaying a first repair button near the second area of the second object; The electronic device responds to the user's triggering operation on the first repair button by displaying the second object in a first outline format.
4. The method according to claim 1, characterized in that, The number of the second objects is multiple, and the electronic device, in response to a user's repair operation on a second region of the second object, displays the second object with a first outline of the second object, including: The electronic device displays a second repair button on the image editing interface; In response to a user's triggering of the second repair button, the electronic device displays each of the second objects in a first outline display of a plurality of the second objects.
5. The method according to claim 1, characterized in that, After the electronic device displays the first prompt message near the second area of the second object, the method further includes: In response to the user's non-repair operation on the second area of the second object, the electronic device cancels the display of the first prompt message.
6. The method according to claim 1, characterized in that, After the electronic device displays the first prompt message near the second area of the second object, the method further includes: The electronic device responds to a second deformation operation by the user on a third region of a first object among the plurality of objects, changing the shape of an image region including the third region; The electronic device acquires the third contour data of each object in the image to be edited after the second deformation operation; The electronic device determines, based on the third contour data and the first contour data, that the fourth region of the third object is deformed before and after the first deformation operation, wherein the third object is located near the first object and the fourth region is adjacent to the third region; The electronic device displays a second prompt message near the fourth region of the third object, the second prompt message indicating that the fourth region has been deformed; or, the second prompt message indicating that the fourth region of the third object has returned to its shape before the first deformation operation.
7. The method according to claim 1, characterized in that, The degree of deformation is the difference between the area of the second contour data and the area of the first contour data; Alternatively, the degree of deformation is the difference between the perimeter of the second contour data and the perimeter of the first contour data.
8. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the image editing prompting method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the image editing prompting method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method and device, and mobile terminal
CN108492246A
Method and device for acquiring difference object between images based on image data
CN108875780A
Image Editing Method and System
US20140270544A1
