Image processing method, device, terminal and storage medium
By detecting and responding to user operations, the specified lines or objects in the image are cleared, and the problems of cumbersome operations and unsatisfactory effects in the prior art are solved, and the intelligence and efficiency of image processing are achieved.
Patent Information
- Application Number
- CN202011583577.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-12-28
AI Technical Summary
When the prior art debris that do not want to be deleted in the image, the operation is complicated and the effect is not ideal, which brings a bad experience to the user.
An image processing method is provided, by acquiring a target image, detecting a designated operation, and in response to a sliding or triggering operation, it clears the specified lines or objects in the target image, including determining the line or objects matching the operation, and implementing a one-click deletion function.
It simplifies user operations, improves the intelligence and effect of image processing, can relatively thoroughly clear image information, and improves user experience and image quality.
Smart Images

Figure CN114697514B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to an image processing method, device, terminal and storage medium. Background Art
[0002] In related technologies, with the development of optical signal acquisition equipment and digital image processing technology, cutout technology has become an important research direction in digital image processing. For example, in the film industry, images shot using green screen technology need to be cutout to delete the green screen; and a suitable background can also be added to the image without the green screen. For another example, in images taken by individuals, it is also necessary to cut out the image of the subject, such as a person or a building, from a complex background.
[0003] However, in the related art, if unwanted debris in an image is deleted, such as unwanted people or lines in an image, it requires cumbersome operations on the one hand, and cannot be completely removed on the other hand, which brings a bad experience to users. Summary of the invention
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, which is applied to a terminal, and the method includes:
[0005] Get the target image;
[0006] On a designated page including the target image, detecting a designated operation acting on the target image;
[0007] In response to the designated operation, image information targeted by the designated operation is cleared in the target image.
[0008] In some embodiments, the designated page is a page for providing a line clearing function; the designated operation includes: a sliding operation;
[0009] In response to the specified operation, clearing, in the target image, image information targeted by the specified operation, includes:
[0010] In response to the sliding operation, in the target image, a target line targeted by the sliding operation and matching a designated line type is cleared.
[0011] In some embodiments, the specified line type includes: a first line type; wherein the first line type is a line that does not intersect any line in the image;
[0012] In response to the sliding operation, in the target image, clearing the target line that matches the specified line type and is targeted by the sliding operation, includes one of the following:
[0013] In response to the sliding operation, determining that the target line is a line that is closest to the sliding area affected by the sliding operation and matches the first line type, and clearing the target line;
[0014] In response to the sliding operation, the target line is determined to be a line located within a predetermined area of the sliding area and matching the first line type, and the target line is cleared.
[0015] In some embodiments, the specified line type includes: a second line type; wherein the second line type is a line that intersects with any line in the image;
[0016] In response to the sliding operation, clearing, in the target image, target lines that match the specified line type targeted by the sliding operation, comprises:
[0017] In response to the sliding operation, in the target image, some or all line segments of the target line matching the second line type are cleared.
[0018] In some embodiments, in response to the sliding operation, clearing, in the target image, some or all segments of the target line matching the second line type, includes one of the following:
[0019] In response to the sliding area of the sliding operation being smaller than the first length, determining the target line to be a line that is closest to the sliding area of the sliding operation and matches the second line type, and clearing part of the target line;
[0020] In response to the sliding area of the sliding operation being greater than or equal to the first length, determining that the target line is a line that is closest to the sliding area and matches the second line type, and clearing the target line;
[0021] In response to a sliding area affected by the sliding operation being smaller than the first length, determining a target line matching the second line type within a predetermined area of the sliding area, and removing a portion of the target line segments;
[0022] In response to the sliding area on which the sliding operation acts being greater than or equal to the first length, determining a target line matching the second line type within the predetermined area of the sliding area, and clearing the target line;
[0023] In response to the sliding operation, based on a motion track of the sliding operation, a part of or all of the target line matching the motion track is cleared.
[0024] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a first trigger operation;
[0025] In response to the specified operation, clearing, in the target image, image information targeted by the specified operation, includes:
[0026] In response to the first trigger operation acting on the designated page, in the target image, target objects that match a designated object type and are targeted by the first trigger operation are cleared.
[0027] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a second triggering operation;
[0028] In response to the specified operation, clearing, in the target image, image information targeted by the specified operation, includes:
[0029] In response to the second trigger operation acting on the designated page, clearing target objects except the subject object;
[0030] The target object is an object in the target image that matches a specified object type, and the main object is a target object that occupies the largest size ratio in the target image.
[0031] In some embodiments, it is characterized in that, in response to the specified operation, clearing the image information targeted by the specified operation in the target image includes:
[0032] In response to the designated operation applied to the target image, amplifying a designated area applied with the designated operation;
[0033] In response to the time of staying in the designated area being equal to or greater than a predetermined time threshold, the image information in the designated area is cleared.
[0034] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing device, applied to a terminal, the device comprising:
[0035] An acquisition module, used for acquiring a target image;
[0036] A detection module, used for detecting a specified operation acting on the target image on a specified page containing the target image;
[0037] The processing module is used for clearing the image information targeted by the specified operation in the target image in response to the specified operation.
[0038] In some embodiments, the designated page is a page for providing a line clearing function; the designated operation includes: a sliding operation;
[0039] The processing module is used for clearing, in response to the sliding operation, the target line targeted by the sliding operation and matching the specified line type in the target image.
[0040] In some embodiments, the specified line type includes: a first line type; wherein the first line type is a line that does not intersect any line in the image;
[0041] The processing module is used for, in response to the sliding operation, determining that the target line is a line that is closest to the sliding area affected by the sliding operation and matches the first line type, and clearing the target line;
[0042] or,
[0043] The processing module is used for, in response to the sliding operation, determining that the target line is a line located within a predetermined area of the sliding area and matching the first line type, and clearing the target line.
[0044] In some embodiments, the specified line type includes: a second line type; wherein the second line type is a line that intersects with any line in the image;
[0045] The processing module is configured to clear, in response to the sliding operation, part of or all of the target line segments matching the second line type in the target image.
[0046] In some embodiments, the processing module is used for at least one of the following:
[0047] In response to the sliding area of the sliding operation being smaller than the first length, determining the target line to be a line that is closest to the sliding area of the sliding operation and matches the second line type, and clearing part of the target line;
[0048] In response to the sliding area of the sliding operation being greater than or equal to the first length, determining that the target line is a line that is closest to the sliding area and matches the second line type, and clearing the target line;
[0049] In response to a sliding area affected by the sliding operation being smaller than the first length, determining a target line matching the second line type within a predetermined area of the sliding area, and removing a portion of the target line segments;
[0050] In response to the sliding area on which the sliding operation acts being greater than or equal to the first length, determining a target line matching the second line type within the predetermined area of the sliding area, and clearing the target line;
[0051] In response to the sliding operation, based on a motion track of the sliding operation, a part of or all of the target line matching the motion track is cleared.
[0052] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a first trigger operation;
[0053] The processing module is configured to respond to the first trigger operation on the designated page and to clear, in the target image, target objects that match the designated object type and are targeted by the first trigger operation.
[0054] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a second triggering operation;
[0055] The processing module is used to respond to the second trigger operation acting on the designated page and clear the target objects except the main object; wherein the target object is the object in the target image that matches the designated object type, and the main object is the target object with the largest size ratio in the target image.
[0056] In some embodiments, the processing module is used to, in response to the specified operation acting on the target image, enlarge the specified area where the specified operation acts; in response to the time spent in the specified area being equal to or greater than a predetermined time threshold, clear the image information in the specified area.
[0057] According to a third aspect of an embodiment of the present disclosure, a terminal is provided, including:
[0058] processor;
[0059] a memory for storing processor-executable instructions;
[0060] Wherein, the processor is configured to: implement the steps of any one of the above-mentioned image processing methods when executed.
[0061] According to a fourth aspect of the embodiments of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is enabled to perform the steps of implementing any one of the above-mentioned image processing methods.
[0062] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0063] The embodiment of the present disclosure obtains a target image, detects a designated operation acting on the target image on a designated page containing the target image, and clears the image information targeted by the designated operation in the target image in response to the designated operation. In this way, the embodiment of the present disclosure can directly clear the image information targeted by the designated operation in the target image through the designated operation. Compared with the prior art of clearing the image information by repeatedly smearing, on the one hand, it can simplify user operations and improve user experience, and on the other hand, it can relatively thoroughly clear the image information and improve the intelligence of the terminal.
[0064] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0066] Figure 1 is a schematic diagram of an application scenario of an image processing method according to an exemplary embodiment;
[0067] Figure 2 is a schematic diagram of an application scenario of an image processing method according to an exemplary embodiment;
[0068] Figure 3 is a flowchart of an image processing method according to an exemplary embodiment;
[0069] Figure 4 is a flowchart of an image processing method according to an exemplary embodiment;
[0070] Figure 5 is a schematic diagram of a wire removal method according to an exemplary embodiment;
[0071] Figure 6 is a schematic diagram of a wire removal method according to an exemplary embodiment;
[0072] Figure 7 is a schematic diagram of a wire removal method according to an exemplary embodiment;
[0073] Figure 8 is a schematic diagram of a wire removal method according to an exemplary embodiment;
[0074] Fig. 9 is a schematic diagram of a wire removal method according to an exemplary embodiment;
[0075] Fig.10 is a schematic diagram of a wire removal method according to an exemplary embodiment;
[0076] Fig.11 is a flowchart of an image processing method according to an exemplary embodiment;
[0077] Fig.12 is a schematic diagram showing a method of removing a person according to an exemplary embodiment;
[0078] Fig.13 is a schematic diagram showing a method of removing a person according to an exemplary embodiment;
[0079] Fig.14 is a flowchart of an image processing method according to an exemplary embodiment;
[0080] Fig.15 is a block diagram of an image processing device according to an exemplary embodiment;
[0081] Fig.16 It is a block diagram of a terminal according to an exemplary embodiment. DETAILED DESCRIPTION
[0082] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0083] In the related art, if you want to remove image information in an image, you need to continuously paint the corresponding area to remove it. Figure 1 As shown in , if you want to remove the person in the image, you need to continuously paint the person part to eliminate the painted part. Figure 2 As shown in the figure, if you want to remove the lines in the image, you need to continuously paint the corresponding line parts to remove the lines in the image. In this way, in the related art, if you want to remove image information that you do not want to enter the scene, such as people or lines, you need to repeat the operation, which brings great inconvenience to the user, and the removal effect is not ideal.
[0084] like Figure 3 As shown, the embodiment of the present disclosure provides an image processing method. The method comprises the following steps:
[0085] Step S11: Acquire a target image;
[0086] Step S12: on a designated page including the target image, detecting a designated operation acting on the target image;
[0087] Step S13: In response to the designated operation, in the target image, clear the image information targeted by the designated operation.
[0088] The image processing method described in the embodiments of the present disclosure is applied to a terminal. The terminal here can be various types of mobile terminals or fixed terminals; for example, the terminal can be a mobile phone, a computer, a server or a tablet computer, etc.; for another example, the terminal can also be a wearable device such as a bracelet or a watch.
[0089] In some embodiments, the terminal may be used for image recognition. For example, an image recognition application is installed in the terminal, which can recognize lines and / or people in an image.
[0090] In one embodiment, clearing the image information targeted by the designated operation in the target image means: clearing the image information in the target image targeted by the designated operation.
[0091] The designated page here is used to provide a function of clearing the image information.
[0092] In some embodiments, the designated page includes, but is not limited to, one of the following: a manual deletion page, an intelligent line removal page, and an intelligent person removal page. The manual deletion page is used to provide a function of clearing image information; the intelligent line removal page is used to provide a function of clearing lines; and the intelligent person removal page is used to provide a function of clearing objects.
[0093] Of course, in other embodiments, the designated page may also include a smart object removal page. The smart object removal page is used to provide an object removal function. For example, in an application scenario, the target image includes a desk, a pen, a folder, a phone, a computer, and a cup on the desk; if you want to remove the cup from the target image, you can also switch the terminal to the smart object removal interface to remove the cup.
[0094] The designated operation here includes but is not limited to at least one of the following: a sliding operation, a clicking operation, a smearing operation, a key operation, and an operation of receiving voice.
[0095] In one embodiment, the key operation includes but is not limited to: an operation on a virtual key of the terminal, an operation on a physical key of the terminal, or an operation on a physical key connected to the terminal for communication. For example, an operation on the HOME key on a mobile phone, or an operation on a component displayed on a display screen of a mobile phone, or an operation on a key on a keyboard connected to a computer.
[0096] In one embodiment, the operation of receiving voice refers to the operation of the terminal receiving voice information and responding to the voice information.
[0097] In one embodiment, the smearing operation is a sliding operation of sliding back and forth repeatedly.
[0098] The image information here includes but is not limited to one of the following: lines and objects. The lines include at least one. The lines can be various types of lines, for example, they can include but are not limited to at least one of the following: crossed lines, uncrossed lines, curves, straight lines, and wavy lines. The objects here include but are not limited to people; for example, the objects can also be cups, flowers, books, and other physical objects.
[0099] In some embodiments, the line includes: a first line type and a second line type. In this embodiment, the first line type is used to indicate a line of the first type; the second line type is used to indicate a line of the second type. For example, the line indicated by the first line type is a line that does not intersect with other lines, and the line indicated by the second line type is a line that intersects with other lines.
[0100] Of course, the image information here can also be any image information existing in the target image, for example, it can also be the content described by any pixel point in the image.
[0101] The embodiment of the present disclosure obtains a target image, detects a specified operation acting on the target image on a specified page containing the target image, and clears the image information targeted by the specified operation in the target image in response to the specified operation. In this way, the embodiment of the present disclosure can directly clear the image information targeted by the specified operation in the target image through the specified operation. Compared with the prior art of repeatedly smearing the image information, on the one hand, it can simplify user operations and improve user experience, and on the other hand, it can relatively completely delete the image information and improve the intelligence of the terminal.
[0102] In some embodiments, before step S12, the method further includes:
[0103] If a switching operation is detected, switching is performed to the designated page including the target image.
[0104] The switching operation here includes but is not limited to one of the following: a click operation, a page turning operation, and a sliding operation. The voice operation here is used to instruct the terminal to switch to the specified page. Of course, in other embodiments, the switching operation can also be any other operation acting on the display interface of the terminal, or acting on the keys of the terminal, or receiving a voice message operation, etc., as long as the terminal switches the terminal to the specified page display based on the switching operation, and the type of switching operation is not limited here.
[0105] For example, in an application scenario, the display interface of the terminal displays a target image, and the components of "manual removal", "intelligent line removal" and "intelligent person removal" are displayed on the target image. If the terminal detects the operation of clicking the "manual removal" component, it switches to the manual removal page containing the target image; if the terminal detects the operation of clicking the "intelligent line removal", it switches to the intelligent line removal page containing the target image; if the terminal detects the operation of clicking the "intelligent person removal", it switches to the intelligent person removal page containing the target image.
[0106] Thus, in the disclosed embodiment, the display interface of the terminal can also be switched to various types of designated pages (such as manual deletion, intelligent line removal, or designated person removal pages, etc.) through switching operations, so that designated operations on various designated pages can be implemented to clear the corresponding image information. Thus, the disclosed embodiment can automatically select whether to manually delete or intelligently delete the image information of the target image with one click, thereby achieving flexible configuration and further improving the intelligence of the terminal.
[0107] like Figure 4 As shown, in some embodiments, the designated page is a page for providing a line clearing function; the designated operation includes: a sliding operation;
[0108] The step S13 comprises:
[0109] Step S131: In response to the sliding operation, in the target image, clearing the target line targeted by the sliding operation and matching the specified line type.
[0110] The target lines herein include but are not limited to at least one of the following: parallel lines, crossing lines, non-crossing lines, curves, and straight lines.
[0111] The specified line type here is used to indicate lines of the same type; for example, it is used to indicate crossing lines in the target image.
[0112] In one embodiment, clearing the target lines matching the specified line type targeted by the sliding operation in the target image means clearing the target lines matching the specified line type in the target image targeted by the sliding operation.
[0113] The designated line type herein includes but is not limited to at least one of the following: a first line type and a second line type. A target line includes: a first line and a line of the same type as the first line; or a target line includes: a second line and a line of the same type as the second line.
[0114] For example, in an application scenario, a method for implementing the above step S131 is:
[0115] The terminal performs a sliding operation;
[0116] In response to the sliding operation, a target line within a predetermined range of the sliding area where the sliding operation is applied is adsorbed into the sliding area, or a target line closest to the sliding area where the sliding operation is applied is adsorbed into the sliding area;
[0117] Delete the target line adsorbed to the sliding area.
[0118] In the embodiment of the present disclosure, the terminal can respond to the sliding operation and clear the target lines that match the specified line type in the target image targeted by the sliding operation; thus, the target lines to be deleted can be accurately determined and deleted in the embodiment of the present disclosure. Thus, the embodiment of the present disclosure can achieve the deletion of the target lines by one-key operation (i.e., sliding operation), which can simplify the operation and improve the convenience of user operation compared to the prior art of repeatedly smearing and deleting lines; and it can also achieve the target line clearing operation relatively cleanly, improving the image quality of the target image.
[0119] In some embodiments, the specified line type includes: a first line type; wherein the first line type is a line that does not intersect any line in the image;
[0120] The step S131 includes one of the following:
[0121] In response to the sliding operation, determining that the target line is a line that is closest to the sliding area affected by the sliding operation and matches the first line type, and clearing the target line;
[0122] In response to the sliding operation, the target line is determined to be a line located within a predetermined area of the sliding area and matching the first line type, and the target line is cleared.
[0123] The first type of lines here may be lines that do not intersect with any lines in the target image, or the first type of lines here may be lines that do not intersect with any lines in other images except the target image.
[0124] Here, in response to the sliding operation, determining that the target line is a line that is closest to the sliding area where the sliding operation acts and matches the first line type, and clearing the target line can be: in response to the sliding operation, identifying that a line that is closest to the sliding area where the sliding operation acts and matches the first line type is the target line, and clearing the target line.
[0125] Here, in response to the sliding operation, determining that the target line is a line located within a predetermined area of the sliding area and matching the first line type, and clearing the target line may be: in response to the sliding operation, identifying a line matching the first line type within a predetermined area of the sliding area where the sliding operation acts as a target line, and clearing the target line. Here, the target line may be one or more.
[0126] Here, the target line within the predetermined area of the sliding area may refer to: a whole target line within the predetermined area of the sliding area, or a part of a target line within the predetermined area of the sliding area. Figure 5 In the example, within the predetermined area range 1 of the sliding area 1, there is a whole line L1 and a part of the line L2, then it can be considered that the line L1 and the line L2 are both within the predetermined range of the sliding area.
[0127] For example, Figure 6 As shown, in the target image, there are two parallel lines, namely line L1 and line L2; slide near line L1; the terminal determines that line L1 is closest to the sliding area 1 where the sliding operation is performed, and the terminal clears the line L1. When the terminal performs the sliding operation, line L1 is automatically adsorbed to the sliding area or sliding line where the sliding operation is performed; then the terminal clears the line L1 adsorbed on the sliding area 1 or sliding line.
[0128] For example, Figure 7 As shown, in the target image, there are two non-intersecting lines, namely line L3 and line L4; slide near line L3; the terminal determines that line L3 and line L4 exist within a predetermined area range 2 in the sliding area 2 where the sliding operation is performed, and then the terminal clears the line L3 and line L4. When the terminal performs the sliding operation, line L3 and line L4 are automatically adsorbed to the sliding area 2 or the sliding line where the sliding operation is performed; then the terminal clears the line L3 and line L4 adsorbed on the sliding area 2 or the sliding line.
[0129] In some embodiments, the step S131 may also be:
[0130] In response to the sliding operation, determining that at least one target line exists within a predetermined range of the sliding area where the sliding operation acts, clearing the at least one target line; wherein the target line is a target line that matches the first line type;
[0131] In response to the sliding operation, it is determined that the target line does not exist within a predetermined range of a sliding area where the sliding operation acts, and a target line closest to the sliding area and matching the first line type is removed.
[0132] In the embodiment of the present disclosure, for non-intersecting target lines, the entire target line may be cleared.
[0133] In the disclosed embodiment, the terminal can delete a target line closest to the sliding area where the sliding operation is applied or delete at least one target line within a predetermined range of the sliding area in response to the sliding operation; thus, the disclosed embodiment can achieve one-key operation (i.e., sliding operation) to delete the entire target line, without the need for fingers or other touch objects to slide back and forth or smear, etc., reducing the time for fingers or other touch objects to slide or smear the line; while improving user convenience, the target line can be quickly eliminated, thereby further improving the intelligence of the terminal. Moreover, since the disclosed embodiment can achieve one-key operation to delete the entire line, it can also achieve clean and clear lines, thereby improving the image quality of the target image.
[0134] Of course, in other embodiments, the terminal may also determine whether the line needs to be a target line to be cleared based only on the distance between the line and the sliding area affected by the sliding operation.
[0135] For example, in some embodiments, the step S131 may also be:
[0136] In response to the sliding operation, in the target image, clearing a target line that is closest to the sliding area where the sliding operation acts;
[0137] In response to the sliding operation, at least one target line matching the first line type within a predetermined area of the sliding area is cleared in the target image.
[0138] In one embodiment, clearing the target line closest to the sliding area affected by the sliding operation in the target image means clearing the target line closest to the sliding area affected by the sliding operation in the target image.
[0139] In one embodiment, in the target image, clearing at least one target line matching the first line type within a predetermined area range of the sliding area means: clearing at least one target line matching the first line type within a predetermined area range of the sliding area in the target image.
[0140] In some embodiments, the specified line type includes: a second line type; wherein the second line type is a line that intersects with any line in the image;
[0141] The response step 131 includes:
[0142] In response to the sliding operation, in the target image, some or all line segments of the target line matching the second line type are cleared.
[0143] The second type of lines here may be lines that intersect with any lines in the target image, or the second type of lines here may be lines that intersect with any lines in other images except the target image.
[0144] Wherein, in response to the sliding operation, in the target image, clearing some or all segments of the target line matching the second line type includes but is not limited to one of the following:
[0145] In response to the sliding area of the sliding operation being smaller than the first length, determining the target line to be a line that is closest to the sliding area of the sliding operation and matches the second line type, and clearing part of the target line;
[0146] In response to the sliding area of the sliding operation being greater than or equal to the first length, determining that the target line is a line that is closest to the sliding area and matches the second line type, and clearing the target line;
[0147] In response to a sliding area affected by the sliding operation being smaller than the first length, determining a target line matching the second line type within a predetermined area of the sliding area, and removing a portion of the target line segments;
[0148] In response to the sliding area on which the sliding operation acts being greater than or equal to the first length, a target line matching the second line type within the predetermined area of the sliding area is determined, and the target line is cleared.
[0149] Here, the partial line refers to the partial line between the intersection and the two end points. Optionally, the partial line can be the partial line between the intersection and the target end point, and the target end point can be the end point of the target line adjacent to the sliding area. For example, Figure 8 As shown, the partial line of L5 may refer to the AD line segment. Of course, in other embodiments, the partial line here may also refer to other lines, for example, it may refer to a line segment at a specific position of L5, such as a line segment at the middle position of L5.
[0150] For example, Figure 8As shown, in the target image, there are two intersecting lines, namely line L5 and line L6, and the intersection point of line L5 and line L6 is D. If the terminal detects that a sliding operation is performed near the AD segment of line L5, and determines that the sliding area 3 or the sliding line affected by the sliding operation is less than the first length, the AD segment of line L5 is cleared. When the terminal performs a sliding operation, the AD segment of line segment L5 is automatically attracted to the sliding area 3 or the sliding line affected by the sliding operation; the terminal clears the AD segment of line L5 attracted to the sliding area 3 or the sliding line.
[0151] In the above example, if the terminal detects that a sliding operation is performed on the AD segment of line L5, and determines that the sliding area 4 or the sliding line affected by the sliding operation is greater than or equal to the first length; in this example, the sliding area 4 affected by the sliding operation exceeds the intersection D of line L5 and line L6; then the entire line L5 is cleared. When the terminal performs a sliding operation, line segment L5 is automatically attracted to the sliding area 4 or the sliding line affected by the sliding operation; the terminal clears the line L5 attracted to the sliding area 4 or the sliding line.
[0152] For example, Fig. 9 As shown, in the target image, there are two intersecting target lines, namely line L7 and line L8, and the intersection point of line L7 and line L8 is D. If the terminal detects that a sliding operation is performed on the target image, and the lines L7 and L8 exist within the predetermined area range 3 of the sliding area 5 where the sliding operation acts, and it is determined that the sliding area 5 or the sliding line where the sliding operation acts is less than the first length; then the AD line segment of line L7 and the BD line segment of L8 are cleared. When the terminal performs a sliding operation, the AD line segment of line L7 and the BD line segment of line L8 are automatically attracted to the sliding area 5 or the sliding line where the sliding operation acts; the terminal clears the AD line segment of line L7 and the BD line segment of line L8 attracted to the sliding area 5 or the sliding line.
[0153] In the above example, if the terminal detects that an interactive operation is performed on the target image, and determines that the sliding area 6 or the sliding line of the sliding operation is greater than or equal to the first length; in this example, the sliding area 6 of the sliding operation exceeds the intersection D of the line L7 and the line L8; then the line L7 and the line L8 are cleared. When the terminal performs a sliding operation, the line segments L7 and L8 are automatically attracted to the sliding area 6 or the sliding line of the sliding operation; the terminal clears the lines L7 and L8 attracted to the sliding area 6 or the sliding line.
[0154] In the embodiment of the present disclosure, a part of the target line or the entire target line may be cleared among the intersecting target lines, for example, the AD lines separated by the intersection point D in the above line L7 may be cleared, or the entire line L7 may be deleted.
[0155] Of course, in other examples, any line segment in the target line can be cleared according to the length of the sliding area affected by the sliding operation; it only needs to be that the length of the sliding area is positively correlated with the length of the line segment in the cleared target line.
[0156] Of course, in other embodiments, clearing some or all of the line segments matching the second line type is also implemented in the following manner; for example, in response to the sliding operation, clearing some or all of the line segments of the target line matching the second line type in the target image may also include but is not limited to one of the following:
[0157] In response to a sliding area of the sliding operation being smaller than a first length, clearing a portion of the target line closest to the sliding area of the sliding operation;
[0158] In response to the sliding area of the sliding operation being greater than or equal to the first length, clearing the target line closest to the sliding area;
[0159] In response to a sliding area of the sliding operation being smaller than the first length and at least two target lines matching the second line existing within a predetermined area of the sliding area, removing partial line segments of at least two target lines;
[0160] In response to the sliding area on which the sliding operation acts being greater than or equal to the first length and a target line matching the second line existing within the predetermined area of the sliding area, at least two of the target lines are cleared.
[0161] In the embodiment of the present disclosure, the terminal can clear part of or all of the intersecting at least two line segments in response to the sliding operation; thus, one-key operation (sliding operation) can be implemented to delete the entire target line or part of the target line; thus, the user operation can be simplified and the target line can be quickly eliminated. Moreover, since part of the target line can be deleted, for example Figure 8 The AD line segments separated by the intersection D of L5 are deleted. Compared with the prior art in which the line segments near the intersection cannot be clearly clear when the intersection is painted, the AD line segments can be cleared more cleanly; thereby improving the integrity and image quality of the image.
[0162] In some embodiments, in response to the sliding operation, clearing, in the target image, some or all line segments of at least one target line matching the second line type, includes:
[0163] In response to the sliding operation, based on a motion track of the sliding operation, a part of or all of the target line matching the motion track is cleared.
[0164] If the motion track of the sliding operation is in a predetermined direction, some or all segments of the target line in the predetermined direction may be deleted. Figure 7 , the motion track 1 of the sliding operation is a motion track from northwest to southeast, and the target line L7 to be cleared is also from northwest to southeast.
[0165] If the running track of the sliding operation is a predetermined shape, some or all segments of the target line that are the same or similar to the predetermined shape can be deleted. Fig.10 As shown, if the motion track 2 of the sliding operation is "√", the CD segment of L9 and the ED segment of line L10 are cleared. For another example, if the sliding operation is "S" type, the "S" type curve is cleared; if the sliding operation is wavy line type, the wavy line curve is cleared.
[0166] In the disclosed embodiment, the terminal can remove the target line segment matching the motion trajectory based on the motion trajectory of the sliding operation, such as the motion direction and / or shape of the motion trajectory. In this way, it can be applied to the removal of various target lines of the target image, and flexible removal of part or all of the target lines is achieved.
[0167] like Fig.11 As shown, in some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a first trigger operation;
[0168] The step S13 comprises:
[0169] Step S132: In response to the first trigger operation acting on the designated page, in the target image, clearing the target objects that match the designated object type and are targeted by the first trigger operation.
[0170] The first trigger operation here includes but is not limited to one of the following: a click operation or a key operation.
[0171] The designated object here includes: people. Of course, in other examples, the designated object here also includes: objects; such as cups, electronic devices, books, flowers and plants, etc.
[0172] The target object that matches the specified object type here can be: if the specified object is a person, then the target object is all the people in the target image; if the specified object is a pen, then the target object is all the pens in the target image.
[0173] In an embodiment of the present disclosure, the terminal can identify all people in the target image based on an image recognition device; in this way, based on a first trigger operation, such as clicking anywhere on the target image or clicking anywhere on the display interface or touching a "one-click delete" button displayed on the display screen or the Enter key on a keyboard connected to the terminal, etc.; all people in the target image can be cleared.
[0174] For example, in some application scenarios, you need to take photos of buildings or landscapes, etc., and do not need people to appear in the photos, so you need to delete all people. Fig.12 As shown, through the first trigger operation, the person ABCD in the target image is deleted.
[0175] Thus, in the disclosed embodiment, all persons in the target image can be deleted with one click, which can simplify the user operation and quickly realize the process of deleting persons. Moreover, the disclosed embodiment can also make the target image more complete and clean after deleting persons.
[0176] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a second triggering operation;
[0177] The step S13 comprises:
[0178] In response to the second trigger operation acting on the designated page, clearing target objects except the subject object;
[0179] The target object is an object in the target image that matches a specified object type, and the main object is a target object that occupies the largest size ratio in the target image.
[0180] In other embodiments, the subject object may also be: a target object whose size ratio in the target image is within a predetermined ratio range. For example, there are four characters, ABCD, in the target image, and the size ratios of characters A and B in the target image are relatively large, which are the first ratio and the second ratio, respectively; the user wants to keep characters A and B, and can set a predetermined ratio range so that the first ratio and the second ratio are both within the predetermined ratio range. In this way, in this example, through one-key operation, that is, when the second trigger operation is executed, characters A and B can be retained in the target image, and characters C and D can be cleared.
[0181] In an embodiment of the present disclosure, the terminal can identify all people in the target image based on the image recognition device; and the terminal can also obtain the size ratio of each person in the target image, and determine the person with the largest size ratio in the target image or at least one person whose size ratio in the target image is within a predetermined ratio range as the main object.
[0182] For example, in some application scenarios, you need to take photos of yourself at certain scenic spots or streets, and no one other than yourself needs to appear in the photos. Fig.13 As shown, through the first trigger operation, characters BCD in the target image are deleted, and only character A is retained. Here, the proportion of character A in the target image is greater than that of characters B, C or D.
[0183] Thus, in the disclosed embodiment, it is possible to delete other people except the main character with one click, which can simplify the user operation and realize the process of quickly clearing other people. Moreover, the disclosed embodiment can also make the target image more complete and clean after deleting the person.
[0184] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a third trigger operation;
[0185] The step S13 comprises:
[0186] If the third trigger operation acting on the designated page is detected, prompt information matching each designated object is displayed;
[0187] If a selection operation of the prompt information acting on at least one of the designated objects is detected, at least one of the designated objects is cleared.
[0188] The prompt information here may include but is not limited to at least one of the following: text prompt information, color prompt information. For example, in one application scenario, different identifications of different characters are displayed, such as prompt information of character A, character B, or character C; in another application scenario, different colors of different characters are displayed, such as green for character A, blue for character B, yellow for character C, and so on.
[0189] In the embodiment of the present disclosure, the terminal can identify all persons in the target image based on the image recognition device; and the terminal configures different prompt information for each person. Fig.13 In the example, if the "A" component of character A, the "B" component of character B, the "C" component of character C, and the "D" component of character D are displayed on the display interface; if the terminal detects a selection operation acting on the "C" component and the "D" component, characters C and D are cleared.
[0190] In the disclosed embodiment, after the third trigger operation, prompt information matching each designated object can be displayed; based on the selection operation acting on the prompt information, the designated object can be selected for removal. In this way, in the disclosed embodiment, some designated objects, such as people, can be quickly selected for removal.
[0191] like Fig.14 As shown, in some embodiments, it is characterized in that the step S13 includes:
[0192] Step S135: In response to the designated operation applied to the target image, amplifying a designated area applied with the designated operation;
[0193] Step S136: In response to the time of staying in the designated area being equal to or greater than a predetermined time threshold, clearing the image information in the designated area.
[0194] The time unit of the predetermined time threshold here is in seconds. For example, in one embodiment, the predetermined time threshold is 1 second; in another embodiment, the predetermined time threshold is 2 seconds.
[0195] In some application scenarios, the fonts of some image information are relatively small, so you can enlarge these fonts and delete them. For example, when the font "ABC*" is relatively small in the designated area 1, you can enlarge the designated area 1 and enlarge the font "ABC*" in the designated area 1 by sliding the interaction to the designated area 1; and the font "ABC*" can be considered as impurities in the target image, so you can stay on the font "ABC*" for 1 minute, and the terminal will automatically delete the "ABC*" in the designated area 1.
[0196] In some embodiments, the designated area is smaller than the predetermined area. The designated area here is relatively small, and the image information of the designated area is relatively detailed information.
[0197] In this way, in the disclosed embodiments, some relatively detailed image information in the target image, such as redundant characters, black spots, unsightly patterns, etc., can be enlarged and deleted; the user does not need to perform a smearing operation on the basis of the magnification; the user is saved from the operation of zooming in and out of the specified area, further simplifying the user operation.
[0198] Moreover, in some application scenarios, if a specified area of a target image is enlarged by a user operation, the target image is enlarged as a whole, and much image information will not be displayed in the display area. In the embodiment of the present disclosure, through a specified operation, only a specified area of the target image can be enlarged, so that the user can perform an operation to clear the image information based on the entire target image, thereby reducing the occurrence of erroneous operations and accurately achieving the operation of clearing image information.
[0199] Fig.15 is an image processing device according to an exemplary embodiment. Fig.15 , the device is applied to a terminal, and the device comprises:
[0200] An acquisition module 41, used for acquiring a target image;
[0201] A detection module 42, configured to detect a designated operation acting on the target image on a designated page containing the target image;
[0202] The processing module 43 is used for clearing the image information targeted by the specified operation in the target image in response to the specified operation.
[0203] In some embodiments, the designated page is a page for providing a line clearing function; the designated operation includes: a sliding operation;
[0204] The processing module 43 is configured to, in response to the sliding operation, clear the target line in the target image that is targeted by the sliding operation and matches the specified line type.
[0205] In some embodiments, the specified line type includes: a first line type; wherein the first line type is a line that does not intersect any line in the image;
[0206] The processing module 43 is used for, in response to the sliding operation, determining that the target line is a line that is closest to the sliding area affected by the sliding operation and matches the first line type, and clearing the target line;
[0207] or,
[0208] The processing module 43 is used for determining, in response to the sliding operation, that the target line is a line located within a predetermined area of the sliding area and matching the first line type, and clearing the target line.
[0209] In some embodiments, the specified line type includes: a second line type; wherein the second line type is a line that intersects with any line in the image;
[0210] The processing module 43 is configured to clear, in response to the sliding operation, some or all of the target line segments that match the second line type in the target image.
[0211] In some embodiments, the processing module 43 is used for at least one of the following:
[0212] In response to the sliding area of the sliding operation being smaller than the first length, determining the target line to be a line that is closest to the sliding area of the sliding operation and matches the second line type, and clearing part of the target line;
[0213] In response to the sliding area of the sliding operation being greater than or equal to the first length, determining that the target line is a line that is closest to the sliding area and matches the second line type, and clearing the target line;
[0214] In response to a sliding area affected by the sliding operation being smaller than the first length, determining a target line matching the second line type within a predetermined area of the sliding area, and removing a portion of the target line segments;
[0215] In response to the sliding area on which the sliding operation acts being greater than or equal to the first length, determining a target line matching the second line type within the predetermined area of the sliding area, and clearing the target line;
[0216] In response to the sliding operation, based on a motion track of the sliding operation, a part of or all of the target line matching the motion track is cleared.
[0217] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a first trigger operation;
[0218] The processing module 43 is configured to respond to the first trigger operation on the designated page and to clear, in the target image, target objects that match the designated object type and are targeted by the first trigger operation.
[0219] In some embodiments, the designated page is a page for providing an object clearing function; the designated operation includes: a second triggering operation;
[0220] The processing module 43 is used to respond to the second trigger operation acting on the designated page and clear the target objects except the main object; wherein the target object is the object in the target image that matches the designated object type, and the main object is the target object with the largest size ratio in the target image.
[0221] In some embodiments, the processing module 43 is used to respond to the designated operation applied to the target image by enlarging the designated area where the designated operation is applied; and to clear the image information in the designated area in response to the time spent in the designated area being equal to or greater than a predetermined time threshold.
[0222] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0223] An embodiment of the present disclosure further provides a terminal, including:
[0224] processor;
[0225] a memory for storing processor-executable instructions;
[0226] Wherein, the processor is configured to: implement the image processing method described in any embodiment of the present disclosure when executing the executable instructions.
[0227] The memory may include various types of storage media, which are non-transitory computer storage media that can continue to memorize information stored thereon after the communication device loses power.
[0228] The processor may be connected to the memory through a bus or the like, and is used to read the executable program stored in the memory, for example, to implement the following Figure 3 , 4 Or at least one of the methods shown in 11.
[0229] The embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the image processing method described in any embodiment of the present disclosure. Figure 3 , 4 or Fig.11 , 14 At least one of the methods shown.
[0230] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0231] Fig.16 6 is a block diagram of a terminal 600 according to an exemplary embodiment. For example, the terminal 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0232] Reference Fig.16 The terminal 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0233] The processing component 602 generally controls the overall operation of the terminal 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0234] The memory 604 is configured to store various types of data to support operations at the terminal 600. Examples of such data include instructions for any application or method operating on the terminal 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0235] Power component 606 provides power to various components of terminal 600. Power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to terminal 600.
[0236] The multimedia component 608 includes a screen that provides an output interface between the terminal 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the terminal 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0237] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the terminal 600 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0238] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0239] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the terminal 600. For example, the sensor assembly 614 can detect the open / closed state of the terminal 600, the relative positioning of the components, such as the display and keypad of the terminal 600, and the sensor assembly 614 can also detect the position change of the terminal 600 or a component of the terminal 600, the presence or absence of contact between the user and the terminal 600, the orientation or acceleration / deceleration of the terminal 600, and the temperature change of the terminal 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0240] The communication component 616 is configured to facilitate wired or wireless communication between the terminal 600 and other devices. The terminal 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0241] In an exemplary embodiment, terminal 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0242] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of a terminal 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0243] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0244] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An image processing method, It is characterized in that Applied to a terminal, the method comprises: Get the target image; On a designated page including the target image, detecting a designated operation acting on the target image; In response to the specified operation, clearing the image information targeted by the specified operation in the target image; Wherein, in response to the specified operation, clearing the image information targeted by the specified operation in the target image includes: In response to the designated operation applied to the target image, the image information targeted by the designated operation is cleared according to the length of the designated area of the designated operation; wherein the designated operation includes: a sliding operation; the image information includes: partial line segments or all line segments of the target line matching a second line type; wherein the second line type is a line that intersects with any line in the target image; the partial line segments are determined in response to the sliding area of the sliding operation being less than a first length, or the full line segments are determined in response to the sliding area of the sliding operation being greater than or equal to the first length.
2. The method according to claim 1, It is characterized in that The designated page is a page for providing a line clearing function.
3. The method according to claim 1, It is characterized in that The image information further includes: a first line type; wherein the first line type is a line that does not intersect with any line in the target image; In response to the designated operation applied to the target image, clearing the image information targeted by the designated operation according to the length of the designated area applied by the designated operation, includes one of the following: In response to the sliding operation, determining that the target line is a line that is closest to the sliding area affected by the sliding operation and matches the first line type, and clearing the target line; In response to the sliding operation, the target line is determined to be a line located within a predetermined area of the sliding area and matching the first line type, and the target line is cleared.
4. The method according to claim 1, It is characterized in that In response to the designated operation applied to the target image, clearing the image information targeted by the designated operation according to the length of the designated area applied by the designated operation, includes one of the following: In response to the sliding area of the sliding operation being smaller than the first length, determining the target line to be a line that is closest to the sliding area of the sliding operation and matches the second line type, and clearing part of the target line; In response to the sliding area of the sliding operation being greater than or equal to the first length, determining that the target line is a line that is closest to the sliding area and matches the second line type, and clearing the target line; In response to a sliding area affected by the sliding operation being smaller than the first length, determining a target line matching the second line type within a predetermined area of the sliding area, and removing a portion of the target line segments; In response to the sliding area on which the sliding operation acts being greater than or equal to the first length, determining a target line matching the second line type within the predetermined area of the sliding area, and clearing the target line; In response to the sliding operation, based on a motion track of the sliding operation, a part of or all of the target line matching the motion track is cleared.
5. The method according to claim 1, It is characterized in that The designated page is a page for providing an object clearing function; the designated operation further includes: a first triggering operation; In response to the specified operation, clearing, in the target image, image information targeted by the specified operation, includes: In response to the first trigger operation acting on the designated page, target objects matching a designated object type are cleared in the target image.
6. The method according to claim 1, It is characterized in that The designated page is a page for providing an object clearing function; the designated operation further includes: a second triggering operation; In response to the specified operation, clearing, in the target image, image information targeted by the specified operation, includes: In response to the second trigger operation acting on the designated page, clearing target objects except the subject object; The target object is an object in the target image that matches a specified object type, and the main object is a target object that occupies the largest size ratio in the target image.
7. The method according to any one of claims 1 to 6, It is characterized in that In response to the specified operation, clearing, in the target image, image information targeted by the specified operation, includes: In response to the designated operation applied to the target image, a designated area where the designated operation is applied is enlarged; in response to the time spent in the designated area being equal to or greater than a predetermined time threshold, the image information in the designated area is cleared.
8. An image processing device, It is characterized in that Applied to a terminal, the device comprises: An acquisition module, used for acquiring a target image; A detection module, used for detecting a specified operation acting on the target image on a specified page containing the target image; A processing module is used to clear the image information targeted by the designated operation in the target image in response to the designated operation; wherein the processing module is specifically used to clear the image information targeted by the designated operation in response to the designated operation applied to the target image according to the length of the designated area applied by the designated operation; wherein the designated operation includes: a sliding operation; the image information includes: partial or all line segments of the target line matching a second line type; wherein the second line type is a line intersecting with any line in the target image; the partial line segments are determined in response to a sliding area less than a first length applied by the sliding operation, or the full line segments are determined in response to a sliding area greater than or equal to the first length applied by the sliding operation.
9. The device according to claim 8, It is characterized in that The designated page is a page for providing a line clearing function.
10. The device according to claim 8, It is characterized in that The image information further includes: a first line type; wherein the first line type is a line that does not intersect with any line in the target image; The processing module is used for, in response to the sliding operation, determining that the target line is a line that is closest to the sliding area affected by the sliding operation and matches the first line type, and clearing the target line; or, The processing module is used for, in response to the sliding operation, determining that the target line is a line located within a predetermined area of the sliding area and matching the first line type, and clearing the target line.
11. The device according to claim 8, It is characterized in that The processing module is used for at least one of the following: In response to the sliding area of the sliding operation being smaller than the first length, determining the target line to be a line that is closest to the sliding area of the sliding operation and matches the second line type, and clearing part of the target line; In response to the sliding area of the sliding operation being greater than or equal to the first length, determining that the target line is a line that is closest to the sliding area and matches the second line type, and clearing the target line; In response to a sliding area affected by the sliding operation being smaller than the first length, determining a target line matching the second line type within a predetermined area of the sliding area, and removing a portion of the target line segments; In response to the sliding area on which the sliding operation acts being greater than or equal to the first length, determining a target line matching the second line type within the predetermined area of the sliding area, and clearing the target line; The processing module is used for clearing part or all of the target line matching the motion trajectory in response to the sliding operation based on the motion trajectory of the sliding operation.
12. The device according to claim 8, It is characterized in that The designated page is a page for providing an object clearing function; the designated operation further includes: a first triggering operation; The processing module is configured to respond to the first trigger operation on the designated page and to clear, in the target image, target objects that match the designated object type and are targeted by the first trigger operation.
13. The device according to claim 8, It is characterized in that The designated page is a page for providing an object clearing function; the designated operation further includes: a second triggering operation; The processing module is used to respond to the second trigger operation acting on the designated page and clear the target objects except the main object; The target object is an object in the target image that matches a specified object type, and the main object is a target object that occupies the largest size ratio in the target image.
14. The device according to any one of claims 8 to 13, It is characterized in that The processing module is specifically used to respond to the designated operation acting on the target image, enlarge the designated area where the designated operation acts; and clear the image information in the designated area in response to the time spent in the designated area being equal to or greater than a predetermined time threshold.
15. A terminal, It is characterized in that include: processor; memory for storing computer programs; The computer program is configured to be executed by a processor to implement the image processing method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium having stored thereon a computer program, It is characterized in that When the computer program is executed by a processor of a terminal, the terminal is enabled to implement the image processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent photographing method and device
CN105763812A
Image data processing method and device
CN107145280A
Image processing method and device
CN107240068A
Image processing method and mobile terminal
CN107734260A
Method for erasing notes, electronic device, and computer storage medium
CN109032463A
