CN115237321A - Erasing processing method and device, electronic equipment and computer-readable storage medium - Google Patents

Erasing processing method and device, electronic equipment and computer-readable storage medium Download PDF

Info

Publication number
CN115237321A
CN115237321A CN202210879163.6A CN202210879163A CN115237321A CN 115237321 A CN115237321 A CN 115237321A CN 202210879163 A CN202210879163 A CN 202210879163A CN 115237321 A CN115237321 A CN 115237321A
Authority
CN
China
Prior art keywords
area
erasing
touch screen
outer edge
erasing area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210879163.6A
Other languages
Chinese (zh)
Inventor
戴文波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huasheng Software Technology Co ltd
Original Assignee
Shenzhen Huasheng Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huasheng Software Technology Co ltd filed Critical Shenzhen Huasheng Software Technology Co ltd
Priority to CN202210879163.6A priority Critical patent/CN115237321A/en
Publication of CN115237321A publication Critical patent/CN115237321A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses an erasing processing method, an erasing processing device, electronic equipment and a computer readable storage medium; the method comprises the steps of receiving an operation instruction for representing starting an erasing function; detecting to obtain a first contact area between the touch object and the touch screen and a second contact area after the touch object moves for a unit length along a first direction on the touch screen; determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively; determining a first erasing area according to the first outer edge profile, and determining a second erasing area according to the second outer edge profile; obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area; and clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen. By adopting the embodiment of the application, the size of the erasing range can be adjusted according to the erasing requirement, so that the erasing using effect is improved.

Description

Erasing processing method and device, electronic equipment and computer-readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an erasure processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
In recent years, a touch screen is a device which can replace a traditional blackboard and is applied to teaching and meetings. When the touch screen is used, the touch screen can be separated from a mouse and a keyboard, and the touch screen can be operated by using touch objects such as fingers or a touch pen, so that great convenience is brought to a user.
However, when the existing touch screen is used for erasing, the technical problem of poor erasing effect is solved, and therefore, the use requirements of users cannot be met.
Disclosure of Invention
The embodiment of the application provides an erasing processing method and device, electronic equipment and a computer readable storage medium, which can adjust the size of an erasing range according to erasing requirements, so that the using effect of erasing is improved.
In a first aspect, an embodiment of the present application provides an erasing method applied to a touch screen, including:
receiving an operation instruction for representing starting an erasing function;
detecting to obtain a first contact area between the touch object and the touch screen and a second contact area after the touch object moves for a unit length on the touch screen along a first direction;
determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively;
determining a first erased area according to the first outer edge profile and a second erased area according to the second outer edge profile;
obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area;
and clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
In a second aspect, an embodiment of the present application further provides an erasing apparatus, applied to a touch screen, including:
the receiving unit is used for receiving an operation instruction for representing starting an erasing function;
the detection unit is used for detecting and obtaining a first contact area between the touch object and the touch screen and a second contact area after the touch object moves on the touch screen along the first direction by a unit length;
a first determining unit for determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively;
a second determining unit for determining a first erasing area according to the first outer edge profile and a second erasing area according to the second outer edge profile;
the obtaining unit is used for obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area;
and the clearing unit is used for clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a memory, a processor, and an erasing program that is stored in the memory and is executable on the processor, and when the processor executes the erasing program, the steps in any one of the erasing processing methods provided in the embodiments of the present application are implemented. In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where an erasing program is stored in the computer-readable storage medium, and the erasing program is executed by a processor to implement any one of the steps in the erasing processing method provided in the embodiment of the present application.
In the application, after an operation instruction for representing starting of an erasing function is received, the area size of a contact area between a touch object and a touch screen is obtained through detection, the range of an erasing area is determined, and the size of a first target erasing area can be adjusted according to the change of the range of the erasing area. Therefore, the size of the first target erasing area can be adjusted in real time by adjusting the area of the contact area between the touch object and the touch screen according to the erasing requirement, and the erasing use effect is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic view of a scenario of an erasing processing method according to an embodiment of the present application;
FIG. 1b is a schematic flowchart of an erase processing method according to an embodiment of the present application;
fig. 1c is a schematic flowchart of a method for obtaining a first target erase region on a touch screen according to an embodiment of the present disclosure;
fig. 1d is a schematic flowchart of a method for erasing a first content to be erased in a first target erasing area according to an embodiment of the present application;
fig. 1e is a schematic structural diagram of a bounding region provided in the embodiment of the present application;
fig. 2 is a schematic flowchart of an erasing processing method applied in a scene of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic view of a first structure of an erasing processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides an erasing processing method and device, electronic equipment and a storage medium.
The electronic device may be a terminal, a server, or the like. The terminal can be a mobile phone, a tablet Computer, an intelligent bluetooth device, a notebook Computer, or a Personal Computer (PC), and the like; the server may be a single server or a server cluster composed of a plurality of servers.
In some embodiments, the erasing processing method of the present application may be implemented by a plurality of electronic devices or may be integrated in a plurality of servers.
In some embodiments, the server may also be implemented in the form of a terminal.
For example, referring to fig. 1a, the electronic device may be a server, and the server in this embodiment of the present application is configured to receive an operation instruction for starting an erase function; detecting to obtain a first contact area between the touch object and the touch screen and a second contact area after the touch object moves for a unit length along a first direction on the touch screen; determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively; determining a first erased area according to the first outer edge profile and a second erased area according to the second outer edge profile; obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area; and clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
The following are detailed below. The numbers in the following examples are not intended to limit the order of preference of the examples.
In this embodiment, an erasing method is provided, and as shown in fig. 1b, a specific flow of the erasing method may be as follows:
110. and receiving an operation instruction for representing starting the erasing function.
The operation instruction is an instruction sent by the touch screen when the touch screen needs to enter an erasing function, and after the touch screen receives the operation instruction, the touch screen is in an erasing mode, and a user can erase the content on the touch screen.
Touch panel (Touch panel) is an inductive display device capable of receiving input signals such as Touch, when a graphic button on a screen is touched, a Touch feedback system on the screen can drive various connecting devices according to a pre-programmed program, so that the Touch panel can be used for replacing a mechanical button panel, and vivid video and audio effects can be produced by a liquid crystal display picture. In some embodiments, the touch screen may be an electronic whiteboard, and the working principle of the electronic whiteboard may be a pressure sensing principle or a laser tracking principle.
The erasing mode of the touch screen refers to a mode capable of erasing contents on the touch screen, in some embodiments, when the erasing mode is entered, the contents on the touch screen can be erased by one key, and also part of the contents on the touch screen can be erased according to needs, for example, when the part of the contents are erased, an eraser function of the touch screen can be called for erasing.
In some embodiments, the operation instruction may be directly triggered by a user by clicking a function key in a function area on the touch screen, so that the touch screen is in an erase mode, or the user may send a control signal such as sound to the server, so that the server sends an operation instruction representing starting an erase function to the touch screen, so that the touch screen is in the erase mode. For example, the touch screen may include a functional area and a writing area, and when the content on the writing area needs to be cleared, the touch screen may be in an erasing mode by clicking an erasing button on the functional area, so as to clear the content on the writing area.
120. And detecting to obtain a first contact area between the touch object and the touch screen and a second contact area after the touch object moves for a unit length along the first direction on the touch screen.
The touch object refers to an object that can contact the touch screen and perform a writing function, an erasing function, a selecting function, and the like, and in some embodiments, the touch object may include a stylus, a palm, and a finger.
The first contact area is an area where the touch object is in contact with the touch screen, and the second contact area is an area where the touch object is in contact with the touch screen after the touch screen moves by a unit length. In some embodiments, the first contact region and the second contact region may be a regular region, an irregular region, or a region composed of two or more sub-regions.
The unit length may be a unit distance moved from the first contact area to the second contact area, wherein in the embodiment of the present application, the unit length may be set according to the use requirement of the user.
The first direction is a direction in which the touching object moves by a unit length.
In this application embodiment, when the theory of operation of touch-control screen is pressure sensing principle, can detect the pressure that touch-control screen surface receives through pressure sensing membrane, receive the pressure back, through causing the short circuit in pressure place position to confirm the regional that touch thing and touch-control screen contacted.
130. A first outer edge profile of the first contact area and a second outer edge profile of the second contact area are determined, respectively.
Wherein the outer edge profile may refer to an edge of the contact region. In an embodiment of the present application, the first outer edge profile and the second outer edge profile may be determined by determining coordinates of respective points on the first contact area and on the second contact area.
For example, in some embodiments, the touch screen may be divided to obtain a touch screen composed of m × n coordinate pixels, where m is used to represent a number of rows and n is used to represent a number of columns, and when the touch screen senses pressure, a short circuit is caused at a position where the pressure is applied, so as to determine an area where the touch object is in contact with the touch screen and coordinates of the area. And finally, determining the outline of the outer edge of the area according to the coordinates of the area.
For example, in some embodiments, when the touch area is square and the positions on the touch screen are columns 200 to 205 of the 5 th row, columns 200 to 205 of the 6 th row, columns 200 to 205 of the 7 th row, columns 200 to 205 of the 8 th row, columns 200 to 205 of the 9 th row and columns 200 to 205 of the 10 th row, the coordinates of the outer edge profile are (5, 200), (5, 201), (5, 202), (5, 203), (5, 204), (5, 205), (6, 205), (7, 205), (8, 205), (9, 205), (10, 204), (10, 203), (10, 202), (10, 201), (10, 200), (9, 200), (8, 200), (7, 200) and (6, 200), respectively.
140. A first erased area is determined from the first outer edge profile and a second erased area is determined from the second outer edge profile.
The erasing area may be an erasing area that needs to be erased, and the erasing area may be the same as or different from the outer edge profile.
For example, in some embodiments, when the outer edge profile is square in shape, the wiping area may be a circle circumscribing or a circle inscribed the outer edge profile.
In some embodiments, the number of the contact areas may be multiple, for example, when the touching object is a palm, due to the uneven surface of the palm, when the touching object contacts the touch screen, multiple contact areas may be generated. For example, when five fingers are used to contact the touch screen, there are 5 contact areas and 5 corresponding outer edge contours. The wiping area may be a square area provided along the maximum length and the maximum width of the 5 outer edge profiles or a circular area provided along the maximum length of the 5 outer edge profiles.
In the embodiment of the present application, the first erasing area and the second erasing area may be determined together or separately.
In the embodiment of the present application, determining the first erasing area according to the first outer edge profile includes:
two coordinate points with the longest distance on the first outer edge profile are determined.
The two coordinate points with the longest distance are the two coordinate points with the longest distance obtained by the distance formula between the two points.
In the embodiment of the present application, determining two coordinate points with the longest distance on the first outer edge profile includes:
determining coordinates of each coordinate point on the first outer edge profile;
calculating the distance of coordinates of each coordinate point on the first outer edge profile to obtain a first distance set between any two coordinate points on the first outer edge profile;
selecting a first target interval meeting preset requirements from the first interval set;
determining two coordinate points with the longest distance on the first outer edge profile according to the first target distance;
for example, in some embodiments, the respective coordinate points on the first outer edge profile are (5, 200), (5, 201), (5, 202), (5, 203), (5, 204), (5, 205), (6, 205), (7, 205), (8, 205), (9, 205), (10, 204), (10, 203), (10, 202), (10, 201), (10, 200), (9, 200), (8, 200), (7, 200), and (6, 200).
After determining each coordinate point on the first outer edge contour, pairing each coordinate point pairwise, finally solving a first distance set of distance values between the paired coordinate points according to a distance formula between the two coordinate points, finally selecting a first distance with the largest value from the first distance set, and determining the two coordinate points according to the first distance.
In some embodiments, when the outer edge profile is a 5-circle edge profile, the two coordinate points on each circle edge profile may also be determined, then the coordinate points are paired pairwise, finally a first distance set of distance values between the paired coordinate points is obtained according to a distance formula between the two coordinate points, finally a first distance with a maximum value is selected from the first distance set, and the two coordinate points are determined according to the first distance, where the first distance may be from a coordinate point on one circle edge profile to a coordinate point on another circle edge profile.
And obtaining a first circular area by taking a first distance between two coordinate points with the longest distance on the first outer edge outline as a first diameter, wherein the first circular area is taken as a first erasing area.
The first diameter may be a connecting line between the two coordinate points.
The first circular area may be obtained by rotating the first diameter along the midpoint after determining the midpoint between the two coordinate points, or may be obtained by determining the midpoint between the two coordinate points and simultaneously determining the radius according to the first diameter. For example, when the two coordinate points on the first outer edge profile that are the longest in pitch are (5, 200) and (8, 204), the first pitch of the two coordinate points is 5, and the midpoint coordinate is (6.5, 202).
In this embodiment of the present application, determining the second erasing area according to the second outer edge profile includes:
determining two coordinate points with the longest distance on the second outer edge profile;
determining two coordinate points of the second outer edge profile having the longest distance, including:
determining coordinates of each coordinate point on the second outer edge profile;
calculating the space of the coordinates of each coordinate point on the second outer edge profile to obtain a second space set between any two coordinate points on the second outer edge profile;
selecting a second target distance meeting the preset requirement from the second distance set;
determining two coordinate points with the longest distance on the second outer edge profile according to the second target distance;
and taking a second distance between two coordinate points with the longest distance on the second outer edge profile as a second diameter to obtain a second circular area, wherein the second circular area is taken as a second erasing area.
150. And obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area.
The first target erasing area is an area which needs to be erased after a user performs an erasing operation, and comprises a first erasing area, a second erasing area and an area when the second erasing area is moved by the first erasing area.
The position relationship of the first erasing area and the second erasing area can comprise intersection, separation and superposition according to different moving distances. The intersection means that partial areas of the first erasing area and the second erasing area are in an overlapped state or the edges of the first erasing area and the second erasing area are connected; the separation means that the first erasing area and the second erasing area are not overlapped, and the edges of the first erasing area and the second erasing area are not connected; by coincident is meant that the first erased area is contained within the second erased area or that the second erased area is contained within the first erased area.
In this embodiment, as shown in fig. 1c, when the position relationship between the first erasing area and the second erasing area is intersection or separation, the method for obtaining the first target erasing area on the touch screen according to the first erasing area and the second erasing area includes:
151. determining two common tangents of the first erasing area and the second erasing area;
152. determining a surrounding area of the first erasing area and the second erasing area according to two common tangents of the first erasing area and the second erasing area, and taking the surrounding area as a first target erasing area on the touch screen.
The common tangent line refers to a straight line which is tangent to two or more curves simultaneously. In the embodiment of the present application, since the first erasing area and the second erasing area are both circular areas, the common tangent line is a tangent line tangent to the edges of the two circular areas.
For example, in the embodiment of the present application, there are two common tangent lines, and the two common tangent lines are symmetrically disposed on two sides of a connection line between circle centers of the first erasing area and the second erasing area.
The encircled area is an area formed by the first erased area, the second erased area and a common tangent line, for example, as shown in fig. 1e, when the first erased area is ABCD, the second erased area is ABCD, one common tangent line is aA, and the other common tangent line is cC, the encircled area is abcCDA.
In the embodiment of the application, when the position relationship between the first erasing area and the second erasing area is coincident, the method for obtaining the first target erasing area on the touch screen according to the first erasing area and the second erasing area includes:
if the area of the first erasing area is larger than that of the second erasing area, selecting the first erasing area as a first target erasing area on the touch screen;
if the area of the first erasing area is smaller than that of the second erasing area, selecting the second erasing area as a first target erasing area on the touch screen;
and if the area of the first erasing area is equal to that of the second erasing area, selecting the first erasing area or the second erasing area as a first target erasing area on the touch screen.
If the area of the first erasing area is larger than that of the second erasing area, the second erasing area is represented to be located in the first erasing area, and therefore the first erasing area with the larger erasing area is selected as the first target erasing area.
If the area of the first erasing area is smaller than that of the second erasing area, the first erasing area is represented to be in the second erasing area, and therefore the second erasing area with the larger erasing area is selected as the first target erasing area.
If the area of the first erasing area is equal to the area of the second erasing area, the first erasing area and the second erasing area are represented to be the same in size and shape, and therefore the first erasing area or the second erasing area is selected to be surrounded as a first target erasing area.
160. And clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
The first content to be erased is erasable lines, characters, colors or images which are displayed on the touch screen and located in the first target erasing area.
In this embodiment of the application, as shown in fig. 1d, the method for erasing the first content to be erased in the first target erase area according to the first target erase area on the touch screen includes:
161. content on the touch screen is determined.
The content on the touch screen comprises erasable content in a writing area, non-erasable content in the writing area and content in other areas. For example, erasable content that is within a writing area may include lines, text, colors, or images that are not locked, written or imported; the non-erasable content in the writing area may include locked, written or imported lines, text, colors or images; the content in the other area may include names of function keys in the function area, and the like. The erasable content in the writing area may be a content object for performing an erasing operation.
162. And comparing the position relation between the content and the first target erasing area.
The position relation between the content and the first target erasing area comprises that the content is completely in the first target erasing area, the content part is in the first target erasing area and is intersected with the first target erasing area, and the content is not in the first target erasing area.
In some embodiments, the position relationship may be determined by comparing the shape of the content with the first target erasing area, or by determining the coordinates of the position where the content is located, and comparing the shape of the content with the coordinates of the first target erasing area.
163. And taking the content in the first target erasing area as the first content to be erased, and clearing the first content to be erased.
The first content to be erased may refer to the whole content or part of the content in the first target erase region in terms of position relationship.
The clearing process may be replacing the content in the first target erase area with the background portion, or deleting the content superimposed on the first target erase area.
In the embodiment of the application, when the first content to be erased in the first target erasing area is not intersected with the first target erasing area, that is, lines, characters and images in the first content to be erased are not intersected with the edge of the first target erasing area, the first content to be erased can be directly cleaned.
When the first content to be erased in the first target erasing area is intersected with the first target erasing area, namely lines, characters and images in the first content to be erased are intersected with the edge of the first target erasing area,
determining the coordinates of each pixel point on the lines, the characters and the images, comparing and judging the coordinates of each pixel point with the first target erasing area, determining whether the point is in the first target erasing area, if so, deleting the point, and if not, keeping the point, thereby erasing the first content to be erased in the first target erasing area.
In the embodiment of the application, when the touch object moves from the first position to the second position on the touch screen, the steps 110 to 160 may be repeated, so that the first target erasing area is determined in real time and the content in the first target erasing area is removed in real time in the process that the touch object moves on the touch screen.
Therefore, after the operation instruction for representing starting the erasing function is received, the area of the contact area between the touch object and the touch screen is obtained through detection, the range of the erasing area is determined, and the size of the first target erasing area can be adjusted according to the change of the range of the erasing area. Therefore, the size of the first target erasing area can be adjusted in real time by adjusting the area of the contact area between the touch object and the touch screen according to the erasing requirement, and the erasing use effect is improved.
The method also comprises the steps of firstly determining a moving path of the touch object moving from the first position to the second position on the touch screen, then determining a plurality of sub paths forming the moving path according to the moving path, and finally clearing the content with erasures on the touch screen according to the plurality of sub-erasing areas by determining the sub-erasing area of each sub path.
In this embodiment of the present application, when the touch object moves from the first position to the second position on the touch screen, the erasing processing method may include:
and determining a moving path of the touch object moving from the first position to the second position on the touch screen.
The moving path refers to a moving track of the touch object moving from the first position to the second position, and when the moving path is obtained, the change of the size of the contact area between the touch object and the touch screen in the moving process can also be obtained.
And decomposing the moving path to obtain at least one sub-path, wherein the moving direction of the sub-path is a second direction, and the moving length is a unit length.
The decomposition processing is to divide the moving path according to the unit length, so as to obtain at least one sub-path, for example, when the length of the moving path is 50cm, and the unit length is 1cm, the number of the sub-paths is 50, and the direction of each sub-path can be set according to the direction of the moving path. When the moving path is an arc-shaped path, the direction of the sub-path obtained by the decomposition processing may be a tangential direction of an arc of the sub-path.
A sub-erasure area for each sub-path is determined.
When the touch object moves towards the other end along one end of the sub-path, the contact area between the touch object and the touch screen is detected to be the first sub-contact area when the touch object is at one end of the sub-path, the contact area between the touch object and the touch screen is detected to be the second sub-contact area when the touch object is at the other end of the sub-path, and the steps 130-150 are repeated, so that the sub-erasing area of the sub-path is obtained.
In the embodiment of the present application, the first sub-contact area and the second sub-contact area of each sub-path are determined, and steps 130 to 150 are repeated, so that the sub-erase area of each sub-path can be obtained.
And determining a second target erasing area of the touch object moving from the first position to the second position on the touch screen according to the sub-erasing area of each sub-path.
The second target erasing area is determined when the touch object moves from the first position to the second position on the touch screen, and the second target erasing area is obtained by splicing the sub erasing areas of all the sub paths.
And erasing the second target content to be erased in the second erasing area according to the second erasing area on the touch screen.
Therefore, the second target erasing area needing to be erased can be determined firstly, the erasing range can be adjusted in the contact object moving process, the erasing range can be adjusted conveniently, a user can erase the content after determining the erasing area, and the using effect of the content on the touch screen during erasing is improved.
The method described in the above embodiments is further described in detail below.
As shown in fig. 2, a specific flow of the erasing processing method is as follows:
201. responding to an erasing button on the electronic whiteboard, and starting an erasing function of the electronic whiteboard;
202. and determining a first contact position of the finger and the electronic whiteboard and a first contact area at the first contact position, and setting and displaying a first erasing ring of the eraser according to the first contact area and a preset proportional relation.
Wherein the size of the first erase can be determined according to the maximum distance in the contact area of the finger and the electronic whiteboard.
203. And determining a moving path of the finger, a second contact position where the finger is translated to the electronic whiteboard and a second contact area at the second contact position, and setting and displaying a second erasing ring of the eraser according to the second contact area and a preset proportional relation.
The size of the second erase can be determined according to the maximum distance between the finger and the contact area of the electronic whiteboard after the finger moves to the second position.
204. Calculating to obtain two common tangent lines of the first erasing circle and the second erasing circle;
205. and determining an erasing area formed by the first erasing circle and the second erasing circle according to the two common tangent lines, and clearing the display content in the erasing area.
When the display content is completely in the erasing area, the display content in the erasing area is directly cleared, when the display content is partially in the erasing area, whether the line in the display content is intersected with the erasing area is judged, if the line is intersected with the erasing area, the coordinates of all points on the line in the display content are obtained, whether the coordinates of all points on the line belong to the erasing area is judged, if yes, the point is cleared, and if not, the point is reserved.
In order to better implement the above method, an embodiment of the present application further provides an erasing processing apparatus, as shown in fig. 3, the erasing processing apparatus may include:
a receiving unit 301, configured to receive an operation instruction indicating to start an erase function;
the detection unit 302 is configured to detect a first contact area between the touch object and the touch screen and a second contact area after the touch object moves by a unit length on the touch screen along a first direction;
a first determining unit 303 for determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively;
a second determining unit 304, configured to determine a first erased area according to the first outer edge profile, and determine a second erased area according to the second outer edge profile;
a obtaining unit 305, configured to obtain a first target erasing area on the touch screen according to the first erasing area and the second erasing area;
the clearing unit 306 is configured to clear the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
In this embodiment of the application, the second determining unit 304 is further specifically configured to:
determining two coordinate points with the longest distance on the first outer edge profile;
taking a first distance between two coordinate points with the longest distance on the first outer edge outline as a first diameter to obtain a first circular area, wherein the first circular area is taken as a first erasing area;
determining two coordinate points with the longest distance on the second outer edge profile;
and taking a second distance between two coordinate points with the longest distance on the second outer edge profile as a second diameter to obtain a second circular area, wherein the second circular area is taken as a second erasing area.
In this embodiment of the application, the second determining unit 304 is further specifically configured to:
determining coordinates of each coordinate point on the first outer edge profile;
calculating the distance of coordinates of each coordinate point on the first outer edge profile to obtain a first distance set between any two coordinate points on the first outer edge profile;
selecting a first target interval meeting preset requirements from the first interval set;
determining two coordinate points with the longest distance on the first outer edge profile according to the first target distance;
determining coordinates of each coordinate point on the second outer edge profile;
calculating the space of the coordinates of each coordinate point on the second outer edge profile to obtain a second space set between any two coordinate points on the second outer edge profile;
selecting a second target distance meeting the preset requirement from the second distance set;
and determining two coordinate points with the longest distance on the second outer edge profile according to the second target distance.
The first erasing area and the second erasing area are intersected or separated in a position relationship, and in this embodiment, the obtaining unit 305 is further specifically configured to:
determining two common tangents of the first erasing area and the second erasing area;
determining a surrounding area of the first erasing area and the second erasing area according to two common tangents of the first erasing area and the second erasing area, and taking the surrounding area as a first target erasing area on the touch screen. The first erasing area and the second erasing area are overlapped in a position relationship, and in this embodiment, the obtaining unit 305 is further specifically configured to:
obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area, including:
if the area of the first erasing area is larger than that of the second erasing area, selecting the first erasing area as a first target erasing area on the touch screen;
if the area of the first erasing area is smaller than that of the second erasing area, selecting the second erasing area as a first target erasing area on the touch screen;
and if the area of the first erasing area is equal to that of the second erasing area, selecting the first erasing area or the second erasing area as a first target erasing area on the touch screen.
In this embodiment of the application, the clearing unit 306 is further specifically configured to:
determining content on a touch screen;
comparing the position relation between the content and the first target erasing area;
and taking the content in the first target erasing area as the first content to be erased, and clearing the first content to be erased.
The touch object moves from a first position to a second position on the touch screen, and in this embodiment of the application, the clearing unit 306 is further specifically configured to:
determining a moving path of a touch object moving from a first position to a second position on a touch screen;
decomposing the moving path to obtain at least one sub-path, wherein the moving direction of the sub-path is a second direction, and the moving length is a unit length;
determining a sub-erasure area of each sub-path;
determining a second target erasing area of the touch object moving from the first position to the second position on the touch screen according to the sub-erasing area of each sub-path;
and erasing the second target content to be erased in the second erasing area according to the second erasing area on the touch screen.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the erasing processing apparatus of the present embodiment includes a receiving unit 301, configured to receive an operation instruction indicating to start an erasing function; the detection unit 302 is configured to detect a first contact area between the touch object and the touch screen and a second contact area after the touch object moves by a unit length along a first direction on the touch screen; a first determining unit 303 for determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively; a second determining unit 304, configured to determine a first erased area according to the first outer edge profile and a second erased area according to the second outer edge profile; obtaining, by the obtaining unit 305, a first target erasing area on the touch screen according to the first erasing area and the second erasing area; the clearing unit 306 is configured to clear the first content to be erased in the first target erase area according to the first target erase area on the touch screen. Therefore, the range of the erasing area can be determined according to the area of the contact area between the touch object and the touch screen, and the size of the erasing area can be changed in the moving process, so that the convenience degree of erasing the content on the touch screen is improved.
The embodiment of the application further provides the electronic equipment which can be a terminal, a server and the like. The terminal can be a mobile phone, a tablet computer, an intelligent Bluetooth device, a notebook computer, a personal computer and the like; the server may be a single server, a server cluster composed of a plurality of servers, or the like.
In some embodiments, the erasing processing apparatus may also be integrated in a plurality of electronic devices, for example, the erasing processing apparatus may be integrated in a plurality of servers, and the erasing processing method of the present application is implemented by the plurality of servers.
In this embodiment, a detailed description will be given by taking the electronic device of this embodiment as an example of a terminal, for example, as shown in fig. 4, which shows a schematic structural diagram of the terminal according to the embodiment of the present application, specifically:
the terminal may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402. In some embodiments, processor 401 may include one or more processing cores; in some embodiments, processor 401 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The terminal also includes a power supply 403 for powering the various components, and in some embodiments, the power supply 403 may be logically coupled to the processor 401 via a power management system, such that the power management system may perform functions of managing charging, discharging, and power consumption. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The terminal may also include an input module 404, the input module 404 being operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The terminal may also include a communication module 405, and in some embodiments the communication module 405 may include a wireless module, through which the terminal may wirelessly transmit over short distances, thereby providing wireless broadband internet access to the user. For example, the communication module 405 may be used to assist a user in sending and receiving e-mails, browsing web pages, accessing streaming media, and the like.
Although not shown, the terminal may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 401 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
receiving an operation instruction for representing starting an erasing function;
detecting to obtain a first contact area between the touch object and the touch screen and a second contact area after the touch object moves for a unit length on the touch screen along a first direction;
determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively;
determining a first erased area according to the first outer edge profile and a second erased area according to the second outer edge profile;
obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area;
and clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
In some embodiments, a computer program product is also proposed, which comprises a computer program or instructions that, when executed by a processor, implement the steps of any one of the above-mentioned methods of erasure processing.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the erasing processing methods provided in the present application.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium.
Since the instructions stored in the storage medium can execute the steps in any of the erasing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the erasing methods provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
The foregoing detailed description has provided a method, an apparatus, an electronic device, and a computer-readable storage medium for erasure processing according to embodiments of the present application, and specific examples have been applied in the present application to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An erasing processing method is applied to a touch screen, and comprises the following steps:
receiving an operation instruction for representing starting an erasing function;
detecting to obtain a first contact area between a touch object and the touch screen and a second contact area after the touch object moves for a unit length on the touch screen along a first direction;
determining a first outer edge profile of the first contact area and a second outer edge profile of the second contact area, respectively;
determining a first erasing area according to the first outer edge profile, and determining a second erasing area according to the second outer edge profile;
obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area;
and clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
2. The method of claim 1, wherein determining a first erased area from the first outer edge profile comprises:
determining two coordinate points with the longest distance on the first outer edge profile;
taking a first distance between two coordinate points with the longest distance on the first outer edge profile as a first diameter to obtain a first circular area, wherein the first circular area is taken as a first erasing area;
determining a second erased area according to the second peripheral profile, comprising:
determining two coordinate points with the longest distance on the second outer edge profile;
and obtaining a second circular area by taking a second distance between two coordinate points with the longest distance on the second outer edge outline as a second diameter, wherein the second circular area is taken as a second erasing area.
3. The method of claim 2, wherein determining the two most distant coordinate points on the first outer edge profile comprises:
determining coordinates of each coordinate point on the first outer edge profile;
carrying out calculation processing on the coordinate of each coordinate point on the first outer edge profile to obtain a first distance set between any two coordinate points on the first outer edge profile;
selecting a first target interval meeting preset requirements from the first interval set;
determining two coordinate points with the longest distance on the first outer edge profile according to the first target distance;
the determining two coordinate points with the longest distance on the second outer edge profile comprises:
determining coordinates of each coordinate point on the second outer edge profile;
calculating the distance of coordinates of each coordinate point on the second outer edge profile to obtain a second distance set between any two coordinate points on the second outer edge profile;
selecting a second target distance meeting a preset requirement from the second distance set;
and determining two coordinate points with the longest distance on the second outer edge profile according to the second target distance.
4. The method according to claim 2, wherein the first erasing area and the second erasing area are in a positional relationship of intersecting or separating;
the obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area comprises:
determining two common tangents to the first erased area and the second erased area;
determining a surrounding area of the first erasing area and the second erasing area according to two common tangents of the first erasing area and the second erasing area, and taking the surrounding area as a first target erasing area on the touch screen.
5. The method according to claim 1, wherein the positional relationship of the first erasing area and the second erasing area is coincidence;
the obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area comprises:
if the area of the first erasing area is larger than that of the second erasing area, selecting the first erasing area as a first target erasing area on the touch screen;
if the area of the first erasing area is smaller than that of the second erasing area, selecting the second erasing area as a first target erasing area on the touch screen;
and if the area of the first erasing area is equal to the area of the second erasing area, selecting the first erasing area or the second erasing area to surround as a first target erasing area on the touch screen.
6. The method of claim 1, wherein erasing the first content to be erased in the first target erase region according to the first target erase region on the touch screen comprises:
determining content on the touch screen;
comparing the position relation between the content and the first target erasing area;
and taking the content in the first target erasing area as a first content to be erased, and clearing the first content to be erased.
7. The method of claim 1, wherein the touch object moves from a first position to a second position on the touch screen;
the method further comprises the following steps:
determining a moving path of the touch object moving from a first position to a second position on the touch screen;
decomposing the moving path to obtain at least one sub-path, wherein the moving direction of the sub-path is a second direction, and the moving length is a unit length;
determining a sub-erasure area for each of the sub-paths;
determining a second target erasing area of the touch object moving from the first position to the second position on the touch screen according to the sub-erasing area of each sub-path;
and erasing a second target content to be erased in the second erasing area according to the second erasing area on the touch screen.
8. An erasing processing device, which is applied to a touch screen, includes:
the receiving unit is used for receiving an operation instruction for representing starting an erasing function;
the detection unit is used for detecting and obtaining a first contact area between a touch object and the touch screen and a second contact area after the touch object moves on the touch screen along a first direction by a unit length;
a first determination unit configured to determine a first outer edge profile of the first contact region and a second outer edge profile of the second contact region, respectively;
a second determining unit, configured to determine a first erased area according to the first outer edge profile, and determine a second erased area according to the second outer edge profile;
the obtaining unit is used for obtaining a first target erasing area on the touch screen according to the first erasing area and the second erasing area;
and the clearing unit is used for clearing the first content to be erased in the first target erasing area according to the first target erasing area on the touch screen.
9. An electronic device, comprising a memory, a processor and an erase program stored in the memory and executable on the processor, wherein the processor implements the steps of the erase processing method according to any one of claims 1 to 7 when executing the erase program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores an erasing program, which is executed by a processor to implement the steps in the erasing processing method according to any one of claims 1 to 7.
CN202210879163.6A 2022-07-25 2022-07-25 Erasing processing method and device, electronic equipment and computer-readable storage medium Pending CN115237321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210879163.6A CN115237321A (en) 2022-07-25 2022-07-25 Erasing processing method and device, electronic equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210879163.6A CN115237321A (en) 2022-07-25 2022-07-25 Erasing processing method and device, electronic equipment and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115237321A true CN115237321A (en) 2022-10-25

