CN110045909B - Ellipse processing method, device and equipment based on writing track and storage medium - Google Patents

Ellipse processing method, device and equipment based on writing track and storage medium Download PDF

Info

Publication number
CN110045909B
CN110045909B CN201910298665.8A CN201910298665A CN110045909B CN 110045909 B CN110045909 B CN 110045909B CN 201910298665 A CN201910298665 A CN 201910298665A CN 110045909 B CN110045909 B CN 110045909B
Authority
CN
China
Prior art keywords
ellipse
track
target
writing
target ellipse
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.)
Active
Application number
CN201910298665.8A
Other languages
Chinese (zh)
Other versions
CN110045909A (en
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201910298665.8A priority Critical patent/CN110045909B/en
Publication of CN110045909A publication Critical patent/CN110045909A/en
Application granted granted Critical
Publication of CN110045909B publication Critical patent/CN110045909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Abstract

The embodiment of the invention discloses an ellipse processing method, a device, equipment and a storage medium based on writing tracks, relating to the field of electronic whiteboards and comprising the following steps: responding to received handwriting control operation, and displaying at least one writing track, wherein a first track point located in a closed area of a target ellipse and a second track point located outside the closed area exist in the writing track; and adjusting the size data of the target ellipse so that all track points of the writing track are positioned in the adjusted closed area of the target ellipse. By adopting the scheme, the technical problem of low integration efficiency of writing tracks and ellipses in the prior art can be solved.

Description

Ellipse processing method, device and equipment based on writing track and storage medium
Technical Field
The embodiment of the invention relates to the technical field of electronic whiteboards, in particular to an ellipse processing method, device, equipment and storage medium based on writing tracks.
Background
With the development of computer technology, computer devices are widely used in various scenes of daily life. For example, in a meeting, a classroom, and the like, more and more people write, draw, and the like through computer equipment, so as to replace a traditional notebook or a traditional blackboard (including a white board). In this case, the user usually uses a graphic as a carrier for integrating the writing trace during the operation. For example, writing is performed within an ellipse to use the ellipse as a carrier of its internal writing trajectory, thereby achieving integration of the writing trajectory. In the process of implementing the invention, the inventor finds that the following problems exist in the prior art: the writing track and the drawn ellipse belong to two types of elements which are independent from each other, and in order to achieve a desired integration effect, a user is required to adjust the display position of the writing track or the ellipse one by one. Therefore, the prior art has a problem of low integration efficiency for writing a trajectory and an ellipse.
Disclosure of Invention
The invention provides a method, a device and equipment for processing an ellipse based on a writing track and a storage medium, and aims to solve the technical problem of low integration efficiency of the writing track and the ellipse in the prior art.
In a first aspect, an embodiment of the present invention provides an ellipse processing method based on a writing trajectory, including:
responding to received handwriting control operation, and displaying at least one writing track, wherein a first track point located in a closed area of a target ellipse and a second track point located outside the closed area exist in the writing track;
and adjusting the size data of the target ellipse so that all track points of the writing track are positioned in the closed area of the adjusted target ellipse.
Further, adjusting the size data of the target ellipse so that all track points of the writing track are located in the closed area of the adjusted target ellipse includes:
moving the target ellipse to enable a first central point of the target ellipse to be overlapped with a second central point of the writing track, wherein the second central point is a central point of a minimum circumscribed rectangle of the writing track;
and if a second track point located outside the closed area of the target ellipse exists in the writing track, performing amplification operation on the target ellipse so as to enable all track points of the writing track to be located in the closed area of the amplified target ellipse.
Further, the enlarging operation on the target ellipse includes:
drawing an ellipse graph to be selected corresponding to each track point in the writing track, wherein the ellipse graph to be selected is a minimum ellipse graph containing corresponding track points, the central point of the ellipse graph to be selected is a first central point, and the length ratio of a second long axis to a short axis of the ellipse graph to be selected is equal to the length ratio of the first long axis to the short axis of the target ellipse;
determining the amplification parameters of the target ellipse according to all the ellipse graphs to be selected;
and amplifying the target ellipse according to the amplification parameter.
Further, the determining the amplification parameter of the target ellipse according to all the ellipse graphs to be selected includes:
acquiring first length data of a semi-axis to be selected in each elliptical figure to be selected, wherein the semi-axis to be selected is a short semi-axis to be selected or a long semi-axis to be selected;
calculating the length ratio of each first length data to a second length data of a target half shaft, wherein the target half shaft is a target half shaft corresponding to the to-be-selected half shaft or a target half shaft corresponding to the to-be-selected half shaft in the target ellipse;
selecting the length ratio with the largest value from all the length ratios;
and taking the length ratio with the maximum value as the magnification ratio of the target ellipse.
Further, the determining the amplification parameter of the target ellipse according to all the ellipse graphs to be selected includes:
selecting the largest elliptical graph to be selected from all the elliptical graphs to be selected;
and taking the size data of the largest ellipse graph to be selected as the target size data of the target ellipse.
Further, before displaying at least one writing track in response to the received handwriting control operation, the method further includes:
in response to the received graphical control operation, a target ellipse is displayed.
Further, after the displaying the target ellipse in response to the received graphic control operation, the method further includes:
a first center point and a first major-minor axis length ratio of the target ellipse are determined.
Further, the displaying at least one writing trace in response to the received handwriting control operation includes:
responding to the received handwriting control operation, and displaying a track to be selected;
confirming that a target ellipse is matched, wherein a closed area of the target ellipse comprises at least one track point of the to-be-selected track;
all tracks of the target ellipse are obtained, and at least one track point of any track in all tracks is located in a closed area of the target ellipse;
confirming that track points outside the closed area exist in all the tracks;
and determining all the tracks as writing tracks.
Further, the handwriting control operation includes: at least one of a write operation, a move operation, and an amplify operation.
In a second aspect, an embodiment of the present invention further provides an ellipse processing apparatus based on a writing trajectory, including:
the handwriting display module is used for responding to received handwriting control operation and displaying at least one writing track, and a first track point located in a closed area of a target ellipse and a second track point located outside the closed area exist in the writing track;
and the size adjusting module is used for adjusting the size data of the target ellipse so as to enable all track points of the writing track to be located in the closed area of the adjusted target ellipse.
In a third aspect, an embodiment of the present invention further provides an ellipse processing apparatus based on a writing trajectory, including:
one or more processors;
a memory for storing one or more programs;
the display screen is used for displaying the writing track and the target ellipse;
when executed by the one or more processors, cause the one or more processors to implement the written trajectory-based ellipse processing method of the first aspect.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for ellipse processing based on a written trajectory according to the first aspect.
According to the ellipse processing method, the device, the equipment and the storage medium based on the writing tracks, at least one writing track is displayed by responding to received handwriting control operation, wherein the writing track comprises a first track point located in a closed area of a target ellipse and a second track point located outside the closed area of the target ellipse, and then the displayed size data of the target ellipse is adjusted, so that all track points of the writing track are located in the adjusted closed area of the target ellipse. The technical problem of low integration efficiency for writing tracks and ellipses is solved. When the writing track part in the ellipse exceeds the ellipse, the ellipse is realized to follow the synchronous self-adaptive amplification of the writing track, the use experience of a user is improved, the reasonable layout and the attractiveness of the displayed content are ensured, meanwhile, the target ellipse and the central point of the writing track are overlapped, the attractiveness is ensured, and the subsequent calculation and amplification parameters are convenient. And the amplification parameters of the target ellipse are determined based on the ellipse to be selected for drawing each track point in the writing track, so that the amplification accuracy can be ensured, namely the writing track is ensured to be positioned in the closed area of the target ellipse, and the condition that the blank area in the closed area is overlarge due to the fact that the target ellipse is excessively amplified is avoided.
Drawings
Fig. 1 is a flowchart of an ellipse processing method based on a writing track according to an embodiment of the present invention;
FIG. 2 is a flowchart of an ellipse processing method based on writing trajectory according to a second embodiment of the present invention;
FIG. 3 is a first schematic display diagram according to a second embodiment of the present invention;
FIG. 4 is a second schematic display view according to a second embodiment of the present invention;
FIG. 5 is a third schematic view of a display device according to a second embodiment of the present invention;
FIG. 6 is a fourth schematic view of the display according to the second embodiment of the present invention;
FIG. 7 is a fifth schematic view of a display according to a second embodiment of the present invention;
FIG. 8 is a sixth schematic view of a display according to a second embodiment of the present invention;
FIG. 9 is a seventh display diagram according to the second embodiment of the present invention;
FIG. 10 is a schematic view of an eighth display provided in the second embodiment of the present invention;
fig. 11 is a schematic structural diagram of an ellipse processing apparatus based on a writing trajectory according to a third embodiment of the present invention;
fig. 12 is a schematic structural diagram of an ellipse processing apparatus based on a writing trajectory according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an ellipse processing method based on a writing trajectory according to an embodiment of the present invention. The writing trajectory based ellipse processing method provided in the embodiment may be executed by a writing trajectory based ellipse processing device, the writing trajectory based ellipse processing device may be implemented by software and/or hardware, and the writing trajectory based ellipse processing device may be formed by two or more physical entities or may be formed by one physical entity. For example, the ellipse processing device based on the writing trajectory may be a computer, a mobile phone, a tablet, an interactive smart tablet, or the like.
For the convenience of understanding, the interactive smart tablet is taken as an ellipse processing device based on the writing track in the embodiment for exemplary description. The interactive intelligent panel can be integrated equipment for controlling contents displayed on the display panel and realizing man-machine interaction operation through a touch technology, and integrates one or more functions of a projector, an electronic whiteboard, a curtain, a sound box, a television, a video conference terminal and the like.
Generally, an interactive smart tablet includes at least one display screen. For example, the interactive smart tablet is configured with a display screen having a touch function, and the display screen may be a capacitive screen, a resistive screen, or an electromagnetic screen. Furthermore, the user can realize touch operation by touching the display screen with a finger or a stylus, and correspondingly, the interactive intelligent tablet detects the touch position, determines a response scheme according to the display content corresponding to the touch position, and then responds to realize the touch function. For example, the corresponding display content is determined to be a control of a certain function according to the touch position, and at this time, the response scheme is to execute the function. For another example, the corresponding display content is determined as a writing area according to the touch position, and at this time, the response scheme is to display a writing track.
Typically, the interactive smart tablet is installed with at least one type of operating system, wherein the operating system includes, but is not limited to, an android system, a Linux system, and a Windows system. Further, the interactive smart tablet may be installed with at least one application program with writing function, such as an electronic whiteboard application program with writing function installed in the interactive smart tablet. The application program may be an application program carried by an operating system, and may also be an application program downloaded from a third-party device or a server. Optionally, the application program has other editing functions besides the writing function, such as inserting tables, inserting pictures, inserting multimedia, inserting graphics, drawing tables, drawing graphics, and the like. And the drawn table or graph is a standard element drawn by the computer. Computer drawn standard elements may be understood as print standard elements drawn by an interactive smart tablet, which are distinguished from elements written by a user. Typically, an application program is displayed with an operation area in which a user can write or edit. The area position and the area size of the operation area can be set according to actual requirements. It is understood that the operating field can also be understood as a writing field in the writing function. In the embodiment, a description will be given by taking, as an example, a method of performing ellipse processing based on a writing trajectory in the operation area.
Specifically, referring to fig. 1, the ellipse processing method based on the writing trajectory provided in this embodiment includes:
and step 110, responding to the received handwriting control operation, and displaying at least one writing track, wherein a first track point located in a closed area of the target ellipse and a second track point located outside the closed area exist in the writing track.
Illustratively, the handwriting control operation is a control operation for a writing track issued by a user. The writing track comprises a plurality of continuous track points, and each track point corresponds to one coordinate point. The coordinate points are points within the operating area coordinate system. Specifically, a coordinate system is created for the operation area in advance, wherein the specific location embodiment of the origin of the coordinate system is not limited. Further, in order to ensure that the user has enough operation area, the operation area is not fixed in size in the embodiment, that is, the operation area may be infinite. For example, the operating region may expand indefinitely as the user writes. The specific expansion method and expansion direction are not limited to the examples. It is understood that, due to the limited size of the display screen, only a part of the operation region may be displayed in the display screen, and the operation region in the display screen is replaced when the set replacement operation issued by the user is detected. The replacing of the manipulation region in the display screen may include moving the manipulation region, zooming the manipulation region, and the like. For example, when the palm of the user is detected to touch the display screen and the moving operation is performed, the moving path is determined according to the track of the moving operation, and then the operation area displayed in the display screen is changed according to the moving path. Further, a coordinate range of an operation area displayed in the display screen is determined, and then the corresponding relation between the coordinate points and the pixel points is determined according to the coordinate range. Each pixel point in the display screen corresponds to one pixel coordinate, and the corresponding relation between the coordinate point and the pixel point can be obtained through the coordinate range of the operation area and the pixel coordinate range of the display screen. Typically, when the touch operation is obtained, a pixel point corresponding to the touch operation is determined, a coordinate point corresponding to the pixel point is determined according to a corresponding relationship between the coordinate point and the pixel point, and then a coordinate value of the coordinate point is used as a coordinate position of the corresponding track point. And simultaneously, marking the pixel coordinates of the display track points as the pixel positions of the track points. When the operation area in the display screen is unchanged, if the pixel position of the track point changes, the coordinate position of the track point changes synchronously. In the embodiment, a description is made with an operation region in a display screen not being changed as an example.
In an embodiment, the setting writing control operation includes at least one of a writing operation, a moving operation, and an enlarging operation. The writing operation refers to an operation of writing a writing track, and after the writing operation is completed, at least one newly added writing track is displayed in the display screen. The moving operation refers to an operation of moving a pixel position of the writing track, and in the embodiment, the moving operation is used for moving at least one track point of the writing track into a closed area of the target ellipse. The enlarging operation is an operation of enlarging the size of the writing track, that is, enlarging the coordinate range of the writing track, wherein the coordinate range is a set of coordinate positions of all track points in the writing track. Further, the embodiment of the touch mode corresponding to the handwriting control operation is not limited. For example, after the user selects the writing function, if the interactive smart tablet detects a moving touch operation in the operation area, it is determined that a writing operation is received. For another example, after it is detected that the coordinate range of a certain writing track is selected and moved, it is determined that a moving operation is received, and the writing track is moved according to the path of the moving operation.
In an embodiment, the interactive smart tablet may be set to draw an ellipse. The specific drawing means embodiment of the ellipse is not limited. Further, the target ellipse is an ellipse that is currently displayed, and it is also understood that the target ellipse is a handwriting box set by the user for the writing track, and is used for integrating the writing track, that is, the writing track is placed inside the target ellipse as a whole. The inner part of the target ellipse refers to the inner part of a closed area surrounded by the target ellipse, and correspondingly, the outer part of the target ellipse refers to other areas except the closed area. It is understood that the target ellipse is only an alternative, and in embodiments, the figure for integrating the writing trajectory may also be a circle and a convex polygon such as a matrix, a square, a diamond, a triangle, etc.
Typically, in the embodiment, after the handwriting control operation is set to be responded, the track related to the handwriting control operation is displayed, and when at least one track point in the track is located in a closed area of a displayed ellipse, the corresponding ellipse is marked as the target ellipse. Furthermore, all pixel points of the target ellipse closed region are traversed to determine whether other tracks exist in the closed region. And if other tracks exist, synchronously acquiring other tracks. Then, whether track points located in the closed area of the target ellipse and track points located outside the closed area exist in the track related to the handwriting control operation and other tracks is determined. If the handwriting control operation exists, determining the track related to the handwriting control operation and other tracks as writing tracks. The trace points are located in the closed area, namely the pixel positions of the trace points are located in the pixel area of the target ellipse, and the pixel area is a pixel coordinate set corresponding to the closed area defined by the target ellipse. Further, track points in a closed area of the target ellipse in the writing track are set to be recorded as first track points, and track points outside the closed area are set to be recorded as second track points. I.e. the written trajectory is only partially displayed within the target ellipse. Typically, the second trace point located outside the closed area is a trace point on the trace associated with the handwriting control operation. Since the writing track is displayed on the display screen, in the embodiment, the pixel position is used as the relevant parameter for position determination, position expression and calculation, and it can be understood that, in practical application, the coordinate position may also be used as the relevant parameter, for example, whether the track point is in the closed area is determined by the coordinate position.
For example, when the handwriting control operation is a write operation, a written trajectory is displayed according to the write operation. And then, confirming whether at least one track point exists in the written track and is positioned in a closed area of a certain displayed ellipse, and if so, determining the corresponding displayed ellipse as a target ellipse. Meanwhile, traversing each pixel point in the closed region of the target ellipse, and if it is confirmed that other tracks exist in the target ellipse besides the written track, acquiring other tracks. And then, confirming whether at least one first track point exists in the written track and other tracks and whether at least one second track point exists in the closed area of the target ellipse and at the same time exists outside the closed area of the same target ellipse. If so, the written trajectory and other trajectories are determined as written trajectories. It can be understood that if the track points in the written track are located in the closed area of an ellipse, no operation is required on the ellipse.
For another example, when the handwriting control operation is a moving operation, the trajectory to be moved and the moving path are determined according to the moving operation, and the trajectory is moved according to the moving path. After the track is moved, whether at least one track point exists in the moved track and is located in a closed area of a displayed ellipse or not is confirmed, and if the at least one track point exists, the corresponding displayed ellipse is determined as a target ellipse. Meanwhile, traversing each pixel point in the closed region of the target ellipse, and if it is determined that other tracks exist in the closed region of the target ellipse besides the moving track, acquiring other tracks. And then, confirming whether at least one first track point exists in the moved track and other tracks and is positioned in the closed area of the target ellipse while at least one second track point exists in the closed area of the same target ellipse. If the writing track exists, the moving track and other tracks are determined as writing tracks. It can be understood that if all track points in the moved track are located in the closed area of an ellipse, no operation is required on the ellipse.
For example, when the handwriting control operation is an enlarging operation, the track to be enlarged and the enlarging ratio are determined according to the enlarging operation, and the enlarged track is displayed according to the enlarging ratio. And then, confirming whether at least one track point exists in the enlarged track and is positioned in a closed area of a displayed ellipse, and if so, determining the corresponding displayed ellipse as the target ellipse. Meanwhile, traversing each pixel point in the closed region of the target ellipse, and if it is determined that other tracks exist in the closed region of the target ellipse besides the amplified track, acquiring other tracks. And then, confirming whether at least one first track point exists in the enlarged track and other tracks and whether at least one second track point exists in the closed area of the target ellipse and at the same time exists outside the closed area of the same target ellipse. If so, determining the enlarged track as the writing track. It will be appreciated that if all of the trace points of the enlarged trace are within the closed area of an ellipse, then no action is required on the ellipse.
It should be noted that, during the writing process, in order to facilitate the processor to operate or calculate the trajectory, the trajectory is usually placed in the corresponding element box for display. In general, an element box may also be considered as the smallest bounding rectangle of a trajectory, with the boundaries of the element box hidden from view. Further, due to one writing process, multiple tracks may be generated, and if each track corresponds to one element box, the load of the processor may be increased. Thus, the trajectories generated per writing can be set to share one element box. After the input of one track is finished, if the writing operation is received again within the set time interval and the set pixel distance, the newly written track and the original track are regarded as the tracks obtained in the same writing process, and the newly written track and the original track are placed in the same element box. Subsequently, if a track in the element box is deleted or moved to a remote location (by comparison to a predetermined distance threshold), it is determined that the track in the element box is reduced, and the size of the element box is updated based on the remaining tracks. If a new written track or a track moved into the element box is added to the element box, the size of the element box can be updated synchronously. Or, the tracks meeting the conditions can be placed in the same element box according to the actual requirements. For example, a writing trace corresponding to a certain target ellipse is placed in the same element box. At this time, in determining the target ellipse and the writing trajectory, it is only necessary to compare the pixel position of the element box and the pixel position of the target ellipse.
And step 120, adjusting the size data of the target ellipse so that all track points of the writing track are positioned in the closed area of the adjusted target ellipse.
Illustratively, the size data of the target ellipse refers to the pixel locations of the edges of the target ellipse in the display screen. The pixel position of the center point of the target ellipse, the pixel length of the major and minor axes, the pixel length of the minor and minor axes, and the major-minor axis length ratio can be determined from the size data. The major-minor axis length ratio refers to a pixel length ratio of a major semi-axis to a minor semi-axis. It will be appreciated that the pixel locations may be replaced with coordinate locations when determining the above parameters.
Specifically, the size data of the target ellipse is adjusted according to the pixel position of the writing trajectory. Wherein adjusting the size data of the target ellipse is achieved by moving the target ellipse and/or enlarging the target ellipse. Moving the target ellipse means that the pixel length of the major semi-axis and the pixel length of the minor semi-axis of the target ellipse are not changed, and only the pixel position of the central point of the target ellipse is changed to realize the adjustment of the size data of the target ellipse. Enlarging the target ellipse means that the pixel position of the center point of the target ellipse is not changed, and only the pixel lengths of the major semi-axis and/or the minor semi-axis of the target ellipse are changed. In the embodiment, when the target ellipse is set to be enlarged, the length ratio of the major axis to the minor axis of the target ellipse is not changed, that is, the enlarged target ellipse and the target ellipse before enlargement are similar figures.
Optionally, when the size data of the target ellipse is adjusted, first, all trace points of the writing trace are obtained, then, a minimum ellipse graph containing corresponding trace points is drawn based on each trace point, and a central point of each minimum ellipse graph coincides with a central point of the target ellipse. And selecting the minimum elliptical figure with the largest area from the drawn minimum elliptical figures, and taking the size data of the minimum elliptical figure as the size data of the adjusted target ellipse. Or, in each drawn minimum ellipse graphic, calculating the ratio of the pixel length of the semi-minor axis in each minimum ellipse graphic to the pixel length of the semi-minor axis of the target ellipse, selecting the minimum ellipse graphic with the largest ratio, and taking the size data of the minimum ellipse graphic as the size data of the adjusted target ellipse, or taking the largest ratio as the magnification ratio of the target ellipse.
Optionally, when the size data of the target ellipse is adjusted, first, the minimum circumscribed rectangle of the writing trajectory is confirmed, then, the minimum ellipse including the minimum circumscribed rectangle is drawn, and the size data of the minimum ellipse is used as the size data of the adjusted target ellipse. Or, confirming the minimum circumscribed rectangle of the writing track, then acquiring the central point of the minimum circumscribed rectangle, moving the target ellipse, and coinciding the central point of the target ellipse with the central point of the minimum circumscribed rectangle. And then traversing all track points of the writing track, determining whether a second track point positioned outside the current target ellipse closed area still exists, if so, acquiring all track points of the writing track, then drawing a corresponding minimum ellipse graph based on all track points, and enabling the central point of each minimum ellipse graph to coincide with the central point of the target ellipse. And selecting the minimum elliptical figure with the largest area from the drawn minimum elliptical figures, and taking the size data of the minimum elliptical figure as the size data of the adjusted target ellipse. Or, in each drawn minimum ellipse graphic, calculating the ratio of the pixel length of the semi-minor axis in each minimum ellipse graphic to the pixel length of the semi-minor axis of the target ellipse, selecting the minimum ellipse graphic with the largest ratio, and taking the size data of the minimum ellipse graphic as the size data of the adjusted target ellipse, or taking the largest ratio as the magnification ratio of the target ellipse.
Optionally, after receiving the handwriting control operation each time, whether the size data of the target ellipse needs to be adjusted or not can be determined, and the size data of the target ellipse is adjusted when needed, so that the target ellipse always contains all track points of the writing track. The technical means for confirming whether the size data of the target ellipse needs to be adjusted or not can be to determine whether at least one track point exists in the relevant track of the handwriting control operation and is located outside the closed area of the target ellipse.
And after the size data of the displayed target ellipse is adjusted, the technical means that all track points of the writing track are located in the closed area of the adjusted target ellipse is realized. The technical problem of low integration efficiency for writing tracks and ellipses is solved. When the writing track part in the ellipse exceeds the ellipse, the ellipse is synchronously and adaptively amplified along with the writing track, the use experience of a user is improved, and the reasonable layout and the attractiveness of the displayed content are ensured.
Example two
Fig. 2 is a flowchart of an ellipse processing method based on a writing trajectory according to a second embodiment of the present invention. The present embodiment is embodied on the basis of the above-described embodiments. Specifically, referring to fig. 2, the ellipse processing method based on the writing trajectory includes:
step 201, in response to the received graphical control operation, displaying the target ellipse.
In the embodiment, only displaying an ellipse in the interactive smart tablet is taken as an example. The graphic control operation refers to an operation of controlling an ellipse. Specifically, the method may be at least one of drawing an ellipse, adjusting the length of a semi-major axis pixel of the ellipse, adjusting the length of a semi-minor axis pixel of the ellipse, and moving the ellipse. It can be understood that the graphic control operation may be directed to any ellipse, and in the embodiment, for convenience of understanding, the graphic control operation is set to be directed to a target ellipse, that is, at least one track point exists in a related track generated by a subsequent handwriting control operation, in a closed area of the target ellipse.
Further, the embodiment of the specific implementation manner of the graphic control operation is not limited. For example, after it is detected that the ellipse template is called by the user, it is determined that a drag and drop operation based on the ellipse template is received in the operation area, and an ellipse is displayed in the operation area according to the drag and drop operation. For another example, if it is detected that at least two points on the edge of the ellipse receive the touch operation, the scaling size of the ellipse is determined according to the touch movement trajectory, and the ellipse is scaled. And if any point on the edge of the ellipse is detected to receive the touch operation, determining the moving position of the ellipse according to the touch moving track, and moving the ellipse according to the moving position. Generally, after responding to the graphic control operation, a target ellipse obtained according to the graphic control operation is displayed in the display screen.
Step 202, a first central point and a first major-minor axis length ratio of the target ellipse are determined.
Illustratively, when the target ellipse is displayed by the received graphic control operation, the related data of the target ellipse is synchronously determined and recorded. The related data may be at least one of size data, a first center point, a first major-minor axis length ratio, a pixel length of a major semi-axis, a pixel length of a minor semi-axis, and the like. In the embodiment, the correlation data is taken as a first central point and a first length-to-short axis ratio is exemplarily described.
Specifically, the center point of the target ellipse is denoted as the first center point. The embodiment of the determining method of the first center point is not limited. For example, the major axis and the minor axis of the target ellipse are plotted according to the pixel position where the edge of the target ellipse is located, and then the intersection point of the major axis and the minor axis is recorded as the first center point of the target ellipse, and the pixel position of the first center point is recorded.
Further, the major-minor axis length ratio of the target ellipse is recorded as a first major-minor axis length ratio. The embodiment of the first aspect ratio determination method is not limited. For example, the major axis and the minor axis of the target ellipse are plotted according to the pixel position where the edge of the target ellipse is located, and then the pixel length of the major axis and the pixel length of the minor axis are determined, and the ratio of the two pixel lengths is taken as the first major-minor axis length ratio.
The advantage of recording the first center point and the first aspect ratio is that it facilitates subsequent calculations of dimensional data when adjusting the target ellipse.
And step 203, responding to the received handwriting control operation, and displaying the track to be selected.
In the embodiment, the handwriting control operation is exemplified by a write operation, a move operation, or an enlarge operation. When the handwriting control operation is a moving operation, a new track exists in the target ellipse after a response is made according to the moving operation.
And further, after responding to the handwriting control operation, displaying a track related to the handwriting control operation and recording the track as a to-be-selected track. For example, during write operation, at least one newly written track is recorded as a to-be-selected track; during the amplification operation, recording at least one amplified track as a to-be-selected track; and when the user moves, recording the moved track as a to-be-selected track.
And 204, judging whether the target ellipse is matched, wherein the closed area of the target ellipse comprises at least one track point of the track to be selected. If the target ellipse is confirmed to be matched, step 205 is executed, otherwise, the operation is ended.
Specifically, after the trajectory to be selected is displayed, all the displayed ellipses are traversed, and the pixel area where each ellipse is located is confirmed. And then, determining whether an ellipse containing at least one track point of the to-be-selected track exists or not according to the pixel area of the ellipse and the pixel position of each track point in the to-be-selected track, and if so, determining the ellipse as a target ellipse. If the target ellipse does not exist, the target ellipse does not exist in the trajectory to be selected, and the operation is ended. In general, the candidate trajectory corresponds to only one target ellipse. It should be noted that all the ellipses displayed may refer to all the ellipses in the operation area or all the ellipses in the display screen. In the embodiment, the description will be made taking all ellipses in the display screen as an example. Of course, if all the displayed ellipses refer to all the ellipses in the operation area, the coordinate area of each ellipse needs to be determined, and then, whether an ellipse containing at least one track point of the to-be-selected track exists is determined according to the coordinate area of the ellipse and the coordinate position of each track point in the to-be-selected track.
It is understood that the embodiment of the manner in which the interactive smart tablet distinguishes between ellipses and trajectories is not limited. For example, the track and the ellipse have different identifications, and the interactive smart tablet determines that the element is the track or the ellipse through the identification.
And step 205, acquiring all tracks of the target ellipse, wherein at least one track point of any one track of all the tracks is located in a closed area of the target ellipse.
Specifically, after the target ellipse is determined, all pixel points in the target ellipse are traversed to screen out the pixel points displaying the track points. Generally, the set target ellipse includes a pixel point for displaying a track point and a pixel point for displaying a blank or a background, which can be distinguished by a pixel value of each pixel point. And then determining the track of each track point in the target ellipse. Each track is composed of a plurality of continuous track points, so that the track where each track point is located can be confirmed by only finding all the continuous track points corresponding to each track point, and then all the tracks of the target ellipse are obtained.
And step 206, judging whether track points outside the closed area exist in all the tracks. And if the track points outside the closed area exist in all the tracks, executing the step 207, otherwise, ending the operation.
Specifically, after all the tracks of the target ellipse are determined, each track point of all the tracks is traversed, and the pixel position of each track point is compared with the pixel area of the target ellipse to determine whether the track point located outside the closed area of the target ellipse exists. If track points located outside the closed area of the target ellipse are determined to exist in all the tracks, it is indicated that the closed area of the target ellipse does not contain all the tracks, and the size data of the target ellipse needs to be adjusted so that the target ellipse contains all the tracks. At this point, step 207 is performed. If the track points outside the closed area of the target ellipse are not found in all the tracks, the target ellipse already contains all the tracks, and at this time, the size data of the target ellipse does not need to be adjusted, so the operation can be ended.
And step 207, determining all the tracks as writing tracks.
Further, all the tracks are determined as writing tracks, track points in the writing tracks, which are located in the target ellipse closed area, are recorded as first track points, and track points in the writing tracks, which are located outside the target ellipse closed area, are recorded as second track points.
And 208, moving the target ellipse to enable the first central point of the target ellipse to coincide with the second central point of the writing track, wherein the second central point is the central point of the minimum circumscribed rectangle of the writing track.
Specifically, the minimum bounding rectangle of the writing track is determined. The minimum circumscribed rectangle is a rectangle which contains all track points of the writing track and has the minimum area. Further, the embodiment of the determination method of the minimum bounding rectangle is not limited. For example, all track points of the writing track are acquired, one outermost track point is selected from the upper direction, the lower direction, the left direction and the right direction, and then the minimum circumscribed rectangle is determined according to the four outermost track points. Further, after the minimum circumscribed rectangle is determined, the center point of the minimum circumscribed rectangle is determined and recorded as a second center point. The embodiment of the determining method of the second center point is not limited. For example, for the minimum bounding rectangle, the midpoints of the two long sides and the midpoints of the two short sides are connected, and the intersection of the two connecting lines is taken as the second center point.
Further, before this step, it is determined whether a second center point of the writing trajectory coincides with the first center point of the target ellipse. If not, the step is executed, and if so, the step 209 is executed. Generally, in response to the handwriting control operation, the second center point of the writing trajectory and the first center point of the target ellipse do not coincide. At this time, the target ellipse is moved so that the first center point coincides with the second center point, that is, the target ellipse coincides with the center of the minimum circumscribed rectangle. For example, fig. 3 is a first display diagram provided in the second embodiment of the present invention. Referring to fig. 3, the second center point 311 of the minimum bounding rectangle 31 of the writing trajectory and the first center point 321 of the target ellipse 32 are at two positions, respectively. Further, the interactive smart tablet moves the target ellipse 32 so that the first center point 321 and the second center point 311 coincide, at this time, fig. 3 is changed to fig. 4, and fig. 4 is a second display diagram provided by the second embodiment of the present invention. The relative position of the writing trajectory and the target ellipse in fig. 4 is more reasonable than in fig. 3. It should be noted that, in practical applications, the minimum bounding rectangle and the central point of each graph are only background operations of the interactive smart tablet, and are not displayed in the display screen, and the minimum bounding rectangle, the first central point, and the second central point are only displayed in fig. 3 to facilitate understanding.
It will be appreciated that, in addition to moving the target ellipse, the writing trajectory may also be moved so that the first center point and the second center point coincide. Since the writing trajectory is obtained according to the handwriting control operation given by the user, the writing trajectory is generally displayed at a position desired by the user, and therefore, compared with moving the writing trajectory, it is more reasonable to move the target ellipse.
And 209, judging whether a second track point positioned outside the target ellipse closed area exists in the writing track. And if a second track point located outside the target ellipse closed area exists in the writing track, executing the step 210, otherwise, ending the operation.
Specifically, after the target ellipse is moved, the writing track may be completely contained in the closed region of the target ellipse, or a second track point located outside the target ellipse may also exist in the writing track. Therefore, after the target ellipse is moved, all trace points of the writing trace need to be traversed again, the pixel position of each trace point is obtained, and the pixel position is compared with the pixel area of the target ellipse. If the pixel position of at least one track point is outside the pixel area, it indicates that a second track point outside the closed area of the target ellipse exists in the writing track, and at this time, the target ellipse needs to be enlarged, that is, step 210 is executed. If the pixel position of at least one track point is not outside the pixel area, it is indicated that each track point in the writing track is the first track point located in the closed area of the target ellipse. At this time, the operation is ended without performing the enlarging operation on the target ellipse.
And step 210, performing amplification operation on the target ellipse so that all track points of the writing track are positioned in the closed area of the amplified target ellipse.
Specifically, the target ellipse is enlarged. In the embodiment, the description will be given taking an example of enlarging the target ellipse on an equal scale. Optionally, in the writing track, a track point farthest from the first central point of the target ellipse is selected, a minimum ellipse graph containing the track point is drawn, the central point of the minimum ellipse graph is the first central point, and then the target ellipse is enlarged to be overlapped with the minimum ellipse graph. Optionally, based on the writing track, drawing a minimum ellipse graph of each track point, and determining the magnification parameter of the target ellipse according to the minimum ellipse graph.
Specifically, taking the minimum ellipse drawing of each trace point as an example, the step specifically includes steps 2101 to 2103:
step 2101, drawing an ellipse to be selected corresponding to each trajectory point in the writing trajectory, wherein the ellipse to be selected is a minimum ellipse containing the corresponding trajectory point, the central point of the ellipse to be selected is a first central point, and the length ratio of a second major axis to a second minor axis of the ellipse to be selected is equal to the length ratio of the first major axis to the first minor axis of the target ellipse.
Specifically, each track point of the writing track is selected in sequence, and the ellipse graph to be selected of each track point is drawn. Wherein, each track point corresponds to a candidate ellipse figure. The ellipse graph to be selected takes the first central point as a central point and comprises a minimum ellipse graph corresponding to the track point. Further, the ellipse to be selected and the target ellipse are similar, that is, the length ratio of the long axis to the short axis of the ellipse to be selected is recorded as a second length ratio of the long axis to the short axis, and the second length ratio of the long axis to the short axis is equal to the first length ratio of the long axis to the short axis.
It is understood that the first center point and the second center point may be replaced with each other in this step.
Generally speaking, after determining the ellipse graph to be selected corresponding to each trace point, a plurality of concentric ellipses relative to the first central point can be obtained. Taking fig. 4 as an example, after determining the elliptical graph to be selected corresponding to each trajectory point, the third display diagram of fig. 5 may be obtained. Fig. 5 shows only an exemplary elliptical graph to be selected of 3 track points, and in practical application, each track point has a corresponding elliptical graph to be selected. It is understood that fig. 5 is a calculation process of the interactive smart tablet, and is not displayed in the display screen during the operation of the user.
And 2102, determining the amplification parameters of the target ellipse according to all the ellipse graphs to be selected.
Specifically, the ellipse graph to be selected can be regarded as a pixel area to be selected when the target ellipse includes the corresponding track point. Accordingly, the amplification parameters of the target ellipse are determined according to all the ellipse graphs to be selected. The enlargement parameter may be an enlargement ratio for the target ellipse, or may be size data of the enlarged target ellipse, that is, target size data. When the types of the amplification parameters are different, the corresponding determination schemes are different. Accordingly, embodiments include at least one of the following:
in the first scheme, the scheme is directed at a case where the amplification parameter is an amplification scale, and at this time, the step specifically includes: step 21021-step 21024:
21021, obtaining first length data of a half shaft to be selected in each ellipse figure to be selected, wherein the half shaft to be selected is a short half shaft to be selected or a long half shaft to be selected.
Specifically, the middle and the middle half axes of the ellipse to be selected are recorded as the middle and the middle half axes of the ellipse to be selected are recorded as the middle and the middle half axes of the ellipse to be selected. The semi-axis to be selected is a semi-axis to be selected or a semi-axis to be selected in the corresponding elliptical figure to be selected. In the embodiment, the description is given by taking the semi-axis to be selected as the semi-axis to be selected in the ellipse graph to be selected.
Illustratively, the pixel length of the to-be-selected semi-minor axis in each to-be-selected elliptical graph is obtained and recorded as first length data. Specifically, according to the pixel position of the edge of the ellipse graph to be selected, the semi-minor axis to be selected is determined, and then the length of the pixel point corresponding to the semi-minor axis to be selected is determined and recorded as first length data.
Step 21022, calculating a length ratio of each first length data to a second length data of the target half shaft, where the target half shaft is a target half shaft corresponding to the to-be-selected half shaft or a target half shaft corresponding to the to-be-selected half shaft in the target ellipse.
Specifically, the middle and middle semi-axes of the target ellipse are denoted as target long semi-axes, and the middle and short semi-axes of the target ellipse are denoted as target short semi-axes. Further, the target semi-axis refers to a semi-axis of the target ellipse used for calculating the length ratio with the semi-axis to be selected. And when the semi-axis to be selected is the short semi-axis to be selected, the target semi-axis is the target short semi-axis. And when the semi-axis to be selected is the long semi-axis to be selected, the target semi-axis is the target long semi-axis.
Further, since the semi-axis to be selected is taken as an example, the target semi-axis in this step is the target semi-axis. Specifically, the pixel length of the target minor axis may be obtained according to the size data of the target ellipse, and the pixel length may be recorded as the second length data. And respectively calculating the length ratio of each first length data and each second length data. In general, the length ratio may represent a scaling relationship of the corresponding half-axes between the candidate ellipse graphic and the target ellipse.
Step 21023, select the length ratio with the largest value from all the length ratios.
Illustratively, the larger the length ratio is, the longer the semi-axis to be selected of the elliptic figure to be selected is, the larger the area of the elliptic figure to be selected is, and the larger the number of track points of the writing track contained in the closed area of the elliptic figure to be selected is. Therefore, in the embodiment, the length ratio with the largest value is selected. At this time, the area of the ellipse to be selected is the largest, and the number of track points of the writing track contained in the closed area is the largest. Generally, the ellipse to be selected corresponding to the length ratio with the largest value contains the second trace point farthest from the target ellipse.
Step 21024, the length ratio with the largest value is used as the enlargement ratio of the target ellipse.
Specifically, the ellipse to be selected corresponding to the length ratio with the largest numerical value includes the second trace point farthest from the target ellipse, and at this time, the closed area of the ellipse to be selected may be considered to include all trace points of the writing trace. Therefore, the target ellipse is set to be amplified according to the amplification ratio, and the amplified target ellipse is superposed with the ellipse graph to be selected.
For example, the maximum length ratio is 2, and the magnification ratio of the target ellipse is 2. And when the target ellipse is amplified according to the amplification ratio, the length of the half axis pixel of the major axis and the length of the half axis pixel of the minor axis of the target ellipse are amplified by one time.
And a second scheme, wherein the second scheme is directed to a case that the amplification parameter is size data after the target ellipse is amplified, and at this time, the method specifically comprises the following steps: step 21025-step 21026:
step 21025, selecting the largest elliptical graph to be selected from all elliptical graphs to be selected.
Specifically, the largest elliptical figure to be selected may be the elliptical figure to be selected which is farthest from the first central point in all the elliptical figures to be selected, that is, the elliptical figure to be selected which is the outermost elliptical figure to be selected in the concentric elliptical figures to be selected. In general, the largest ellipse to be selected has the largest area, and the number of trace points of the writing track contained in the closed area is the largest, that is, all writing tracks can be considered to be contained. Further, the embodiment of the selection mode of the largest ellipse to be selected is not limited. For example, the most peripheral ellipse to be selected is selected, the ellipse to be selected with the largest area is selected, the ellipse to be selected with the longest pixel length of the semi-major axis to be selected is selected, or the ellipse to be selected with the longest pixel length of the semi-minor axis to be selected is selected.
Step 21026, using the size data of the largest ellipse to be selected as the target size data of the target ellipse.
Specifically, the target size data is size data obtained by enlarging a target ellipse. Since the target ellipse needs to be enlarged to coincide with the largest ellipse to be selected. Therefore, the size data of the largest candidate elliptical figure is taken as the target size data. After the target size data is determined, the size data of the target ellipse can be directly adjusted to the target size data.
It can be understood that, in practical application, the pixel length of the candidate semi-major axis and the pixel length of the candidate semi-minor axis of the largest candidate elliptical figure can also be used as the target size data. At this time, when the target ellipse is enlarged, the target major semi-axis and the target minor semi-axis of the target ellipse can be directly adjusted to the corresponding pixel length.
And 2103, amplifying the target ellipse according to the amplification parameters.
Specifically, when the target ellipse is amplified according to the amplification parameter, the adjusted size data of the target ellipse may be determined according to the amplification parameter, and the target ellipse may be further amplified. Or determining the adjustment data of each pixel point on the edge of the target ellipse according to the amplification parameters (for example, the A pixel point on the edge moves upwards by B pixel points), and amplifying the target ellipse according to the adjustment data.
In this embodiment, the pixel positions of the track point and the target ellipse are used as calculation reference data, and in practical application, the coordinate positions of the track point and the target ellipse may also be used as calculation reference data.
The technical solution provided by the present embodiment is exemplarily described below.
Fig. 6 is a fourth schematic display diagram provided in the second embodiment of the present invention. Referring to FIG. 6, upon receiving a graphical control operation, the ellipse 32 is displayed while recording a first center point of the ellipse and a first major-minor axis length ratio. At this time, the ellipse 32 is set to include at least one track therein. Further, after receiving the writing operation, referring to fig. 3, the corresponding track is displayed in the display screen as the candidate track 33, and in fig. 3, the candidate track 33 is "good. Then, the ellipse 32 is determined as a target ellipse based on the trajectory to be selected, and the writing trajectory is obtained according to the target ellipse, that is, the writing trajectory is all the trajectories within the minimum circumscribed rectangle 31. Thereafter, the first center point 321 of the target ellipse 32 is moved so that the first center point 321 coincides with the second center point 311. At this time, fig. 4 was obtained.
Further, the trace points of the written trace in fig. 4 are traversed to confirm that the written trace includes a second trace point located outside the target ellipse 32. And then, obtaining a corresponding ellipse graph to be selected based on each track point of the writing track. Further, first length data of a to-be-selected semi-minor axis of each to-be-selected ellipse figure and second length data of a target semi-minor axis of the target ellipse are calculated, and a length ratio of each first length data to each second length data is obtained. Then, the length ratio with the largest value is selected as the enlargement ratio of the target ellipse. Taking fig. 5 as an example, fig. 5 exemplarily shows three candidate elliptical patterns. The data of the length ratio of the to-be-selected elliptical figure 34 corresponding to the track point 312 is the largest, that is, the length ratio of the to-be-selected elliptical figure 34 is used as the magnification ratio. Further, the target ellipse 32 is enlarged. At this time, the display diagram of fig. 7 is obtained. Referring to FIG. 7, the closed area of the target ellipse 32, when enlarged, completely encompasses the writing trajectory. It can be understood that, in practical application, each central point, the ellipse to be selected, and the like are not displayed on the display screen. In practical application, through the above calculation, the transition from fig. 3 to fig. 7 can be made directly in the display screen, and the processes of fig. 4 and fig. 5 are background calculation processes.
Example two, fig. 8 is a sixth display schematic diagram provided in the implementation two of the present invention. Referring to FIG. 8, upon receiving a graphical control operation, an ellipse 35 is displayed while recording a first center point of the ellipse and a first major-minor axis length ratio. Meanwhile, the ellipse 35 contains at least one track inside. Further, after receiving the writing operation, referring to fig. 9, a corresponding track is displayed in the display screen as the candidate track 36, and in fig. 9, the candidate track 36 is "good". Then, the ellipse 35 is determined as a target ellipse based on the trajectory to be selected, and a writing trajectory is obtained according to the target ellipse, that is, the writing trajectory is all trajectories within the minimum circumscribed rectangle 37. Thereafter, the first center point 351 of the target ellipse 35 is moved so that the first center point 351 coincides with the second center point 371. At this time, fig. 10 was obtained. Further, traversing each trace point of the writing trace in fig. 10, and confirming that the writing trace does not include a second trace point located outside the closed region of the target ellipse 35. At this time, the operation is ended. It can be understood that, in practical application, each central point, the minimum circumscribed rectangle, and the like are not displayed in the display screen.
And then, responding to the handwriting control operation to display the to-be-selected track, matching the target ellipse according to the to-be-selected track, and taking all tracks of the target ellipse as writing tracks. And then, when the writing track is confirmed to contain a second track point which is positioned outside the closed area of the target ellipse, the target ellipse is moved so that the first central point of the target ellipse is superposed with the second central point of the minimum circumscribed rectangle of the writing track. Then, when confirming that the writing track still contains a second track point outside the closed area of the target ellipse, generating a corresponding to-be-selected ellipse graph based on each track point in the writing track, wherein the central point of the to-be-selected ellipse graph is a first central point, and the length ratio of a second major axis to a second minor axis of the to-be-selected ellipse graph is equal to the length of the first major axis to the second major axis of the target ellipse, then determining an amplification parameter according to the to-be-selected ellipse graph, and adjusting the size data of the target ellipse according to the amplification parameter, so that the target ellipse is adaptively amplified when the track in the target ellipse exceeds the target ellipse, and the complete track is contained, namely the integration of the target ellipse and the writing track is realized, the target ellipse or the writing track is not required to be manually modified by a user, the integration efficiency and the user experience are improved, the attractiveness of the display content is increased, and the central points of the target ellipse and the writing, not only the aesthetic property is ensured, but also the subsequent calculation of the amplification parameters is facilitated. And the amplification parameters of the target ellipse are determined based on the ellipse to be selected for drawing each track point in the writing track, so that the amplification accuracy can be ensured, namely the writing track is ensured to be positioned in the closed area of the target ellipse, and the condition that the blank area in the closed area is overlarge due to the fact that the target ellipse is excessively amplified is avoided.
EXAMPLE III
Fig. 11 is a schematic structural diagram of an ellipse processing apparatus based on a writing trajectory according to a third embodiment of the present invention. Referring to fig. 11, the ellipse processing apparatus based on a writing trace includes: a handwriting display module 401 and a resizing module 402.
The handwriting display module 401 is configured to display at least one writing track in response to a received handwriting control operation, where a first track point located in a closed area of a target ellipse and a second track point located outside the closed area exist in the writing track; and a size adjusting module 402, configured to adjust size data of the target ellipse, so that all track points of the writing track are located in the closed area of the adjusted target ellipse.
And after the size data of the displayed target ellipse is adjusted, the technical means that all track points of the writing track are located in the closed area of the adjusted target ellipse is realized. The technical problem of low integration efficiency for writing tracks and ellipses is solved. When the writing track part in the ellipse exceeds the ellipse, the ellipse is synchronously and adaptively amplified along with the writing track, the use experience of a user is improved, and the reasonable layout and the attractiveness of the displayed content are ensured.
On the basis of the above embodiment, the resizing module 402 comprises: the moving submodule is used for moving the target ellipse so as to enable a first central point of the target ellipse to be superposed with a second central point of the writing track, and the second central point is a central point of a minimum circumscribed rectangle of the writing track; and the amplifying submodule is used for amplifying the target ellipse if a second track point which is positioned outside the closed region of the target ellipse exists in the writing track so as to enable all track points of the writing track to be positioned in the closed region of the amplified target ellipse.
On the basis of the above embodiment, the amplification sub-module includes: a candidate ellipse determining unit, configured to draw a candidate ellipse graph corresponding to each trajectory point in the writing trajectory if a second trajectory point located outside the target ellipse exists in the writing trajectory, where the candidate ellipse graph is a minimum ellipse graph including the corresponding trajectory point, a central point of the candidate ellipse graph is a first central point, and a second major-minor axis length ratio of the candidate ellipse graph is equal to a first major-minor axis length ratio of the target ellipse; the amplification parameter determining unit is used for determining the amplification parameters of the target ellipse according to all the ellipse graphs to be selected; and the ellipse amplifying unit is used for amplifying the target ellipse according to the amplifying parameter.
On the basis of the above embodiment, the amplification parameter determination unit includes: the data acquisition subunit is used for acquiring first length data of a semi-axis to be selected in each elliptical figure to be selected, wherein the semi-axis to be selected is a short semi-axis to be selected or a long semi-axis to be selected; the ratio operator unit is used for calculating the length ratio of each first length datum to a second length datum of a target half shaft, and the target half shaft is a target half shaft corresponding to the to-be-selected half shaft or a target half shaft corresponding to the to-be-selected half shaft in the target ellipse; a ratio selection subunit, configured to select, from all the length ratios, a length ratio with a largest value; and the magnification ratio determining subunit is used for taking the length ratio with the maximum numerical value as the magnification ratio of the target ellipse.
On the basis of the above embodiment, the amplification parameter determination unit includes: the maximum ellipse selecting subunit is used for selecting the maximum ellipse graph to be selected from all the ellipse graphs to be selected; and the target size determining subunit is used for taking the size data of the largest ellipse to be selected as the target size data of the target ellipse.
On the basis of the above embodiment, the method further includes: and the ellipse display module is used for responding to the received graphic control operation and displaying the target ellipse before responding to the received handwriting control operation and displaying at least one writing track.
On the basis of the above embodiment, the method further includes: and the data determination module is used for determining a first central point and a first major-minor axis length ratio of the target ellipse after the target ellipse is displayed in response to the received graphic control operation.
On the basis of the above embodiment, the handwriting display module 401 includes: the handwriting to be selected display unit is used for responding to the received handwriting control operation and displaying a trajectory to be selected; the figure matching unit is used for confirming that a target ellipse is matched, and at least one track point of the to-be-selected track is contained in a closed area of the target ellipse; the handwriting obtaining unit is used for obtaining all the tracks of the target ellipse, and at least one track point of any track in all the tracks is located in the closed area of the target ellipse; the track point determining unit is used for confirming that track points outside the closed area exist in all the tracks; and the target determining unit is used for determining all the tracks as writing tracks.
On the basis of the above embodiment, the handwriting control operation includes: at least one of a write operation, a move operation, and an amplify operation.
The ellipse processing device based on the writing track provided by the embodiment of the invention is contained in ellipse processing equipment based on the writing track, can be used for executing the ellipse processing method based on the writing track provided by any embodiment, and has corresponding functions and beneficial effects.
Example four
Fig. 12 is a schematic structural diagram of an ellipse processing apparatus based on a writing trajectory according to a fourth embodiment of the present invention. As shown in fig. 12, the ellipse processing apparatus based on a writing trace includes a processor 50, a memory 51, an input device 52, an output device 53, and a display screen 54. The number of processors 50 in the ellipse processing apparatus based on the writing trace may be one or more, and one processor 50 is exemplified in fig. 12. The number of the display screens 54 in the ellipse processing apparatus based on the writing trace may be one or more, and one display screen 54 is exemplified in fig. 12. The processor 50, the memory 51, the input device 52, the output device 53, and the display 54 in the ellipse processing apparatus based on the writing trace may be connected by a bus or other means, and the bus connection is exemplified in fig. 12.
The memory 51 may be used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the ellipse processing method based on the writing trace in the embodiment of the present invention (for example, the handwriting display module 401 and the resizing module 402 in the ellipse processing apparatus based on the writing trace). The processor 50 executes various functional applications and data processing of the writing trajectory-based ellipse processing apparatus by executing software programs, instructions and modules stored in the memory 51, that is, implements the writing trajectory-based ellipse processing method described above.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the ellipse processing apparatus based on the writing trace, and the like. Further, the memory 51 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 non-volatile solid state storage device. In some examples, the memory 51 may further include a memory remotely located from the processor 50, which may be connected to the written trajectory based ellipse processing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the elliptical processing device based on the writing trajectory. The output device 53 may include an audio output device such as a speaker. The display screen 54 is a touch-enabled display screen, which may be a capacitive screen, an electromagnetic screen, or an infrared screen. Optionally, when the display screen 54 is an infrared screen, the display screen further includes an infrared touch frame, and the infrared touch frame is disposed around the display screen 54, and may also be configured to receive an infrared signal and send the infrared signal to the processor 50 or other devices. The display screen 54 is used to display the writing trajectory and the target ellipse. Meanwhile, other contents can be displayed according to the instruction of the processor.
In this embodiment, the ellipse processing device based on the writing trajectory may be an interactive smart tablet.
The ellipse processing equipment based on the writing track comprises the ellipse processing device based on the writing track, can be used for executing any ellipse processing method based on the writing track, and has corresponding functions and beneficial effects.
EXAMPLE five
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for ellipse processing based on a written trajectory, the method comprising:
responding to received handwriting control operation, and displaying at least one writing track, wherein a first track point located in a closed area of a target ellipse and a second track point located outside the closed area exist in the writing track;
and adjusting the size data of the target ellipse so that all track points of the writing track are positioned in the closed area of the adjusted target ellipse.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the writing trajectory based ellipse processing method provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the ellipse processing device based on the writing track, the included units and modules are only divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (13)

1. An ellipse processing method based on writing tracks is characterized by comprising the following steps:
responding to received handwriting control operation, and displaying at least one writing track, wherein the writing track comprises a first track point and a second track point, the first track point is located in a closed area of a target ellipse, the second track point is located outside the closed area of the target ellipse, and the target ellipse is a displayed ellipse;
adjusting the size data of the target ellipse so that all track points of the writing track are positioned in the closed area of the adjusted target ellipse;
the displaying at least one writing trace in response to the received handwriting control operation includes:
responding to the received handwriting control operation, and displaying a track to be selected;
confirming that a target ellipse is matched, wherein a closed area of the target ellipse comprises at least one track point of the to-be-selected track;
all tracks of the target ellipse are obtained, and at least one track point of any track in all tracks is located in a closed area of the target ellipse;
confirming that track points outside the closed area exist in all the tracks;
and determining all the tracks as writing tracks.
2. The ellipse processing method based on the writing track according to claim 1, wherein the adjusting the size data of the target ellipse so that all track points of the writing track are located in the closed area of the adjusted target ellipse comprises:
moving the target ellipse to enable a first central point of the target ellipse to be overlapped with a second central point of the writing track, wherein the second central point is a central point of a minimum circumscribed rectangle of the writing track;
recognizing that the second track point exists in the writing track;
and amplifying the target ellipse so as to enable all track points of the writing track to be positioned in the closed area of the amplified target ellipse.
3. The ellipse processing method based on writing trace of claim 2, wherein the enlarging operation on the target ellipse comprises:
drawing an ellipse graph to be selected corresponding to each track point in the writing track, wherein the ellipse graph to be selected is a minimum ellipse graph containing corresponding track points, the central point of the ellipse graph to be selected is the first central point, and the length ratio of the second major axis to the minor axis of the ellipse graph to be selected is equal to the length ratio of the first major axis to the minor axis of the target ellipse;
determining the amplification parameters of the target ellipse according to all the ellipse graphs to be selected;
and amplifying the target ellipse according to the amplification parameter.
4. The ellipse processing method based on the writing trajectory according to claim 3, wherein the magnification parameter is a magnification ratio of the target ellipse and/or target size data of the target ellipse.
5. The ellipse processing method based on writing track of claim 4, wherein the magnification parameter is a magnification ratio of the target ellipse, and the determining the magnification parameter of the target ellipse according to all the ellipse figures to be selected comprises:
acquiring first length data of a semi-axis to be selected in each elliptical figure to be selected, wherein the semi-axis to be selected is a short semi-axis to be selected or a long semi-axis to be selected;
respectively calculating the length ratio of each first length data to a second length data, wherein the second length data is the length data of a target half shaft in the target ellipse, and the target half shaft is a target half shaft corresponding to the to-be-selected half shaft or a target half shaft corresponding to the to-be-selected half shaft;
selecting the length ratio with the largest value from all the length ratios;
and taking the length ratio with the maximum value as the magnification ratio of the target ellipse.
6. The ellipse processing method based on writing track of claim 4, wherein the magnification parameter is the target size data of the target ellipse, and the determining the magnification parameter of the target ellipse according to all the candidate ellipse figures comprises:
selecting the elliptical graph to be selected with the largest area from all the elliptical graphs to be selected;
and taking the size data of the ellipse graph with the largest area to be selected as the target size data of the target ellipse.
7. The writing trajectory-based ellipse processing method of claim 2, wherein the moving the target ellipse comprises:
and moving the target ellipse when the first central point and the second central point are not coincident.
8. The method for ellipse processing based on writing tracks as claimed in claim 1, wherein before displaying at least one writing track in response to the received handwriting control operation, further comprising:
in response to the received graphical control operation, a target ellipse is displayed.
9. The method of claim 8, wherein after displaying the target ellipse in response to the received graphical control operation, further comprising:
a first center point and a first major-minor axis length ratio of the target ellipse are determined.
10. The ellipse processing method based on written trajectory according to claim 1, wherein the handwriting control operation comprises: at least one of a write operation, a move operation, and an amplify operation.
11. An ellipse processing apparatus based on a writing trajectory, comprising:
the handwriting display module is used for responding to received handwriting control operation and displaying at least one writing track, wherein the writing track comprises a first track point and a second track point, the first track point is located in a closed area of a target ellipse, the second track point is located outside the closed area of the target ellipse, and the target ellipse is a displayed ellipse;
the size adjusting module is used for adjusting the size data of the target ellipse so that all track points of the writing track are positioned in the closed area of the adjusted target ellipse;
the handwriting display module comprises: the handwriting to be selected display unit is used for responding to the received handwriting control operation and displaying a trajectory to be selected; the figure matching unit is used for confirming that a target ellipse is matched, and at least one track point of the to-be-selected track is contained in a closed area of the target ellipse; the handwriting obtaining unit is used for obtaining all the tracks of the target ellipse, and at least one track point of any track in all the tracks is located in the closed area of the target ellipse; the track point determining unit is used for confirming that track points outside the closed area exist in all the tracks; and the target determining unit is used for determining all the tracks as writing tracks.
12. An ellipse processing apparatus based on a writing trajectory, comprising:
one or more processors;
a memory for storing one or more programs;
the display screen is used for displaying the writing track and the target ellipse;
when executed by the one or more processors, cause the one or more processors to implement the written trajectory based ellipse processing method of any of claims 1-10.
13. A storage medium containing computer-executable instructions for performing the method of written trajectory based ellipse processing of any of claims 1-10 when executed by a computer processor.
CN201910298665.8A 2019-04-15 2019-04-15 Ellipse processing method, device and equipment based on writing track and storage medium Active CN110045909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910298665.8A CN110045909B (en) 2019-04-15 2019-04-15 Ellipse processing method, device and equipment based on writing track and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910298665.8A CN110045909B (en) 2019-04-15 2019-04-15 Ellipse processing method, device and equipment based on writing track and storage medium

Publications (2)

Publication Number Publication Date
CN110045909A CN110045909A (en) 2019-07-23
CN110045909B true CN110045909B (en) 2021-01-22

Family

ID=67277215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910298665.8A Active CN110045909B (en) 2019-04-15 2019-04-15 Ellipse processing method, device and equipment based on writing track and storage medium

Country Status (1)

Country Link
CN (1) CN110045909B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069204B (en) * 2019-04-15 2021-12-03 广州视源电子科技股份有限公司 Graph processing method, device and equipment based on writing track and storage medium
CN110716680B (en) * 2019-10-09 2021-05-07 广州视源电子科技股份有限公司 Control method and device of intelligent interactive panel
CN110941383B (en) * 2019-10-11 2021-08-10 广州视源电子科技股份有限公司 Double-screen display method, device, equipment and storage medium
CN111078073B (en) * 2019-12-17 2021-03-23 科大讯飞股份有限公司 Handwriting amplification method and related device
CN111736751B (en) * 2020-08-26 2021-03-26 深圳市千分一智能技术有限公司 Stroke redrawing method, device and readable storage medium
CN112506402A (en) * 2020-11-25 2021-03-16 广州朗国电子科技有限公司 Electronic whiteboard based graph control method and device and storage medium
CN114237418A (en) * 2021-11-19 2022-03-25 新华三智能终端有限公司 Track identification method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000003407A (en) * 1998-06-11 2000-01-07 Seiko Epson Corp Method and device for normalizing hand-written character, and recording medium recorded with program therefor
CN103513898A (en) * 2012-06-21 2014-01-15 夏普株式会社 Handwritten character segmenting method and electronic equipment
CN104574467A (en) * 2014-12-04 2015-04-29 华中师范大学 Automatic generation method and system of conceptual graph
CN108834426A (en) * 2015-10-19 2018-11-16 迈思慧公司 The system and method for handwriting recognition in figure

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547433B (en) * 2016-11-07 2019-12-06 青岛海信电器股份有限公司 handwriting determining method and device
CN107632760B (en) * 2017-08-21 2019-12-17 广州视源电子科技股份有限公司 Handwriting circle selection method and device, touch equipment and readable storage medium
CN109147004B (en) * 2018-08-20 2023-06-09 广州视源电子科技股份有限公司 Handwriting display method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000003407A (en) * 1998-06-11 2000-01-07 Seiko Epson Corp Method and device for normalizing hand-written character, and recording medium recorded with program therefor
CN103513898A (en) * 2012-06-21 2014-01-15 夏普株式会社 Handwritten character segmenting method and electronic equipment
CN104574467A (en) * 2014-12-04 2015-04-29 华中师范大学 Automatic generation method and system of conceptual graph
CN108834426A (en) * 2015-10-19 2018-11-16 迈思慧公司 The system and method for handwriting recognition in figure

Also Published As

Publication number Publication date
CN110045909A (en) 2019-07-23

Similar Documents

Publication Publication Date Title
CN110045909B (en) Ellipse processing method, device and equipment based on writing track and storage medium
CN110069204B (en) Graph processing method, device and equipment based on writing track and storage medium
CN108334486B (en) Table control method, device, equipment and storage medium
CN110716680B (en) Control method and device of intelligent interactive panel
US9268423B2 (en) Definition and use of node-based shapes, areas and windows on touch screen devices
CN108304132B (en) Graph display method, device, equipment and storage medium
WO2020010775A1 (en) Method and device for operating interface element of electronic whiteboard, and interactive intelligent device
CN110045840B (en) Writing track association method, device, terminal equipment and storage medium
WO2019000681A1 (en) Information layout method, device, apparatus and computer storage medium
WO2021068366A1 (en) Writing operation method and device for intelligent interactive whiteboard, apparatus, and storage medium
CN110956674B (en) Graph adjusting method, device, equipment and storage medium
CN106909246B (en) Electronic writing and erasing method and intelligent touch television
CN108958861A (en) Object displaying method, equipment and storage medium based on text control
AU2019457052A1 (en) Table processing method and apparatus, and intelligent interactive tablet and storage medium
CN108492349B (en) Processing method, device and equipment for writing strokes and storage medium
CN111580903B (en) Real-time voting method, device, terminal equipment and storage medium
WO2019218622A1 (en) Element control method, apparatus, and device, and storage medium
CN109814787B (en) Key information determination method, device, equipment and storage medium
US20160132478A1 (en) Method of displaying memo and device therefor
WO2023092254A1 (en) Mind map adjustment method, storage medium and device
CN110286827B (en) Element scaling control method, device, equipment and storage medium
CN111428455B (en) Form management method, device, equipment and storage medium
JP2008243025A (en) Information processor, method and computer program
CN113485590A (en) Touch operation method and device
CN108491139B (en) Object fixing method and device, terminal equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant