WO2021077539A1 - Graphic adjustment method and apparatus, device and storage medium - Google Patents

Graphic adjustment method and apparatus, device and storage medium Download PDF

Info

Publication number
WO2021077539A1
WO2021077539A1 PCT/CN2019/121742 CN2019121742W WO2021077539A1 WO 2021077539 A1 WO2021077539 A1 WO 2021077539A1 CN 2019121742 W CN2019121742 W CN 2019121742W WO 2021077539 A1 WO2021077539 A1 WO 2021077539A1
Authority
WO
WIPO (PCT)
Prior art keywords
geometric
graphic
writing
target
graphics
Prior art date
Application number
PCT/CN2019/121742
Other languages
French (fr)
Chinese (zh)
Inventor
吴诗乐
Original Assignee
广州视源电子科技股份有限公司
广州视睿电子科技有限公司
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 广州视源电子科技股份有限公司, 广州视睿电子科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2021077539A1 publication Critical patent/WO2021077539A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • 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

Definitions

  • This application relates to the technical field of electronic whiteboards, for example, to a graphic adjustment method, device, device, and storage medium.
  • the present application provides a graphic adjustment method, device, equipment, and storage medium to solve the technical problem that the graphic cannot be adjusted accurately and simply in the related art.
  • this application provides a graphics adjustment method, including:
  • the graphic is adjusted so that the target geometric attribute is the geometric attribute of the adjusted graphic.
  • the method After displaying the first writing track in response to the received first writing operation, the method includes:
  • the geometric features include edges, corners, or axes, and each target geometric attribute corresponds to one geometric feature.
  • the marking the corresponding geometric features in the graphics includes:
  • the geometric feature corresponding to the target geometric attribute is a corner or an axis
  • a mark of the geometric feature is added to the graphic.
  • the method further includes:
  • an adjustment failure prompt is displayed.
  • the display of graphics in the canvas includes:
  • a graphic corresponding to the graphic template selection operation is displayed on the canvas.
  • the method further includes:
  • the reshaped first writing trajectory is displayed, and the reshaped first writing trajectory is more computer-drawn elements.
  • this application also provides a graphics adjustment method, including:
  • a first writing operation is received, and a first writing trajectory is obtained according to the first writing operation, and the first writing trajectory is recognized to determine a target geometric attribute represented by the first writing trajectory, and the target geometric attribute includes At least one of length parameter and angle parameter;
  • the graphic is adjusted according to the target geometric attribute, so that the target geometric attribute is used as the geometric attribute of the adjusted graphic.
  • the recognizing the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory includes:
  • a geometric feature corresponding to the first data parameter in the graph is determined, and the geometric feature includes an edge, a corner, or an axis.
  • the first writing track includes at least one group
  • At least one of number recognition, symbol recognition, and character recognition is performed on each group of the first writing trajectories to determine the first data parameter and feature type represented by each group of the first writing trajectory.
  • the figure is a polygon
  • the determining, according to the feature type, the geometric feature corresponding to the first data parameter in the graph includes:
  • the geometric feature closest to the first position data is searched, and the found geometric feature is used as the geometric feature corresponding to the first data parameter.
  • the method After recognizing the first writing trajectory to determine the geometric attributes of the target represented by the first writing trajectory, the method includes:
  • the adjusting the graphics according to the target geometric attributes includes:
  • the figure is adjusted according to the target geometric attribute.
  • the geometric characteristic corresponding to the target geometric attribute is searched in the figure, the actual geometric attribute of the geometric characteristic is determined, and the target geometric attribute and the geometric characteristic are determined.
  • the actual geometric attributes determine the modification range, and adjust the graphics according to the modification range; or,
  • the corresponding geometric feature is searched in the figure according to the unique determination condition of the figure, the actual geometric attribute of the geometric feature is determined, and the target geometry
  • the attributes and the actual geometric attributes adjust the graphics.
  • the graphic is a polygon, and the adjusting the graphic according to the target geometric attribute includes:
  • the adjusted graph is displayed according to the second position data.
  • the determining the second position data of all vertices in the graph according to the target geometric attributes includes:
  • the second position data of the vertex is determined according to the second data parameter.
  • the display of graphics in the canvas includes:
  • Graphic recognition is performed on the second writing trajectory to determine the graphic represented by the second writing trajectory.
  • this application also provides a graphics adjustment device, including:
  • the first display module is used to display graphics in the canvas
  • the second display module is configured to display a first writing trajectory in response to the received first writing operation, the first writing trajectory representing a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter;
  • the first adjustment module is configured to adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
  • this application also provides a graphics adjustment device, including:
  • the third display module is used to display graphics on the canvas
  • the operation receiving module is configured to receive a first writing operation, and obtain a first writing trajectory according to the first writing operation; to recognize the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory,
  • the target geometric attribute includes at least one of a length parameter and an angle parameter;
  • the second adjustment module is configured to adjust the graphics according to the target geometric attributes, so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
  • this application also provides a graphics adjustment device, including:
  • One or more processors are One or more processors;
  • Memory used to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the graphics adjustment method according to the first aspect or the second aspect.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the graphics adjustment method as described in the first aspect or the second aspect is implemented.
  • the above-mentioned graphic adjustment method, device, equipment and storage medium display the graphic on the canvas, and after receiving the first writing operation, display the first writing trajectory for representing the geometric properties of the target, wherein the geometric properties of the target include length parameters Afterwards, the technical means of adjusting the graphics according to the target geometric attributes realizes the adjustment of the graphics displayed in the canvas by handwriting parameters, so that the adjusted graphics can be more in line with the user’s expectations. And the accuracy of graphics adjustment is high.
  • the operation process is simple and convenient, and does not require high user proficiency, which is convenient for users to realize and enhances user experience; inputting graphics by handwriting or computer drawing makes the graphics input methods diversified; marking geometric features can be The user is prompted that the geometric attributes of the target have been identified, thereby ensuring that the graphics adjustment process is carried out accurately.
  • FIG. 1 is a flowchart of a graph adjustment method provided in Embodiment 1 of this application;
  • FIG. 2 is a schematic diagram of the first interface of the canvas provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of a second interface of the canvas provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of the third interface of the canvas provided by an embodiment of the application.
  • FIG. 5 is a flowchart of a graph adjustment method provided in Embodiment 2 of this application.
  • FIG. 6 is a schematic diagram of a fourth interface of the canvas provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of the fifth interface of the canvas provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of the sixth interface of the canvas provided by an embodiment of the application.
  • FIG. 9 is a schematic diagram of a seventh interface of the canvas provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of the eighth interface of the canvas provided by an embodiment of the application.
  • FIG. 11 is a schematic diagram of the ninth interface of the canvas provided by an embodiment of the application.
  • FIG. 12 is a schematic diagram of the tenth interface of the canvas provided by an embodiment of the application.
  • FIG. 13 is a schematic diagram of the eleventh interface of the canvas provided by an embodiment of the application.
  • FIG. 14 is a schematic diagram of the twelfth interface of the canvas provided by an embodiment of the application.
  • 15 is a schematic diagram of the thirteenth interface of the canvas provided by an embodiment of the application.
  • 16 is a schematic diagram of the fourteenth interface of the canvas provided by an embodiment of the application.
  • FIG. 17 is a schematic diagram of the fifteenth interface of the canvas provided by an embodiment of the application.
  • FIG. 18 is a flowchart of a graph adjustment method provided in Embodiment 3 of this application.
  • FIG. 19 is a flowchart of a graph adjustment method provided by Embodiment 4 of this application.
  • 20 is a schematic diagram of the sixteenth interface of the canvas provided by an embodiment of the application.
  • FIG. 21 is a schematic structural diagram of a graphic adjustment device provided by Embodiment 5 of this application.
  • FIG. 22 is a schematic structural diagram of another graphic adjustment device provided by Embodiment 5 of this application.
  • FIG. 23 is a schematic structural diagram of a graphics adjustment device provided in Embodiment 6 of this application.
  • first and second are only used to distinguish one entity or operation or object from another entity or operation or object, and do not necessarily require or imply these entities Or any such actual relationship or sequence exists before the operation or object.
  • first and second of the first writing operation and the second writing operation are used to distinguish two different touch operations.
  • the graphics adjustment method provided in the embodiments of the present application can be executed by a graphics adjustment device.
  • the graphics adjustment device can be implemented by at least one of software and hardware.
  • the graphics adjustment device may be composed of two or more physical entities, or It is a physical entity.
  • the graphics adjustment device may be a smart device such as a computer, a mobile phone, a tablet, or a smart interactive tablet.
  • a smart interactive tablet is used as a graphics adjustment device for exemplary description.
  • the smart interactive tablet can be an integrated device that controls the content displayed on the display tablet through touch technology and realizes human-computer interaction. It integrates a projector, an electronic whiteboard, a screen, a sound, a TV, and a video conference. One or more functions such as a terminal.
  • the smart interactive tablet includes at least one display screen.
  • the smart interactive tablet is equipped with a display screen with touch function, and the display screen can be a capacitive screen, a resistive screen or an electromagnetic screen.
  • the user can realize touch operation by touching the display screen with a finger or a stylus.
  • the smart interactive tablet detects the touch position, and determines the response plan according to the display content corresponding to the touch position, and then responds to realize the touch Features. For example, it is determined that the corresponding display content is the writing area according to the touch position. At this time, the response scheme is to display the writing track. It is understandable that in practical applications, users can also implement control operations through keyboards, mice, physical keys, and other methods.
  • At least one type of operating system is installed on the smart interactive tablet, where the operating system includes but is not limited to the Android system, the Linux system, and the Windows system.
  • the smart interactive tablet can install at least one application program based on the operating system.
  • an application program with a drawing function is used for exemplary description.
  • an electronic whiteboard application with a drawing function is installed in a smart interactive tablet.
  • the application program may be an application program that comes with the operating system, or may be an application program downloaded from a third-party device or server.
  • the application also has other editing functions, such as writing, inserting tables, inserting pictures, inserting multimedia, inserting graphics, and drawing tables.
  • an operable area is set in the display interface of an application program, and the operable area can be recorded as a canvas, through which an interactive interface for drawing or editing can be displayed to the user.
  • the display position of the canvas can be set according to actual needs.
  • the size of the canvas can be set according to actual conditions, and it can be a finite size or an infinite size.
  • a first coordinate system is established in the canvas, and the origin of the first coordinate system can be set according to actual conditions.
  • the infinite size of the canvas means that the canvas can be infinitely reduced or increased in the coordinate system according to the actual needs of the user.
  • a second coordinate system is established in the display screen, and the origin of the second coordinate system can also be set according to actual conditions.
  • the second coordinate system is a coordinate system with a fixed size.
  • the second coordinate system has a corresponding relationship with the electrical component that detects the touch operation.
  • the electrical component parameters of the corresponding position change.
  • the smart interactive tablet will change according to the electrical component parameters.
  • Determine the coordinate data of the touch operation in the second coordinate system that is, determine the touch position of the touch operation, and then determine the touch operation in the first coordinate system according to the mapping relationship between the second coordinate system and the first coordinate system Then, respond to touch operations based on the display content of the coordinate data in the canvas.
  • the embodiment of the method for determining the mapping relationship is not limited.
  • adjusting the geometric characteristics of the graphics in the canvas is taken as an example to describe the graphics adjustment method.
  • FIG. 1 is a flowchart of a graph adjustment method provided in Embodiment 1 of this application.
  • the graphic adjustment method specifically includes:
  • Step 110 Display graphics on the canvas.
  • the figure is a geometric figure, which can be a polygon, a circle-like figure, etc., when the figure is a polygon, it can be selected as a regular convex polygon (such as a triangle, a square, a regular five-sided) Shape, etc.).
  • the graphic can be input by the user by handwriting or by selecting a graphic template.
  • the user can perform a writing operation on the canvas, where the writing operation is a type of touch operation.
  • the smart interactive tablet displays the writing trajectory and performs graphic recognition on the writing trajectory to determine the type of graphic input by the user.
  • the displayed graphic belongs to the graphic handwritten by the user.
  • the graphic template corresponding to each graphic type is displayed in the canvas.
  • the intelligent interactive tablet determines that the user selects the graphic template
  • the graphic is displayed in the canvas according to the graphic template.
  • the displayed graphics belong to the standard graphics drawn by the computer.
  • the way the user selects the graphic template can be set according to the actual situation. For example, the graphic template is dragged to the canvas through a drag operation, and the smart interactive tablet obtains the end position of the drag operation, and displays the graphic at the end position.
  • the graphics corresponding to the template is dragged to the canvas through a drag operation, and the smart interactive tablet obtains the end position of the drag operation, and displays the graphic at the end position.
  • each graphic type corresponds to a graphic template, wherein the classification basis of the graphic type can be set according to the actual situation, for example, according to the number of graphic edges.
  • the graphic type includes at least: circle, triangle Class, quadrilateral class, pentagon class, etc.
  • Each type can also be subdivided.
  • the quadrilateral type can also include: square type, rectangular type, parallelogram type, trapezoid type and other graphic types.
  • Triangle type can also include right-angled triangle type, isosceles triangle type, and ordinary triangle type. And other graphic types.
  • the above-mentioned end position may refer to coordinate data in the first coordinate system or coordinate data in the second coordinate system, which is not limited in the embodiment.
  • Step 120 In response to the received first writing operation, display a first writing trajectory, the first writing trajectory represents a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter.
  • the geometric attributes are the parameters of the geometric characteristics of the graphics.
  • the geometric feature refers to the feature that determines the geometric shape when displaying graphics, and generally can include at least one of edges, corners, and axes.
  • the axis refers to other lines that can determine the shape and size of the displayed image, except for the sides.
  • the axis can refer to at least one of a radius and a diameter.
  • the axis can refer to a certain side. perpendicular.
  • the geometric properties include length parameters and angle parameters.
  • the corresponding geometric attribute is a length parameter
  • the corresponding geometric attribute is an angle parameter
  • the geometric feature contained in the figure is an axis
  • the geometric feature contained in the figure is at least one of edges and corners.
  • the geometric attribute refers to the length parameter of the axis.
  • the axis is at least one of a radius and a diameter.
  • the geometric attribute refers to at least one of the length parameter of the radius and the length parameter of the diameter.
  • the axis is at least one of the minor axis, major axis, minor minor axis and major minor axis.
  • the geometric attributes refer to the minor axis length parameter, major axis length parameter, minor minor axis length parameter, and major half axis. At least one of the length parameters.
  • the geometric attribute refers to at least one of the length parameter of the side and the angle parameter of the corner.
  • the geometric features include three sides and three corners.
  • the geometric attributes can be the length parameter of each side and the angle parameter of each corner.
  • the geometric features include short sides and long sides.
  • geometric attributes refer to the length parameters of the short sides and the length parameters of the long sides. It is understandable that the length and angle parameters mentioned above are all relative values. Accordingly, the range of the coordinates (in the first coordinate system or the second coordinate system) corresponding to the length unit and the angle unit can be set according to actual conditions. The embodiment does not limit this. In the embodiment, the geometric attribute input by the user is recorded as the target geometric attribute.
  • the target geometric attributes are written on the canvas by the user by handwriting.
  • the user's operation of writing the target geometric attribute is recorded as the first writing operation.
  • the embodiment of the trigger mode of the first writing operation is not limited. For example, when it is determined that the canvas is currently in writing mode, it is monitored that a touch operation is received in the canvas, and the touch operation is a touch operation that includes a moving path, then it is determined that there is currently a writing behavior in the canvas, and the touch operation It is confirmed as the first writing operation, and then the writing track generated corresponding to the first writing operation is displayed at the touch position.
  • the smart interactive tablet during the user's writing process, the smart interactive tablet only receives a writing operation, and then it needs to identify the writing track of the writing operation to determine whether the writing operation is used for writing. Enter the geometric properties of the target. In the embodiment, only to distinguish the first writing operation currently received from the subsequent second writing operation, the first writing operation is interpreted as an operation for writing a target geometric attribute. For another example, set the graphics adjustment mode. When it is determined that the canvas is currently in the graphics adjustment mode, if a touch operation is detected in the canvas, it is determined that the first writing operation is received. In the embodiment, the writing trajectory corresponding to the first writing operation is recorded as the first writing trajectory. Optionally, take a number as an example.
  • the multiple first writing tracks are grouped into a group, where the setting conditions can be set according to the actual situation.
  • the setting condition is that the writing time interval of the multiple first writing tracks is within the set interval and the multiple first writing tracks
  • the distance between the writing tracks is within the set distance, and the above set interval and set distance are set according to the actual situation.
  • the advantage of grouping multiple first writing trajectories is to facilitate the management and calculation of the first writing trajectory. Taking management as an example, when moving the first writing trajectory, there is no need to calculate the movement path of each trajectory one by one, only the movement path of the smallest rectangular area containing the group of writing trajectories needs to be calculated.
  • the first writing track is set as the target geometric attribute written by the user. Since when receiving the first writing operation, the smart interactive tablet can only recognize the first writing operation and display the first writing track, it is impossible to determine whether the first writing operation is used to write the target geometric attributes. Therefore, when the first writing trajectory is displayed, the first writing trajectory needs to be recognized to determine the geometric attributes of the target represented by the first writing trajectory. Specifically, after a set of first writing trajectories are determined to be written, perform number recognition, symbol recognition, and character recognition on the first writing trajectory to determine the data parameters and feature types represented by the first writing trajectory, that is, determine the first writing trajectory Represents the geometric properties of the target. Among them, the implementation means of number recognition, symbol recognition, and character recognition are not limited in the embodiment.
  • the feature type refers to the geometric feature represented by the data parameter.
  • the graphics corresponding to the target geometric attributes it is necessary to determine the graphics corresponding to the target geometric attributes, and determine the geometric features in the graphics corresponding to the target geometric attributes.
  • the graphic when determining the graphic corresponding to the target geometric attribute, if there is only one graphic displayed, the graphic can be directly determined as the graphic corresponding to the target geometric attribute. If there are multiple graphs displayed, you can obtain the position data of the target geometric property in the canvas and the position data of each graph in the canvas, and based on the two position data, determine the graph closest to the target geometric property, and add the graph Determine the graphics corresponding to the target geometric attributes.
  • the two position data belong to the same coordinate system, which can be located in the first coordinate system or the second coordinate system, which is not limited in the embodiment.
  • all geometric features of the same type are determined in the graph according to the feature type, and the geometric feature closest to the first writing track is selected as the geometric feature corresponding to the target geometric attribute. For example, if the radius is marked as R and the diameter is marked as L, when it is confirmed that the figure is a circle and the first writing track is recognized as R3, the data parameter is determined to be R3, and the feature type is radius, that is, the target geometric attribute corresponds to The geometric feature is the radius, and the length parameter is 3.
  • the angle is set as R and the side length is L
  • the characteristic type corresponding to R60 is determined to be angle
  • the angle parameter is 60
  • the geometric feature corresponding to L5 is an edge
  • the length parameter is 5.
  • the edge with the closest distance is selected as the geometric feature corresponding to L5, and the angle is the same.
  • the angle is marked as °, and there is no sign on the side.
  • the characteristic type corresponding to 60° is an angle
  • the angle parameter is The geometric feature corresponding to 60 and 5 is an edge
  • the length parameter is 5. According to the distance between each edge and the target geometric attribute, the edge with the closest distance is selected as the geometric feature corresponding to 5, and the angle is the same.
  • the target geometric attribute may be bound to the graphic and marked in the graphic.
  • the marking method can be set according to the actual situation. For example, when the target geometric attribute is the angle parameter of an angle, a mark is added at the position of the corresponding corner. For example, when the target geometric attribute is the length data of an edge, the display parameter of the corresponding edge is changed. . For another example, when the target geometric attribute is the length data of the axis, mark the corresponding axis in the graph.
  • Step 130 Adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
  • the graphics are adjusted according to the target geometric attributes, so that the adjusted graphics are displayed according to the target geometric attributes.
  • the graphics unique determination condition includes all the necessary conditions for determining the graphics.
  • the only condition for determining the circle figure can be to specify the radius length or the diameter length.
  • the only condition for determining the figure of the ellipse can be to specify the length of the minor axis and the length of the major axis, or the length of the minor axis and the length of the major axis.
  • the only condition for determining the figure of the triangle can be to clarify the length of the three sides, the length of the two sides and the angle between the two sides, or the angle of the two corners and the side between the two corners. Length etc.
  • the only condition for determining the square figure can be to specify the length of the side. Determining whether the target geometric attribute meets the unique determination condition of the figure, that is, judging whether the figure can be obtained according to the target geometric attribute, and if it is, the operation of adjusting the figure is performed; otherwise, the user is prompted that the adjustment has failed.
  • the specific method for determining whether the target geometric attribute meets the condition for determining the uniqueness of the figure can be set according to the actual situation.
  • the target geometric attribute includes the angle of two corners and the length of one side.
  • the positional relationship with an edge satisfies the unique determination condition of the figure, then it is determined that the target geometric attributes meet the unique determination condition of the figure.
  • the actual geometric attributes of the geometric features corresponding to the target geometric attributes in the graphics can be determined, where the actual geometric attributes are the geometric attributes obtained based on the graphics.
  • the actual geometric properties are relative values.
  • the target geometric attribute when the target geometric attribute does not satisfy the condition for determining the uniqueness of the figure, other geometric features can be searched in the figure according to the condition for determining the uniqueness of the figure, and the geometric features corresponding to the target geometric attributes can be found to satisfy
  • the conditions are uniquely determined for the graphics, and then the actual geometric attributes corresponding to the found geometric features are determined, and the graphics are adjusted according to the actual geometric attributes and the target geometric attributes.
  • the drawn graphics belong to the standard graphics drawn by the computer.
  • the position data of the vertices in the adjusted figure in the canvas is determined based on the target geometric properties, and then the figure is drawn based on the position data of the vertices.
  • the feature calculation formula can be called, and the length data of each side in the adjusted graph is calculated according to the feature calculation formula.
  • the feature calculation formula is pre-stored in the smart interactive tablet, and at least one of the side length and the angle can be calculated.
  • the corresponding characteristic calculation formula includes the sum of three internal angles of 180°, the Pythagorean theorem, the law of sine, the law of cosine, and so on.
  • the position data of the vertex is determined according to the length data of each side.
  • the figure is a circle figure
  • the position data of the edge of the circle figure in the canvas is directly determined based on the target geometric properties, and then the figure is drawn based on the position data of the edge.
  • the target geometric attributes are simultaneously reshaped and displayed in the graphics.
  • shaping the geometric properties of the target can be understood as shaping the first writing trajectory into a computer drawing element.
  • the relative position relationship between geometric attributes and geometric features can be set in advance, and then, based on the relative position relationship, the reshaped target geometric attributes are displayed in the graphics.
  • FIG. 2 is a schematic diagram of the first interface of the canvas provided by an embodiment of the application.
  • a graphic 11 is displayed on the current canvas.
  • the graphic 11 is a graphic input by the user by handwriting. Through graphic recognition, it is determined that the graphic 11 is a triangle.
  • FIG. 3 is a schematic diagram of a second interface of the canvas provided by an embodiment of the application.
  • the canvas contains three groups of first writing trajectories, and after the first writing trajectory is digitally recognized, it is determined that the first writing trajectories of each group are respectively: 3, 4, and 5, that is, the first writing trajectory represents the geometric properties of the target Is the length parameter of the side, and the values are 3, 4, and 5 respectively. Then, based on the distance between the target geometric attribute and the three edges in the graph 11, the edge corresponding to each target geometric attribute is determined.
  • FIG. 4 is a schematic diagram of the third interface of the canvas provided by an embodiment of the application. Referring to Fig. 4, after adjusting the graph 11, it is displayed as a standard graph drawn by a computer.
  • the operation process is simple and convenient, does not require high user proficiency, is convenient for users to realize, and improves user experience.
  • FIG. 5 is a flowchart of a graph adjustment method provided in Embodiment 2 of this application. This embodiment is embodied on the basis of the above-mentioned embodiment.
  • the graph adjustment method provided in this embodiment specifically includes:
  • Step 210 Display graphics on the canvas.
  • the setting of this step includes at least two solutions as follows:
  • Solution 1 In response to the received second writing operation, a second writing track is displayed on the canvas, and the second writing track composes a graph.
  • the touch operation of the user's handwriting drawing graphics is recorded as the second writing operation.
  • the second writing operation trigger mode can be set according to actual conditions. For example, when it is determined that the canvas is currently in the writing mode, it is monitored that a touch operation is received in the canvas, and the touch operation is a touch operation that includes a moving path. It is determined that the second writing operation is received, and the touch position of the second writing operation is acquired, and then the writing track is displayed at the touch position. It can be understood that for the smart interactive tablet, the smart interactive tablet is Only when a writing operation is received, and the writing track of the writing operation needs to be recognized later, can it be determined whether the writing operation is used to draw a graph.
  • the second writing operation is interpreted as an operation for drawing graphics.
  • the writing trajectory corresponding to the second writing operation is recorded as the second writing trajectory.
  • it can be set to group multiple writing trajectories that meet the set conditions into a group, where the grouping condition is the same as the grouping condition of the first writing trajectory, and will not be repeated here.
  • the embodiments of the identification means are not limited. For example, collect a data set containing various graphics in advance, and train the data set through machine learning to obtain a graphics recognition model. The algorithm used in training can be set according to the actual situation. After that, a set of second The writing trajectory is used as the input of the graphic recognition model, and the graphic category corresponding to the second writing trajectory can be determined through the graphic recognition model.
  • the trajectory samples corresponding to each graphic category are preset, wherein the embodiment of the setting method of the trajectory samples is not limited. Identify the second writing trajectory and each trajectory sample to obtain the trajectory sample that is most similar to the second writing trajectory, and then calculate the trajectory error between the trajectory sample and the second writing trajectory, and when the trajectory error meets the set error range At this time, the graphic type corresponding to the trajectory sample is used as the graphic type corresponding to the second writing trajectory.
  • the calculation method of the trajectory error and the setting of the error range are not limited according to the embodiment.
  • the writing trace can be displayed first, and a group of writing traces can be recognized by graphics. If the corresponding graphics cannot be recognized, then the number recognition, symbol recognition and text recognition can be performed , To determine the geometric properties of the target represented by the writing trajectory.
  • Solution 2 In response to the received graphic template selection operation, a graphic corresponding to the graphic template selection operation is displayed on the canvas.
  • the graphic template is a graphic drawn by a computer as a template.
  • a graphic template corresponding to each graphic type is displayed on the canvas, wherein the generating method and storage location of the graphic template are not limited in the embodiment.
  • the graphic template can be displayed on the set position of the canvas, or the trigger button of the graphic template is displayed at the set position. When the trigger button is detected to be triggered, the graphic template is displayed.
  • the set position can be set or modified according to the actual situation.
  • all graphics templates can be displayed; when there are many types of graphics (such as greater than the set number), graphics templates of some graphics types can be displayed, and set Set graphics template switching rules to achieve switching display graphics templates, where the switching rules can be set according to actual conditions.
  • the graphic template selection operation is an operation issued by the user to select a graphic template.
  • the smart interactive tablet draws a corresponding graphic on the canvas according to the graphic template selection operation.
  • the embodiment of the trigger mode of the graphic template selection operation is not limited. For example, when setting the graphic template to receive a drag operation, confirm that the graphic template selection operation is received, and monitor the drag operation to control the graphic template to move synchronously with the drag operation. When the end of the drag is detected, the end position is obtained, and Draw the graph at the end position. For another example, it is detected that the graphic template receives the click operation, and then the click operation is received again in other areas of the canvas, and the graphic template selection operation is determined to be received. The first click operation is used to select the graphic template.
  • the second single-click operation is used to determine the drawing position of the graph, and then, taking the drawing position as the center, draw the same type of graph as the graph template.
  • the drawing position may refer to coordinate data in the first coordinate system or coordinate data in the second coordinate system, which is not limited in the embodiment.
  • Step 220 In response to the received first writing operation, display a first writing trajectory, where the first writing trajectory represents a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter.
  • Step 230 Mark the corresponding geometric features in the graphics based on the target geometric attributes.
  • the geometric features include edges, corners or axes, and each target geometric attribute corresponds to a geometric feature.
  • each target geometric attribute can find the corresponding geometric characteristic in the graph, and mark the geometric characteristic corresponding to each target geometric attribute.
  • marking the geometric features in the target graphic includes: when the geometric feature corresponding to the target geometric attribute is an edge, changing the display parameters of the geometric feature; when the geometric feature corresponding to the target geometric attribute is an angle or axis, adding geometry to the graphic Characteristic mark.
  • FIG. 6 is a schematic diagram of the fourth interface of the canvas provided by an embodiment of the application. Referring to FIG. 6, a graphic 201 and a target geometric attribute 202 are displayed on the canvas. It is determined that the bottom edge of the graph 201 is the geometric feature corresponding to the target geometric attribute, and the display parameters of the bottom edge are changed. At this time, the interface of the canvas changes from FIG.
  • FIG. 7 is a schematic diagram of the fifth interface of the canvas provided by an embodiment of the application. Compared with FIG. 6, the line type of the bottom edge of the graph 201 in FIG. 7 has changed. At this time, the user can be prompted to establish an association relationship between the target geometric attribute and the graph.
  • FIG. 8 is a schematic diagram of the sixth interface of the canvas provided by the embodiment of the application.
  • the graphic 203 and the target geometric attribute 204 are displayed in the canvas.
  • the target geometric attribute 204 corresponds to the bottom corner on the left side of the graphic 203.
  • Add a corner mark 205 at the bottom corner on the left to prompt the user to establish an association relationship between the target geometric attributes and the graphics. It is understandable that the display parameters of the lines in the corner marks can be modified in accordance with actual conditions.
  • the user can also directly draw corner marks when writing the target geometric attributes.
  • the smart interactive tablet can determine the angle corresponding to the target geometric attributes according to the detected corner marks, and calculate the radian of the corner marks drawn by the user. Make corrections to prompt the user that the target geometry attributes are bound to the corners.
  • FIG. 9 is a schematic diagram of the seventh interface of the canvas provided by an embodiment of the application.
  • a graphic 206 and a target geometric attribute 207 are displayed on the canvas.
  • the target geometric attribute 207 corresponds to the radius in the graphic 206.
  • the corresponding axis 208 is displayed in the graphic 206 to prompt the user of the target geometric attribute and graphic Establish an association relationship.
  • the user can also directly draw the line of the axis when writing the target geometric attributes.
  • the smart interactive tablet can determine the axis represented by the line according to the relative position of the line and the figure, and modify the line And modify the display parameters to prompt the user that the target geometric attributes are bound to the axis.
  • the multiple target geometric attributes need to be input sequentially.
  • the first set of writing trajectories are identified to determine the target geometric attributes and corresponding geometric features they represent, and then the corresponding geometric features are performed in the graphics. mark.
  • Step 240 Confirm whether the geometric attributes of the target meet the conditions for determining the uniqueness of the figure. If it is confirmed that the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, step 250 is executed. If it is confirmed that the geometric properties of the target satisfy the condition for determining the uniqueness of the figure, step 260 is executed.
  • each type of graphics has corresponding graphics unique determination conditions. After marking the graph, call up the graph's unique determination condition corresponding to the graph. Among them, the geometric features required to determine the size of the figure are recorded in the unique determination condition of the figure, and when there are multiple geometric features, in addition to the parameters of the geometric features, the positional relationship between the geometric features is also recorded. Compare the geometric features with the geometric features recorded in the graphics unique determination condition. If there are multiple geometric features, compare the position relationship of the geometric features with the position relationship recorded in the graphics unique determination condition. If they are consistent, it is determined that the uniqueness is satisfied. Determine the conditions and execute step 260; otherwise, execute step 250. Among them, the positional relationship can be determined by the display position of the geometric feature in the canvas.
  • the figure is a circle
  • the target geometric property is the length of the radius.
  • the only condition for obtaining a circle is to specify the length of the semi-axis or the length of the diameter.
  • the figure is a rectangle, and there are two target geometric attributes, which correspond to the length parameters of the two sides respectively.
  • the only condition for obtaining the graph is to clarify the length parameters of the two adjacent sides. Since the edges corresponding to the target geometric attributes have been marked, this step can directly determine whether the two marked edges are two adjacent edges. After determining that the two marked edges are two adjacent edges At this time, it is determined that the conditions for determining the graphic position are satisfied, and step 260 is executed.
  • the method for determining adjacent edges can be set according to actual conditions. For example, when it is determined that there is an intersection point between two edges, the two edges are determined to be adjacent edges.
  • the two sides are determined to be adjacent sides according to the coordinate data of the two sides in the first coordinate system or the second coordinate system.
  • the figure is a triangle, and there are two target geometric attributes, which correspond to the length parameters of the two sides respectively.
  • the only determination condition for obtaining the graph is: clarify the length of the three sides, the length of the two sides and the angle between the two sides, or the angle of the two corners and the length of the side between the two corners, etc. Since the edges corresponding to the target geometric attributes have been marked, this step can directly clarify whether the two marked edges meet the conditions for determining the uniqueness of the figure. Determine whether the two marked edges meet any of the above-mentioned unique determination conditions for graphics. At this time, it can be known that the two marked edges do not satisfy the condition for determining the uniqueness of the graph through the above-mentioned uniqueness determination condition of the graph. And step 250 is executed.
  • Step 250 Display an adjustment failure prompt.
  • the display mode of the adjustment failure prompt can be set according to the actual situation. For example, a prompt box pops up in the canvas, and the prompt box displays the text "known attributes are insufficient, and the graph cannot be adjusted" to prompt the user that the adjustment has failed. For another example, cancel the marked geometric feature to remind the user that the adjustment has failed.
  • the advantage of setting the adjustment failure prompt is that the user can rewrite the target geometric attributes according to the prompt to accurately realize the graphic adjustment.
  • Step 260 Adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics, and the reshaped first writing trajectory is displayed, and the reshaped first writing trajectory is a computer drawing element.
  • the graphics when adjusting the graphics, synchronously modify the first writing trajectory representing the target geometric attributes, that is, change the target geometric attributes to numbers, letters or symbols with a set font and size for display.
  • Numbers, letters, or symbols that set the font and size can be understood as elements drawn by a computer.
  • the data parameters are obtained by recognizing the first writing track
  • the characters with the same content of the data parameters and the set font and size are obtained, and when the graphics are adjusted, the first writing track is replaced with the corresponding characters synchronously. It is understandable that obtaining characters with the same content as the first writing track and setting the font and size can also be considered as shaping the target geometric attributes represented by the first writing track.
  • the benefit of reshaping is that it improves the aesthetics of the display, and the user can determine whether the intelligent interactive tablet recognizes accurately through the geometric properties of the target after reshaping.
  • all geometric features of the graph or geometric attributes corresponding to specific geometric features can be displayed in the graph. That is, when the graphics are adjusted, the geometric attributes corresponding to the remaining geometric features except the target geometric attributes are synchronously determined, and displayed with the set font and size.
  • the relative position relationship between each geometric feature and the corresponding geometric attribute is preset, and the relative position relationship is changeable.
  • the character is displayed according to the relative position relationship, that is, the geometric attribute is displayed.
  • the original first writing track is deleted.
  • the corner mark can be displayed simultaneously.
  • the geometric feature is an axis
  • the axis can be displayed simultaneously.
  • FIG. 10 is a schematic diagram of the eighth interface of the canvas provided by an embodiment of the application.
  • a graphic 209 is displayed on the canvas.
  • the graphic 209 is input by the user through a graphic template selection operation, and the graphic 209 is a triangle.
  • FIG. 11 is a schematic diagram of the ninth interface of the canvas provided by an embodiment of the application.
  • the canvas contains three sets of first writing trajectories, and after performing number recognition and symbol recognition on the first writing trajectories, the first writing trajectories are determined to be 6, 45°, and 45° respectively, and then the first writing trajectory is determined Represents the geometric properties of the target. After that, it is determined that the target geometric attributes respectively correspond to the bottom edge and the two bottom corners of the figure 209. After that, the bottom edge and two bottom corners of the figure 209 are marked. At this time, the interface of the canvas changes from Figure 11 to Figure 12.
  • FIG. 12 is a schematic diagram of the tenth interface of the canvas provided by an embodiment of the application. Figure 12 can prompt the user to establish an association relationship between the target geometric attributes and the graphics.
  • FIG. 13 is a schematic diagram of the eleventh interface of the canvas provided by an embodiment of the application. Referring to FIG. 13, after the graphic 209 is adjusted, it is displayed as a standard graphic drawn by the computer, and at the same time, the geometric attributes of all geometric features of the graphic 209 are displayed.
  • FIG. 14 is a schematic diagram of the twelfth interface of the canvas provided by an embodiment of the application.
  • a graphic 2010 is displayed on the canvas.
  • the graphic 2010 is input by the user through a graphic template selection operation, and the graphic 2010 is circular.
  • FIG. 15 is a schematic diagram of the thirteenth interface of the canvas provided by an embodiment of the application.
  • the canvas contains a set of first writing trajectories, and after performing number recognition and character recognition on the first writing trajectory, it is determined that the first writing trajectory is: R3 and represents the radius, and then it is determined that the first writing trajectory represents the geometric attributes of the target . After that, it is determined that the target geometric attribute corresponds to the radius of the figure 2010. After that, the radius of the figure 2010 is marked.
  • the interface of the canvas changes from Figure 15 to Figure 16.
  • FIG. 16 is a schematic diagram of the fourteenth interface of the canvas provided by an embodiment of the application. Figure 16 can prompt the user to establish an association relationship between the target geometric attributes and the graphics.
  • FIG. 17 is a schematic diagram of the fifteenth interface of the canvas provided by an embodiment of the application. Referring to FIG. 17, after adjusting the graphic 2010, it is displayed as a standard graphic drawn by the computer, and at the same time, the target geometric attributes are changed to the set font and size for display.
  • the first writing track used to represent the geometric properties of the target is displayed, after which the corresponding geometric features in the figure are marked, and the geometric properties of the target are confirmed.
  • the graphic is adjusted when the unique determination condition of the graphic is satisfied, so that the target geometric property is used as the technical solution of the adjusted geometric property of the graphic, which realizes the dynamic adjustment of the graphic displayed in the canvas by means of handwriting parameters.
  • Inputting graphics by handwriting or computer drawing makes the graphics input methods diversified, and by marking geometric features, the user can be reminded that the target geometric attributes have been recognized, thereby ensuring the accuracy of the graphics adjustment process.
  • the user can clarify whether the target geometric attributes can adjust the graphics, especially in teaching scenarios. Show students what geometric features and geometric attributes need to be included in the figure, making the teaching scene more flexible and vivid.
  • FIG. 18 is a flowchart of a graph adjustment method provided in Embodiment 3 of this application.
  • the graphics adjustment method provided in this embodiment and the graphics adjustment method provided in the foregoing embodiments are applied in the same usage scenarios.
  • the graphics adjustment method provided by this embodiment specifically includes:
  • Step 310 Display graphics on the canvas.
  • the setting of this step includes at least one of the following schemes:
  • Solution 1 Step 311: Receive the second writing operation, and display the second writing track according to the second writing operation.
  • the embodiment of the means of pattern recognition is not limited.
  • a machine learning method is used to train a data set composed of a large number of graphs of known categories in advance to obtain a graph recognition model.
  • the second writing trajectory is used as the input of the pattern recognition model, and the figure represented by the second writing trajectory is determined by the output result of the pattern recognition model.
  • pre-set trajectory samples of various graphics are pre-set.
  • the second writing trajectory is matched with the trajectory samples of various types of patterns one by one, and the figure corresponding to the closest trajectory sample is determined as the figure represented by the second writing trajectory.
  • the trajectory error between the second writing trajectory and the closest trajectory template needs to be within the set error range, otherwise, it is determined that the second writing trajectory cannot be recognized.
  • Solution 2 Step 313: Receive the graphic template selection operation, and confirm the graphic type selected by the graphic template selection operation.
  • the smart interactive tablet receives a touch operation. If it is determined that the touch position of the touch operation is the display position of a certain graphic template, and the touch operation of the touch operation If the control mode is a mobile operation, it is determined that the graphic template selection operation is received. After that, monitor the current touch position of the touch operation in real time, and after confirming the end of the touch operation, obtain the touch position at the end, and use the touch position at the end as the center of the graph to draw a graphic corresponding to the graphic template. Among them, after obtaining the finished touch position, identify whether the finished touch position is in the canvas, if it is in the canvas, draw the corresponding figure, otherwise, end this operation.
  • the smart interactive tablet receives a single-click touch operation, and if it is determined that the touch position of the touch operation is the display position of a certain graphic template, it is determined A graphic template selection operation is received. After that, a graphic corresponding to the graphic template is drawn in the set position of the canvas. After drawing the graph, the user can move the graph in the canvas.
  • the smart interactive tablet receives the touch operation in the form of a click for the first time, and determines that the touch position of the touch operation is the display position of a certain graphic template , If within the set time interval, the touch operation in the form of a click is received again in the canvas, it is determined that the graphic template selection operation is received, and the touch position of the re-click is obtained, and then the touch position is drawn as the center of the graphic The graphics corresponding to the graphics template.
  • the display sizes of various types of graphics are preset, and when the graphics are drawn according to the selection operation of the graphics template, they are displayed according to the preset display size.
  • Step 320 Receive the first writing operation, and obtain the first writing trajectory according to the first writing operation, and recognize the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory.
  • the target geometric attribute includes a length parameter and an angle parameter. At least one.
  • the touch operation After displaying the graphics, if it is monitored again that the touch operation is received in the canvas, and the touch operation includes a movement path, it is determined that the first writing operation is received, and the touch position of the first writing operation is obtained, and then the touch position Display the first writing track.
  • text recognition and symbol recognition are used.
  • text recognition is used to recognize the numbers and characters contained in the first writing track
  • symbol recognition is used to determine the meaning of the symbols in the first writing track.
  • the specific means of text recognition and symbol recognition are not limited in the embodiment.
  • the numerical recognition model can realize text recognition and symbol recognition.
  • the first writing trajectory is used as the input of the numerical recognition model, and the output of the numerical recognition model is determined as the data parameter represented by the first writing trajectory.
  • the training method of the numerical recognition model can be set according to the actual situation.
  • a corresponding numerical recognition model can be set for each type of graphics.
  • the first writing trajectory is compared with preset trajectory templates of each data parameter, and the most similar trajectory template is selected as the data parameter represented by the first writing trajectory. Then, based on the data parameters, determine the feature type represented by the first writing trajectory, that is, whether the first writing trajectory is the geometric attribute of an edge, a corner or an axis, and then obtain the target geometric attribute represented by the first writing trajectory, where different features can be preset Type composition rules.
  • the marking method of the axis is preset, for example, for a circle, a line segment whose radius and diameter are both in the vertical direction is preset, and then the vertical radius or diameter can be marked in the circle.
  • the position data of each geometric feature in the canvas can be determined based on the position data of each vertex in the polygon, and then the geometric feature of the same kind closest to the target geometric attribute is selected as the corresponding geometric feature, for example, the target
  • the geometric attribute is a length parameter
  • the edge closest to the target geometric attribute is selected as the corresponding geometric feature
  • the target geometric attribute is an angle parameter
  • the angle closest to the target geometric attribute is selected as the corresponding geometric feature.
  • Step 330 Adjust the graphics according to the target geometric attributes, so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
  • a unique graphic can be obtained according to the target geometric properties, and then the position of the graphic in the canvas is determined, and then the graphic is displayed on the canvas according to the position, and the original graphic in the canvas is deleted.
  • each type of graph corresponds to a graph definite model, for example, a circle corresponds to a circle definite model, and an ellipse corresponds to an ellipse definite model.
  • the circle determination model is taken as an example.
  • the circle determination model is a model obtained by training a large number of circles with different radius lengths and diameters and their different positions in the canvas through machine learning, and combines the target geometric attributes and The position of the edge of the circle in the current canvas is also used as the input of the circle determination model, and the position of the edge of the circle output by the circle determination model in the canvas is obtained. After that, draw the adjusted circle on the canvas based on the position.
  • the graphics are polygons
  • different types of graphics have different feature calculation formulas.
  • the parameters of the remaining geometric features in the graphics are calculated through the feature calculation formulas to obtain the unique graphics.
  • the graphic deterministic model corresponding to this type of graphic is obtained, wherein each type of graphic corresponds to a type of graphic deterministic model.
  • the graphics determination model is a model obtained by training the graphics with different geometric attributes and the different positions of the vertices of the graphics in the canvas through machine learning.
  • the parameters of the geometric characteristics of the graphics are determined, the parameters and the current canvas
  • the position of the edge of the middle figure is used as the input of the figure determination model, and the position of each vertex of the figure determination model output in the canvas is obtained. After that, the adjusted figure is drawn on the canvas based on the vertex position.
  • the first writing trajectory is recognized to determine the target geometric attribute represented by the first writing trajectory, and then, according to the target geometry
  • the technical solution of attribute adjustment graphics realizes the adjustment of the graphics displayed in the canvas by means of handwriting parameters, so that the adjusted graphics can better meet the expectations of users.
  • the accuracy of the graphics adjustment is high, which meets the user's adjustment expectations.
  • the operation process is simple and convenient, does not require high user proficiency, is convenient for users to realize, and improves user experience.
  • FIG. 19 is a flowchart of a graph adjustment method provided by Embodiment 4 of this application. This embodiment is embodied on the basis of the above-mentioned embodiment. Referring to FIG. 19, the graphics adjustment method provided by this embodiment specifically includes:
  • Step 401 Display graphics on the canvas.
  • Step 402 Receive a first writing operation, and obtain a first writing trajectory according to the first writing operation, and identify the first writing trajectory to determine the first data parameter and feature type represented by the first writing trajectory.
  • the user may input multiple target geometric attributes.
  • the first writing trajectory corresponding to each target geometric attribute is determined as a group.
  • the grouping mode can be set according to the actual situation. For example, when the writing time interval of the multiple first writing tracks is within the set interval and the distance between the multiple first writing tracks is within the set distance, then multiple writing tracks are determined.
  • the first writing trajectory is a set of writing trajectories. At this time, it can be clear that the first writing track includes at least one group.
  • this step specifically includes: performing at least one of number recognition, symbol recognition, and character recognition on each group of first writing trajectories to determine the first data parameter and feature type represented by each group of first writing trajectories.
  • number recognition, symbol recognition, and character recognition are taken as examples.
  • text recognition refers to the recognition of letters.
  • the target geometric attributes include the first data parameter and the feature type.
  • the first data parameter refers to the track content determined after recognizing the first writing track, and the track content includes numbers, symbols, and letters. Therefore, the first data parameter can be obtained through number recognition, symbol recognition, and character recognition.
  • the implementation means embodiments of number recognition, symbol recognition, and character recognition are not limited.
  • a numerical recognition model is constructed by means of machine learning, so as to obtain at least one of the numbers, symbols, and letters represented by the first writing trajectory through the numerical recognition model.
  • standard writing trajectories corresponding to different numbers, symbols, and letters are preset, and then the first writing trajectory is matched with each standard writing trajectory to determine at least one of the numbers, symbols, and letters identified by the first writing trajectory.
  • the first data parameters obtained after recognizing the first writing track include: the number 45, the symbol °
  • the first data parameters obtained after recognizing the first writing track include: the letter R, The number 3.
  • the identification means also needs to be changed accordingly.
  • the identification means may only use number identification.
  • the character recognition should also include Chinese character recognition.
  • the feature type refers to the type of geometric feature corresponding to the first data parameter.
  • Feature types include edges, corners, and shafts.
  • the feature type is axis, it specifically includes radius, diameter, short semi-axis, long semi-axis, etc.
  • pre-set the parameter composition rules for each feature type For example, the parameter composition rules of edges are numbers, the parameter composition rules of angles are numbers and the symbol "°", and the parameter composition rules of axes are letters and numbers.
  • the feature type can be obtained by combining the parameter combination rules.
  • the first writing track contains a number and a symbol "°". Therefore, it can be determined that the feature type is an angle.
  • the geometric attributes of the target represented by the first written trajectory can be determined by the first data parameter and the feature type.
  • each group of first writing trajectories can be identified separately.
  • the first writing trajectory is monitored in real time, and when the writing of a group of first writing trajectories is confirmed, the first writing trajectory of the group is recognized. After confirming that the writing of the next set of first writing trajectories is completed, the next set of first writing trajectories are recognized.
  • the first data parameter and the characteristic type may be determined at the same time, or the first data parameter may be determined first, and then the characteristic type may be determined, or the characteristic type may be determined first, and then the first data parameter may be determined.
  • different recognition models are set for different types of graphics in advance.
  • the recognition model adopts a machine learning method and is obtained after training a large number of first writing trajectories with known first data parameters and feature types.
  • the first data parameter can be obtained by using the data recognition model to identify the first writing track, and then the first data parameter can be identified by the composition rule of the feature type. Determine the geometric characteristics of the first data parameter.
  • Step 403 Determine the geometric feature corresponding to the first data parameter in the graph according to the feature type.
  • the geometric feature includes an edge, a corner, or an axis.
  • this step specifically includes: Steps 4031-4033:
  • Step 4031 Obtain all geometric features that meet the feature type in the graph.
  • the feature type of the first writing track is an edge or a corner.
  • the position data of each edge in the graph in the canvas is obtained, that is, all geometric features satisfying the feature type as an edge are obtained in the graph.
  • the position data of each vertex in the graph in the canvas can be obtained in advance, and then the position data of the corresponding edge can be determined according to the position data of the vertex.
  • the position data of each vertex in the graph is obtained, and the position data is used as the position data of the corresponding angle, that is, all geometric features satisfying the feature type as an angle are obtained in the graph.
  • the method for determining the vertex position data can be set according to actual conditions.
  • the position data of the intersection of the trajectories are synchronously acquired as the position data of the vertex.
  • the position data of the trajectory intersection point is synchronously determined as the position data of the vertex.
  • Step 4032 Acquire first position data of the first writing track.
  • the first position data of the first writing trajectory has already been obtained. Therefore, the first position data can be directly obtained in this step.
  • Step 4033 Among all geometric features satisfying the feature type, search for the geometric feature closest to the first position data, and use the found geometric feature as the geometric feature corresponding to the first data parameter.
  • the location data of each edge in the graph is compared with the first location data to determine the edge closest to the first location data, and the edge is taken as the edge corresponding to the first data parameter.
  • the method of comparing the position data of each side with the first position data may be: determining the minimum area of the first position data (the smallest rectangular area containing the first position data), and at the same time, determining the minimum area of each side (The smallest rectangular area containing the side), then, calculate the distance between the center points of the two smallest areas, and take the side corresponding to the smallest distance as the closest geometric feature of the first position data.
  • FIG. 20 is a schematic diagram of the sixteenth interface of the canvas provided by an embodiment of the application.
  • the graphics in the canvas are triangles. Among them, the three sides of the triangle correspond to the minimum area 41, the minimum area 42, and the minimum area 43, respectively.
  • the first position data of the first writing track corresponds to the minimum area 44. At this time, the center point of the minimum area 44 and the minimum area 41 are respectively calculated. , The minimum area 42 and the distance between the center points of the minimum area 43, after which the minimum area 42 is determined to be the closest to the minimum area 44. At this time, the edge corresponding to the minimum area 42 is taken as the geometry corresponding to the target geometric attribute represented by the first writing trajectory feature. It can be understood that the minimum area shown in the figure is only easy to understand, and the minimum area will not be displayed in actual applications.
  • the position data of each vertex in the graph is compared with the first position data to determine the vertex closest to the first position data, and the angle corresponding to the vertex is taken as the angle corresponding to the first data parameter.
  • the method of comparing the position data of the vertex with the first position data may be to obtain any coordinate position in the vertex, calculate the distance between the coordinate position and the minimum area center point of the first position data, and take the angle corresponding to the minimum distance, and The side corresponding to the angle is regarded as the closest angle of the first position data.
  • step 403 is specifically: selecting a corresponding geometric feature in the figure according to the feature type as the geometric feature corresponding to the first data parameter in the figure.
  • the geometric feature is usually an axis.
  • the graphic is a circle and the feature type is a radius
  • any radius of the circle or a set radius (such as the radius on the right in the horizontal direction) can be directly obtained as the radius corresponding to the first data parameter.
  • the graph is an ellipse and the feature type is the short semi-axis
  • Half shaft is the set short semi-axis, any short semi-axis, or the short semi-axis closest to the first data parameter.
  • Step 404 Establish an association relationship between the target geometric attribute and the corresponding geometric feature in the graph, and mark the geometric feature.
  • an association relationship between the target geometric attributes and the geometric features is established, for example, the same identification is added for the target geometric attributes and the geometric features.
  • Step 405 Determine whether the target geometric attribute meets the graphics unique determination condition of the graphics, and each type of graphics corresponds to the unique determination condition of one type of graphics. If the target geometric attribute meets the condition for determining the uniqueness of the figure, step 406 is executed. If the target geometric attribute does not satisfy the condition for determining the uniqueness of the figure, step 407 is executed.
  • each type of graphics is provided with graphics unique determination conditions. After the type of graphics is identified, the corresponding graphics unique determination conditions can be obtained, and then it is determined whether the target geometric attributes meet the graphics unique determination conditions.
  • the figure is a polygon
  • all target geometric attributes of the figure are obtained, and then it is determined whether the geometric features corresponding to all the target geometric attributes meet the conditions for determining the uniqueness of the figure. For example, when the figure is a triangle, determine that the geometric features corresponding to the target geometric attributes are one side and two corners, and confirm that the position relationship between the above geometric features is that the side is located between the two corners.
  • the graphics unique determination condition is compared to confirm whether the position relationship is consistent with the position relationship in the graphics unique determination condition. If so, it is determined that the graphics unique determination condition is satisfied; otherwise, it is determined that the graphics unique determination condition is not satisfied.
  • the position relationship can be determined by the position data of each geometric feature in the canvas.
  • the figure when the figure is a rectangle, determine that the geometric features corresponding to the target geometric properties are the two sides in the rectangle, and confirm that the positional relationship between the two sides is adjacent, and then compare with the positional relationship in the unique determination condition of the figure. Yes, to confirm whether the positional relationship is consistent with the positional relationship in the graphics unique determination condition.
  • the figure is a round figure
  • the graphics uniquely determine the conditions. For example, when the graphic is circular, the feature type of the target geometric attribute is radius, which is consistent with the feature type (radius or diameter) in the unique determination condition of the circular graphic. Therefore, it is determined that the unique determination condition of the graphic is satisfied.
  • the feature type of the target geometric attribute is the semi-minor axis, which is inconsistent with the feature type (the semi-minor axis and the semi-major axis, or the minor axis or the major axis) that uniquely determines the condition of the ellipse. , It is determined that the unique determination condition of the graph is not satisfied.
  • Step 406 Adjust the graphics according to the target geometric attributes.
  • this step includes steps 4061 to 4062:
  • Step 4061 Determine the second position data of all vertices in the graph according to the target geometric attributes.
  • setting this step includes 40611-step 40613:
  • Step 40611 retrieve the feature calculation formula of the graph.
  • each type of graph has a corresponding characteristic calculation formula.
  • the characteristic calculation formula of a triangle includes the Pythagorean theorem, the law of sine, and the law of cosine.
  • the characteristic calculation formula of a square is that the side lengths are equal, and each internal angle is 90°.
  • Step 40612 Substitute the target geometric attributes into the feature calculation formula to calculate the second data parameter of each edge in the graph.
  • the second data parameter of each side in the graph can be obtained, where the second data parameter represents the length parameter of the corresponding side. It is understandable that in some cases, multiple feature calculation formulas are required to obtain the second data parameter of each edge in the graph.
  • the sequence of substituting each feature calculation formula can be determined, where the substituting sequence can be set according to actual conditions, for example, the fastest obtaining of the second data parameter of each side as a criterion determines the substituting sequence.
  • step 407 is executed.
  • Step 40613 Determine the second position data of the vertex according to the second data parameter.
  • the position of each vertex in the adjusted graph on the canvas is recorded as the second position data.
  • the second position data is obtained through the graphic determination model.
  • the second data parameters and the position data of the current vertices of the graphic are used as the input of the graphic determination model, and the position data output by the graphic data model is recorded as the adjusted graphic The second position data of each vertex.
  • the position data of a vertex in the current graph is used as the adjusted second position data of the vertex, and then the second position data of the remaining vertices are determined based on the second data parameter.
  • Step 4062 display the adjusted graph according to the second position data.
  • the position data of each edge after adjustment can be obtained, and then a new graph is drawn on the canvas as the adjusted graph according to the position data of each edge. At the same time, delete the original graphics in the canvas.
  • the first writing track is reshaped and displayed in the adjusted graph.
  • the embodiment of the shaping means is not limited. Pre-set the relative position relationship between the target geometric attributes and the graphics, and after shaping, display the target geometric attributes in the graphics according to the relative position relationship.
  • Step 407 Confirm and execute the subsequent execution plan.
  • an execution plan can be set and executed as a follow-up execution plan according to the actual situation.
  • the subsequent execution plan includes any of the following execution plans:
  • Solution 1 Display the adjustment failure prompt.
  • the adjustment failure prompt is triggered, and the preset prompt box display content and display position are called.
  • the control display screen displays the prompt box according to the display content and display position to prompt the user that the adjustment has failed. At this point, it can continue to detect whether the first writing operation is received, and after receiving the first writing operation, continue to perform the above operations, and confirm whether the graphics can be adjusted.
  • Solution 2 Find the geometric features corresponding to the target geometric attributes in the graphics, determine the actual geometric attributes of the geometric features, determine the modification range according to the target geometric attributes and the actual geometric attributes, and adjust the graphics according to the modification range.
  • the first data parameter is 5.
  • the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, and the actual geometric properties of the edges corresponding to the geometric properties of the target in the rectangle are obtained.
  • the actual geometric property is 4.
  • the modification range is determined to be 5/4.
  • find an adjacent side of the side corresponding to the target geometric property in the rectangle and confirm that the actual geometric property of the adjacent side is 8.
  • the result of 8*5/4 is used as the adjusted geometric property of the adjacent side .
  • the graphics are adjusted according to the target geometric attributes and the adjusted geometric attributes. It can be understood that at this time, the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
  • the first data parameter is 5.
  • the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, and the actual geometric properties of the minor semi-axis corresponding to the geometric properties of the target in the ellipse are obtained.
  • the actual geometric property is 4.
  • the modification range is determined to be 5/4.
  • search for any semi-major axis in the ellipse and confirm that the actual geometric attribute of the semi-major axis is 8.
  • the result of 8*5/4 is used as the geometric attribute of the semi-major axis after adjustment.
  • the graphics are adjusted according to the target geometric attributes and the adjusted geometric attributes. It can be understood that at this time, the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
  • any one of the target geometric attributes and the corresponding actual geometric attributes can be selected to obtain the modification range.
  • other target geometric attributes can be modified according to the actual geometric attributes corresponding to their geometric features to ensure that graphics can be obtained.
  • Solution 3 Find the corresponding geometric features in the graphics according to the unique determination conditions of the graphics, determine the actual geometric attributes of the geometric features, and adjust the graphics according to the target geometric attributes and the actual geometric attributes.
  • the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
  • the feature types of the two target geometric attributes are edges, and the first data parameter is 5.
  • the geometric attributes of the target do not satisfy the conditions for determining the uniqueness of the figure, and the angle between the two edges corresponding to the geometric attributes of the target is obtained according to the conditions for determining the uniqueness of the graphics.
  • the actual geometric properties of the determined angle are 70°.
  • the first writing track is recognized to obtain the first data parameter and the characteristic type, and then the first writing track is determined according to the characteristic type.
  • the first data parameter corresponds to the geometric feature in the graph, and establishes the association relationship between the target geometric property and the corresponding geometric feature.
  • the graph is adjusted according to the target geometric property, and the target geometry is confirmed
  • the technical solution of adjusting the graphic with an adjustment failure prompt or combining the actual geometric attributes of the graphic realizes the adjustment of the graphic displayed in the canvas by handwriting parameters, and the accuracy of graphic adjustment is high .
  • the geometric feature corresponding to the target geometric property can be accurately determined through the positional relationship between each geometric feature and the target geometric property, and the data parameters of the edge in the graph can be quickly and accurately obtained through the pre-stored feature calculation formula, and then accurately obtained
  • the position data of each vertex after adjustment ensures the accuracy of graphics adjustment.
  • FIG. 21 is a schematic structural diagram of a graphic adjustment device provided in Embodiment 5 of the application.
  • the graphic adjustment device includes: a first display module 501, a second display module 502, and a first adjustment module 503.
  • the first display module 501 is used to display graphics in the canvas; the second display module 502 is used to display a first writing trajectory in response to the received first writing operation, and the first writing trajectory represents the geometric attributes of the target
  • the target geometric attribute includes at least one of a length parameter and an angle parameter; the first adjustment module 503 is configured to adjust the graphic so that the target geometric attribute is used as the geometric attribute of the adjusted graphic.
  • a feature marking module which is used to respond to the received first writing operation, after displaying the first writing trajectory, and based on the target geometric attributes, to compare the corresponding geometric features in the figure Marking is performed, the geometric features include edges, corners, or axes, and each target geometric attribute corresponds to one geometric feature.
  • the feature marking module is specifically configured to: when the geometric feature corresponding to the target geometric attribute is an edge, change the display parameter of the geometric feature; the geometric feature corresponding to the target geometric attribute is an angle or axis At the time, the mark of the geometric feature is added to the graphic.
  • the fourth display module is configured to display an adjustment failure prompt when it is confirmed that the target geometric attribute does not satisfy the condition for determining the uniqueness of the figure after displaying the first writing trajectory in response to the received first writing operation .
  • the first display module 501 is specifically configured to: in response to the received second writing operation, display a second writing trajectory in the canvas, the second writing trajectory composing a graph; or, in response to receiving The graphic template selection operation that has been obtained, the graphic corresponding to the graphic template selection operation is displayed on the canvas.
  • the first adjustment module 503 is further configured to: display the reshaped first writing trajectory, and the reshaped first writing trajectory is a computer drawing element.
  • the graphic adjustment device provided above can be used to implement the graphic adjustment method provided in any one of the foregoing embodiment 1 to embodiment 2, and has corresponding functions and beneficial effects.
  • FIG. 22 is a schematic structural diagram of another graphic adjustment device provided by the fifth embodiment of the present application.
  • the graphic adjustment device includes: a third display module 504, an operation receiving module 505, and a second adjustment module 506.
  • the third display module 504 is used to display graphics in the canvas;
  • the operation receiving module 505 is used to receive a first writing operation, and obtain a first writing track according to the first writing operation, and to compare the first writing track Recognition is performed to determine the target geometric attribute represented by the first writing track, the target geometric attribute includes at least one of a length parameter and an angle parameter;
  • the second adjustment module 506 is configured to adjust the figure according to the target geometric attribute , So that the target geometric attribute is used as the geometric attribute of the adjusted figure.
  • the operation receiving module 505 includes: a trajectory determining unit for receiving a first writing operation, and obtaining the first writing trajectory according to the first writing operation, and a parameter determining unit for evaluating the first writing operation.
  • a writing track is identified to determine the first data parameter and feature type represented by the first writing track;
  • the feature confirmation unit is configured to determine the corresponding first data parameter in the graph according to the feature type Geometric features, the geometric features include edges, corners or shafts.
  • the first writing trajectory includes at least one group;
  • the parameter determining unit specifically includes: performing at least one of number recognition, symbol recognition, and character recognition on each group of the first writing trajectory to determine each group Set the first data parameter and feature type represented by the first writing track.
  • the graphic is a polygon
  • the feature confirmation unit includes: a feature acquisition subunit for acquiring all geometric features in the graphic that meet the feature type; a position acquisition subunit for acquiring the first A first position data of a writing track; a feature search subunit, used to search for the geometric feature closest to the first position data among all geometric features that satisfy the feature type, and use the found geometric feature as the all geometric features The geometric feature corresponding to the first data parameter.
  • the relationship establishment module is used to identify the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory, and then establish the target geometric attribute and the figure. Corresponding to the association relationship of the geometric features, and marking the geometric features.
  • the second adjustment module 506 is specifically configured to adjust the graphics according to the target geometric attributes if the target geometric attributes meet the conditions for determining the uniqueness of the graphics, so that the target geometric attributes serve as The geometric properties of the adjusted figure.
  • a failure execution module configured to display an adjustment failure prompt if the target geometric attribute does not meet the condition for determining the uniqueness of the figure; or, if the target geometric attribute does not meet the If the figure is uniquely determined, the geometric feature corresponding to the target geometric attribute is searched in the figure, the actual geometric attribute of the geometric feature is determined, the modification range is determined according to the target geometric attribute and the actual geometric attribute, and according to The modification range adjusts the graphic; or, if the target geometric attribute does not satisfy the unique determination condition of the graphic, the corresponding geometric feature is searched in the graphic according to the unique determination condition of the graphic, and the geometric feature is determined And adjust the graphics according to the target geometric properties and the actual geometric properties.
  • the graphic is a polygon
  • the second adjustment module 506 includes: a vertex determining unit, configured to determine the second position data of all vertices in the graphic according to the target geometric attributes; and a graphic display unit, configured to The adjusted graph is displayed according to the second position data.
  • the vertex determination unit includes: a formula calling subunit for calling a feature calculation formula of the graph; a formula calculation subunit for substituting the target geometric attribute into the feature calculation formula , To calculate the second data parameter of each edge in the graph; the position determining subunit is used to determine the second position data of the vertex according to the second data parameter.
  • the third display module 504 includes: a writing receiving unit for receiving a second writing operation, and displaying the second writing track according to the second writing operation;
  • the second writing trajectory performs pattern recognition to determine the figure represented by the second writing trajectory.
  • the graphics adjustment device provided above can be used to execute the graphics adjustment method provided in any one of the third and fourth embodiments above, and has corresponding functions and beneficial effects.
  • FIG. 23 is a schematic structural diagram of a graphics adjustment device provided in Embodiment 6 of this application.
  • the description is made by taking the smart interactive tablet as the graphics adjustment device as an example.
  • the smart interactive tablet 60 includes at least one processor 61, at least one network interface 62, a user interface 63, a memory 64, and at least one communication bus 65.
  • the communication bus 65 is used to realize the connection and communication between these components.
  • the user interface 62 may include a display screen and a camera, and the optional user interface 63 may also include a standard wired interface and a wireless interface.
  • the network interface 62 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).
  • the processor 61 may include one or more processing cores.
  • the processor 61 uses various interfaces and lines to connect the various parts of the entire intelligent interactive tablet 60, by running or executing instructions, programs, code sets, or instruction sets stored in the processor 61, and calling data stored in the memory 64 , Perform various functions of the smart interactive tablet 60 and process data.
  • the processor 61 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable logic arrays, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 61 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the display; the modem is used to process wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 61, but may be implemented by a chip alone.
  • the memory 64 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 64 includes a non-transitory computer-readable storage medium.
  • the memory 64 may be used to store instructions, programs, codes, code sets, or instruction sets.
  • the memory 64 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions used to implement the foregoing method embodiments, etc.; the storage data area can store the data involved in the foregoing method embodiments, etc.
  • the memory 64 may also be at least one storage device located far away from the aforementioned processor 61.
  • the memory 64 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program of a smart interactive tablet.
  • the user interface 63 is mainly used to provide an input interface for the user to obtain data input by the user; and the processor 61 can be used to call the operation application of the smart interactive tablet stored in the memory 64 Program, and specifically execute the relevant operations in the element control method in the above embodiment.
  • the operating system of the smart interactive tablet is Android.
  • the above-mentioned smart interactive tablet can be used to execute any graphics adjustment method, and has corresponding functions and beneficial effects.
  • an embodiment of the present application also provides a storage medium containing computer-executable instructions, which are used to perform related operations in the graphics adjustment method provided by any embodiment of the present application when the computer-executable instructions are executed by a computer processor. , And have corresponding functions and beneficial effects.
  • this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware.
  • this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to the embodiments of this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions.
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-permanent memory in a computer readable medium, and at least one form of random access memory (RAM) and non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

Landscapes

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

Abstract

A graphic adjustment method and apparatus, a device and a storage medium, relating to the field of electronic whiteboard technology. The method comprises: displaying a graphic in a canvas (310); receiving a first writing operation, obtaining a first writing track according to the first writing operation, and recognizing the first writing track so as to determine a target geometric attribute represented by the first writing track, wherein the target geometric attribute comprises a length parameter and/or an angle parameter (320); and adjusting the graphic according to the target geometric attribute, so that the target geometric attribute serves as a geometric attribute of the adjusted graphic (330). The described method can solve the technical problem in the related art that a graphic cannot be adjusted accurately and simply.

Description

图形调整方法、装置、设备及存储介质Graphic adjustment method, device, equipment and storage medium
本公开要求在2019年10月23日提交中国专利局、申请号为201911010626.X的中国专利申请的优先权,以上申请的全部内容通过引用结合在本公开中。This disclosure claims the priority of a Chinese patent application filed with the Chinese Patent Office with an application number of 201911010626.X on October 23, 2019, and the entire content of the above application is incorporated into this disclosure by reference.
技术领域Technical field
本申请涉及电子白板技术领域,例如涉及一种图形调整方法、装置、设备及存储介质。This application relates to the technical field of electronic whiteboards, for example, to a graphic adjustment method, device, device, and storage medium.
背景技术Background technique
随着计算机技术的发展,计算机设备被广泛应用于日常生活的各类场景。例如,具有电子白板功能的平板电脑、电视机等智能设备被广泛应用在办公、教学等场景下。此时,用户可以基于电子白板功能在显示屏中进行书写、绘画等操作。例如,在教学场景下,讲师可以根据需要通过电子白板功能在显示屏中绘制几何图形,并对学生进行相应的讲解。但是相关技术存在如下缺陷:若讲师需要对已绘制的几何图形进行修改,通常需要讲师手动选择调整的点(如顶点),之后,通过拖拽该点的方式调整图形。然而,由于拖拽操作的精确度不高,会使得调整后图形与讲师期望得到的图形不符,此时,讲师仅能通过反复拖拽的方式提高准确度。综上,如何精准、简单地实现对图形的调整,成为了亟需解决的技术问题。With the development of computer technology, computer equipment is widely used in various scenes of daily life. For example, smart devices such as tablet computers and TVs with electronic whiteboard functions are widely used in office and teaching scenarios. At this point, the user can perform operations such as writing and drawing on the display screen based on the electronic whiteboard function. For example, in a teaching scenario, the lecturer can draw geometric figures on the display screen through the electronic whiteboard function as needed, and give corresponding explanations to the students. However, the related technology has the following defects: if the lecturer needs to modify the drawn geometric figure, the lecturer usually needs to manually select the adjusted point (such as the vertex), and then adjust the figure by dragging the point. However, because the precision of the drag operation is not high, the adjusted graphics will not match the graphics expected by the lecturer. At this time, the lecturer can only improve the accuracy by repeatedly dragging. In summary, how to adjust graphics accurately and simply has become a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本申请提供了一种图形调整方法、装置、设备及存储介质,以解决相关技术中无法精准、简单地对图形进行调整的技术问题。The present application provides a graphic adjustment method, device, equipment, and storage medium to solve the technical problem that the graphic cannot be adjusted accurately and simply in the related art.
第一方面,本申请提供了一种图形调整方法,包括:In the first aspect, this application provides a graphics adjustment method, including:
在画布中显示图形;Display graphics in the canvas;
响应于接收到的第一书写操作,显示第一书写轨迹,所述第一书写轨迹表示目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;In response to the received first writing operation, displaying a first writing trajectory, the first writing trajectory representing a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter;
调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The graphic is adjusted so that the target geometric attribute is the geometric attribute of the adjusted graphic.
所述响应于接收到的第一书写操作,显示第一书写轨迹之后,包括:After displaying the first writing track in response to the received first writing operation, the method includes:
基于所述目标几何属性,对所述图形中相应的几何特征进行标记,所述几何特征包括边、角或轴,每个所述目标几何属性对应一个所述几何特征。Based on the target geometric attributes, mark corresponding geometric features in the graphics. The geometric features include edges, corners, or axes, and each target geometric attribute corresponds to one geometric feature.
所述对所述图形中相应的几何特征进行标记包括:The marking the corresponding geometric features in the graphics includes:
所述目标几何属性对应的几何特征为边时,更换所述几何特征的显示参数;When the geometric feature corresponding to the target geometric attribute is an edge, the display parameter of the geometric feature is changed;
所述目标几何属性对应的几何特征为角或轴时,在所述图形中添加所述几何特征的标记。When the geometric feature corresponding to the target geometric attribute is a corner or an axis, a mark of the geometric feature is added to the graphic.
所述响应于接收到的第一书写操作,显示第一书写轨迹之后,还包括:After displaying the first writing track in response to the received first writing operation, the method further includes:
确认所述目标几何属性不满足图形唯一确定条件时,显示调整失败提示。When it is confirmed that the geometric properties of the target do not meet the conditions for determining the uniqueness of the figure, an adjustment failure prompt is displayed.
所述在画布中显示图形包括:The display of graphics in the canvas includes:
响应于接收到的第二书写操作,在画布中显示第二书写轨迹,所述第二书写轨迹组成图形;或,In response to the received second writing operation, display a second writing track on the canvas, the second writing track composing a graph; or,
响应于接收到的图形模板选择操作,在画布中显示与所述图形模板选择操作对应的图形。In response to the received graphic template selection operation, a graphic corresponding to the graphic template selection operation is displayed on the canvas.
所述调整所述图形,以使所述目标几何属性作为调整后图形的几何属性之后,还包括:After the adjusting the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics, the method further includes:
显示整形后的所述第一书写轨迹,所述整形后的所述第一书写轨迹更为计算机绘制元素。The reshaped first writing trajectory is displayed, and the reshaped first writing trajectory is more computer-drawn elements.
第二方面,本申请还提供了一种图形调整方法,包括:In the second aspect, this application also provides a graphics adjustment method, including:
在画布中显示图形;Display graphics in the canvas;
接收第一书写操作,并根据所述第一书写操作得到第一书写轨迹,对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;A first writing operation is received, and a first writing trajectory is obtained according to the first writing operation, and the first writing trajectory is recognized to determine a target geometric attribute represented by the first writing trajectory, and the target geometric attribute includes At least one of length parameter and angle parameter;
根据所述目标几何属性调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The graphic is adjusted according to the target geometric attribute, so that the target geometric attribute is used as the geometric attribute of the adjusted graphic.
所述对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性包括:The recognizing the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory includes:
对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的第一数据参数以及特征类型;Identifying the first writing trajectory to determine the first data parameter and feature type represented by the first writing trajectory;
根据所述特征类型,确定所述第一数据参数在所述图形中对应的几何特征,所述几何特征包括边、角或轴。According to the feature type, a geometric feature corresponding to the first data parameter in the graph is determined, and the geometric feature includes an edge, a corner, or an axis.
所述第一书写轨迹包括至少一组;The first writing track includes at least one group;
所述对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的第一数据参数以及特征类型包括:The recognizing the first writing trajectory to determine the first data parameter and characteristic type represented by the first writing trajectory includes:
对每组所述第一书写轨迹进行数字识别、符号识别和文字识别至少之一,以确定每组所述第一书写轨迹表示的第一数据参数以及特征类型。At least one of number recognition, symbol recognition, and character recognition is performed on each group of the first writing trajectories to determine the first data parameter and feature type represented by each group of the first writing trajectory.
所述图形为多边形;The figure is a polygon;
所述根据所述特征类型,确定所述第一数据参数在所述图形中对应的几何特征包括:The determining, according to the feature type, the geometric feature corresponding to the first data parameter in the graph includes:
获取所述图形中满足所述特征类型的全部几何特征;Acquiring all geometric features in the graph that meet the feature type;
获取所述第一书写轨迹的第一位置数据;Acquiring first position data of the first writing track;
在满足所述特征类型的全部几何特征中,查找距离所述第一位置数据最近的几何特征,并将查找到的几何特征作为所述第一数据参数对应的几何特征。Among all geometric features satisfying the feature type, the geometric feature closest to the first position data is searched, and the found geometric feature is used as the geometric feature corresponding to the first data parameter.
所述对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性之后,包括:After recognizing the first writing trajectory to determine the geometric attributes of the target represented by the first writing trajectory, the method includes:
建立所述目标几何属性与所述图形中对应几何特征的关联关系,并对所述几何特征进行标记。Establish an association relationship between the target geometric attribute and the corresponding geometric feature in the graph, and mark the geometric feature.
所述根据所述目标几何属性调整所述图形包括:The adjusting the graphics according to the target geometric attributes includes:
若所述目标几何属性满足所述图形唯一确定条件,则根据所述目标几何属性调整所述图形。If the target geometric attribute satisfies the unique determination condition of the figure, the figure is adjusted according to the target geometric attribute.
还包括:Also includes:
若所述目标几何属性不满足所述图形唯一确定条件,则显示调整失败提示;或,If the target geometric attributes do not meet the conditions for the unique determination of the figure, a prompt of adjustment failure is displayed; or,
若所述目标几何属性不满足所述图形唯一确定条件,则在所述图形中查找所述目标几何属性对应的几何特征,确定所述几何特征的实际几何属性,根据所述目标几何属性和所述实际几何属性确定修改幅度,并根据所述修改幅度调整所述图形;或,If the target geometric attribute does not satisfy the unique determination condition of the figure, the geometric characteristic corresponding to the target geometric attribute is searched in the figure, the actual geometric attribute of the geometric characteristic is determined, and the target geometric attribute and the geometric characteristic are determined. The actual geometric attributes determine the modification range, and adjust the graphics according to the modification range; or,
若所述目标几何属性不满足所述图形唯一确定条件,则根据所述图形唯一确定条件在所述图形中查找相应的几何特征,确定所述几何特征的实际几何属性,并根据所述目标几何属性和所述实际几何属性调整所述图形。If the target geometric attribute does not meet the unique determination condition of the figure, the corresponding geometric feature is searched in the figure according to the unique determination condition of the figure, the actual geometric attribute of the geometric feature is determined, and the target geometry The attributes and the actual geometric attributes adjust the graphics.
所述图形为多边形,所述根据所述目标几何属性调整所述图形包括:The graphic is a polygon, and the adjusting the graphic according to the target geometric attribute includes:
根据所述目标几何属性确定所述图形中全部顶点的第二位置数据;Determining the second position data of all vertices in the graph according to the target geometric attributes;
根据所述第二位置数据显示调整后的图形。The adjusted graph is displayed according to the second position data.
所述根据所述目标几何属性确定所述图形中全部顶点的第二位置数据包括:The determining the second position data of all vertices in the graph according to the target geometric attributes includes:
调取所述图形的特征计算公式;Retrieve the characteristic calculation formula of the graph;
将所述目标几何属性代入所述特征计算公式,以计算所述图形中每条边的第二数据参数;Substituting the target geometric attribute into the feature calculation formula to calculate the second data parameter of each edge in the graph;
根据所述第二数据参数确定所述顶点的第二位置数据。The second position data of the vertex is determined according to the second data parameter.
所述在画布中显示图形包括:The display of graphics in the canvas includes:
接收第二书写操作,并根据所述第二书写操作显示第二书写轨迹;Receiving a second writing operation, and displaying a second writing track according to the second writing operation;
对所述第二书写轨迹进行图形识别,以确定所述第二书写轨迹表示的图形。Graphic recognition is performed on the second writing trajectory to determine the graphic represented by the second writing trajectory.
第三方面,本申请还提供了一种图形调整装置,包括:In the third aspect, this application also provides a graphics adjustment device, including:
第一显示模块,用于在画布中显示图形;The first display module is used to display graphics in the canvas;
第二显示模块,用于响应于接收到的第一书写操作,显示第一书写轨迹,所述第一书写轨迹表示目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;The second display module is configured to display a first writing trajectory in response to the received first writing operation, the first writing trajectory representing a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter;
第一调整模块,用于调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The first adjustment module is configured to adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
第四方面,本申请还提供了一种图形调整装置,包括:In a fourth aspect, this application also provides a graphics adjustment device, including:
第三显示模块,用于在画布中显示图形;The third display module is used to display graphics on the canvas;
操作接收模块,用于接收第一书写操作,并根据所述第一书写操作得到第一书写轨迹;对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;The operation receiving module is configured to receive a first writing operation, and obtain a first writing trajectory according to the first writing operation; to recognize the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory, The target geometric attribute includes at least one of a length parameter and an angle parameter;
第二调整模块,用于根据所述目标几何属性调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The second adjustment module is configured to adjust the graphics according to the target geometric attributes, so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
第五方面,本申请还提供了一种图形调整设备,包括:In a fifth aspect, this application also provides a graphics adjustment device, including:
一个或多个处理器;One or more processors;
存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如第一方面或如第二方面所述的图形调整方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the graphics adjustment method according to the first aspect or the second aspect.
第六方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面或如第二方面所述的图形调整方法。In a sixth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the graphics adjustment method as described in the first aspect or the second aspect is implemented.
上述图形调整方法、装置、设备及存储介质,通过在画布中显示图形,并在接收到第一书写操作后,显示用于表示目标几何属性的第一书写轨迹,其中,目标几何属性包括长度参数和角度参数至少之一,之后,根据目标几何属性对图形进行调整的技术手段,实现了通过手写参数的方式,对画布中显示的图形进行调整,以使调整后的图形更加符合用户的期望,且图形调整的准确度高。同时,操作过程简单方便,对于用户操作熟练度要求不高,便于用户实现,提升了用户使用体验;通过手写或计算机绘制的方式输入图形,使得图形输入方式多样化;通过标记几何特征的方式可以提示用户已经识别目标几何属性,进而保证图形调整过程准确进行。The above-mentioned graphic adjustment method, device, equipment and storage medium display the graphic on the canvas, and after receiving the first writing operation, display the first writing trajectory for representing the geometric properties of the target, wherein the geometric properties of the target include length parameters Afterwards, the technical means of adjusting the graphics according to the target geometric attributes realizes the adjustment of the graphics displayed in the canvas by handwriting parameters, so that the adjusted graphics can be more in line with the user’s expectations. And the accuracy of graphics adjustment is high. At the same time, the operation process is simple and convenient, and does not require high user proficiency, which is convenient for users to realize and enhances user experience; inputting graphics by handwriting or computer drawing makes the graphics input methods diversified; marking geometric features can be The user is prompted that the geometric attributes of the target have been identified, thereby ensuring that the graphics adjustment process is carried out accurately.
附图说明Description of the drawings
图1为本申请实施例一提供的一种图形调整方法的流程图;FIG. 1 is a flowchart of a graph adjustment method provided in Embodiment 1 of this application;
图2为本申请实施例提供的画布第一界面示意图;2 is a schematic diagram of the first interface of the canvas provided by an embodiment of the application;
图3为本申请实施例提供的画布第二界面示意图;FIG. 3 is a schematic diagram of a second interface of the canvas provided by an embodiment of the application;
图4为本申请实施例提供的画布第三界面示意图;4 is a schematic diagram of the third interface of the canvas provided by an embodiment of the application;
图5为本申请实施例二提供的一种图形调整方法的流程图;FIG. 5 is a flowchart of a graph adjustment method provided in Embodiment 2 of this application;
图6为本申请实施例提供的画布第四界面示意图;FIG. 6 is a schematic diagram of a fourth interface of the canvas provided by an embodiment of the application;
图7为本申请实施例提供的画布第五界面示意图;FIG. 7 is a schematic diagram of the fifth interface of the canvas provided by an embodiment of the application;
图8为本申请实施例提供的画布第六界面示意图;FIG. 8 is a schematic diagram of the sixth interface of the canvas provided by an embodiment of the application;
图9为本申请实施例提供的画布第七界面示意图;FIG. 9 is a schematic diagram of a seventh interface of the canvas provided by an embodiment of the application;
图10为本申请实施例提供的画布第八界面示意图;FIG. 10 is a schematic diagram of the eighth interface of the canvas provided by an embodiment of the application;
图11为本申请实施例提供的画布第九界面示意图;FIG. 11 is a schematic diagram of the ninth interface of the canvas provided by an embodiment of the application;
图12为本申请实施例提供的画布第十界面示意图;FIG. 12 is a schematic diagram of the tenth interface of the canvas provided by an embodiment of the application;
图13为本申请实施例提供的画布第十一界面示意图;FIG. 13 is a schematic diagram of the eleventh interface of the canvas provided by an embodiment of the application;
图14为本申请实施例提供的画布第十二界面示意图;FIG. 14 is a schematic diagram of the twelfth interface of the canvas provided by an embodiment of the application;
图15为本申请实施例提供的画布第十三界面示意图;15 is a schematic diagram of the thirteenth interface of the canvas provided by an embodiment of the application;
图16为本申请实施例提供的画布第十四界面示意图;16 is a schematic diagram of the fourteenth interface of the canvas provided by an embodiment of the application;
图17为本申请实施例提供的画布第十五界面示意图;FIG. 17 is a schematic diagram of the fifteenth interface of the canvas provided by an embodiment of the application;
图18为本申请实施例三提供的一种图形调整方法的流程图;FIG. 18 is a flowchart of a graph adjustment method provided in Embodiment 3 of this application;
图19为本申请实施例四提供的一种图形调整方法的流程图;FIG. 19 is a flowchart of a graph adjustment method provided by Embodiment 4 of this application;
图20为本申请实施例提供的画布第十六界面示意图;20 is a schematic diagram of the sixteenth interface of the canvas provided by an embodiment of the application;
图21为本申请实施例五提供的一种图形调整装置的结构示意图;FIG. 21 is a schematic structural diagram of a graphic adjustment device provided by Embodiment 5 of this application; FIG.
图22为本申请实施例五提供的另一种图形调整装置的结构示意图;FIG. 22 is a schematic structural diagram of another graphic adjustment device provided by Embodiment 5 of this application; FIG.
图23为本申请实施例六提供的一种图形调整设备的结构示意图。FIG. 23 is a schematic structural diagram of a graphics adjustment device provided in Embodiment 6 of this application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described here are used to explain the application, but not to limit the application. In addition, it should be noted that, for ease of description, the drawings only show a part of the structure related to the present application instead of all of the structure.
需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或操作或对象与另一个实体或操作或对象区分开来,而不一定要求或者暗示这些实体或操作或对象之前存在任何这种实际的关系或顺序。例如,第一书写操作和第二书写操作的“第一”和“第二”用来区分两个不同的触控操作。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation or object from another entity or operation or object, and do not necessarily require or imply these entities Or any such actual relationship or sequence exists before the operation or object. For example, "first" and "second" of the first writing operation and the second writing operation are used to distinguish two different touch operations.
本申请实施例中提供的图形调整方法可以由图形调整设备执行,该图形调整设备可以通过软件和硬件至少之一的方式实现,该图形调整设备可以是两个或多个物理实体构成,也可以是一个物理实体构成。例如,图形调整设备可以是电脑、手机、平板或智能交互平板等智能设备。The graphics adjustment method provided in the embodiments of the present application can be executed by a graphics adjustment device. The graphics adjustment device can be implemented by at least one of software and hardware. The graphics adjustment device may be composed of two or more physical entities, or It is a physical entity. For example, the graphics adjustment device may be a smart device such as a computer, a mobile phone, a tablet, or a smart interactive tablet.
为了便于理解,实施例中以智能交互平板为图形调整设备进行示例性描述。其中,智能交互平板可以是通过触控技术对显示在显示平板上的内容进行操控和实现人机交互操作的一体化设备,其集成了投影机、电子白板、幕布、音响、电视机以及视频会议终端等一种或多种功能。For ease of understanding, in the embodiments, a smart interactive tablet is used as a graphics adjustment device for exemplary description. Among them, the smart interactive tablet can be an integrated device that controls the content displayed on the display tablet through touch technology and realizes human-computer interaction. It integrates a projector, an electronic whiteboard, a screen, a sound, a TV, and a video conference. One or more functions such as a terminal.
一般而言,智能交互平板包括至少一块显示屏。例如,智能交互平板配置有一块具有触控功能的显示屏,且该显示屏可以是电容屏、电阻屏或者电磁屏。用户可以通过手指或触控笔触控显示屏的方式实现触控操作,相应的,智能交互平板检测触控位置,并根据触控位置对应的显示内容确定响应方案,进而进行响应,以实现触控功能。例如,根据触控位置确定对应的显示内容为书写区域,此时,响应方案为显示书写轨迹。可以理解的是,实际应用中,用户还可以通过键盘、鼠标、物理按键等方式实现控制操作。Generally speaking, the smart interactive tablet includes at least one display screen. For example, the smart interactive tablet is equipped with a display screen with touch function, and the display screen can be a capacitive screen, a resistive screen or an electromagnetic screen. The user can realize touch operation by touching the display screen with a finger or a stylus. Correspondingly, the smart interactive tablet detects the touch position, and determines the response plan according to the display content corresponding to the touch position, and then responds to realize the touch Features. For example, it is determined that the corresponding display content is the writing area according to the touch position. At this time, the response scheme is to display the writing track. It is understandable that in practical applications, users can also implement control operations through keyboards, mice, physical keys, and other methods.
智能交互平板安装有至少一类操作系统,其中,操作系统包括但不限定于安卓系统、Linux系统及Windows系统。智能交互平板可以基于操作系统安装至少一个应用程序,实施例中,以具有绘图功能的应用程序进行示例性描述。例如,智能交互平板中安装有具有绘图功能的电子白板应用程序。其中,该应用程序可以为操作系统自带的应用程序,也可以为从第三方设备或者服务器中下载的应用程序。可选的,应用程序除具备绘图功能外,还具有其他编辑功能,如书写、插入表格、插入图片、插入多媒体、插入图形、绘制表格等功能。At least one type of operating system is installed on the smart interactive tablet, where the operating system includes but is not limited to the Android system, the Linux system, and the Windows system. The smart interactive tablet can install at least one application program based on the operating system. In the embodiment, an application program with a drawing function is used for exemplary description. For example, an electronic whiteboard application with a drawing function is installed in a smart interactive tablet. Wherein, the application program may be an application program that comes with the operating system, or may be an application program downloaded from a third-party device or server. Optionally, in addition to the drawing function, the application also has other editing functions, such as writing, inserting tables, inserting pictures, inserting multimedia, inserting graphics, and drawing tables.
通常,应用程序的显示界面中设置有可操作区域,该可操作区域可以记为画布,通过画布可以向用户显示绘图或编辑的交互界面。可选的,画布的显示位置可以根据实际需求设置。可以理解的是,画布的尺寸可以根据实际情况设定,其可以为有限的尺寸,也可以为无限的尺寸。画布中建立有第一坐标系,第一坐标系的原点可以根据实际情况设定。其中,画布为无限的尺寸是指画布可以根据用户的实际需求无限减小或增大坐标系。同样的,显示屏中建立有第二坐标系,第二坐标系的原点同样可以根据实际情况设定,一般而言,第二坐标系为固定大小的坐标系。通常,第二坐标系与检测触控操作的电器元件存在对应关系, 当显示屏接收到触控操作时,对应位置的电器元件参数发生变化,此时,智能交互平板根据电器元件参数的变化情况确定触控操作在第二坐标系中的坐标数据,即确定触控操作的触控位置,之后,根据第二坐标系与第一坐标系的映射关系,确定触控操作在第一坐标系中的坐标数据,之后,基于坐标数据在画布中的显示内容对触控操作进行响应。其中,映射关系的确定方式实施例不做限定。实施例中,以调整画布中图形的几何特征为例,描述图形调整方法。Generally, an operable area is set in the display interface of an application program, and the operable area can be recorded as a canvas, through which an interactive interface for drawing or editing can be displayed to the user. Optionally, the display position of the canvas can be set according to actual needs. It is understandable that the size of the canvas can be set according to actual conditions, and it can be a finite size or an infinite size. A first coordinate system is established in the canvas, and the origin of the first coordinate system can be set according to actual conditions. Among them, the infinite size of the canvas means that the canvas can be infinitely reduced or increased in the coordinate system according to the actual needs of the user. Similarly, a second coordinate system is established in the display screen, and the origin of the second coordinate system can also be set according to actual conditions. Generally speaking, the second coordinate system is a coordinate system with a fixed size. Generally, the second coordinate system has a corresponding relationship with the electrical component that detects the touch operation. When the display screen receives the touch operation, the electrical component parameters of the corresponding position change. At this time, the smart interactive tablet will change according to the electrical component parameters. Determine the coordinate data of the touch operation in the second coordinate system, that is, determine the touch position of the touch operation, and then determine the touch operation in the first coordinate system according to the mapping relationship between the second coordinate system and the first coordinate system Then, respond to touch operations based on the display content of the coordinate data in the canvas. Among them, the embodiment of the method for determining the mapping relationship is not limited. In the embodiment, adjusting the geometric characteristics of the graphics in the canvas is taken as an example to describe the graphics adjustment method.
实施例一Example one
图1为本申请实施例一提供的一种图形调整方法的流程图。参考图1,该图形调整方法具体包括:FIG. 1 is a flowchart of a graph adjustment method provided in Embodiment 1 of this application. Referring to Figure 1, the graphic adjustment method specifically includes:
步骤110、在画布中显示图形。Step 110: Display graphics on the canvas.
当前,画布中显示有至少一个图形,其中,图形为几何图形,其可以是多边形、圆类图形等,当图形为多边形时,其可选为规则的凸多边形(如三角形、正方形、正五边形等)。该图形可以由用户通过手写方式输入或通过选择图形模板的方式输入。在通过手写方式输入时,用户可以在画布中进行书写操作,其中,书写操作为触控操作的一种。之后,智能交互平板显示书写轨迹,并对书写轨迹进行图形识别,以确定用户输入的图形类型。此时,显示的图形属于用户手写的图形。相应的,在通过选择图形模板方式输入时,画布中显示有各图形类型对应的图形模板,当智能交互平板确定用户选择图形模板后,根据图形模板在画布中显示图形。此时,显示的图形属于计算机绘制的标准图形。其中,用户选择图形模板的方式可以根据实际情况设定,例如,通过拖拽操作的方式将图形模板拖拽至画布中,智能交互平板获取拖拽操作的结束位置,并在结束位置显示与图形模板对应的图形。可以理解的是,每个图形类型对应一个图形模板,其中,图形类型的分类依据可以根据实际情况设定,例如,根据图形边的数量进行分类,此时,图形类型至少包括:圆类、三角形类、四边形类、五边形类等。每个类型还可以进行细分,例如,四边形类还可以包括:正方形类、矩形类、平行四边形类、梯形类等图形类型,三角形类还可以包括直角三角形类、等腰三角形类、普通三角形类等图形类型。需要说明的是,上述提及的结束位置可以指第一坐标系中的坐标数据或第二坐标系中的坐标数据,实施例对此不做限定。At present, at least one figure is displayed on the canvas. Among them, the figure is a geometric figure, which can be a polygon, a circle-like figure, etc., when the figure is a polygon, it can be selected as a regular convex polygon (such as a triangle, a square, a regular five-sided) Shape, etc.). The graphic can be input by the user by handwriting or by selecting a graphic template. When inputting by handwriting, the user can perform a writing operation on the canvas, where the writing operation is a type of touch operation. After that, the smart interactive tablet displays the writing trajectory and performs graphic recognition on the writing trajectory to determine the type of graphic input by the user. At this time, the displayed graphic belongs to the graphic handwritten by the user. Correspondingly, when inputting by selecting a graphic template, the graphic template corresponding to each graphic type is displayed in the canvas. When the intelligent interactive tablet determines that the user selects the graphic template, the graphic is displayed in the canvas according to the graphic template. At this time, the displayed graphics belong to the standard graphics drawn by the computer. Among them, the way the user selects the graphic template can be set according to the actual situation. For example, the graphic template is dragged to the canvas through a drag operation, and the smart interactive tablet obtains the end position of the drag operation, and displays the graphic at the end position. The graphics corresponding to the template. It is understandable that each graphic type corresponds to a graphic template, wherein the classification basis of the graphic type can be set according to the actual situation, for example, according to the number of graphic edges. At this time, the graphic type includes at least: circle, triangle Class, quadrilateral class, pentagon class, etc. Each type can also be subdivided. For example, the quadrilateral type can also include: square type, rectangular type, parallelogram type, trapezoid type and other graphic types. Triangle type can also include right-angled triangle type, isosceles triangle type, and ordinary triangle type. And other graphic types. It should be noted that the above-mentioned end position may refer to coordinate data in the first coordinate system or coordinate data in the second coordinate system, which is not limited in the embodiment.
步骤120、响应于接收到的第一书写操作,显示第一书写轨迹,第一书写轨迹表示目标几何属性,目标几何属性包括长度参数和角度参数至少之一。Step 120: In response to the received first writing operation, display a first writing trajectory, the first writing trajectory represents a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter.
具体的,为了实现调整图形,用户可以在画布中输入目标几何属性。几何属性为图形的几何特征的参数。几何特征是指显示图形时确定几何形状的特征,一般而言可以包括边、角以及轴中至少一种。其中,轴是指除了边外,可以确定显示图像形状及大小的其他线条,例如,对于圆而言,轴可以指半径和直径至少之一,对于平行四边形而言,轴可以指某条边的垂线。几何属性包括长度参数以及角度参数。几何特征为轴或边时,对应的几何属性为长度参数,几何特征为角时,对应的几何属性为角度参数。为了简化计算复杂度,设定图形为圆类图形时,图形包含的几何特征为轴,图形为多边形时,图形包含的几何特征为边和角至少之一。例如,当图形类型为圆类时,几何属性是指轴的长度参数。其中,图形为圆时,轴为半径和直径至少之一,相应的,几何属性是指半径的长度参数和直径的长度参数至少之一。图形为椭圆时,轴为短轴、长轴、短半轴和长半轴至少之一,相应的,几何属性是指短轴长度参数、长轴长度参数、短半轴长度参数和长半轴长度参数至少之一。再如,图形为多边形时,几何属性是指边的长度参数和角的角度参数至少之一。举例而言,图形为三角形时,几何特征包括三条边以及三个角,相应的,几何属性可以为每条边的长度参数以及每个角的角度参数。图形为矩形时,几何特征包括短边和长边,相应的,几何属性是指短边的长度参数和长边的长度参数。可以理解的时,上述提及的长度参数和角度参数均为相对值,相应的,长度单位以及角度单位对应的坐标(第一坐标系或第二坐标系内)范围可以根据实际情况设定,实施例对此不做限定。实施例中将用户输入的几何属性记为目标几何属性。Specifically, in order to adjust the graphics, the user can input the target geometric attributes in the canvas. The geometric attributes are the parameters of the geometric characteristics of the graphics. The geometric feature refers to the feature that determines the geometric shape when displaying graphics, and generally can include at least one of edges, corners, and axes. Among them, the axis refers to other lines that can determine the shape and size of the displayed image, except for the sides. For example, for a circle, the axis can refer to at least one of a radius and a diameter. For a parallelogram, the axis can refer to a certain side. perpendicular. The geometric properties include length parameters and angle parameters. When the geometric feature is an axis or an edge, the corresponding geometric attribute is a length parameter, and when the geometric feature is an angle, the corresponding geometric attribute is an angle parameter. In order to simplify the calculation complexity, when the figure is set as a circle-like figure, the geometric feature contained in the figure is an axis, and when the figure is a polygon, the geometric feature contained in the figure is at least one of edges and corners. For example, when the graph type is circle, the geometric attribute refers to the length parameter of the axis. Wherein, when the figure is a circle, the axis is at least one of a radius and a diameter. Correspondingly, the geometric attribute refers to at least one of the length parameter of the radius and the length parameter of the diameter. When the figure is an ellipse, the axis is at least one of the minor axis, major axis, minor minor axis and major minor axis. Correspondingly, the geometric attributes refer to the minor axis length parameter, major axis length parameter, minor minor axis length parameter, and major half axis. At least one of the length parameters. For another example, when the graphic is a polygon, the geometric attribute refers to at least one of the length parameter of the side and the angle parameter of the corner. For example, when the figure is a triangle, the geometric features include three sides and three corners. Correspondingly, the geometric attributes can be the length parameter of each side and the angle parameter of each corner. When the figure is a rectangle, the geometric features include short sides and long sides. Correspondingly, geometric attributes refer to the length parameters of the short sides and the length parameters of the long sides. It is understandable that the length and angle parameters mentioned above are all relative values. Accordingly, the range of the coordinates (in the first coordinate system or the second coordinate system) corresponding to the length unit and the angle unit can be set according to actual conditions. The embodiment does not limit this. In the embodiment, the geometric attribute input by the user is recorded as the target geometric attribute.
目标几何属性由用户通过手写的方式写在画布中。实施例中,将用户写入目标几何属性的操作记为第一书写操作。可选的,第一书写操作的触发方式实施例不做限定。例如,当确定画布当前处于书写模式时,监听到画布中接收到触控操作,且该触控操作为包含移动路径的触控操作,则确定当前在画布中存在书写行为,并将触控操作确认为第一书写操作,进而在触控位置显示第一书写操作对应生成的书写轨迹。可以理解的是,对于智能交互平板而言,在用户书写过程中,智能交互平板仅是接收到了一个书写操作,后续需要对书写操作的书写轨迹进行识别,才能够确定该书写操作是否用于写入目标几何属性。实施例中仅是为了将当前接收到的第一书写操作与后续第二书写操作进行区别,便将第一书写操作解释为用于写入目标几何属性的操作。又如,设定图形调整模式,当确定画布当前处于图形调整模式时,若监听到画布中接收触控操作,确定接收到第一书写操作。实施例中,将第一书写操作对应的书写轨迹记为第一书写轨迹。可选的,以数字为例,考虑到实际应用中用户写入数字时,可能需要写入多条第一书写轨迹(如数字4需要两条书写轨迹),此时,可以将满足设定条件的多条第一书写轨迹归为一组,其中,设定条件可以根据实际情况设定,如设定条件为多条第一书写轨迹的写入时间间隔在设定间隔内且多条第一书写轨迹之间的距离在设定距离内,上述设定间隔和设定距离根据实际情况设定。将多条第一书写轨迹归组的好处是便于对第一书写轨迹的管理、计算。以管理为例,在移动第一书写轨迹时,无需逐个计算每条轨迹的移动路径,仅需计算包含该组书写轨迹的最小矩形区域的移动路径。The target geometric attributes are written on the canvas by the user by handwriting. In the embodiment, the user's operation of writing the target geometric attribute is recorded as the first writing operation. Optionally, the embodiment of the trigger mode of the first writing operation is not limited. For example, when it is determined that the canvas is currently in writing mode, it is monitored that a touch operation is received in the canvas, and the touch operation is a touch operation that includes a moving path, then it is determined that there is currently a writing behavior in the canvas, and the touch operation It is confirmed as the first writing operation, and then the writing track generated corresponding to the first writing operation is displayed at the touch position. It is understandable that for the smart interactive tablet, during the user's writing process, the smart interactive tablet only receives a writing operation, and then it needs to identify the writing track of the writing operation to determine whether the writing operation is used for writing. Enter the geometric properties of the target. In the embodiment, only to distinguish the first writing operation currently received from the subsequent second writing operation, the first writing operation is interpreted as an operation for writing a target geometric attribute. For another example, set the graphics adjustment mode. When it is determined that the canvas is currently in the graphics adjustment mode, if a touch operation is detected in the canvas, it is determined that the first writing operation is received. In the embodiment, the writing trajectory corresponding to the first writing operation is recorded as the first writing trajectory. Optionally, take a number as an example. Considering that in actual applications, when a user writes a number, it may need to write multiple first writing tracks (for example, the number 4 requires two writing tracks). At this time, the set conditions can be satisfied The multiple first writing tracks are grouped into a group, where the setting conditions can be set according to the actual situation. For example, the setting condition is that the writing time interval of the multiple first writing tracks is within the set interval and the multiple first writing tracks The distance between the writing tracks is within the set distance, and the above set interval and set distance are set according to the actual situation. The advantage of grouping multiple first writing trajectories is to facilitate the management and calculation of the first writing trajectory. Taking management as an example, when moving the first writing trajectory, there is no need to calculate the movement path of each trajectory one by one, only the movement path of the smallest rectangular area containing the group of writing trajectories needs to be calculated.
实施例中,设定第一书写轨迹为用户写入的目标几何属性。由于在接收第一书写操作时,智能交互平板仅能识别第一书写操作并显示第一书写轨迹,无法确定第一书写操作是否用于写入目标几何属性。因此,在显示第一书写轨迹时,需要对第一书写轨迹进行识别,以确定第一书写轨迹所代表的目标几何属性。具体的,当确定一组第一书写轨迹书写完毕后,对第一书写轨迹进行数字识别、符号识别以及文字识别,以确定第一书写轨迹表示的数据参数以及特征类型,即确定第一书写轨迹代表的目标几何属性。其中,数字识别、符号识别以及文字识别的实现手段,实施例不做限定。特征类型是指数据参数代表的几何特征。In the embodiment, the first writing track is set as the target geometric attribute written by the user. Since when receiving the first writing operation, the smart interactive tablet can only recognize the first writing operation and display the first writing track, it is impossible to determine whether the first writing operation is used to write the target geometric attributes. Therefore, when the first writing trajectory is displayed, the first writing trajectory needs to be recognized to determine the geometric attributes of the target represented by the first writing trajectory. Specifically, after a set of first writing trajectories are determined to be written, perform number recognition, symbol recognition, and character recognition on the first writing trajectory to determine the data parameters and feature types represented by the first writing trajectory, that is, determine the first writing trajectory Represents the geometric properties of the target. Among them, the implementation means of number recognition, symbol recognition, and character recognition are not limited in the embodiment. The feature type refers to the geometric feature represented by the data parameter.
可选的,为了实现调整图形,需要确定与目标几何属性对应的图形,并确定图形中与目标几何属性对应的几何特征。其中,确定目标几何属性对应的图形时,若显示的图形仅有一个,则可以直接将该图形确定为目标几何属性对应的图形。若显示的图形有多个,则可以获取目标几何属性在画布中的位置数据以及各图形在画布中的位置数据,并基于两个位置数据,确定距离目标几何属性最近的图形,并将该图形确定为目标几何属性对应的图形。其中,两个位置数据属于相同的坐标系,其可以位于第一坐标系或第二坐标系,实施例对此不做限定。确定图形中与目标几何属性对应的几何特征时,根据特征类型在图形中确定同类型的全部几何特征,并选择距离第一书写轨迹最近的几何特征作为目标几何属性对应的几何特征。例如,设定半径的标识为R,直径的标识为L,当确认图形为圆,且识别到第一书写轨迹为R3时,确定数据参数为R3,特征类型为半径,即目标几何属性对应的几何特征为半径,长度参数为3。再如,设定角的标识为R,边长度的标识为L,当确定图形为三角形,且识别到第一书写轨迹包含两组,分别为R60、L5,则确定R60对应的特征类型为角,角度参数为60,L5对应的几何特征为边,长度参数为5,并根据各边与目标几何属性的距离,选择距离最近的边作为L5对应的几何特征,角同样。再如,角的标识为°,边无标识,当确定图形为三角形,且识别到第一书写轨迹包含两组,分别为60°、5,确定60°对应的特征类型为角,角度参数为60,5对应的几何特征为边,长度参数为5,并根据各边与目标几何属性的距离,选择距离最近的边作为5对应的几何特征,角同样。Optionally, in order to adjust the graphics, it is necessary to determine the graphics corresponding to the target geometric attributes, and determine the geometric features in the graphics corresponding to the target geometric attributes. Among them, when determining the graphic corresponding to the target geometric attribute, if there is only one graphic displayed, the graphic can be directly determined as the graphic corresponding to the target geometric attribute. If there are multiple graphs displayed, you can obtain the position data of the target geometric property in the canvas and the position data of each graph in the canvas, and based on the two position data, determine the graph closest to the target geometric property, and add the graph Determine the graphics corresponding to the target geometric attributes. Wherein, the two position data belong to the same coordinate system, which can be located in the first coordinate system or the second coordinate system, which is not limited in the embodiment. When determining the geometric feature corresponding to the target geometric attribute in the graph, all geometric features of the same type are determined in the graph according to the feature type, and the geometric feature closest to the first writing track is selected as the geometric feature corresponding to the target geometric attribute. For example, if the radius is marked as R and the diameter is marked as L, when it is confirmed that the figure is a circle and the first writing track is recognized as R3, the data parameter is determined to be R3, and the feature type is radius, that is, the target geometric attribute corresponds to The geometric feature is the radius, and the length parameter is 3. For another example, if the angle is set as R and the side length is L, when it is determined that the figure is a triangle, and the first writing track is recognized as including two groups, R60 and L5, then the characteristic type corresponding to R60 is determined to be angle , The angle parameter is 60, the geometric feature corresponding to L5 is an edge, and the length parameter is 5. According to the distance between each edge and the target geometric attribute, the edge with the closest distance is selected as the geometric feature corresponding to L5, and the angle is the same. For another example, the angle is marked as °, and there is no sign on the side. When it is determined that the figure is a triangle and the first writing track is identified as containing two groups, namely 60° and 5, it is determined that the characteristic type corresponding to 60° is an angle, and the angle parameter is The geometric feature corresponding to 60 and 5 is an edge, and the length parameter is 5. According to the distance between each edge and the target geometric attribute, the edge with the closest distance is selected as the geometric feature corresponding to 5, and the angle is the same.
可选的,确定第一书写轨迹代表的目标几何属性后,为了通知用户智能交互平板当前已经识别到目标几何属性,可以将目标几何属性与图形进行绑定,并在图形中进行标记。其中,标记方式可以根据实际情况设定,例如,目标几何属性为角的角度参数时,在对应角的位置添加标记,再如,目标几何属性为边的 长度数据时,改变对应边的显示参数。又如,目标几何属性为轴的长度数据时,在图形中标记对应的轴。Optionally, after determining the target geometric attribute represented by the first writing trajectory, in order to notify the user that the intelligent interactive tablet currently recognizes the target geometric attribute, the target geometric attribute may be bound to the graphic and marked in the graphic. Among them, the marking method can be set according to the actual situation. For example, when the target geometric attribute is the angle parameter of an angle, a mark is added at the position of the corresponding corner. For example, when the target geometric attribute is the length data of an edge, the display parameter of the corresponding edge is changed. . For another example, when the target geometric attribute is the length data of the axis, mark the corresponding axis in the graph.
步骤130、调整图形,以使目标几何属性作为调整后图形的几何属性。Step 130: Adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
示例性的,根据目标几何属性对图形进行调整,以使调整后的图形根据目标几何属性进行显示。在调整图形时,首选需要确定图形对应的图形唯一确定条件。其中,图形唯一确定条件包含可以确定图形的全部必要条件。例如,图形为圆时,确定圆形的图形唯一确定条件可以是明确半径长度或直径长度。图形为椭圆时,确定椭圆的图形唯一确定条件可以是明确短轴长度以及长轴长度,或者明确短半轴长度以及长半轴长度。图形为三角形时,确定三角形的图形唯一确定条件可以是明确三条边的长度、两条边的长度及两条边之间夹角的角度、或者两个角的角度以及两个角之间边的长度等。图形为正方形时,确定正方形的图形唯一确定条件可以是明确边的长度。确定目标几何属性是否满足图形唯一确定条件,即判断根据目标几何属性确定是否可以得到图形,若是,则进行调整图形的操作,否则,提示用户调整失败。其中,确定目标几何属性是否满足图形唯一确定条件的具体方式可以根据实际情况设定,举例而言,图形为三角形,目标几何属性包括两个角的角度以及一条边的长度,若确定两个角与一条边之间的位置关系满足图形唯一确定条件,则确定目标几何属性满足图形唯一确定条件。Exemplarily, the graphics are adjusted according to the target geometric attributes, so that the adjusted graphics are displayed according to the target geometric attributes. When adjusting the graphics, it is first necessary to determine the unique determination conditions for the graphics corresponding to the graphics. Among them, the graphics unique determination condition includes all the necessary conditions for determining the graphics. For example, when the figure is a circle, the only condition for determining the circle figure can be to specify the radius length or the diameter length. When the figure is an ellipse, the only condition for determining the figure of the ellipse can be to specify the length of the minor axis and the length of the major axis, or the length of the minor axis and the length of the major axis. When the figure is a triangle, the only condition for determining the figure of the triangle can be to clarify the length of the three sides, the length of the two sides and the angle between the two sides, or the angle of the two corners and the side between the two corners. Length etc. When the figure is a square, the only condition for determining the square figure can be to specify the length of the side. Determining whether the target geometric attribute meets the unique determination condition of the figure, that is, judging whether the figure can be obtained according to the target geometric attribute, and if it is, the operation of adjusting the figure is performed; otherwise, the user is prompted that the adjustment has failed. Among them, the specific method for determining whether the target geometric attribute meets the condition for determining the uniqueness of the figure can be set according to the actual situation. For example, if the figure is a triangle, the target geometric attribute includes the angle of two corners and the length of one side. The positional relationship with an edge satisfies the unique determination condition of the figure, then it is determined that the target geometric attributes meet the unique determination condition of the figure.
在本申请另一实施例中,当目标几何属性不满足图形唯一确定条件时,可以确定目标几何属性对应的几何特征在图形中的实际几何属性,其中,实际几何属性为基于图形得到的、几何特征当前的几何属性。同样,实际几何属性为相对值。之后,将目标几何属性和实际几何属性之间的比值作为修改幅度,并根据该修改幅度对图形中其他几何特征对应的实际几何属性进行修改,以实现调整图形。In another embodiment of the present application, when the target geometric attributes do not meet the conditions for determining the uniqueness of the figure, the actual geometric attributes of the geometric features corresponding to the target geometric attributes in the graphics can be determined, where the actual geometric attributes are the geometric attributes obtained based on the graphics. The current geometric properties of the feature. Likewise, the actual geometric properties are relative values. After that, the ratio between the target geometric attribute and the actual geometric attribute is used as the modification range, and the actual geometric attributes corresponding to other geometric features in the graph are modified according to the modification range to realize the adjustment of the graph.
在本申请再一实施例中,当目标几何属性不满足图形唯一确定条件时,可以根据图形唯一确定条件,在图形中查找其他的几何特征,查找到几何特征和目标几何属性对应的几何特征满足图形唯一确定条件,之后,确定查找到的几何特征对应的实际几何属性,并根据实际几何属性和目标几何属性对图形进行调整。In yet another embodiment of the present application, when the target geometric attribute does not satisfy the condition for determining the uniqueness of the figure, other geometric features can be searched in the figure according to the condition for determining the uniqueness of the figure, and the geometric features corresponding to the target geometric attributes can be found to satisfy The conditions are uniquely determined for the graphics, and then the actual geometric attributes corresponding to the found geometric features are determined, and the graphics are adjusted according to the actual geometric attributes and the target geometric attributes.
调整图形时,需要先确定每个几何特征的位置数据,之后,根据位置数据重新绘制图形,并将未调整的图形进行删除。此时,绘制后的图形属于计算机绘制的标准图形。具体的,当图形为多边形时,基于目标几何属性确定调整后图形中顶点在画布中的位置数据,之后,基于顶点的位置数据绘制图形。其中,确定顶点的位置数据时,可以是调取特征计算公式,并根据特征计算公式计算调整后图形中每条边的长度数据。其中,特征计算公式为智能交互平板中预先存储的,可以计算边长和角度至少之一的方式。例如,图形为三角形时,对应的特征计算公式包括三个内角的和为180°、勾股定理、正弦定理、余弦定理等等。之后,根据每条边的长度数据确定顶点的位置数据。当图形为圆类图形时,基于目标几何属性直接确定圆类图形边在画布中的位置数据,之后,基于边的位置数据绘制图形。When adjusting graphics, you need to determine the position data of each geometric feature first, and then redraw the graphics based on the position data, and delete the unadjusted graphics. At this time, the drawn graphics belong to the standard graphics drawn by the computer. Specifically, when the figure is a polygon, the position data of the vertices in the adjusted figure in the canvas is determined based on the target geometric properties, and then the figure is drawn based on the position data of the vertices. Among them, when determining the position data of the vertices, the feature calculation formula can be called, and the length data of each side in the adjusted graph is calculated according to the feature calculation formula. Among them, the feature calculation formula is pre-stored in the smart interactive tablet, and at least one of the side length and the angle can be calculated. For example, when the figure is a triangle, the corresponding characteristic calculation formula includes the sum of three internal angles of 180°, the Pythagorean theorem, the law of sine, the law of cosine, and so on. After that, the position data of the vertex is determined according to the length data of each side. When the figure is a circle figure, the position data of the edge of the circle figure in the canvas is directly determined based on the target geometric properties, and then the figure is drawn based on the position data of the edge.
可选的,调整图形后,同步将目标几何属性进行整形,并显示在图形中。其中,对目标几何属性进行整形可以理解为将第一书写轨迹整形为计算机绘制元素。其中,可以预先设定几何属性与几何特征之间的相对位置关系,之后,基于相对位置关系在图形中显示整形后的目标几何属性。Optionally, after the graphics are adjusted, the target geometric attributes are simultaneously reshaped and displayed in the graphics. Among them, shaping the geometric properties of the target can be understood as shaping the first writing trajectory into a computer drawing element. Among them, the relative position relationship between geometric attributes and geometric features can be set in advance, and then, based on the relative position relationship, the reshaped target geometric attributes are displayed in the graphics.
下面对本实施例提供的技术方案进行示例性描述。The technical solution provided by this embodiment will be exemplarily described below.
图2为本申请实施例提供的画布第一界面示意图。参考图2,当前画布中显示有图形11,该图形11为用户通过手写方式输入的图形,通过图形识别,确定该图形11为三角形。FIG. 2 is a schematic diagram of the first interface of the canvas provided by an embodiment of the application. Referring to FIG. 2, a graphic 11 is displayed on the current canvas. The graphic 11 is a graphic input by the user by handwriting. Through graphic recognition, it is determined that the graphic 11 is a triangle.
接收用户输入的第一书写操作,并显示第一书写轨迹。显示第一书写轨迹后,画布的界面由图2变为图3。图3为本申请实施例提供的画布第二界面示意图。参考图3,画布中包含三组第一书写轨迹,且对第一书写轨迹进行数字识别后,确定各组第一书写轨迹分别为:3、4、5,即第一书写轨迹表示目标几何属性为边的长度参数,且数值分别为3、4、5。之后,基于目标几何属性与图形11中三条边的距离,确定每个目标几何属性对应的边。此时,可以确定图形11调整后,三条边的长度分别为3、4、5。根据目标几 何属性调整三角形。此时,画布的界面由图3变为图4。图4为本申请实施例提供的画布第三界面示意图。参考图4,对图形11调整后,显示为计算机绘制的标准图形。The first writing operation input by the user is received, and the first writing track is displayed. After displaying the first writing track, the interface of the canvas changes from Figure 2 to Figure 3. FIG. 3 is a schematic diagram of a second interface of the canvas provided by an embodiment of the application. Referring to Figure 3, the canvas contains three groups of first writing trajectories, and after the first writing trajectory is digitally recognized, it is determined that the first writing trajectories of each group are respectively: 3, 4, and 5, that is, the first writing trajectory represents the geometric properties of the target Is the length parameter of the side, and the values are 3, 4, and 5 respectively. Then, based on the distance between the target geometric attribute and the three edges in the graph 11, the edge corresponding to each target geometric attribute is determined. At this time, it can be determined that after the adjustment of the graph 11, the lengths of the three sides are 3, 4, and 5 respectively. Adjust the triangle according to the geometric properties of the target. At this time, the interface of the canvas changes from Figure 3 to Figure 4. FIG. 4 is a schematic diagram of the third interface of the canvas provided by an embodiment of the application. Referring to Fig. 4, after adjusting the graph 11, it is displayed as a standard graph drawn by a computer.
上述,通过在画布中显示图形,并在接收到第一书写操作后,显示用于表示目标几何属性的第一书写轨迹,其中,目标几何属性包括长度参数和角度参数至少之一,之后,根据目标几何属性对图形进行调整的技术手段,实现了通过手写参数的方式,对画布中显示的图形进行调整,以使调整后的图形更加符合用户的期望。同时,操作过程简单方便,对于用户操作熟练度要求不高,便于用户实现,提升了用户使用体验。As mentioned above, by displaying the figure in the canvas, and after receiving the first writing operation, displaying the first writing trajectory for representing the geometric properties of the target, wherein the geometric properties of the target include at least one of a length parameter and an angle parameter, and then according to The technical means of adjusting the graphics with the target geometric attributes realizes the adjustment of the graphics displayed on the canvas by means of handwriting parameters, so that the adjusted graphics can be more in line with the user's expectations. At the same time, the operation process is simple and convenient, does not require high user proficiency, is convenient for users to realize, and improves user experience.
实施例二Example two
图5为本申请实施例二提供的一种图形调整方法的流程图。本实施例是在上述实施例的基础上进行具体化。FIG. 5 is a flowchart of a graph adjustment method provided in Embodiment 2 of this application. This embodiment is embodied on the basis of the above-mentioned embodiment.
具体的,参考图5,本实施例提供的图形调整方法具体包括:Specifically, referring to FIG. 5, the graph adjustment method provided in this embodiment specifically includes:
步骤210、在画布中显示图形。Step 210: Display graphics on the canvas.
实施例中,设定该步骤包含下述至少两个方案:In the embodiment, the setting of this step includes at least two solutions as follows:
方案一、响应于接收到的第二书写操作,在画布中显示第二书写轨迹,第二书写轨迹组成图形。Solution 1: In response to the received second writing operation, a second writing track is displayed on the canvas, and the second writing track composes a graph.
实施例中,将用户手写绘制图形的触控操作记为第二书写操作。其中,第二书写操作触发方式可以根据实际情况设定,例如,当确定画布当前处于书写模式时,监听到画布中接收到触控操作,且该触控操作为包含移动路径的触控操作,则确定接收到第二书写操作,并获取第二书写操作的触控位置,进而在触控位置显示书写轨迹,可以理解的是,对于智能交互平板而言,在用户书写过程中,智能交互平板仅是接收到了一个书写操作,后续需要对书写操作的书写轨迹进行识别,才能够确定该书写操作是否用于绘制图形。实施例中仅是为了将当前接收到的第二书写操作与第一书写操作进行区别,便将第二书写操作解释为用于绘制图形的操作。将第二书写操作对应的书写轨迹记为第二书写轨迹。此时,可以设定将满足设定条件的多条书写轨迹归为一组,其中,分组条件与第一书写轨迹的分组条件相同,在此不做赘述。In the embodiment, the touch operation of the user's handwriting drawing graphics is recorded as the second writing operation. Wherein, the second writing operation trigger mode can be set according to actual conditions. For example, when it is determined that the canvas is currently in the writing mode, it is monitored that a touch operation is received in the canvas, and the touch operation is a touch operation that includes a moving path. It is determined that the second writing operation is received, and the touch position of the second writing operation is acquired, and then the writing track is displayed at the touch position. It can be understood that for the smart interactive tablet, the smart interactive tablet is Only when a writing operation is received, and the writing track of the writing operation needs to be recognized later, can it be determined whether the writing operation is used to draw a graph. In the embodiment, only to distinguish the currently received second writing operation from the first writing operation, the second writing operation is interpreted as an operation for drawing graphics. The writing trajectory corresponding to the second writing operation is recorded as the second writing trajectory. At this time, it can be set to group multiple writing trajectories that meet the set conditions into a group, where the grouping condition is the same as the grouping condition of the first writing trajectory, and will not be repeated here.
由于智能交互平板仅能识别第二书写操作并显示第二书写轨迹,而无法确定第二书写操作是否用于绘制图形,因此,在显示第二书写轨迹时,需要对第二书写轨迹进行识别,以确定第二书写轨迹是否可以组成图形。其中,识别手段实施例不做限定。例如,预先收集包含各类图形的数据集,并通过机器学习的方式对数据集进行训练,得到图形识别模型,其中,训练时采用的算法可以根据实际情况设定,之后,将一组第二书写轨迹作为图形识别模型的输入,便可以通过图形识别模型确定第二书写轨迹对应的图形类别。再如,预先设定各图形类别对应的轨迹样本,其中,轨迹样本的设定方式实施例不做限定。将第二书写轨迹与各轨迹样本进行识别,以得到与第二书写轨迹最相似的轨迹样本,之后,计算轨迹样本与第二书写轨迹之间的轨迹误差,并在轨迹误差满足设定误差范围时,将该轨迹样本对应的图形类别作为第二书写轨迹对应的图形类型。其中,轨迹误差的计算方法以及误差范围的设定依据实施例不做限定。Since the smart interactive tablet can only recognize the second writing operation and display the second writing trajectory, and cannot determine whether the second writing operation is used to draw graphics, it is necessary to recognize the second writing trajectory when displaying the second writing trajectory. To determine whether the second writing track can form a graph. Among them, the embodiments of the identification means are not limited. For example, collect a data set containing various graphics in advance, and train the data set through machine learning to obtain a graphics recognition model. The algorithm used in training can be set according to the actual situation. After that, a set of second The writing trajectory is used as the input of the graphic recognition model, and the graphic category corresponding to the second writing trajectory can be determined through the graphic recognition model. For another example, the trajectory samples corresponding to each graphic category are preset, wherein the embodiment of the setting method of the trajectory samples is not limited. Identify the second writing trajectory and each trajectory sample to obtain the trajectory sample that is most similar to the second writing trajectory, and then calculate the trajectory error between the trajectory sample and the second writing trajectory, and when the trajectory error meets the set error range At this time, the graphic type corresponding to the trajectory sample is used as the graphic type corresponding to the second writing trajectory. Among them, the calculation method of the trajectory error and the setting of the error range are not limited according to the embodiment.
当第一书写操作和第二书写操作的触发方式相同时,可以先显示书写轨迹,并对一组书写轨迹进行图形识别,若无法识别到对应的图形,再进行数字识别、符号识别以及文字识别,以确定书写轨迹表示的目标几何属性。When the trigger mode of the first writing operation and the second writing operation are the same, the writing trace can be displayed first, and a group of writing traces can be recognized by graphics. If the corresponding graphics cannot be recognized, then the number recognition, symbol recognition and text recognition can be performed , To determine the geometric properties of the target represented by the writing trajectory.
方案二、响应于接收到的图形模板选择操作,在画布中显示与图形模板选择操作对应的图形。Solution 2: In response to the received graphic template selection operation, a graphic corresponding to the graphic template selection operation is displayed on the canvas.
示例性的,图形模板为计算机绘制的、作为模板的图形。可选的,画布中显示有各图形类型对应的图形模板,其中,图形模板的生成方式以及存储位置实施例不做限定。书写模式下,图形模板可以显示在画布的设定位置上,或者是在设定位置上显示图形模板的触发按键,当检测到该触发按键被触发后,显示图形模板。其中,设定位置可以根据实际情况设定或修改。当图形类型较少(如小于或等于设定数量)时, 可以显示全部图形类型的图形模板,当图形类型较多(如大于设定数量)时,可以显示部分图形类型的图形模板,且设定图形模板切换规则,以实现切换显示图形模板,其中,切换规则可以根据实际情况设定。Exemplarily, the graphic template is a graphic drawn by a computer as a template. Optionally, a graphic template corresponding to each graphic type is displayed on the canvas, wherein the generating method and storage location of the graphic template are not limited in the embodiment. In the writing mode, the graphic template can be displayed on the set position of the canvas, or the trigger button of the graphic template is displayed at the set position. When the trigger button is detected to be triggered, the graphic template is displayed. Among them, the set position can be set or modified according to the actual situation. When there are few types of graphics (such as less than or equal to the set number), all graphics templates can be displayed; when there are many types of graphics (such as greater than the set number), graphics templates of some graphics types can be displayed, and set Set graphics template switching rules to achieve switching display graphics templates, where the switching rules can be set according to actual conditions.
图形模板选择操作是用户发出的用于选择图形模板的操作,智能交互平板根据图形模板选择操作在画布中绘制相应的图形。其中,图形模板选择操作的触发方式实施例不做限定。例如,设定图形模板接收到拖拽操作时,确定接收到图形模板选择操作,并监听拖拽操作以控制图形模板跟随拖拽操作同步移动,当检测到拖拽结束时,获取结束位置,并在结束位置处绘制图形。再如,检测到图形模板接收到单击操作,之后,在画布中的其他区域再次接收到单击操作,确定接收到图形模板选择操作,其中,第一个单击操作用于选择图形模板,第二个单击操作用于确定图形的绘制位置,之后,以绘制位置为中心,绘制与图形模板类型相同的图形。其中,绘制位置可以指第一坐标系中的坐标数据或第二坐标系中的坐标数据,实施例对此不做限定。The graphic template selection operation is an operation issued by the user to select a graphic template. The smart interactive tablet draws a corresponding graphic on the canvas according to the graphic template selection operation. Among them, the embodiment of the trigger mode of the graphic template selection operation is not limited. For example, when setting the graphic template to receive a drag operation, confirm that the graphic template selection operation is received, and monitor the drag operation to control the graphic template to move synchronously with the drag operation. When the end of the drag is detected, the end position is obtained, and Draw the graph at the end position. For another example, it is detected that the graphic template receives the click operation, and then the click operation is received again in other areas of the canvas, and the graphic template selection operation is determined to be received. The first click operation is used to select the graphic template. The second single-click operation is used to determine the drawing position of the graph, and then, taking the drawing position as the center, draw the same type of graph as the graph template. The drawing position may refer to coordinate data in the first coordinate system or coordinate data in the second coordinate system, which is not limited in the embodiment.
步骤220、响应于接收到的第一书写操作,显示第一书写轨迹,第一书写轨迹表示目标几何属性,目标几何属性包括长度参数和角度参数至少之一。Step 220: In response to the received first writing operation, display a first writing trajectory, where the first writing trajectory represents a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter.
步骤230、基于目标几何属性,对图形中相应的几何特征进行标记,几何特征包括边、角或轴,每个目标几何属性对应一个几何特征。Step 230: Mark the corresponding geometric features in the graphics based on the target geometric attributes. The geometric features include edges, corners or axes, and each target geometric attribute corresponds to a geometric feature.
为了使用户明确写入的目标几何属性已经与图形建立关联关系,设定对图形中与目标几何属性对应的几何特征进行标记。其中,每个目标几何属性均可在图形中找到对应的几何特征,且对每个目标几何属性对应的几何特征进行标记。In order to enable the user to clearly write the target geometric attributes to have an association relationship with the graphics, it is set to mark the geometric features corresponding to the target geometric attributes in the graphics. Among them, each target geometric attribute can find the corresponding geometric characteristic in the graph, and mark the geometric characteristic corresponding to each target geometric attribute.
可选的,对标图形中几何特征进行标记包括:目标几何属性对应的几何特征为边时,更换几何特征的显示参数;目标几何属性对应的几何特征为角或轴时,在图形中添加几何特征的标记。Optionally, marking the geometric features in the target graphic includes: when the geometric feature corresponding to the target geometric attribute is an edge, changing the display parameters of the geometric feature; when the geometric feature corresponding to the target geometric attribute is an angle or axis, adding geometry to the graphic Characteristic mark.
其中,当目标几何属性对应于图形的边时,更换该条边的显示参数。其中,显示参数为:线条粗细、线条颜色以及线条类型等。智能交互平板可以自动设定显示参数的更换标准,或者由用户设定显示参数的更换标准。通常更换标准可以由用户根据实际情况更改。举例而言,图6为本申请实施例提供的画布第四界面示意图。参考图6,画布中显示图形201以及目标几何属性202。确定图形201的底边为与目标几何属性对应的几何特征,并更换底边的显示参数,此时,画布的界面由图6变为图7。图7为本申请实施例提供的画布第五界面示意图。相比于图6,图7中图形201的底边的线条类型发生了改变,此时,可以向用户提示目标几何属性与图形建立关联关系。Among them, when the target geometric attribute corresponds to the edge of the figure, the display parameter of the edge is changed. Among them, the display parameters are: line thickness, line color, line type, etc. The intelligent interactive tablet can automatically set the replacement standard of display parameters, or the user can set the replacement standard of display parameters. Usually the replacement standard can be changed by the user according to the actual situation. For example, FIG. 6 is a schematic diagram of the fourth interface of the canvas provided by an embodiment of the application. Referring to FIG. 6, a graphic 201 and a target geometric attribute 202 are displayed on the canvas. It is determined that the bottom edge of the graph 201 is the geometric feature corresponding to the target geometric attribute, and the display parameters of the bottom edge are changed. At this time, the interface of the canvas changes from FIG. 6 to FIG. 7. FIG. 7 is a schematic diagram of the fifth interface of the canvas provided by an embodiment of the application. Compared with FIG. 6, the line type of the bottom edge of the graph 201 in FIG. 7 has changed. At this time, the user can be prompted to establish an association relationship between the target geometric attribute and the graph.
当目标几何属性对应于图形的角时,在图形中对应的角处添加角标记,其中,角标记的显示方式可以根据实际情况设定。例如,图8为本申请实施例提供的画布第六界面示意图,参考图8,画布中显示图形203以及目标几何属性204,其中,目标几何属性204与图形203中左边的底角对应,此时,在左边的底角处添加角标记205,以向用户提示目标几何属性与图形建立关联关系。可以理解的是,角标记中线条的显示参数可以结合实际情况修改。实际应用中,用户也可以在写入目标几何属性时,直接绘制角标记,此时,智能交互平板可以根据检测到的角标记确定目标几何属性对应的角,并对用户绘制的角标记的弧度进行修正,以提示用户目标几何属性与角进行了绑定。When the target geometric attribute corresponds to the corner of the figure, add a corner mark at the corresponding corner in the figure, where the display mode of the corner mark can be set according to the actual situation. For example, FIG. 8 is a schematic diagram of the sixth interface of the canvas provided by the embodiment of the application. Referring to FIG. 8, the graphic 203 and the target geometric attribute 204 are displayed in the canvas. The target geometric attribute 204 corresponds to the bottom corner on the left side of the graphic 203. , Add a corner mark 205 at the bottom corner on the left to prompt the user to establish an association relationship between the target geometric attributes and the graphics. It is understandable that the display parameters of the lines in the corner marks can be modified in accordance with actual conditions. In practical applications, the user can also directly draw corner marks when writing the target geometric attributes. At this time, the smart interactive tablet can determine the angle corresponding to the target geometric attributes according to the detected corner marks, and calculate the radian of the corner marks drawn by the user. Make corrections to prompt the user that the target geometry attributes are bound to the corners.
当目标几何属性对应于图形的轴时,在图形中显示该轴,并将显示的轴作为轴标记。轴的显示参数与图形的边的显示参数不同,以将轴与边进行区分。例如,图9为本申请实施例提供的画布第七界面示意图。参考图9,画布中显示图形206以及目标几何属性207,其中,目标几何属性207与图形206中半径对应,此时,在图形206中显示对应的轴208,以向用户提示目标几何属性与图形建立关联关系。实际应用中,用户也可以在写入目标几何属性时,直接绘制轴的线条,此时,智能交互平板可以根据该线条与图形的相对位置,确定该线条表示的轴,并对该线条进行修正以及修改显示参数,以提示用户目标几何属性与轴进 行了绑定。When the target geometry attribute corresponds to the axis of the graph, the axis is displayed in the graph, and the displayed axis is used as the axis label. The display parameters of the axis are different from the display parameters of the edge of the graph to distinguish between the axis and the edge. For example, FIG. 9 is a schematic diagram of the seventh interface of the canvas provided by an embodiment of the application. Referring to FIG. 9, a graphic 206 and a target geometric attribute 207 are displayed on the canvas. The target geometric attribute 207 corresponds to the radius in the graphic 206. At this time, the corresponding axis 208 is displayed in the graphic 206 to prompt the user of the target geometric attribute and graphic Establish an association relationship. In practical applications, the user can also directly draw the line of the axis when writing the target geometric attributes. At this time, the smart interactive tablet can determine the axis represented by the line according to the relative position of the line and the figure, and modify the line And modify the display parameters to prompt the user that the target geometric attributes are bound to the axis.
可选的,当目标几何属性为多个时,多个目标几何属性需要顺序依次输入。此时,每检测到一组第一书写轨迹输入完成后,对该组第一书写轨迹进行识别以确定其表示的目标几何属性以及对应的几何特征,之后,在图形中对相应的几何特征进行标记。Optionally, when there are multiple target geometric attributes, the multiple target geometric attributes need to be input sequentially. At this point, after each detection of a set of first writing trajectories, the first set of writing trajectories are identified to determine the target geometric attributes and corresponding geometric features they represent, and then the corresponding geometric features are performed in the graphics. mark.
步骤240、确认目标几何属性是否满足图形唯一确定条件。若确认目标几何属性不满足图形唯一确定条件,则执行步骤250。若确认目标几何属性满足图形唯一确定条件,则执行步骤260。Step 240: Confirm whether the geometric attributes of the target meet the conditions for determining the uniqueness of the figure. If it is confirmed that the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, step 250 is executed. If it is confirmed that the geometric properties of the target satisfy the condition for determining the uniqueness of the figure, step 260 is executed.
具体的,每类图形均有相应的图形唯一确定条件。在对图形进行标记后,调取该图形对应的图形唯一确定条件。其中,图形唯一确定条件中记录有可以确定图形大小所需的几何特征,且在几何特征为多个时,除了几何特征的参数外,还记录有各几何特征之间的位置关系。将几何特征与图形唯一确定条件中记录的几何特征进行比较,若几何特征为多个,则将几何特征的位置关系与图形唯一确定条件中记录的位置关系进行比较,若一致,则确定满足唯一确定条件,执行步骤260,否则,执行步骤250。其中,位置关系可以通过几何特征在画布中的显示位置确定。Specifically, each type of graphics has corresponding graphics unique determination conditions. After marking the graph, call up the graph's unique determination condition corresponding to the graph. Among them, the geometric features required to determine the size of the figure are recorded in the unique determination condition of the figure, and when there are multiple geometric features, in addition to the parameters of the geometric features, the positional relationship between the geometric features is also recorded. Compare the geometric features with the geometric features recorded in the graphics unique determination condition. If there are multiple geometric features, compare the position relationship of the geometric features with the position relationship recorded in the graphics unique determination condition. If they are consistent, it is determined that the uniqueness is satisfied. Determine the conditions and execute step 260; otherwise, execute step 250. Among them, the positional relationship can be determined by the display position of the geometric feature in the canvas.
举例而言,图形为圆,目标几何属性为半径的长度。此时,获取圆形的唯一确定条件为明确半轴长度或直径长度。之后,确定目标几何属性满足图形唯一确定条件,并执行步骤260。For example, the figure is a circle, and the target geometric property is the length of the radius. At this time, the only condition for obtaining a circle is to specify the length of the semi-axis or the length of the diameter. After that, it is determined that the geometric properties of the target satisfy the condition for determining the uniqueness of the figure, and step 260 is executed.
再举例而言,图形为矩形,目标几何属性为两个,且分别对应两条边的长度参数。此时,获取图形唯一确定条件为明确两条相邻边的长度参数。由于已经对目标几何属性对应的边进行了标记,因此,本步骤可以直接确定被标记的两条边是否为相邻的两条边,在确定被标记的两条边为相邻的两条边时,确定满足图形位置确定条件,并执行步骤260。其中,相邻边的确定方式可以根据实际情况设定,例如,确定两条边之间存在一个相交点时,确定两条边为相邻边。再如,根据两条边在第一坐标系或第二坐标系的坐标数据确定两条边为相邻边。For another example, the figure is a rectangle, and there are two target geometric attributes, which correspond to the length parameters of the two sides respectively. At this time, the only condition for obtaining the graph is to clarify the length parameters of the two adjacent sides. Since the edges corresponding to the target geometric attributes have been marked, this step can directly determine whether the two marked edges are two adjacent edges. After determining that the two marked edges are two adjacent edges At this time, it is determined that the conditions for determining the graphic position are satisfied, and step 260 is executed. The method for determining adjacent edges can be set according to actual conditions. For example, when it is determined that there is an intersection point between two edges, the two edges are determined to be adjacent edges. For another example, the two sides are determined to be adjacent sides according to the coordinate data of the two sides in the first coordinate system or the second coordinate system.
又举例而言,图形为三角形,目标几何属性为两个,且分别对应两条边的长度参数。此时,获取图形唯一确定条件为:明确三条边的长度、两条边的长度及两条边之间夹角的角度、或者两个角的角度以及两个角之间边的长度等。由于已经对目标几何属性对应的边进行了标记,因此,本步骤可以直接明确被标记的两条边是否满足图形唯一确定条件。确定被标记的两条边是否满足上述任一图形唯一确定条件。此时,通过上述图形唯一确定条件可知被标记的两条边不满足图形唯一确定条件。并执行步骤250。For another example, the figure is a triangle, and there are two target geometric attributes, which correspond to the length parameters of the two sides respectively. At this time, the only determination condition for obtaining the graph is: clarify the length of the three sides, the length of the two sides and the angle between the two sides, or the angle of the two corners and the length of the side between the two corners, etc. Since the edges corresponding to the target geometric attributes have been marked, this step can directly clarify whether the two marked edges meet the conditions for determining the uniqueness of the figure. Determine whether the two marked edges meet any of the above-mentioned unique determination conditions for graphics. At this time, it can be known that the two marked edges do not satisfy the condition for determining the uniqueness of the graph through the above-mentioned uniqueness determination condition of the graph. And step 250 is executed.
步骤250、显示调整失败提示。Step 250: Display an adjustment failure prompt.
其中,调整失败提示的显示方式可以根据实际情况设定,例如,在画布中弹出提示框,且提示框中显示有“已知属性不足,无法调整图形”的文字,以提示用户调整失败。再如,取消已标记的几何特征,以提示用户调整失败。设置调整失败提示的好处是,可以使用户根据提示重新写入目标几何属性,以准确实现图形调整。Among them, the display mode of the adjustment failure prompt can be set according to the actual situation. For example, a prompt box pops up in the canvas, and the prompt box displays the text "known attributes are insufficient, and the graph cannot be adjusted" to prompt the user that the adjustment has failed. For another example, cancel the marked geometric feature to remind the user that the adjustment has failed. The advantage of setting the adjustment failure prompt is that the user can rewrite the target geometric attributes according to the prompt to accurately realize the graphic adjustment.
步骤260、调整图形,以使目标几何属性作为调整后图形的几何属性,显示整形后的第一书写轨迹,整形后的第一书写轨迹为计算机绘制元素。Step 260: Adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics, and the reshaped first writing trajectory is displayed, and the reshaped first writing trajectory is a computer drawing element.
可选的,调整图形时,同步修改表示目标几何属性的第一书写轨迹,即将目标几何属性变更为设定字体及大小的数字、字母或符号进行显示。设定字体及大小的数字、字母或符号可以理解为是由计算机绘制的元素。其中,在对第一书写轨迹进行识别得到数据参数后,获取与数据参数内容相同的、设定字体及大小的字符,并在调整图形时,同步将第一书写轨迹替换为对应的字符。可以理解的是,得到与第一书写轨迹内容相同且设定字体及大小的字符,也可以认为是对第一书写轨迹表示的目标几何属性进行整形。整形的好处是,提高显示的美观度,且用户可以通过整形后的目标几何属性确定智能交互平板是否识别准确。Optionally, when adjusting the graphics, synchronously modify the first writing trajectory representing the target geometric attributes, that is, change the target geometric attributes to numbers, letters or symbols with a set font and size for display. Numbers, letters, or symbols that set the font and size can be understood as elements drawn by a computer. Wherein, after the data parameters are obtained by recognizing the first writing track, the characters with the same content of the data parameters and the set font and size are obtained, and when the graphics are adjusted, the first writing track is replaced with the corresponding characters synchronously. It is understandable that obtaining characters with the same content as the first writing track and setting the font and size can also be considered as shaping the target geometric attributes represented by the first writing track. The benefit of reshaping is that it improves the aesthetics of the display, and the user can determine whether the intelligent interactive tablet recognizes accurately through the geometric properties of the target after reshaping.
还可选的,在调整图形时,还可以将该图形的全部几何特征或特定几何特征对应的几何属性在图形中 进行显示。即调整图形时,同步确定除目标几何属性外剩余几何特征对应的几何属性,并用设定字体和大小进行显示。Optionally, when the graph is adjusted, all geometric features of the graph or geometric attributes corresponding to specific geometric features can be displayed in the graph. That is, when the graphics are adjusted, the geometric attributes corresponding to the remaining geometric features except the target geometric attributes are synchronously determined, and displayed with the set font and size.
预先设定各几何特征与对应的几何属性的相对位置关系,该相对位置关系具有可更改性。获取几何属性对应的字符后,根据相对位置关系显示该字符,即显示几何属性。同时,删除原有的第一书写轨迹。可选的,在显示几何属性时,若对应的几何特征为角,则可以同步显示角标记。若几何特征为轴,则可以同步显示轴。显示几何属性后,用户可以根据实际需求删除该几何属性,其中,删除操作的具体实现手段实施例不做限定。The relative position relationship between each geometric feature and the corresponding geometric attribute is preset, and the relative position relationship is changeable. After obtaining the character corresponding to the geometric attribute, the character is displayed according to the relative position relationship, that is, the geometric attribute is displayed. At the same time, the original first writing track is deleted. Optionally, when displaying geometric attributes, if the corresponding geometric feature is a corner, the corner mark can be displayed simultaneously. If the geometric feature is an axis, the axis can be displayed simultaneously. After displaying the geometric attributes, the user can delete the geometric attributes according to actual needs, wherein the specific implementation means of the deletion operation is not limited in the embodiment.
下面对本实施例提供的技术方案进行示例性说明。The technical solution provided by this embodiment will be exemplified below.
示例一、图10为本申请实施例提供的画布第八界面示意图。参考图10,画布中显示有图形209,该图形209为用户通过图形模板选择操作输入,且图形209为三角形。Example 1. FIG. 10 is a schematic diagram of the eighth interface of the canvas provided by an embodiment of the application. Referring to FIG. 10, a graphic 209 is displayed on the canvas. The graphic 209 is input by the user through a graphic template selection operation, and the graphic 209 is a triangle.
接收用户输入的第一书写操作,并显示第一书写轨迹。显示第一书写轨迹后,画布的界面由图10变为图11。图11为本申请实施例提供的画布第九界面示意图。参考图11,画布中包含三组第一书写轨迹,且对第一书写轨迹进行数字识别及符号识别后,确定第一书写轨迹分别为:6、45°、45°,进而确定第一书写轨迹表示目标几何属性。之后,确定目标几何属性分别对应于图形209的底边以及两个底角。之后,对图形209的底边以及两个底角进行标记。此时,画布的界面由图11变为图12。图12为本申请实施例提供的画布第十界面示意图。通过图12可以向用户提示目标几何属性与图形建立关联关系。The first writing operation input by the user is received, and the first writing track is displayed. After displaying the first writing track, the interface of the canvas changes from Figure 10 to Figure 11. FIG. 11 is a schematic diagram of the ninth interface of the canvas provided by an embodiment of the application. Referring to Figure 11, the canvas contains three sets of first writing trajectories, and after performing number recognition and symbol recognition on the first writing trajectories, the first writing trajectories are determined to be 6, 45°, and 45° respectively, and then the first writing trajectory is determined Represents the geometric properties of the target. After that, it is determined that the target geometric attributes respectively correspond to the bottom edge and the two bottom corners of the figure 209. After that, the bottom edge and two bottom corners of the figure 209 are marked. At this time, the interface of the canvas changes from Figure 11 to Figure 12. FIG. 12 is a schematic diagram of the tenth interface of the canvas provided by an embodiment of the application. Figure 12 can prompt the user to establish an association relationship between the target geometric attributes and the graphics.
确认通过目标几何属性可以得到唯一的三角形,即满足图形唯一确定条件,之后,对图形进行调整,即在画布中重新绘制三角形,并删除之前绘制的三角形。此时,画布的界面由图12变为图13。图13为本申请实施例提供的画布第十一界面示意图。参考图13,对图形209调整后,显示为计算机绘制的标准图形,同时,将该图形209的全部几何特征的几何属性进行显示。It is confirmed that the unique triangle can be obtained through the target geometric properties, that is, the unique determination condition of the graphic is satisfied, and then the graphic is adjusted, that is, the triangle is redrawn on the canvas and the triangle drawn before is deleted. At this time, the interface of the canvas changes from Figure 12 to Figure 13. FIG. 13 is a schematic diagram of the eleventh interface of the canvas provided by an embodiment of the application. Referring to FIG. 13, after the graphic 209 is adjusted, it is displayed as a standard graphic drawn by the computer, and at the same time, the geometric attributes of all geometric features of the graphic 209 are displayed.
示例二、图14为本申请实施例提供的画布第十二界面示意图。参考图14,画布中显示有图形2010,该图形2010为用户通过图形模板选择操作输入,且图形2010为圆形。Example 2. FIG. 14 is a schematic diagram of the twelfth interface of the canvas provided by an embodiment of the application. Referring to FIG. 14, a graphic 2010 is displayed on the canvas. The graphic 2010 is input by the user through a graphic template selection operation, and the graphic 2010 is circular.
接收用户输入的第一书写操作,并显示第一书写轨迹。显示第一书写轨迹后,画布的界面由图14变为图15。图15为本申请实施例提供的画布第十三界面示意图。参考图15,画布中包含一组第一书写轨迹,且对第一书写轨迹进行数字识别及字符识别后,确定第一书写轨迹为:R3且表示半径,进而确定第一书写轨迹表示目标几何属性。之后,确定目标几何属性对应于图形2010的半径。之后,对图形2010的半径进行标记。此时,画布的界面由图15变为图16。图16为本申请实施例提供的画布第十四界面示意图。通过图16可以向用户提示目标几何属性与图形建立关联关系。The first writing operation input by the user is received, and the first writing track is displayed. After displaying the first writing track, the interface of the canvas changes from Figure 14 to Figure 15. FIG. 15 is a schematic diagram of the thirteenth interface of the canvas provided by an embodiment of the application. Referring to FIG. 15, the canvas contains a set of first writing trajectories, and after performing number recognition and character recognition on the first writing trajectory, it is determined that the first writing trajectory is: R3 and represents the radius, and then it is determined that the first writing trajectory represents the geometric attributes of the target . After that, it is determined that the target geometric attribute corresponds to the radius of the figure 2010. After that, the radius of the figure 2010 is marked. At this time, the interface of the canvas changes from Figure 15 to Figure 16. FIG. 16 is a schematic diagram of the fourteenth interface of the canvas provided by an embodiment of the application. Figure 16 can prompt the user to establish an association relationship between the target geometric attributes and the graphics.
确认通过目标几何属性可以得到唯一的圆形,即满足图形唯一确定条件,之后,对图形进行调整,即在画布中重新绘制圆形,并删除之前输入的圆形。此时,画布的界面由图16变为图17。图17为本申请实施例提供的画布第十五界面示意图。参考图17,对图形2010调整后,显示为计算机绘制的标准图形,同时,将目标几何属性变更为设定字体及大小进行显示。It is confirmed that the unique circle can be obtained through the target geometric properties, that is, the unique determination condition of the figure is met, and then the figure is adjusted, that is, the circle is redrawn on the canvas and the circle entered before is deleted. At this time, the interface of the canvas changes from Figure 16 to Figure 17. FIG. 17 is a schematic diagram of the fifteenth interface of the canvas provided by an embodiment of the application. Referring to FIG. 17, after adjusting the graphic 2010, it is displayed as a standard graphic drawn by the computer, and at the same time, the target geometric attributes are changed to the set font and size for display.
上述,通过在画布中显示图形,并在接收到第一书写操作时,显示用于表示目标几何属性的第一书写轨迹,之后,对图形中相应的几何特征进行标记,并在确认目标几何属性满足图形唯一确定条件时调整图形,以使目标几何属性作为调整后图形的几何属性的技术方案,实现了通过手写参数的方式,对画布中显示的图形进行动态调整。通过手写或计算机绘制的方式输入图形,使得图形输入方式的多样化,并且,通过标记几何特征的方式可以提示用户已经识别目标几何属性,进而保证图形调整过程准确进行。同时,通过设定图形唯一确定条件,并在目标几何属性不满足图形唯一确定条件时,显示调整失败提示,可以使得用户明确目标几何属性是否可以调整图形,尤其在教学场景下,可以通过该方式向学生展示得到图形需要 包含哪些几何特征的几何属性,使得教学场景更灵活、生动。As mentioned above, by displaying the figure on the canvas, and when the first writing operation is received, the first writing track used to represent the geometric properties of the target is displayed, after which the corresponding geometric features in the figure are marked, and the geometric properties of the target are confirmed The graphic is adjusted when the unique determination condition of the graphic is satisfied, so that the target geometric property is used as the technical solution of the adjusted geometric property of the graphic, which realizes the dynamic adjustment of the graphic displayed in the canvas by means of handwriting parameters. Inputting graphics by handwriting or computer drawing makes the graphics input methods diversified, and by marking geometric features, the user can be reminded that the target geometric attributes have been recognized, thereby ensuring the accuracy of the graphics adjustment process. At the same time, by setting the conditions for determining the uniqueness of the graphics, and displaying the adjustment failure prompt when the target geometric attributes do not meet the conditions for determining the uniqueness of the graphics, the user can clarify whether the target geometric attributes can adjust the graphics, especially in teaching scenarios. Show students what geometric features and geometric attributes need to be included in the figure, making the teaching scene more flexible and vivid.
实施例三Example three
图18为本申请实施例三提供的一种图形调整方法的流程图。本实施例提供的图形调整方法与上述实施例提供的图形调整方法应用在相同的使用场景。参考图18,本实施例提供的图形调整方法具体包括:FIG. 18 is a flowchart of a graph adjustment method provided in Embodiment 3 of this application. The graphics adjustment method provided in this embodiment and the graphics adjustment method provided in the foregoing embodiments are applied in the same usage scenarios. Referring to FIG. 18, the graphics adjustment method provided by this embodiment specifically includes:
步骤310、在画布中显示图形。Step 310: Display graphics on the canvas.
实施例中,设定该步骤包括下述至少一类方案:In an embodiment, the setting of this step includes at least one of the following schemes:
方案一、步骤311、接收第二书写操作,并根据第二书写操作显示第二书写轨迹。步骤312、对第二书写轨迹进行图形识别,以确定第二书写轨迹表示的图形。Solution 1: Step 311: Receive the second writing operation, and display the second writing track according to the second writing operation. Step 312: Perform graphic recognition on the second writing trajectory to determine the graphic represented by the second writing trajectory.
具体的,当确定设定时长内和设定距离范围内至少之一,未接收到第二书写操作时,确认第二书写操作输入完成,并对显示的第二书写轨迹进行图形识别。其中,图形识别的手段实施例不做限定。例如,采用机器学习的方式,预先对已知类别的大量图形组成的数据集进行训练,以得到图形识别模型。之后,将第二书写轨迹作为图形识别模型的输入,通过图形识别模型输出的结果确定第二书写轨迹表示的图形。再如,预先设定各类图形的轨迹样本。之后,将第二书写轨迹逐一与各类图形的轨迹样本进行匹配,并将最相近的轨迹样本对应的图形确定为第二书写轨迹表示的图形。其中,第二书写轨迹与最相近的轨迹模板之间的轨迹误差需在设定误差范围内,否则,确定第二书写轨迹无法识别。Specifically, when it is determined that at least one of the second writing operation is not received within the set time period and the set distance range, the completion of the second writing operation input is confirmed, and the displayed second writing track is graphically recognized. Among them, the embodiment of the means of pattern recognition is not limited. For example, a machine learning method is used to train a data set composed of a large number of graphs of known categories in advance to obtain a graph recognition model. After that, the second writing trajectory is used as the input of the pattern recognition model, and the figure represented by the second writing trajectory is determined by the output result of the pattern recognition model. For another example, pre-set trajectory samples of various graphics. After that, the second writing trajectory is matched with the trajectory samples of various types of patterns one by one, and the figure corresponding to the closest trajectory sample is determined as the figure represented by the second writing trajectory. Wherein, the trajectory error between the second writing trajectory and the closest trajectory template needs to be within the set error range, otherwise, it is determined that the second writing trajectory cannot be recognized.
方案二、步骤313、接收图形模板选择操作,并确认图形模板选择操作选定的图形类型。步骤314、基于图形类型,在画布中绘制图形。Solution 2: Step 313: Receive the graphic template selection operation, and confirm the graphic type selected by the graphic template selection operation. Step 314: Draw a graph on the canvas based on the graph type.
可选的,图形模板选择操作的实现方式为拖拽操作时,智能交互平板接收到触控操作,若确定触控操作的触控位置为某个图形模板的显示位置,且触控操作的触控方式为移动操作,则确定接收到图形模板选择操作。之后,实时监听触控操作的当前触控位置,并在确认触控操作结束后,获取结束时的触控位置,并将结束时的触控位置作为图形中心绘制与图形模板对应的图形。其中,获取结束的触控位置后,识别结束的触控位置是否在画布中,若在画布中,则绘制相应的图形,否则,结束本次操作。Optionally, when the graphic template selection operation is realized by a drag operation, the smart interactive tablet receives a touch operation. If it is determined that the touch position of the touch operation is the display position of a certain graphic template, and the touch operation of the touch operation If the control mode is a mobile operation, it is determined that the graphic template selection operation is received. After that, monitor the current touch position of the touch operation in real time, and after confirming the end of the touch operation, obtain the touch position at the end, and use the touch position at the end as the center of the graph to draw a graphic corresponding to the graphic template. Among them, after obtaining the finished touch position, identify whether the finished touch position is in the canvas, if it is in the canvas, draw the corresponding figure, otherwise, end this operation.
可选的,图形模板选择操作的实现方式为单击操作时,智能交互平板接收到单击形式的触控操作,若确定触控操作的触控位置为某个图形模板的显示位置,则确定接收到图形模板选择操作。之后,在画布的设定位置中绘制与图形模板对应的图形。在绘制图形后,用户可以在画布中移动图形。Optionally, when the graphic template selection operation is realized by a single-click operation, the smart interactive tablet receives a single-click touch operation, and if it is determined that the touch position of the touch operation is the display position of a certain graphic template, it is determined A graphic template selection operation is received. After that, a graphic corresponding to the graphic template is drawn in the set position of the canvas. After drawing the graph, the user can move the graph in the canvas.
可选的,图形模板选择操作的实现方式为多次点击操作时,智能交互平板第一次接收到点击形式的触控操作,且确定触控操作的触控位置为某个图形模板的显示位置,若在设定时间间隔内,在画布中再次接收到点击形式的触控操作,则确定接收到图形模板选择操作,并获取再次点击的触控位置,进而将该触控位置作为图形中心绘制与图形模板对应的图形。Optionally, when the graphic template selection operation is implemented for multiple click operations, the smart interactive tablet receives the touch operation in the form of a click for the first time, and determines that the touch position of the touch operation is the display position of a certain graphic template , If within the set time interval, the touch operation in the form of a click is received again in the canvas, it is determined that the graphic template selection operation is received, and the touch position of the re-click is obtained, and then the touch position is drawn as the center of the graphic The graphics corresponding to the graphics template.
可以理解的是,预先设定各类图形的显示大小,并根据图形模板选择操作绘制图形时,按照预先设定的显示大小进行显示。It can be understood that the display sizes of various types of graphics are preset, and when the graphics are drawn according to the selection operation of the graphics template, they are displayed according to the preset display size.
步骤320、接收第一书写操作,并根据第一书写操作得到第一书写轨迹,对第一书写轨迹进行识别,以确定第一书写轨迹表示的目标几何属性,目标几何属性包括长度参数和角度参数至少之一。Step 320: Receive the first writing operation, and obtain the first writing trajectory according to the first writing operation, and recognize the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory. The target geometric attribute includes a length parameter and an angle parameter. At least one.
显示图形后,若再次监听到画布中接收到触控操作,且该触控操作包含移动路径,则确定接收到第一书写操作,并获取第一书写操作的触控位置,进而在触控位置显示第一书写轨迹。After displaying the graphics, if it is monitored again that the touch operation is received in the canvas, and the touch operation includes a movement path, it is determined that the first writing operation is received, and the touch position of the first writing operation is obtained, and then the touch position Display the first writing track.
具体的,对第一书写轨迹进行识别时,采用文本识别以及符号识别的方式。其中,文本识别用于识别出第一书写轨迹中包含的数字以及文字,符号识别用于确定第一书写轨迹中符号表示的含义。其中,文本识别以及符号识别的具体手段实施例不做限定。例如,采用机器学习的方式,预先对大量已知目标几何属性的书写轨迹进行训练,以得到数值识别模型,此时,数值识别模型可以实现文本识别和符号识别。之后, 将第一书写轨迹作为数值识别模型的输入,并将数值识别模型的输出确定为第一书写轨迹表示的数据参数。其中,数值识别模型的训练方法可以根据实际情况设定。可选的,为了保证目标几何属性的准确性,可以为每类图形均设置对应的数值识别模型。再如,将第一书写轨迹与预先设定的各数据参数的轨迹模板进行比对,选择最相近的轨迹模板作为第一书写轨迹表示的数据参数。之后,基于数据参数确定第一书写轨迹表示的特征类型,即第一书写轨迹为边、角还是轴的几何属性,进而得到第一书写轨迹代表的目标几何属性,其中,可以预先设定不同特征类型的组成规则。Specifically, when recognizing the first writing track, text recognition and symbol recognition are used. Among them, text recognition is used to recognize the numbers and characters contained in the first writing track, and the symbol recognition is used to determine the meaning of the symbols in the first writing track. Among them, the specific means of text recognition and symbol recognition are not limited in the embodiment. For example, by using machine learning, a large number of known target geometric attributes are trained in advance to obtain a numerical recognition model. At this time, the numerical recognition model can realize text recognition and symbol recognition. After that, the first writing trajectory is used as the input of the numerical recognition model, and the output of the numerical recognition model is determined as the data parameter represented by the first writing trajectory. Among them, the training method of the numerical recognition model can be set according to the actual situation. Optionally, in order to ensure the accuracy of the target geometric attributes, a corresponding numerical recognition model can be set for each type of graphics. For another example, the first writing trajectory is compared with preset trajectory templates of each data parameter, and the most similar trajectory template is selected as the data parameter represented by the first writing trajectory. Then, based on the data parameters, determine the feature type represented by the first writing trajectory, that is, whether the first writing trajectory is the geometric attribute of an edge, a corner or an axis, and then obtain the target geometric attribute represented by the first writing trajectory, where different features can be preset Type composition rules.
得到目标几何属性后,在图形中查找对应的几何特征。当图形为圆类图形时,可以直接在图形中标记对应的轴,若轴的数量为多个时,可以选择与目标几何属性距离最近的轴进行标记。或者是,预先设定轴的标记方式,例如,针对圆,预先设定半径和直径均为竖直方向的线段,此时可以在圆中标记竖直方向的半径或直径。当图形为多边形时,可以基于多边形中各顶点在画布中的位置数据确定各几何特征在画布中的位置数据,之后,选择距离目标几何属性最近的同类几何特征作为对应的几何特征,例如,目标几何属性为长度参数时,选择距离目标几何属性最近的边作为对应的几何特征,目标几何属性为角度参数时,选择距离目标几何属性最近的角作为对应的几何特征。After obtaining the target geometric properties, look for the corresponding geometric features in the graph. When the graph is a circle type graph, you can directly mark the corresponding axis in the graph. If there are multiple axes, you can select the axis with the closest distance to the target geometric property to mark. Alternatively, the marking method of the axis is preset, for example, for a circle, a line segment whose radius and diameter are both in the vertical direction is preset, and then the vertical radius or diameter can be marked in the circle. When the figure is a polygon, the position data of each geometric feature in the canvas can be determined based on the position data of each vertex in the polygon, and then the geometric feature of the same kind closest to the target geometric attribute is selected as the corresponding geometric feature, for example, the target When the geometric attribute is a length parameter, the edge closest to the target geometric attribute is selected as the corresponding geometric feature, and when the target geometric attribute is an angle parameter, the angle closest to the target geometric attribute is selected as the corresponding geometric feature.
步骤330、根据目标几何属性调整图形,以使目标几何属性作为调整后图形的几何属性。Step 330: Adjust the graphics according to the target geometric attributes, so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
具体的,根据目标几何属性可以得到唯一的图形,之后,确定图形在画布中的位置,进而根据该位置在画布中显示图形,并删除画布中原有的图形。Specifically, a unique graphic can be obtained according to the target geometric properties, and then the position of the graphic in the canvas is determined, and then the graphic is displayed on the canvas according to the position, and the original graphic in the canvas is deleted.
其中,当图形为圆类图形时,每类图形对应一个图形确定模型,例如,圆对应圆确定模型,椭圆对应椭圆确定模型。实施例中,以圆确定模型为例,圆确定模型是通过机器学习的方式对大量不同半径长度和直径长度的圆以及其在画布中不同的位置进行训练后得到的模型,将目标几何属性以及当前画布中圆的边的位置一同作为圆确定模型的输入,并获取圆确定模型输出的圆的边在画布中位置。之后,基于该位置在画布中绘制调整后的圆。当图形为多边形时,不同类的图形有不同的特征计算公式,当得到目标几何属性时,通过特征计算公式计算图形中的剩余几何特征的参数,即得到唯一的图形。之后,获取该类图形对应的图形确定模型,其中,每类图形对应一类图形确定模型。图形确定模型是通过机器学习的方式对不同几何属性的图形以及该图形的各顶点在画布中的不同位置进行训练后得到的模型,当确定图形各几何特征的参数后,将各参数以及当前画布中图形的边的位置作为图形确定模型的输入,并获取图形确定模型输出的各顶点在画布中的位置。之后,基于顶点位置在画布中绘制调整后的图形。Wherein, when the graph is a circle type graph, each type of graph corresponds to a graph definite model, for example, a circle corresponds to a circle definite model, and an ellipse corresponds to an ellipse definite model. In the embodiment, the circle determination model is taken as an example. The circle determination model is a model obtained by training a large number of circles with different radius lengths and diameters and their different positions in the canvas through machine learning, and combines the target geometric attributes and The position of the edge of the circle in the current canvas is also used as the input of the circle determination model, and the position of the edge of the circle output by the circle determination model in the canvas is obtained. After that, draw the adjusted circle on the canvas based on the position. When the graphics are polygons, different types of graphics have different feature calculation formulas. When the target geometric properties are obtained, the parameters of the remaining geometric features in the graphics are calculated through the feature calculation formulas to obtain the unique graphics. Afterwards, the graphic deterministic model corresponding to this type of graphic is obtained, wherein each type of graphic corresponds to a type of graphic deterministic model. The graphics determination model is a model obtained by training the graphics with different geometric attributes and the different positions of the vertices of the graphics in the canvas through machine learning. When the parameters of the geometric characteristics of the graphics are determined, the parameters and the current canvas The position of the edge of the middle figure is used as the input of the figure determination model, and the position of each vertex of the figure determination model output in the canvas is obtained. After that, the adjusted figure is drawn on the canvas based on the vertex position.
上述,通过在画布中显示图形,并在接收到第一书写操作后,显示第一书写轨迹,对第一书写轨迹进行识别,以确定第一书写轨迹表示的目标几何属性,之后,根据目标几何属性调整图形的技术方案,实现了通过手写参数的方式,对画布中显示的图形进行调整,以使调整后的图形更加符合用户的期望。同时,图形调整的准确度高,符合用户的调整期望。同时,操作过程简单方便,对于用户操作熟练度要求不高,便于用户实现,提升了用户使用体验。As mentioned above, by displaying the figure in the canvas, and after receiving the first writing operation, displaying the first writing trajectory, the first writing trajectory is recognized to determine the target geometric attribute represented by the first writing trajectory, and then, according to the target geometry The technical solution of attribute adjustment graphics realizes the adjustment of the graphics displayed in the canvas by means of handwriting parameters, so that the adjusted graphics can better meet the expectations of users. At the same time, the accuracy of the graphics adjustment is high, which meets the user's adjustment expectations. At the same time, the operation process is simple and convenient, does not require high user proficiency, is convenient for users to realize, and improves user experience.
实施例四Example four
图19为本申请实施例四提供的一种图形调整方法的流程图。本实施例是在上述实施例的基础上进行具体化。参考图19,本实施例提供的图形调整方法具体包括:FIG. 19 is a flowchart of a graph adjustment method provided by Embodiment 4 of this application. This embodiment is embodied on the basis of the above-mentioned embodiment. Referring to FIG. 19, the graphics adjustment method provided by this embodiment specifically includes:
步骤401、在画布中显示图形。Step 401: Display graphics on the canvas.
步骤402、接收第一书写操作,并根据第一书写操作得到第一书写轨迹,对第一书写轨迹进行识别,以确定第一书写轨迹表示的第一数据参数以及特征类型。Step 402: Receive a first writing operation, and obtain a first writing trajectory according to the first writing operation, and identify the first writing trajectory to determine the first data parameter and feature type represented by the first writing trajectory.
实际应用中,用户可能输入多个目标几何属性,相应的,为了便于后续处理,将每个目标几何属性对应的第一书写轨迹确定为一组。其中,分组方式可以根据实际情况设定,例如,多条第一书写轨迹的写入 时间间隔在设定间隔内且多条第一书写轨迹之间的距离在设定距离内时,确定多条第一书写轨迹为一组书写轨迹。此时,可以明确第一书写轨迹包括至少一组。相应的,该步骤具体包括:对每组第一书写轨迹进行数字识别、符号识别和文字识别至少之一,以确定每组第一书写轨迹表示的第一数据参数以及特征类型。In practical applications, the user may input multiple target geometric attributes. Accordingly, in order to facilitate subsequent processing, the first writing trajectory corresponding to each target geometric attribute is determined as a group. Among them, the grouping mode can be set according to the actual situation. For example, when the writing time interval of the multiple first writing tracks is within the set interval and the distance between the multiple first writing tracks is within the set distance, then multiple writing tracks are determined. The first writing trajectory is a set of writing trajectories. At this time, it can be clear that the first writing track includes at least one group. Correspondingly, this step specifically includes: performing at least one of number recognition, symbol recognition, and character recognition on each group of first writing trajectories to determine the first data parameter and feature type represented by each group of first writing trajectories.
实施例中,以数字识别、符号识别和文字识别为例。其中,文字识别是指对字母进行识别。具体的,目标几何属性包括第一数据参数以及特征类型。第一数据参数是指对第一书写轨迹识别后确定的轨迹内容,轨迹内容包括数字、符号以及字母。因此,可以通过数字识别、符号识别和文字识别得到第一数据参数。In the embodiment, number recognition, symbol recognition, and character recognition are taken as examples. Among them, text recognition refers to the recognition of letters. Specifically, the target geometric attributes include the first data parameter and the feature type. The first data parameter refers to the track content determined after recognizing the first writing track, and the track content includes numbers, symbols, and letters. Therefore, the first data parameter can be obtained through number recognition, symbol recognition, and character recognition.
其中,数字识别、符号识别以及文字识别的实现手段实施例不做限定。例如,通过机器学习的方式构建数值识别模型,以通过数值识别模型得到第一书写轨迹表示的数字、符号和字母至少之一。再如,预先设定不同数字、符号、字母对应的标准书写轨迹,之后将第一书写轨迹与各标准书写轨迹进行匹配,以确定第一书写轨迹标识的数字、符号和字母至少之一。例如,参考图8,对第一书写轨迹识别后得到的第一数据参数包括:数字45、符号°,参考图9,对第一书写轨迹进行识别后得到的第一数据参数包括:字母R、数字3。Among them, the implementation means embodiments of number recognition, symbol recognition, and character recognition are not limited. For example, a numerical recognition model is constructed by means of machine learning, so as to obtain at least one of the numbers, symbols, and letters represented by the first writing trajectory through the numerical recognition model. For another example, standard writing trajectories corresponding to different numbers, symbols, and letters are preset, and then the first writing trajectory is matched with each standard writing trajectory to determine at least one of the numbers, symbols, and letters identified by the first writing trajectory. For example, referring to FIG. 8, the first data parameters obtained after recognizing the first writing track include: the number 45, the symbol °, and referring to FIG. 9, the first data parameters obtained after recognizing the first writing track include: the letter R, The number 3.
可以理解的是,当第一数据参数设定不同的内容时,识别手段也需要相应的改变。例如,第一数据参数仅包含数字时,识别手段可以仅采用数字识别。再如,第一数据参数还包括中文文字时,文字识别中还应包括中文文字识别。It is understandable that when the first data parameter is set with different content, the identification means also needs to be changed accordingly. For example, when the first data parameter contains only numbers, the identification means may only use number identification. For another example, when the first data parameter also includes Chinese characters, the character recognition should also include Chinese character recognition.
特征类型是指第一数据参数对应的几何特征的类型。特征类型包括边、角以及轴。特征类型为轴时,具体包括半径、直径、短半轴、长半轴等。可选的,预先设定每种特征类型的参数组成规则,例如,边的参数组成规则为数字,角的参数组成规则为数字以及符号“°”,轴的参数组成规则为字母及数字,其中,设定不同字母对应不同的轴类型。例如,图形为圆时,R表示半径,L表示直径,图形为椭圆时,R表示短半轴,L表示长半轴。此时,结合参数组合规则便可以得到特征类型。例如,图8中,第一书写轨迹包含数字以及符号“°”,因此,可以确定特征类型为角。通过第一数据参数和特征类型可以确定第一书写轨迹代表的目标几何属性。The feature type refers to the type of geometric feature corresponding to the first data parameter. Feature types include edges, corners, and shafts. When the feature type is axis, it specifically includes radius, diameter, short semi-axis, long semi-axis, etc. Optionally, pre-set the parameter composition rules for each feature type. For example, the parameter composition rules of edges are numbers, the parameter composition rules of angles are numbers and the symbol "°", and the parameter composition rules of axes are letters and numbers. , Set different letters to correspond to different axis types. For example, when the figure is a circle, R represents the radius and L represents the diameter. When the figure is an ellipse, R represents the minor axis, and L represents the major axis. At this point, the feature type can be obtained by combining the parameter combination rules. For example, in FIG. 8, the first writing track contains a number and a symbol "°". Therefore, it can be determined that the feature type is an angle. The geometric attributes of the target represented by the first written trajectory can be determined by the first data parameter and the feature type.
可以理解的是,当第一书写轨迹为多组时,可以在得到各组第一书写轨迹后,分别对每组第一书写轨迹进行识别。或者是,实时对第一书写轨迹进行监测,当确认一组第一书写轨迹书写完毕后,对该组第一书写轨迹进行识别。当确认下一组第一书写轨迹书写完毕后,再对下一组第一书写轨迹进行识别。It is understandable that when the first writing trajectories are in multiple groups, after each group of first writing trajectories are obtained, each group of first writing trajectories can be identified separately. Alternatively, the first writing trajectory is monitored in real time, and when the writing of a group of first writing trajectories is confirmed, the first writing trajectory of the group is recognized. After confirming that the writing of the next set of first writing trajectories is completed, the next set of first writing trajectories are recognized.
可选的,第一数据参数和特征类型可以同时确定,也可以先确定第一数据参数,后确定特征类型,还可以先确定特征类型,后确定第一数据参数。当第一数据参数和特征类型同时确定时,预先为不同类型的图形设定不同的识别模型。该识别模型采用机器学习的方式,对大量已知第一数据参数和特征类型的第一书写轨迹进行训练后得到。当先确定第一数据参数,后确定特征类型时,可以是先利用数据识别模型对第一书写轨迹进行识别得到第一数据参数,之后,用特征类型的组成规则对第一数据参数进行识别,以确定第一数据参数的几何特征。Optionally, the first data parameter and the characteristic type may be determined at the same time, or the first data parameter may be determined first, and then the characteristic type may be determined, or the characteristic type may be determined first, and then the first data parameter may be determined. When the first data parameter and the feature type are determined at the same time, different recognition models are set for different types of graphics in advance. The recognition model adopts a machine learning method and is obtained after training a large number of first writing trajectories with known first data parameters and feature types. When the first data parameter is determined first, and then the feature type is determined, the first data parameter can be obtained by using the data recognition model to identify the first writing track, and then the first data parameter can be identified by the composition rule of the feature type. Determine the geometric characteristics of the first data parameter.
步骤403、根据特征类型,确定第一数据参数在图形中对应的几何特征,几何特征包括边、角或轴。Step 403: Determine the geometric feature corresponding to the first data parameter in the graph according to the feature type. The geometric feature includes an edge, a corner, or an axis.
当图形为多边形时,该步骤具体包括:步骤4031-4033:When the figure is a polygon, this step specifically includes: Steps 4031-4033:
步骤4031、获取图形中满足特征类型的全部几何特征。Step 4031. Obtain all geometric features that meet the feature type in the graph.
图形为多边形时,第一书写轨迹的特征类型为边或角。当特征类型为边时,获取图形中每条边在画布中的位置数据,即在图形中获取满足特征类型为边的全部几何特征。其中,可以预先获取图形中各顶点在画布中的位置数据,之后,根据顶点的位置数据确定对应边的位置数据。当特征类型为角时,获取图形中各顶点的位置数据,并将该位置数据作为对应角的位置数据,即在图形中获取满足特征类型为角的全部几何特征。可选的,顶点位置数据的确定方式可以根据实际情况设定。例如,对第二书写轨迹进行图形识别 时,同步获取轨迹交点的位置数据作为顶点的位置数据。再如,根据图形模板选择操作绘制图形时,同步确定轨迹交点的位置数据作为顶点的位置数据。When the figure is a polygon, the feature type of the first writing track is an edge or a corner. When the feature type is an edge, the position data of each edge in the graph in the canvas is obtained, that is, all geometric features satisfying the feature type as an edge are obtained in the graph. Wherein, the position data of each vertex in the graph in the canvas can be obtained in advance, and then the position data of the corresponding edge can be determined according to the position data of the vertex. When the feature type is an angle, the position data of each vertex in the graph is obtained, and the position data is used as the position data of the corresponding angle, that is, all geometric features satisfying the feature type as an angle are obtained in the graph. Optionally, the method for determining the vertex position data can be set according to actual conditions. For example, when performing pattern recognition on the second writing trajectory, the position data of the intersection of the trajectories are synchronously acquired as the position data of the vertex. For another example, when drawing a graph according to the graph template selection operation, the position data of the trajectory intersection point is synchronously determined as the position data of the vertex.
步骤4032、获取第一书写轨迹的第一位置数据。Step 4032. Acquire first position data of the first writing track.
在显示第一书写轨迹时,已经得到的第一书写轨迹的第一位置数据,因此,本步骤可以直接获取第一位置数据。When the first writing trajectory is displayed, the first position data of the first writing trajectory has already been obtained. Therefore, the first position data can be directly obtained in this step.
步骤4033、在满足特征类型的全部几何特征中,查找距离第一位置数据最近的几何特征,并将查找到的几何特征作为第一数据参数对应的几何特征。Step 4033: Among all geometric features satisfying the feature type, search for the geometric feature closest to the first position data, and use the found geometric feature as the geometric feature corresponding to the first data parameter.
以特征类型为边举例,将图形中每条边的位置数据与第一位置数据比较,以确定距离第一位置数据最近的边,并将该条边作为第一数据参数对应的边。其中,将每条边的位置数据与第一位置数据进行比较的方式可以是:确定第一位置数据的最小区域(包含第一位置数据的最小矩形区域),同时,确定每条边的最小区域(包含该条边的最小矩形区域),之后,计算两个最小区域中心点之间的距离,取最小距离对应的边作为第一位置数据最近的几何特征。Taking the feature type as an example of an edge, the location data of each edge in the graph is compared with the first location data to determine the edge closest to the first location data, and the edge is taken as the edge corresponding to the first data parameter. Wherein, the method of comparing the position data of each side with the first position data may be: determining the minimum area of the first position data (the smallest rectangular area containing the first position data), and at the same time, determining the minimum area of each side (The smallest rectangular area containing the side), then, calculate the distance between the center points of the two smallest areas, and take the side corresponding to the smallest distance as the closest geometric feature of the first position data.
例如,图20为本申请实施例提供的画布第十六界面示意图。画布中的图形为三角形。其中,三角形的三条边分别对应最小区域41、最小区域42以及最小区域43,第一书写轨迹的第一位置数据对应于最小区域44,此时,分别计算最小区域44的中心点与最小区域41、最小区域42以及最小区域43中心点之间的距离,之后,确定最小区域42距离最小区域44最近,此时,将最小区域42对应的边作为第一书写轨迹代表的目标几何属性对应的几何特征。可以理解的是,图中示出最小区域仅便于理解,实际应用中不会显示最小区域。For example, FIG. 20 is a schematic diagram of the sixteenth interface of the canvas provided by an embodiment of the application. The graphics in the canvas are triangles. Among them, the three sides of the triangle correspond to the minimum area 41, the minimum area 42, and the minimum area 43, respectively. The first position data of the first writing track corresponds to the minimum area 44. At this time, the center point of the minimum area 44 and the minimum area 41 are respectively calculated. , The minimum area 42 and the distance between the center points of the minimum area 43, after which the minimum area 42 is determined to be the closest to the minimum area 44. At this time, the edge corresponding to the minimum area 42 is taken as the geometry corresponding to the target geometric attribute represented by the first writing trajectory feature. It can be understood that the minimum area shown in the figure is only easy to understand, and the minimum area will not be displayed in actual applications.
以角为例,将图形中每个顶点的位置数据与第一位置数据比较,以确定距离第一位置数据最近的顶点,并将该顶点对应的角作为第一数据参数对应的角。其中,顶点的位置数据与第一位置数据进行比较的方式可以是获取顶点中任一坐标位置,计算该坐标位置与第一位置数据的最小区域中心点之间距离,取最小距离对应角,并将该角对应的边作为第一位置数据最近的角。Taking the angle as an example, the position data of each vertex in the graph is compared with the first position data to determine the vertex closest to the first position data, and the angle corresponding to the vertex is taken as the angle corresponding to the first data parameter. Wherein, the method of comparing the position data of the vertex with the first position data may be to obtain any coordinate position in the vertex, calculate the distance between the coordinate position and the minimum area center point of the first position data, and take the angle corresponding to the minimum distance, and The side corresponding to the angle is regarded as the closest angle of the first position data.
图形为圆类图形时,步骤403具体为:根据特征类型在图形中选定对应的几何特征作为第一数据参数在图形中对应的几何特征。When the figure is a circle type figure, step 403 is specifically: selecting a corresponding geometric feature in the figure according to the feature type as the geometric feature corresponding to the first data parameter in the figure.
当图形为圆类图形时,几何特征通常为轴。例如,图形为圆,特征类型为半径时,可以直接获取圆的任一半径或设定半径(如水平方向上位于右侧的半径)作为第一数据参数对应的半径。当图形为椭圆,特征类型为短半轴时,可以直接获取椭圆中的设定短半轴、任一短半轴或与第一数据参数距离最近的短半轴作为第一数据参数对应的短半轴。When the figure is a circle type figure, the geometric feature is usually an axis. For example, when the graphic is a circle and the feature type is a radius, any radius of the circle or a set radius (such as the radius on the right in the horizontal direction) can be directly obtained as the radius corresponding to the first data parameter. When the graph is an ellipse and the feature type is the short semi-axis, you can directly obtain the set short semi-axis, any short semi-axis, or the short semi-axis closest to the first data parameter as the short semi-axis corresponding to the first data parameter in the ellipse. Half shaft.
步骤404、建立目标几何属性与图形中对应几何特征的关联关系,并对几何特征进行标记。Step 404: Establish an association relationship between the target geometric attribute and the corresponding geometric feature in the graph, and mark the geometric feature.
确定目标几何属性对应的几何特征后,建立目标几何属性与几何特征的关联关系,例如,为目标几何属性与几何特征添加相同的标识。同时,在图形中添加相应的标记,以提示用户目标几何属性与几何特征建立了关联关系。After the geometric features corresponding to the target geometric attributes are determined, an association relationship between the target geometric attributes and the geometric features is established, for example, the same identification is added for the target geometric attributes and the geometric features. At the same time, add corresponding marks to the graphics to remind users that the target geometric attributes and geometric features have established an association relationship.
步骤405、判断目标几何属性是否满足图形的图形唯一确定条件,每类图形对应一类图形唯一确定条件。若目标几何属性满足图形唯一确定条件,则执行步骤406。若目标几何属性不满足图形唯一确定条件,则执行步骤407。Step 405: Determine whether the target geometric attribute meets the graphics unique determination condition of the graphics, and each type of graphics corresponds to the unique determination condition of one type of graphics. If the target geometric attribute meets the condition for determining the uniqueness of the figure, step 406 is executed. If the target geometric attribute does not satisfy the condition for determining the uniqueness of the figure, step 407 is executed.
具体的,每类图形均设置有图形唯一确定条件,当识别图形的类型后,可以获取对应的图形唯一确定条件,之后,确定目标几何属性是否满足图形唯一确定条件。Specifically, each type of graphics is provided with graphics unique determination conditions. After the type of graphics is identified, the corresponding graphics unique determination conditions can be obtained, and then it is determined whether the target geometric attributes meet the graphics unique determination conditions.
图形为多边形时,获取该图形的全部目标几何属性,之后,确定全部目标几何属性对应的几何特征是否满足图形唯一确定条件。例如,图形为三角形时,确定目标几何属性对应的几何特征分别为一条边以及 两个角,并确认上述几何特征之间的位置关系为边位于两个角之间,之后,将该位置关系与图形唯一确定条件进行比对,以确认位置关系与图形唯一确定条件中的位置关系是否一致,若是,则确定满足图形唯一确定条件,否则,确定不满足图形唯一确定条件。其中,位置关系可以通过各几何特征在画布中的位置数据确定。再如,图形为矩形时,确定目标几何属性对应的几何特征为矩形中的两条边,并确认两条边的位置关系为相邻边,之后,与图形唯一确定条件中的位置关系进行比对,以确认位置关系与图形唯一确定条件中的位置关系是否一致。When the figure is a polygon, all target geometric attributes of the figure are obtained, and then it is determined whether the geometric features corresponding to all the target geometric attributes meet the conditions for determining the uniqueness of the figure. For example, when the figure is a triangle, determine that the geometric features corresponding to the target geometric attributes are one side and two corners, and confirm that the position relationship between the above geometric features is that the side is located between the two corners. The graphics unique determination condition is compared to confirm whether the position relationship is consistent with the position relationship in the graphics unique determination condition. If so, it is determined that the graphics unique determination condition is satisfied; otherwise, it is determined that the graphics unique determination condition is not satisfied. Among them, the position relationship can be determined by the position data of each geometric feature in the canvas. For another example, when the figure is a rectangle, determine that the geometric features corresponding to the target geometric properties are the two sides in the rectangle, and confirm that the positional relationship between the two sides is adjacent, and then compare with the positional relationship in the unique determination condition of the figure. Yes, to confirm whether the positional relationship is consistent with the positional relationship in the graphics unique determination condition.
图形为圆类图形时,获取该图形的目标几何属性之后,确定目标几何属性的特征类型是否与图形唯一确定条件中的特征类型一致,若是,则确定满足图形唯一确定条件,否则,确定不满足图形唯一确定条件。例如,图形为圆形时,目标几何属性的特征类型为半径,其与圆形的图形唯一确定条件中的特征类型(半径或直径)一致,因此,确定满足图形唯一确定条件。再如,图形为椭圆形时,目标几何属性的特征类型为短半轴,其与椭圆的图形唯一确定条件的特征类型(短半轴和长半轴,或短轴或长轴)不一致,因此,确定不满足图形唯一确定条件。When the figure is a round figure, after obtaining the target geometric attributes of the figure, determine whether the characteristic type of the target geometric attribute is consistent with the characteristic type in the figure's unique determination condition. If it is, it is determined that the figure's unique determination condition is satisfied; otherwise, it is determined that the characteristic type is not satisfied. The graphics uniquely determine the conditions. For example, when the graphic is circular, the feature type of the target geometric attribute is radius, which is consistent with the feature type (radius or diameter) in the unique determination condition of the circular graphic. Therefore, it is determined that the unique determination condition of the graphic is satisfied. For another example, when the figure is an ellipse, the feature type of the target geometric attribute is the semi-minor axis, which is inconsistent with the feature type (the semi-minor axis and the semi-major axis, or the minor axis or the major axis) that uniquely determines the condition of the ellipse. , It is determined that the unique determination condition of the graph is not satisfied.
步骤406、根据目标几何属性调整图形。Step 406: Adjust the graphics according to the target geometric attributes.
当图形为多边形时,该步骤包括步骤4061-步骤4062:When the figure is a polygon, this step includes steps 4061 to 4062:
步骤4061、根据目标几何属性确定图形中全部顶点的第二位置数据。Step 4061: Determine the second position data of all vertices in the graph according to the target geometric attributes.
具体的,绘制图形时,需要确定调整后图形中各顶点在画布中的位置数据,并记为第二位置数据。之后,基于第二位置数据顺序连接对应的顶点,进而得到调整后的图形。据此,设定该步骤包括40611-步骤40613:Specifically, when drawing a graph, it is necessary to determine the position data of each vertex in the adjusted graph in the canvas, and record it as the second position data. After that, the corresponding vertices are sequentially connected based on the second position data to obtain the adjusted graphics. Accordingly, setting this step includes 40611-step 40613:
步骤40611、调取图形的特征计算公式。Step 40611: Retrieve the feature calculation formula of the graph.
具体的,每类图形均有对应的特征计算公式,如三角形的特征计算公式包括勾股定理、正弦定理、余弦定理等。再如,正方形的特征计算公式为边长相等、每个内角均为90°。当确定目标几何属性满足图形唯一确定条件时,调取该图形对应的特征计算公式。Specifically, each type of graph has a corresponding characteristic calculation formula. For example, the characteristic calculation formula of a triangle includes the Pythagorean theorem, the law of sine, and the law of cosine. For another example, the characteristic calculation formula of a square is that the side lengths are equal, and each internal angle is 90°. When it is determined that the geometric properties of the target meet the unique determination condition of the figure, the characteristic calculation formula corresponding to the figure is called.
可以理解的是,在调取图形的特征计算公式前,可以先确定是否需要调取特征计算公式,即先确定是否已经明确了各边的长度参数,若是,则无需调取特征计算公式,直接各边的长度参数是否满足图形中边长条件,如三角形的边长条件为任意两边之和大于第三边,任意两边之差小于第三边。若满足,执行步骤40613,否则,调取对应的特征计算公式。It is understandable that before calling the feature calculation formula of the graph, you can first determine whether you need to call the feature calculation formula, that is, first determine whether the length parameters of each side have been clarified, if so, you do not need to call the feature calculation formula, and directly Whether the length parameter of each side meets the side length condition in the graph, for example, the side length condition of a triangle is that the sum of any two sides is greater than the third side, and the difference between any two sides is less than the third side. If it is satisfied, perform step 40613, otherwise, call the corresponding feature calculation formula.
步骤40612、将目标几何属性代入特征计算公式,以计算图形中每条边的第二数据参数。Step 40612: Substitute the target geometric attributes into the feature calculation formula to calculate the second data parameter of each edge in the graph.
具体的,将目标几何属性代入特征计算公式后,可以得到图形中每条边的第二数据参数,其中,第二数据参数表示对应边的长度参数。可以理解的是,有些情况下,需要多个特征计算公式,才可以得到图形中每条边的第二数据参数。此时,可以确定各特征计算公式的先后代入顺序,其中,代入顺序可以根据实际情况设定,例如,以最快得到各边第二数据参数作为标准确定代入顺序。Specifically, after substituting the target geometric attributes into the feature calculation formula, the second data parameter of each side in the graph can be obtained, where the second data parameter represents the length parameter of the corresponding side. It is understandable that in some cases, multiple feature calculation formulas are required to obtain the second data parameter of each edge in the graph. At this time, the sequence of substituting each feature calculation formula can be determined, where the substituting sequence can be set according to actual conditions, for example, the fastest obtaining of the second data parameter of each side as a criterion determines the substituting sequence.
可以理解的是,若根据特征计算公式仍无法得到各边的第二数据参数,则确定调整失败,并执行步骤407。It is understandable that if the second data parameter of each side cannot be obtained according to the feature calculation formula, it is determined that the adjustment has failed, and step 407 is executed.
步骤40613、根据第二数据参数确定顶点的第二位置数据。Step 40613: Determine the second position data of the vertex according to the second data parameter.
具体的,将调整后图形内各顶点在画布中的位置记为第二位置数据。可选的,第二位置数据通过图形确定模型得到,具体的,将第二数据参数以及图形当前各顶点的位置数据作为图形确定模型的输入,将图形数据模型输出的位置数据记为调整图形后各顶点的第二位置数据。还可选的,以当前图形中一个顶点的位置数据作为该顶点调整后的第二位置数据,之后,基于第二数据参数确定其余顶点的第二位置数据。Specifically, the position of each vertex in the adjusted graph on the canvas is recorded as the second position data. Optionally, the second position data is obtained through the graphic determination model. Specifically, the second data parameters and the position data of the current vertices of the graphic are used as the input of the graphic determination model, and the position data output by the graphic data model is recorded as the adjusted graphic The second position data of each vertex. Optionally, the position data of a vertex in the current graph is used as the adjusted second position data of the vertex, and then the second position data of the remaining vertices are determined based on the second data parameter.
步骤4062、根据第二位置数据显示调整后的图形。Step 4062, display the adjusted graph according to the second position data.
具体的,顺序连接各顶点后,便可以得到调整后每条边的位置数据,之后,根据每条边的位置数据在画布中绘制新的图形作为调整后的图形。同时,删除画布中原有的图形。Specifically, after the vertices are sequentially connected, the position data of each edge after adjustment can be obtained, and then a new graph is drawn on the canvas as the adjusted graph according to the position data of each edge. At the same time, delete the original graphics in the canvas.
当图形为圆类图形时,可以直接将当前图形的中心点作为圆心,并根据目标几何属性确定边的位置数据,或者是,根据图形确定模型得到圆的边在画布中位置数据。之后,根据位置数据在画布中绘制新的图形作为调整后的图形。同时,删除画布中原有的图形。When the graphic is a circle-like graphic, you can directly use the center point of the current graphic as the center of the circle, and determine the position data of the edge according to the target geometric properties, or obtain the position data of the edge of the circle in the canvas according to the graphic determination model. After that, a new figure is drawn on the canvas according to the position data as the adjusted figure. At the same time, delete the original graphics in the canvas.
可选的,对第一书写轨迹进行整形,并显示在调整后的图形中。其中,整形手段实施例不做限定。预先设定目标几何属性与图形的相对位置关系,并在整形后,根据相对位置关系在图形中显示目标几何属性。Optionally, the first writing track is reshaped and displayed in the adjusted graph. Among them, the embodiment of the shaping means is not limited. Pre-set the relative position relationship between the target geometric attributes and the graphics, and after shaping, display the target geometric attributes in the graphics according to the relative position relationship.
步骤407、确认后续执行方案并执行。Step 407: Confirm and execute the subsequent execution plan.
具体的,可以根据实际情况设定一个执行方案作为后续执行方案并执行。实施例中,后续执行方案包括下述任一执行方案:Specifically, an execution plan can be set and executed as a follow-up execution plan according to the actual situation. In the embodiment, the subsequent execution plan includes any of the following execution plans:
方案一、显示调整失败提示。Solution 1: Display the adjustment failure prompt.
当确定无法调整图形时,触发调整失败提示,并调取预先设置的提示框显示内容以及显示位置,之后,控制显示屏根据显示内容以及显示位置显示提示框,以向用户提示调整失败。此时,可以继续检测是否接收到第一书写操作,并在接收到第一书写操作后,继续执行上述操作,并确认是否可以对图形进行调整。When it is determined that the graphics cannot be adjusted, the adjustment failure prompt is triggered, and the preset prompt box display content and display position are called. After that, the control display screen displays the prompt box according to the display content and display position to prompt the user that the adjustment has failed. At this point, it can continue to detect whether the first writing operation is received, and after receiving the first writing operation, continue to perform the above operations, and confirm whether the graphics can be adjusted.
方案二、在图形中查找目标几何属性对应的几何特征,确定几何特征的实际几何属性,根据目标几何属性和实际几何属性确定修改幅度,并根据修改幅度调整图形。Solution 2: Find the geometric features corresponding to the target geometric attributes in the graphics, determine the actual geometric attributes of the geometric features, determine the modification range according to the target geometric attributes and the actual geometric attributes, and adjust the graphics according to the modification range.
以矩形为例,目标几何属性仅有一个,且其特征类型为边,第一数据参数为5。此时,确定目标几何属性不满足图形唯一确定条件,并获取矩形中目标几何属性对应的边的实际几何属性。该实际几何属性为4。此时,确定修改幅度为5/4。之后,在矩形中查找目标几何属性对应的边的一条相邻边,确认该相邻边的实际几何属性为8,此时,将8*5/4的结果作为相邻边调整后的几何属性。之后,根据目标几何属性和调整后的几何属性对图形进行调整。可以理解,此时,调整方式与满足图形唯一确定条件时的调整方式相同。在此不做赘述。Taking a rectangle as an example, there is only one target geometric attribute, its characteristic type is edge, and the first data parameter is 5. At this time, it is determined that the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, and the actual geometric properties of the edges corresponding to the geometric properties of the target in the rectangle are obtained. The actual geometric property is 4. At this time, the modification range is determined to be 5/4. Then, find an adjacent side of the side corresponding to the target geometric property in the rectangle, and confirm that the actual geometric property of the adjacent side is 8. At this time, the result of 8*5/4 is used as the adjusted geometric property of the adjacent side . Afterwards, the graphics are adjusted according to the target geometric attributes and the adjusted geometric attributes. It can be understood that at this time, the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
以椭圆为例,目标几何属性仅有一个,且其特征类型为短半轴,第一数据参数为5。此时,确定目标几何属性不满足图形唯一确定条件,并获取椭圆中目标几何属性对应的短半轴的实际几何属性。该实际几何属性为4。此时,确定修改幅度为5/4。之后,在椭圆中查找任一长半轴,确认该长半轴的实际几何属性为8,此时,将8*5/4的结果作为该条长半轴调整后的几何属性。之后,根据目标几何属性和调整后的几何属性对图形进行调整。可以理解,此时,调整方式与满足图形唯一确定条件时的调整方式相同。在此不做赘述。Taking an ellipse as an example, there is only one target geometric attribute, and its feature type is semi-short axis, and the first data parameter is 5. At this time, it is determined that the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, and the actual geometric properties of the minor semi-axis corresponding to the geometric properties of the target in the ellipse are obtained. The actual geometric property is 4. At this time, the modification range is determined to be 5/4. Then, search for any semi-major axis in the ellipse, and confirm that the actual geometric attribute of the semi-major axis is 8. At this time, the result of 8*5/4 is used as the geometric attribute of the semi-major axis after adjustment. Afterwards, the graphics are adjusted according to the target geometric attributes and the adjusted geometric attributes. It can be understood that at this time, the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
可以理解,当目标几何属性为多个时,可以选择其中任一目标几何属性和对应的实际几何属性得到修改幅度。可选的,此时,其他目标几何属性可以根据其几何特征对应的实际几何属性进行修改,以保证可以得到图形。It can be understood that when there are multiple target geometric attributes, any one of the target geometric attributes and the corresponding actual geometric attributes can be selected to obtain the modification range. Optionally, at this time, other target geometric attributes can be modified according to the actual geometric attributes corresponding to their geometric features to ensure that graphics can be obtained.
方案三、根据图形唯一确定条件在图形中查找相应的几何特征,确定几何特征的实际几何属性,并根据目标几何属性和实际几何属性调整图形。Solution 3: Find the corresponding geometric features in the graphics according to the unique determination conditions of the graphics, determine the actual geometric attributes of the geometric features, and adjust the graphics according to the target geometric attributes and the actual geometric attributes.
以矩形为例,目标几何属性仅有一个,且其特征类型为边,第一数据参数为5。此时,确定目标几何属性不满足图形唯一确定条件,并获取矩形中目标几何属性对应的边的实际几何属性。根据图形唯一确定条件,在矩形中查找目标几何属性对应边的一条相邻边,确认该相邻边的实际几何属性为8,此时,根据目标几何属性5和相邻边实际几何属性8对图形进行调整。可以理解,此时,调整方式与满足图形唯一确定条件时的调整方式相同。在此不做赘述。Taking a rectangle as an example, there is only one target geometric attribute, its characteristic type is edge, and the first data parameter is 5. At this time, it is determined that the geometric properties of the target do not satisfy the condition for determining the uniqueness of the figure, and the actual geometric properties of the edges corresponding to the geometric properties of the target in the rectangle are obtained. According to the unique determination condition of the figure, find an adjacent side of the corresponding side of the target geometric property in the rectangle, and confirm that the actual geometric property of the adjacent side is 8. At this time, according to the target geometric property 5 and the actual geometric property of the adjacent side 8. The graphics are adjusted. It can be understood that at this time, the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
以三角形为例,目标几何属性为两个,且两个目标几何属性的特征类型均为边,其第一数据参数均为 5。此时,确定目标几何属性不满足图形唯一确定条件,并根据图形唯一确定条件获取目标几何属性对应的两条边之间的角。确定角的实际几何属性为70°。此时,根据两条边的长度参数以及两条边之间角的角度参数对图形进行调整。可以理解,此时,调整方式与满足图形唯一确定条件时的调整方式相同。在此不做赘述。Take the triangle as an example, there are two target geometric attributes, and the feature types of the two target geometric attributes are edges, and the first data parameter is 5. At this time, it is determined that the geometric attributes of the target do not satisfy the conditions for determining the uniqueness of the figure, and the angle between the two edges corresponding to the geometric attributes of the target is obtained according to the conditions for determining the uniqueness of the graphics. The actual geometric properties of the determined angle are 70°. At this time, adjust the graphics according to the length parameter of the two sides and the angle parameter of the angle between the two sides. It can be understood that at this time, the adjustment method is the same as the adjustment method when the unique determination condition of the graph is satisfied. I won't repeat them here.
可以理解,实际应用中,后续执行方案还可以采用其他方案,实施例对此不做限定。It can be understood that, in actual applications, other solutions may also be adopted for subsequent execution solutions, which are not limited in the embodiment.
上述,通过在画布中显示图形,并根据接收到的第一书写操作显示第一书写轨迹,之后,对第一书写轨迹进行识别,以得到第一数据参数以及特征类型,之后,根据特征类型确定第一数据参数在图形中对应的几何特征,并建立目标几何属性与对应几何特征的关联关系,之后,在确认目标几何属性满足图形唯一确定条件时,根据目标几何属性调整图形,在确认目标几何属性不满足图形唯一确定条件时,进行调整失败提示或结合图形的实际几何属性调整图形的技术方案,实现了通过手写参数的方式,对画布中显示的图形进行调整,且图形调整的准确度高。同时,图形为多边形时,通过各几何特征与目标几何属性的位置关系可以精准确定目标几何属性对应的几何特征,通过预先存储的特征计算公式可以快速准确得到图形中边的数据参数,进而准确得到调整后各顶点的位置数据,保证了图形调整的准确度。As mentioned above, by displaying the graphics in the canvas and displaying the first writing track according to the received first writing operation, after that, the first writing track is recognized to obtain the first data parameter and the characteristic type, and then the first writing track is determined according to the characteristic type. The first data parameter corresponds to the geometric feature in the graph, and establishes the association relationship between the target geometric property and the corresponding geometric feature. After that, when the target geometric property is confirmed to meet the unique determination condition of the graph, the graph is adjusted according to the target geometric property, and the target geometry is confirmed When the attribute does not meet the condition of the unique determination of the graphic, the technical solution of adjusting the graphic with an adjustment failure prompt or combining the actual geometric attributes of the graphic, realizes the adjustment of the graphic displayed in the canvas by handwriting parameters, and the accuracy of graphic adjustment is high . At the same time, when the graph is a polygon, the geometric feature corresponding to the target geometric property can be accurately determined through the positional relationship between each geometric feature and the target geometric property, and the data parameters of the edge in the graph can be quickly and accurately obtained through the pre-stored feature calculation formula, and then accurately obtained The position data of each vertex after adjustment ensures the accuracy of graphics adjustment.
可以理解的是,由于实施例三、实施例四与实施例一、实施例二的应用场景相同,因此,未在本实施例中描述的技术细节,可参见上述实施例。It can be understood that, since the application scenarios of the third and fourth embodiments are the same as those of the first and second embodiments, for technical details not described in this embodiment, please refer to the above-mentioned embodiments.
实施例五Example five
图21为本申请实施例五提供的一种图形调整装置的结构示意图。参考图21,该图形调整装置包括:第一显示模块501、第二显示模块502以及第一调整模块503。FIG. 21 is a schematic structural diagram of a graphic adjustment device provided in Embodiment 5 of the application. Referring to FIG. 21, the graphic adjustment device includes: a first display module 501, a second display module 502, and a first adjustment module 503.
其中,第一显示模块501,用于在画布中显示图形;第二显示模块502,用于响应于接收到的第一书写操作,显示第一书写轨迹,所述第一书写轨迹表示目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;第一调整模块503,用于调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。Among them, the first display module 501 is used to display graphics in the canvas; the second display module 502 is used to display a first writing trajectory in response to the received first writing operation, and the first writing trajectory represents the geometric attributes of the target The target geometric attribute includes at least one of a length parameter and an angle parameter; the first adjustment module 503 is configured to adjust the graphic so that the target geometric attribute is used as the geometric attribute of the adjusted graphic.
在上述实施例的基础上,还包括:特征标记模块,用于响应于接收到的第一书写操作,显示第一书写轨迹之后,基于所述目标几何属性,对所述图形中相应的几何特征进行标记,所述几何特征包括边、角或轴,每个所述目标几何属性对应一个所述几何特征。On the basis of the above-mentioned embodiment, it further includes: a feature marking module, which is used to respond to the received first writing operation, after displaying the first writing trajectory, and based on the target geometric attributes, to compare the corresponding geometric features in the figure Marking is performed, the geometric features include edges, corners, or axes, and each target geometric attribute corresponds to one geometric feature.
在上述实施例的基础上,特征标记模块具体用于:所述目标几何属性对应的几何特征为边时,更换所述几何特征的显示参数;所述目标几何属性对应的几何特征为角或轴时,在所述图形中添加所述几何特征的标记。On the basis of the foregoing embodiment, the feature marking module is specifically configured to: when the geometric feature corresponding to the target geometric attribute is an edge, change the display parameter of the geometric feature; the geometric feature corresponding to the target geometric attribute is an angle or axis At the time, the mark of the geometric feature is added to the graphic.
在上述实施例的基础上,第四显示模块,用于响应于接收到的第一书写操作,显示第一书写轨迹之后,确认所述目标几何属性不满足图形唯一确定条件时,显示调整失败提示。On the basis of the foregoing embodiment, the fourth display module is configured to display an adjustment failure prompt when it is confirmed that the target geometric attribute does not satisfy the condition for determining the uniqueness of the figure after displaying the first writing trajectory in response to the received first writing operation .
在上述实施例的基础上,第一显示模块501具体用于:响应于接收到的第二书写操作,在画布中显示第二书写轨迹,所述第二书写轨迹组成图形;或,响应于接收到的图形模板选择操作,在画布中显示与所述图形模板选择操作对应的图形。On the basis of the foregoing embodiment, the first display module 501 is specifically configured to: in response to the received second writing operation, display a second writing trajectory in the canvas, the second writing trajectory composing a graph; or, in response to receiving The graphic template selection operation that has been obtained, the graphic corresponding to the graphic template selection operation is displayed on the canvas.
在上述实施例的基础上,第一调整模块503还用于:显示整形后的所述第一书写轨迹,所述整形后的所述第一书写轨迹为计算机绘制元素。On the basis of the foregoing embodiment, the first adjustment module 503 is further configured to: display the reshaped first writing trajectory, and the reshaped first writing trajectory is a computer drawing element.
上述提供的图形调整装置可用于执行上述实施例一至实施例二任一提供的图形调整方法,具备相应的功能和有益效果。The graphic adjustment device provided above can be used to implement the graphic adjustment method provided in any one of the foregoing embodiment 1 to embodiment 2, and has corresponding functions and beneficial effects.
同时,本申请实施例五还提供另一种图形调整装置,此时,图22为本申请实施例五提供的另一种图形调整装置的结构示意图。参考图22,该图形调整装置包括:第三显示模块504、操作接收模块505以及 第二调整模块506。At the same time, the fifth embodiment of the present application also provides another graphic adjustment device. At this time, FIG. 22 is a schematic structural diagram of another graphic adjustment device provided by the fifth embodiment of the present application. Referring to FIG. 22, the graphic adjustment device includes: a third display module 504, an operation receiving module 505, and a second adjustment module 506.
其中,第三显示模块504,用于在画布中显示图形;操作接收模块505,用于接收第一书写操作,并根据所述第一书写操作得到第一书写轨迹,对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;第二调整模块506,用于根据所述目标几何属性调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。Among them, the third display module 504 is used to display graphics in the canvas; the operation receiving module 505 is used to receive a first writing operation, and obtain a first writing track according to the first writing operation, and to compare the first writing track Recognition is performed to determine the target geometric attribute represented by the first writing track, the target geometric attribute includes at least one of a length parameter and an angle parameter; the second adjustment module 506 is configured to adjust the figure according to the target geometric attribute , So that the target geometric attribute is used as the geometric attribute of the adjusted figure.
在上述实施例的基础上,操作接收模块505包括:轨迹确定单元,用于接收第一书写操作,并根据所述第一书写操作得到第一书写轨迹,参数确定单元,用于对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的第一数据参数以及特征类型;特征确认单元,用于根据所述特征类型,确定所述第一数据参数在所述图形中对应的几何特征,所述几何特征包括边、角或轴。On the basis of the foregoing embodiment, the operation receiving module 505 includes: a trajectory determining unit for receiving a first writing operation, and obtaining the first writing trajectory according to the first writing operation, and a parameter determining unit for evaluating the first writing operation. A writing track is identified to determine the first data parameter and feature type represented by the first writing track; the feature confirmation unit is configured to determine the corresponding first data parameter in the graph according to the feature type Geometric features, the geometric features include edges, corners or shafts.
在上述实施例的基础上,所述第一书写轨迹包括至少一组;参数确定单元具体包括:对每组所述第一书写轨迹进行数字识别、符号识别和文字识别至少之一,以确定每组所述第一书写轨迹表示的第一数据参数以及特征类型。On the basis of the foregoing embodiment, the first writing trajectory includes at least one group; the parameter determining unit specifically includes: performing at least one of number recognition, symbol recognition, and character recognition on each group of the first writing trajectory to determine each group Set the first data parameter and feature type represented by the first writing track.
在上述实施例的基础上,图形为多边形,特征确认单元包括:特征获取子单元,用于获取所述图形中满足所述特征类型的全部几何特征;位置获取子单元,用于获取所述第一书写轨迹的第一位置数据;特征查找子单元,用于在满足所述特征类型的全部几何特征中,查找距离所述第一位置数据最近的几何特征,并将查找到的几何特征作为所述第一数据参数对应的几何特征。On the basis of the foregoing embodiment, the graphic is a polygon, and the feature confirmation unit includes: a feature acquisition subunit for acquiring all geometric features in the graphic that meet the feature type; a position acquisition subunit for acquiring the first A first position data of a writing track; a feature search subunit, used to search for the geometric feature closest to the first position data among all geometric features that satisfy the feature type, and use the found geometric feature as the all geometric features The geometric feature corresponding to the first data parameter.
在上述实施例的基础上,关系建立模块,用于对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性之后,建立所述目标几何属性与所述图形中对应几何特征的关联关系,并对所述几何特征进行标记。On the basis of the above-mentioned embodiment, the relationship establishment module is used to identify the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory, and then establish the target geometric attribute and the figure. Corresponding to the association relationship of the geometric features, and marking the geometric features.
在上述实施例的基础上,第二调整模块506具体用于若所述目标几何属性满足所述图形唯一确定条件,则根据所述目标几何属性调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。On the basis of the foregoing embodiment, the second adjustment module 506 is specifically configured to adjust the graphics according to the target geometric attributes if the target geometric attributes meet the conditions for determining the uniqueness of the graphics, so that the target geometric attributes serve as The geometric properties of the adjusted figure.
在上述实施例的基础上,还包括:失败执行模块,用于若所述目标几何属性不满足所述图形唯一确定条件,则显示调整失败提示;或,若所述目标几何属性不满足所述图形唯一确定条件,则在所述图形中查找所述目标几何属性对应的几何特征,确定所述几何特征的实际几何属性,根据所述目标几何属性和所述实际几何属性确定修改幅度,并根据所述修改幅度调整所述图形;或,若所述目标几何属性不满足所述图形唯一确定条件,则根据所述图形唯一确定条件在所述图形中查找相应的几何特征,确定所述几何特征的实际几何属性,并根据所述目标几何属性和所述实际几何属性调整所述图形。On the basis of the foregoing embodiment, it further includes: a failure execution module, configured to display an adjustment failure prompt if the target geometric attribute does not meet the condition for determining the uniqueness of the figure; or, if the target geometric attribute does not meet the If the figure is uniquely determined, the geometric feature corresponding to the target geometric attribute is searched in the figure, the actual geometric attribute of the geometric feature is determined, the modification range is determined according to the target geometric attribute and the actual geometric attribute, and according to The modification range adjusts the graphic; or, if the target geometric attribute does not satisfy the unique determination condition of the graphic, the corresponding geometric feature is searched in the graphic according to the unique determination condition of the graphic, and the geometric feature is determined And adjust the graphics according to the target geometric properties and the actual geometric properties.
在上述实施例的基础上,图形为多边形,第二调整模块506包括:顶点确定单元,用于根据所述目标几何属性确定所述图形中全部顶点的第二位置数据;图形显示单元,用于根据所述第二位置数据显示调整后的图形。On the basis of the foregoing embodiment, the graphic is a polygon, and the second adjustment module 506 includes: a vertex determining unit, configured to determine the second position data of all vertices in the graphic according to the target geometric attributes; and a graphic display unit, configured to The adjusted graph is displayed according to the second position data.
在上述实施例的基础上,顶点确定单元包括:公式调取子单元,用于调取所述图形的特征计算公式;公式计算子单元,用于将所述目标几何属性代入所述特征计算公式,以计算所述图形中每条边的第二数据参数;位置确定子单元,用于根据所述第二数据参数确定所述顶点的第二位置数据。On the basis of the foregoing embodiment, the vertex determination unit includes: a formula calling subunit for calling a feature calculation formula of the graph; a formula calculation subunit for substituting the target geometric attribute into the feature calculation formula , To calculate the second data parameter of each edge in the graph; the position determining subunit is used to determine the second position data of the vertex according to the second data parameter.
在上述实施例的基础上,第三显示模块504包括:书写接收单元,用于接收第二书写操作,并根据所述第二书写操作显示第二书写轨迹;图形识别单元,用于对所述第二书写轨迹进行图形识别,以确定所述第二书写轨迹表示的图形。On the basis of the above-mentioned embodiment, the third display module 504 includes: a writing receiving unit for receiving a second writing operation, and displaying the second writing track according to the second writing operation; The second writing trajectory performs pattern recognition to determine the figure represented by the second writing trajectory.
上述提供的图形调整装置可用于执行上述实施例三及实施例四任一提供的图形调整方法,具备相应的功能和有益效果。The graphics adjustment device provided above can be used to execute the graphics adjustment method provided in any one of the third and fourth embodiments above, and has corresponding functions and beneficial effects.
值得注意的是,上述图形调整装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分 的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。It is worth noting that, in the above embodiment of the graphics adjustment device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, each The specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application.
实施例六Example Six
图23为本申请实施例六提供的一种图形调整设备的结构示意图。本实施例中,以智能交互平板为图形调整设备为例,进行描述。如图23所示,该智能交互平板60包括至少一个处理器61、至少一个网络接口62、用户接口63、存储器64以及至少一个通信总线65。FIG. 23 is a schematic structural diagram of a graphics adjustment device provided in Embodiment 6 of this application. In this embodiment, the description is made by taking the smart interactive tablet as the graphics adjustment device as an example. As shown in FIG. 23, the smart interactive tablet 60 includes at least one processor 61, at least one network interface 62, a user interface 63, a memory 64, and at least one communication bus 65.
其中,通信总线65用于实现这些组件之间的连接通信。Among them, the communication bus 65 is used to realize the connection and communication between these components.
其中,用户接口62可以包括显示屏、摄像头,可选用户接口63还可以包括标准的有线接口、无线接口。The user interface 62 may include a display screen and a camera, and the optional user interface 63 may also include a standard wired interface and a wireless interface.
其中,网络接口62可选包括标准的有线接口、无线接口(如Wi-Fi接口)。Among them, the network interface 62 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).
其中,处理器61可以包括一个或多个处理核心。处理器61利用各种接口和线路连接整个智能交互平板60内的各个部分,通过运行或执行存储在处理器61内的指令、程序、代码集或指令集,以及调用存储在存储器64内的数据,执行智能交互平板60的各种功能和处理数据。可选的,处理器61可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable logic arrays,PLA)中的至少一种硬件形式来实现。处理器61可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器61中,单独通过一块芯片进行实现。The processor 61 may include one or more processing cores. The processor 61 uses various interfaces and lines to connect the various parts of the entire intelligent interactive tablet 60, by running or executing instructions, programs, code sets, or instruction sets stored in the processor 61, and calling data stored in the memory 64 , Perform various functions of the smart interactive tablet 60 and process data. Optionally, the processor 61 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable logic arrays, PLA). A kind of hardware form to realize. The processor 61 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the display; the modem is used to process wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 61, but may be implemented by a chip alone.
其中,存储器64可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器64包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器64可用于存储指令、程序、代码、代码集或指令集。存储器64可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器64可选的还可以是至少一个位于远离前述处理器61的存储装置。如图23所示,作为一种计算机存储介质的存储器64中可以包括操作系统、网络通信模块、用户接口模块以及智能交互平板的操作应用程序。The memory 64 may include random access memory (RAM) or read-only memory (Read-Only Memory). Optionally, the memory 64 includes a non-transitory computer-readable storage medium. The memory 64 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 64 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions used to implement the foregoing method embodiments, etc.; the storage data area can store the data involved in the foregoing method embodiments, etc. Optionally, the memory 64 may also be at least one storage device located far away from the aforementioned processor 61. As shown in FIG. 23, the memory 64 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program of a smart interactive tablet.
在图23所示的智能交互平板60中,用户接口63主要用于为用户提供输入的接口,获取用户输入的数据;而处理器61可以用于调用存储器64中存储的智能交互平板的操作应用程序,并具体执行上述实施例中元素控制方法中的相关操作。In the smart interactive tablet 60 shown in FIG. 23, the user interface 63 is mainly used to provide an input interface for the user to obtain data input by the user; and the processor 61 can be used to call the operation application of the smart interactive tablet stored in the memory 64 Program, and specifically execute the relevant operations in the element control method in the above embodiment.
在一个实施例中,所述智能交互平板的操作系统为安卓系统。In one embodiment, the operating system of the smart interactive tablet is Android.
上述智能交互平板可以用于执行任意图形调整方法,具备相应的功能和有益效果。The above-mentioned smart interactive tablet can be used to execute any graphics adjustment method, and has corresponding functions and beneficial effects.
此外,本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行本申请任意实施例所提供的图形调整方法中的相关操作,且具备相应的功能和有益效果。In addition, an embodiment of the present application also provides a storage medium containing computer-executable instructions, which are used to perform related operations in the graphics adjustment method provided by any embodiment of the present application when the computer-executable instructions are executed by a computer processor. , And have corresponding functions and beneficial effects.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products.
因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。本申请是参照根据本申请实施例 的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to the embodiments of this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram. These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和非易失性内存至少之一的形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer readable medium, and at least one form of random access memory (RAM) and non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or they also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.

Claims (20)

  1. 一种图形调整方法,包括:A graphic adjustment method, including:
    在画布中显示图形;Display graphics in the canvas;
    响应于接收到的第一书写操作,显示第一书写轨迹,所述第一书写轨迹表示目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;In response to the received first writing operation, displaying a first writing trajectory, the first writing trajectory representing a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter;
    调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The graphic is adjusted so that the target geometric attribute is the geometric attribute of the adjusted graphic.
  2. 根据权利要求1所述的图形调整方法,其中,所述响应于接收到的第一书写操作,显示第一书写轨迹之后,包括:The graphic adjustment method according to claim 1, wherein the step of displaying the first writing track in response to the received first writing operation comprises:
    基于所述目标几何属性,对所述图形中相应的几何特征进行标记,所述几何特征包括边、角或轴,每个所述目标几何属性对应一个所述几何特征。Based on the target geometric attributes, mark corresponding geometric features in the graphics. The geometric features include edges, corners, or axes, and each target geometric attribute corresponds to one geometric feature.
  3. 根据权利要求2所述的图形调整方法,其中,所述对所述图形中相应的几何特征进行标记包括:The graphic adjustment method according to claim 2, wherein the marking corresponding geometric features in the graphic comprises:
    所述目标几何属性对应的几何特征为边时,更换所述几何特征的显示参数;When the geometric feature corresponding to the target geometric attribute is an edge, the display parameter of the geometric feature is changed;
    所述目标几何属性对应的几何特征为角或轴时,在所述图形中添加所述几何特征的标记。When the geometric feature corresponding to the target geometric attribute is a corner or an axis, a mark of the geometric feature is added to the graphic.
  4. 根据权利要求1所述的图形调整方法,其中,所述响应于接收到的第一书写操作,显示第一书写轨迹之后,还包括:The graphic adjustment method according to claim 1, wherein, after displaying the first writing trajectory in response to the received first writing operation, the method further comprises:
    确认所述目标几何属性不满足图形唯一确定条件时,显示调整失败提示。When it is confirmed that the geometric properties of the target do not meet the conditions for determining the uniqueness of the figure, an adjustment failure prompt is displayed.
  5. 根据权利要求1所述的图形调整方法,其中,所述在画布中显示图形包括:The graphic adjustment method according to claim 1, wherein said displaying the graphic in the canvas comprises:
    响应于接收到的第二书写操作,在画布中显示第二书写轨迹,所述第二书写轨迹组成图形;或,In response to the received second writing operation, display a second writing track on the canvas, the second writing track composing a graph; or,
    响应于接收到的图形模板选择操作,在画布中显示与所述图形模板选择操作对应的图形。In response to the received graphic template selection operation, a graphic corresponding to the graphic template selection operation is displayed on the canvas.
  6. 根据权利要求1所述的图形调整方法,其中,所述调整所述图形,以使所述目标几何属性作为调整后图形的几何属性,还包括:The graphic adjustment method according to claim 1, wherein the adjusting the graphic so that the target geometric attribute is used as the geometric attribute of the adjusted graphic, further comprising:
    显示整形后的所述第一书写轨迹,所述整形后的所述第一书写轨迹为计算机绘制元素。The reshaped first writing trajectory is displayed, and the reshaped first writing trajectory is a computer drawing element.
  7. 一种图形调整方法,包括:A graphic adjustment method, including:
    在画布中显示图形;Display graphics in the canvas;
    接收第一书写操作,并根据所述第一书写操作得到第一书写轨迹,对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;A first writing operation is received, and a first writing trajectory is obtained according to the first writing operation, and the first writing trajectory is recognized to determine a target geometric attribute represented by the first writing trajectory, and the target geometric attribute includes At least one of length parameter and angle parameter;
    根据所述目标几何属性调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The graphic is adjusted according to the target geometric attribute, so that the target geometric attribute is used as the geometric attribute of the adjusted graphic.
  8. 根据权利要求7所述的图形调整方法,其中,所述对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性包括:8. The graphic adjustment method according to claim 7, wherein said recognizing said first writing trajectory to determine the target geometric attribute represented by said first writing trajectory comprises:
    对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的第一数据参数以及特征类型;Identifying the first writing trajectory to determine the first data parameter and feature type represented by the first writing trajectory;
    根据所述特征类型,确定所述第一数据参数在所述图形中对应的几何特征,所述几何特征包括边、角或轴。According to the feature type, a geometric feature corresponding to the first data parameter in the graph is determined, and the geometric feature includes an edge, a corner, or an axis.
  9. 根据权利要求8所述的图形调整方法,其中,所述第一书写轨迹包括至少一组;8. The graphic adjustment method according to claim 8, wherein the first writing track includes at least one group;
    所述对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的第一数据参数以及特征类型包括:The recognizing the first writing trajectory to determine the first data parameter and characteristic type represented by the first writing trajectory includes:
    对每组所述第一书写轨迹进行数字识别、符号识别和文字识别至少之一,以确定每组所述第一书写轨迹表示的第一数据参数以及特征类型。At least one of number recognition, symbol recognition, and character recognition is performed on each group of the first writing trajectories to determine the first data parameter and feature type represented by each group of the first writing trajectory.
  10. 根据权利要求8所述的图形调整方法,其中,所述图形为多边形;8. The graphic adjustment method according to claim 8, wherein the graphic is a polygon;
    所述根据所述特征类型,确定所述第一数据参数在所述图形中对应的几何特征包括:The determining, according to the feature type, the geometric feature corresponding to the first data parameter in the graph includes:
    获取所述图形中满足所述特征类型的全部几何特征;Acquiring all geometric features in the graph that meet the feature type;
    获取所述第一书写轨迹的第一位置数据;Acquiring first position data of the first writing track;
    在满足所述特征类型的全部几何特征中,查找距离所述第一位置数据最近的几何特征,并将查找到的几何特征作为所述第一数据参数对应的几何特征。Among all geometric features satisfying the feature type, the geometric feature closest to the first position data is searched, and the found geometric feature is used as the geometric feature corresponding to the first data parameter.
  11. 根据权利要求7-10任一所述的图形调整方法,其中,所述对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性之后,包括:The graphic adjustment method according to any one of claims 7-10, wherein after the recognizing the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory, the method comprises:
    建立所述目标几何属性与所述图形中对应几何特征的关联关系,并对所述几何特征进行标记。Establish an association relationship between the target geometric attribute and the corresponding geometric feature in the graph, and mark the geometric feature.
  12. 根据权利要求7所述的图形调整方法,其中,所述根据所述目标几何属性调整所述图形包括:8. The graphic adjustment method according to claim 7, wherein said adjusting said graphic according to said target geometric attribute comprises:
    若所述目标几何属性满足所述图形唯一确定条件,则根据所述目标几何属性调整所述图形。If the target geometric attribute satisfies the unique determination condition of the figure, the figure is adjusted according to the target geometric attribute.
  13. 根据权利要求12所述的图形调整方法,还包括:The graphics adjustment method according to claim 12, further comprising:
    若所述目标几何属性不满足所述图形唯一确定条件,则显示调整失败提示;或,If the target geometric attributes do not meet the conditions for the unique determination of the figure, a prompt of adjustment failure is displayed; or,
    若所述目标几何属性不满足所述图形唯一确定条件,则在所述图形中查找所述目标几何属性对应的几何特征,确定所述几何特征的实际几何属性,根据所述目标几何属性和所述实际几何属性确定修改幅度,并根据所述修改幅度调整所述图形;或,If the target geometric attribute does not satisfy the unique determination condition of the figure, the geometric characteristic corresponding to the target geometric attribute is searched in the figure, the actual geometric attribute of the geometric characteristic is determined, and the target geometric attribute and the geometric characteristic are determined. The actual geometric attributes determine the modification range, and adjust the graphics according to the modification range; or,
    若所述目标几何属性不满足所述图形唯一确定条件,则根据所述图形唯一确定条件在所述图形中查找相应的几何特征,确定所述几何特征的实际几何属性,并根据所述目标几何属性和所述实际几何属性调整所述图形。If the target geometric attribute does not meet the unique determination condition of the figure, the corresponding geometric feature is searched in the figure according to the unique determination condition of the figure, the actual geometric attribute of the geometric feature is determined, and the target geometry The attributes and the actual geometric attributes adjust the graphics.
  14. 根据权利要求7所述的图形调整方法,其中,所述图形为多边形;8. The graphic adjustment method according to claim 7, wherein the graphic is a polygon;
    所述根据所述目标几何属性调整所述图形包括:The adjusting the graphics according to the target geometric attributes includes:
    根据所述目标几何属性确定所述图形中全部顶点的第二位置数据;Determining the second position data of all vertices in the graph according to the target geometric attributes;
    根据所述第二位置数据显示调整后的图形。The adjusted graph is displayed according to the second position data.
  15. 根据权利要求14所述的图形调整方法,其中,所述根据所述目标几何属性确定所述图形中全部顶点的第二位置数据包括:The graphic adjustment method according to claim 14, wherein the determining the second position data of all vertices in the graphic according to the target geometric attributes comprises:
    调取所述图形的特征计算公式;Retrieve the characteristic calculation formula of the graph;
    将所述目标几何属性代入所述特征计算公式,以计算所述图形中每条边的第二数据参数;Substituting the target geometric attribute into the feature calculation formula to calculate the second data parameter of each edge in the graph;
    根据所述第二数据参数确定所述顶点的第二位置数据。The second position data of the vertex is determined according to the second data parameter.
  16. 根据权利要求7所述的图形调整方法,其中,所述在画布中显示图形包括:8. The graphic adjustment method according to claim 7, wherein said displaying the graphic in the canvas comprises:
    接收第二书写操作,并根据所述第二书写操作显示第二书写轨迹;Receiving a second writing operation, and displaying a second writing track according to the second writing operation;
    对所述第二书写轨迹进行图形识别,以确定所述第二书写轨迹表示的图形。Graphic recognition is performed on the second writing trajectory to determine the graphic represented by the second writing trajectory.
  17. 一种图形调整装置,包括:A graphic adjustment device, including:
    第一显示模块,用于在画布中显示图形;The first display module is used to display graphics in the canvas;
    第二显示模块,用于响应于接收到的第一书写操作,显示第一书写轨迹,所述第一书写轨迹表示目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;The second display module is configured to display a first writing trajectory in response to the received first writing operation, the first writing trajectory representing a target geometric attribute, and the target geometric attribute includes at least one of a length parameter and an angle parameter;
    第一调整模块,用于调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The first adjustment module is configured to adjust the graphics so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
  18. 一种图形调整装置,包括:A graphic adjustment device, including:
    第三显示模块,用于在画布中显示图形;The third display module is used to display graphics on the canvas;
    操作接收模块,用于接收第一书写操作,并根据所述第一书写操作得到第一书写轨迹,对所述第一书写轨迹进行识别,以确定所述第一书写轨迹表示的目标几何属性,所述目标几何属性包括长度参数和角度参数至少之一;The operation receiving module is configured to receive a first writing operation, obtain a first writing trajectory according to the first writing operation, and identify the first writing trajectory to determine the target geometric attribute represented by the first writing trajectory, The target geometric attribute includes at least one of a length parameter and an angle parameter;
    第二调整模块,用于根据所述目标几何属性调整所述图形,以使所述目标几何属性作为调整后图形的几何属性。The second adjustment module is configured to adjust the graphics according to the target geometric attributes, so that the target geometric attributes are used as the geometric attributes of the adjusted graphics.
  19. 一种图形调整设备,包括:A graphics adjustment device, including:
    一个或多个处理器;One or more processors;
    存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6或权利要求7-16中任一所述的图形调整方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the graphics adjustment method according to any one of claims 1-6 or 7-16 .
  20. 一种计算机可读存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-6或权利要求7-16中任一项所述的图形调整方法。A computer-readable storage medium with a computer program stored thereon, wherein the program is executed by a processor to implement the graphics adjustment method according to any one of claims 1-6 or 7-16.
PCT/CN2019/121742 2019-10-23 2019-11-28 Graphic adjustment method and apparatus, device and storage medium WO2021077539A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911010626.XA CN110956674B (en) 2019-10-23 2019-10-23 Graph adjusting method, device, equipment and storage medium
CN201911010626.X 2019-10-23

Publications (1)

Publication Number Publication Date
WO2021077539A1 true WO2021077539A1 (en) 2021-04-29

Family

ID=69976590

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/121742 WO2021077539A1 (en) 2019-10-23 2019-11-28 Graphic adjustment method and apparatus, device and storage medium

Country Status (2)

Country Link
CN (1) CN110956674B (en)
WO (1) WO2021077539A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237309A (en) * 2022-09-21 2022-10-25 深圳市方成教学设备有限公司 Display control method based on intelligent writing board and intelligent writing board

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113362419A (en) * 2021-06-01 2021-09-07 深圳须弥云图空间科技有限公司 Drawing method and related equipment
CN113496109B (en) * 2021-07-05 2022-06-14 北京华大九天科技股份有限公司 Method, device, storage medium and electronic equipment for displaying rectangular polygon
CN113849118A (en) * 2021-10-20 2021-12-28 锐捷网络股份有限公司 Image identification method applied to electronic whiteboard and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080019591A1 (en) * 2006-07-19 2008-01-24 Fujitsu Limited Freehand input method, freehand input device, and computer program product
CN103914174A (en) * 2012-12-28 2014-07-09 索尼公司 Information processing device, information processing method and program storage medium
CN105074622A (en) * 2013-02-15 2015-11-18 三星电子株式会社 Method for generating writing data and an electronic device thereof
CN106716493A (en) * 2014-09-18 2017-05-24 三星电子株式会社 Method of styling content and touch screen device for styling content
CN109976614A (en) * 2019-03-28 2019-07-05 广州视源电子科技股份有限公司 A kind of mask method of solid figure, device, equipment and medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184300B (en) * 2011-05-23 2012-12-05 镇江科大船苑计算机网络工程有限公司 Label rectangular graph computer drawing method
US8762895B2 (en) * 2012-10-28 2014-06-24 Google Inc. Camera zoom indicator in mobile devices
CN104461315A (en) * 2013-09-25 2015-03-25 天津书生软件技术有限公司 Handwriting input method for achieving vigorous writing effect
JP6269056B2 (en) * 2013-12-27 2018-01-31 カシオ計算機株式会社 Parameter setting device, electronic device and program
CN104268351B (en) * 2014-09-30 2017-11-14 广州市科创电脑技术开发有限公司 A kind of method and apparatus for drawing plan
TWI550519B (en) * 2015-05-27 2016-09-21 仁寶電腦工業股份有限公司 Chart drawing method
CN110069204B (en) * 2019-04-15 2021-12-03 广州视源电子科技股份有限公司 Graph processing method, device and equipment based on writing track and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080019591A1 (en) * 2006-07-19 2008-01-24 Fujitsu Limited Freehand input method, freehand input device, and computer program product
CN103914174A (en) * 2012-12-28 2014-07-09 索尼公司 Information processing device, information processing method and program storage medium
CN105074622A (en) * 2013-02-15 2015-11-18 三星电子株式会社 Method for generating writing data and an electronic device thereof
CN106716493A (en) * 2014-09-18 2017-05-24 三星电子株式会社 Method of styling content and touch screen device for styling content
CN109976614A (en) * 2019-03-28 2019-07-05 广州视源电子科技股份有限公司 A kind of mask method of solid figure, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237309A (en) * 2022-09-21 2022-10-25 深圳市方成教学设备有限公司 Display control method based on intelligent writing board and intelligent writing board

Also Published As

Publication number Publication date
CN110956674B (en) 2022-01-21
CN110956674A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
WO2021077539A1 (en) Graphic adjustment method and apparatus, device and storage medium
US10606474B2 (en) Touch screen finger tracing device
KR102470522B1 (en) System and method for management of handwritten diagram connectors
WO2019140987A1 (en) Table control method, device, apparatus, and storage medium
WO2019000681A1 (en) Information layout method, device, apparatus and computer storage medium
US20130016126A1 (en) Drawing aid system for multi-touch devices
CN110069204B (en) Graph processing method, device and equipment based on writing track and storage medium
US10761721B2 (en) Systems and methods for interactive image caricaturing by an electronic device
KR20130000327A (en) Character recognition for overlapping textual user input
CN114138165B (en) Pattern recognition method, apparatus, device and storage medium
CN111025039B (en) Method, device, equipment and medium for testing accuracy of touch display screen
CN110909596B (en) Side face recognition method, device, equipment and storage medium
CN105074622B (en) For generating the method and its electronic device of writing data
CN113849106B (en) Page turning handwriting processing method, device, electronic device and storage medium
CN111694451B (en) Method, device, equipment and storage medium for processing operation data
US11789604B2 (en) Handwriting processing method, handwriting processing device and non-transitory storage medium
JP2015022524A (en) Terminal device and system
JPH06111073A (en) Handwritten information recognizing device
WO2023184083A1 (en) Smart graphic association method and smart interactive display device
CN116185269A (en) Element selection method, element selection device, storage medium and electronic equipment
WO2022242013A1 (en) Handwriting erasing method and apparatus, interactive tablet, and storage medium
EP4073624B1 (en) Systems and methods for grid-aligned inking
WO2024113271A1 (en) Intelligent handwriting display device, intelligent handwriting display method, and electronic device
CN114882513A (en) Data identification method and intelligent interactive display equipment
CN115509431A (en) Handwriting drawing method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19950212

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19950212

Country of ref document: EP

Kind code of ref document: A1