Family

ID=83674584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210879163.6A Pending CN115237321A (en) 2022-07-25 2022-07-25 Erasing processing method and device, electronic equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115237321A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016122307A (en) * 2014-12-25 2016-07-07 シャープ株式会社 Information processing device, information processing program and information processing method
CN109816675A (en) * 2018-12-28 2019-05-28 歌尔股份有限公司 Detection method, detection device and the storage medium of object
CN111679782A (en) * 2020-06-10 2020-09-18 腾讯科技(深圳)有限公司 Erasing method and related device
CN113311981A (en) * 2021-05-12 2021-08-27 深圳市宝视达光电有限公司 Erasing method and device, intelligent terminal and computer readable storage medium
CN114063859A (en) * 2021-10-27 2022-02-18 湖南新云网科技有限公司 Method for erasing graph, electronic equipment and storage medium
CN114168059A (en) * 2021-12-10 2022-03-11 深圳市华胜软件技术有限公司 Handwriting generating method and device, storage medium and terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016122307A (en) * 2014-12-25 2016-07-07 シャープ株式会社 Information processing device, information processing program and information processing method
CN109816675A (en) * 2018-12-28 2019-05-28 歌尔股份有限公司 Detection method, detection device and the storage medium of object
CN111679782A (en) * 2020-06-10 2020-09-18 腾讯科技(深圳)有限公司 Erasing method and related device
CN113311981A (en) * 2021-05-12 2021-08-27 深圳市宝视达光电有限公司 Erasing method and device, intelligent terminal and computer readable storage medium
CN114063859A (en) * 2021-10-27 2022-02-18 湖南新云网科技有限公司 Method for erasing graph, electronic equipment and storage medium
CN114168059A (en) * 2021-12-10 2022-03-11 深圳市华胜软件技术有限公司 Handwriting generating method and device, storage medium and terminal equipment

Similar Documents

Publication Publication Date Title
US10296136B2 (en) Touch-sensitive button with two levels
US20190079671A1 (en) User input apparatus, computer connected to user input apparatus, and control method for computer connected to user input apparatus, and storage medium
US8749497B2 (en) Multi-touch shape drawing
CN100452019C (en) Data processing apparatus
KR102184269B1 (en) Display apparatus, portable apparatus and method for displaying a screen thereof
US20080134078A1 (en) Scrolling method and apparatus
CN101676844A (en) Processing method and apparatus for information input from touch screen
US20090309851A1 (en) Capacitive Sensor Panel Having Dynamically Reconfigurable Sensor Size and Shape
US9870144B2 (en) Graph display apparatus, graph display method and storage medium
CN107621893A (en) The content creating of electronic input apparatus is used on non-electronic surface
CN103955339A (en) Terminal operation method and terminal equipment
KR20140038568A (en) Multi-touch uses, gestures, and implementation
CN107608668B (en) Method and device for making and compatibly displaying H5 page, terminal equipment and storage medium
CN106919333A (en) The recording method and device of written contents on electronic writing board
CN111475097A (en) Handwriting selection method and device, computer equipment and storage medium
US10565299B2 (en) Electronic apparatus and display control method
US20150042585A1 (en) System and electronic device of transiently switching operational status of touch panel
EP2771766B1 (en) Pressure-based interaction for indirect touch input devices
CN113703631A (en) Writing control method and device, electronic equipment and storage medium
CN112698735A (en) Information input method and device and electronic equipment
CN105786373A (en) Touch track display method and electronic device
CN115237321A (en) Erasing processing method and device, electronic equipment and computer-readable storage medium
CN103502921A (en) Text indicator method and electronic device
JP2016189035A (en) Information processing device, information processing program, and information processing method
CN104007916A (en) Information processing method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination