Drawing method and application of automatic correction rectangle based on electronic whiteboard

By capturing and analyzing the rectangular trajectory points drawn by the user on the electronic whiteboard, and calculating the rectangular vertex coordinates, the automatic correction of the rectangle is realized, solving the problem of drawing irregular rectangles, and improving the aesthetics of drawing and teaching quality.

CN112884864BActive Publication Date: 2024-10-18GUANGZHOU LANGO ELECTRONICS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110080034.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-21
Publication Date
2024-10-18
Estimated Expiration
2041-01-21

AI Technical Summary

Technical Problem

When drawing rectangles on the electronic whiteboard, it is difficult to achieve regular graphics, resulting in unsightly drawings and affecting the quality of teaching.

Method used

By capturing the trajectory points drawn by the user, judging and storing key points, calculating the minimum and maximum values ​​of the X-axis and Y-axis, and automatically correcting the four vertex coordinates of the regular rectangle, the automatic correction of the rectangle is realized.

Benefits of technology

Quickly complete rectangle drawing, which improves user experience, ensures the aesthetics of drawn graphics, and improves teaching quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112884864B_ABST
    Figure CN112884864B_ABST
Patent Text Reader

Abstract

The present invention provides a drawing method and application of an automatic correction rectangle based on an electronic whiteboard, wherein the method comprises: capturing the coordinates of the starting point, inflection point and end point of the track drawn by the user on the electronic whiteboard, and judging whether the track is completed in one stroke, judging whether the distance between the end point and the starting point is within the error range, and if so, respectively capturing the coordinates of several points on the path between the starting point and the inflection point, between two adjacent inflection points, and between the inflection point and the end point; obtaining the minimum and maximum values ​​of the X-axis and the minimum and maximum values ​​of the Y-axis according to the coordinate values ​​of all points, thereby obtaining the four vertices of a regular rectangle. The present invention analyzes the track points on the drawing path, finds out several important eigenvalues ​​according to the comparison of eigenvalues, and corrects them to obtain a regular rectangle. The present invention can quickly complete the drawing of rectangles and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drawing correction, and in particular to a drawing method based on automatic correction of rectangles on an electronic whiteboard and application thereof. Background Art

[0002] At present, electronic whiteboards are increasingly widely used in the field of teaching. When using electronic whiteboards for teaching, sometimes graphics, such as rectangles, are drawn on the whiteboard. Electronic whiteboards are used for writing, and irregular graphics are used. Especially when drawing handwriting, it is difficult to draw regular graphics, or when you want to draw a regular graphic of the size of a specified area, you cannot get the desired regular graphics, which makes the drawn graphics unsightly and affects the teaching quality. Summary of the invention

[0003] The purpose of the present invention is to provide a drawing method based on automatic correction of rectangles on an electronic whiteboard and its application, which can solve the problems of irregular rectangles drawn on electronic whiteboards, unsightly graphics, and affected teaching quality in the prior art.

[0004] The objective of the present invention is achieved through the following technical solutions:

[0005] In a first aspect, the present invention provides a drawing method based on an electronic whiteboard to automatically correct a rectangle, comprising the following steps:

[0006] Step 1: The user selects a rectangle as the shape of the graphic to be drawn and draws a rectangle on the electronic whiteboard;

[0007] Step 2, capturing the coordinates of the starting point, turning point and end point of the track drawn by the user on the electronic whiteboard, determining whether the track is completed in one stroke, and determining whether the distance between the end point and the starting point is within the error range, if yes, go to step 3, otherwise discard the captured track;

[0008] Step 3: Capture several points on the path between the starting point and the inflection point, between two adjacent inflection points, and between the inflection point and the end point, and store the coordinates of all points in the key point set; obtain the minimum and maximum values ​​of the X-axis and the minimum and maximum values ​​of the Y-axis based on the coordinate values ​​of all points, thereby obtaining the four vertices of the regular rectangle.

[0009] Furthermore, the step 3 comprises:

[0010] Step 301: Get the coordinates of the starting point, denoted as A(X A , Y A ), and store it in the key point set;

[0011] Step 302: Make the minimum value of the X axis Xmin=X A , the maximum value of the X axis Xmax=XA , making the minimum value Ymin of the Y-axis equal to Y A , and the maximum value Ymax of the Y-axis equal to Y A ;

[0012] Step 303: Sequentially read the coordinate values (Xn, Yn) of other points, and compare them with Xmin, Xmax, Ymin, and Ymax. If Xn < Xmin, then Xmin = Xn; if Xn > Xmax, then Xmax = Xn; if Yn < Ymin, then Ymin = Yn; if Yn > Ymax, then Ymax = Yn;

[0013] Step 304: Finally, obtain the minimum and maximum values of the X-axis, and the minimum and maximum values of the Y-axis, which form the four vertex coordinates of the rectangle.

[0014] In a second aspect, the present invention provides a drawing device for automatically correcting a rectangle based on an electronic whiteboard, including a coordinate point acquisition module, a storage module, a calculation module, and a buffer module; wherein:

[0015] The coordinate point acquisition module is configured to capture the coordinates of the starting point, inflection points, and ending point, and capture the coordinates of several points on the paths between the starting point and inflection points, between adjacent inflection points, and between the inflection point and the ending point;

[0016] The storage module is configured to store the coordinate values of all points captured by the coordinate point acquisition module;

[0017] The calculation module, based on the coordinate values of all points, obtains the minimum and maximum values of the X-axis, and the minimum and maximum values of the Y-axis, so as to obtain the four vertex coordinates of a regular rectangle.

[0018] In a third aspect, the present invention provides an electronic whiteboard, including the above-mentioned drawing device for automatically correcting a rectangle based on an electronic whiteboard.

[0019] In a fourth aspect, the present invention provides a storage medium, in which a computer program is stored, and characterized in that running the computer program can execute the above-mentioned drawing method for automatically correcting a rectangle based on an electronic whiteboard.

[0020] The drawing method and its application for automatically correcting a rectangle based on an electronic whiteboard according to the present invention capture all the points on the drawing path according to the characteristic values of the irregular rectangle drawn by the user, so as to analyze the trajectory points on the path. According to the comparison of the characteristic values, several important characteristic values are found, and then it is corrected to obtain the rectangle we really want, quickly completing the operation of drawing a rectangle. In this way, the real result desired in the physical world is achieved, improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1An irregular rectangle diagram drawn manually by the user;

[0022] Figure 2 A schematic diagram for capturing points on an irregular rectangle;

[0023] Figure 3 is a schematic diagram of a regular rectangle obtained after correction using the method of the present invention;

[0024] Figure 4 The figure is a schematic diagram of the steps of the drawing method for automatically correcting rectangles based on an electronic whiteboard according to the present invention. DETAILED DESCRIPTION

[0025] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0026] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0027] The drawing method based on the automatic correction rectangle of the electronic whiteboard of the present invention comprises the following steps:

[0028] Step 1: The user selects a rectangle as the shape of the graphic to be drawn and draws a rectangle on the electronic whiteboard.

[0029] In this application, before drawing, the shape of the drawing should be selected first, and different shapes correspond to different correction algorithms.

[0030] Step 2: Capture the starting point, turning point and end point of the track drawn by the user on the electronic whiteboard, determine whether the track is completed in one stroke, and determine whether the distance between the end point and the starting point is within the error range. If so, go to step 3, otherwise discard the captured track.

[0031] like Figure 1 As shown, the user casually draws from point A to point B, then from point B to point C, point C to point D, and point D to point E. This behavior mainly requires the capture of points A, B, C, D, and E, where point A is the starting point, points B, C, and D are turning points, and point E is the end point.

[0032] According to the rectangle law, that is, a rectangle is confirmed by 4 points. However, when the user operates, since the last point E cannot completely coincide with A, 5 points need to be set during correction. Among them, point E must be within the error range, otherwise the automatic capture behavior will be abandoned. At the same time, the present invention requires that the writing path from A to B, B to C, C, to D, and D to E be completed in one stroke without leaving the electronic whiteboard screen in the middle, otherwise the automatic capture behavior will also be automatically abandoned.

[0033] Step 3: Capture several points on the paths of the starting point and the inflection points, two adjacent inflection points, and the inflection point and the end point respectively, and store the coordinates of all points into the key point set; obtain the minimum and maximum values of the X-axis and the minimum and maximum values of the Y-axis according to the coordinate values of all points, so as to obtain the four vertices of a regular rectangle.

[0034] As Figure 2 shown, the points between the captured starting point A and the inflection point B are A1, A2, A3, the points between the inflection point B and the inflection point C are B1, B2, B3, and the points between the inflection point D and the end point E are D1, D2, D3, and so on. The number of points captured on each line segment is not limited.

[0035] Further, in a preferred embodiment of the present application, step 3 includes:

[0036] Step 301: Obtain the coordinates of the starting point, denoted as A(X A , Y A ), and store them into the key point set.

[0037] According to the principle of the rectangle law that a rectangle can be determined by 4 points not on the same straight line, when the user clicks on the screen to start drawing, obviously the starting point A can be obtained as soon as the screen is touched, and the coordinates of A are stored into the key point set.

[0038] Step 302: Let the minimum value of the X-axis Xmin = X A , the maximum value of the X-axis Xmax = X A , let the minimum value of the Y-axis Ymin = Y A , and the maximum value of the Y-axis Ymax = Y A .

[0039] Step 303: Read the coordinate values (Xn, Yn) of other points in sequence, and compare them with the minimum value Xmin of the X-axis, the maximum value Xmax of the X-axis, the minimum value Ymin of the Y-axis, and the maximum value Ymax of the Y-axis. If Xn < Xmin, then Xmin = Xn; if Xn > Xmax, then Xmax = Xn; if Yn < Ymin, then Ymin = Yn; if Yn > Ymax, then Ymax = Yn.

[0040] Step 304: Finally, the minimum and maximum values of the X-axis and the minimum and maximum values of the Y-axis are obtained, forming the four vertex coordinates of the rectangle: (Xmin, Ymin), (Xmin, Ymax), (Xmax, Ymax), (Xmax, Ymin).

[0041] As Figure 3 shown, after the above corrections, a regular rectangular area is obtained, and the automatic correction function of quickly drawing a rectangle on the whiteboard can be realized.

[0042] The drawing device for automatically correcting a rectangle based on an electronic whiteboard according to the present invention includes a coordinate point acquisition module, a storage module, a calculation module, and a buffer module; wherein:

[0043] The coordinate point acquisition module captures the coordinates of the starting point, inflection points, and ending point, and captures the coordinates of several points on the paths of the starting point and inflection points, adjacent inflection points, and inflection points and ending point.

[0044] The storage module is used to store the coordinate values of all points captured by the coordinate point acquisition module.

[0045] The calculation module, based on the coordinate values of all points, obtains the minimum value Xmin and the maximum value Xmax of the X-axis, and the minimum value Ymin and the maximum value Ymax of the Y-axis, thereby obtaining the four vertex coordinates of a regular rectangle.

[0046] Obtain the coordinates of the starting point, denoted as A(X A , Y A ). Let the minimum value Xmin of the X-axis = X A , the maximum value Xmax of the X-axis = X A , let the minimum value Ymin of the Y-axis = Y A , the maximum value Ymax of the Y-axis = Y A . Sequentially read the coordinate values (Xn, Yn) of other points, and compare them with Xmin, Xmax, Ymin, and Ymax. If Xn < Xmin, then Xmin = Xn; if Xn > Xmax, then Xmax = Xn; if Yn < Ymin, then Ymin = Yn; if Yn > Ymax, then Ymax = Yn. The minimum and maximum values of the X-axis and the minimum and maximum values of the Y-axis are obtained, forming the four vertex coordinates of the rectangle, namely (Xmin, Ymin), (Xmin, Ymax), (Xmax, Ymax), (Xmax, Ymin).

[0047] The buffer module is used to cache the minimum value Xmin and maximum value Xmax of the X axis, the minimum value Ymin and maximum value Ymax of the Y axis obtained by the calculation module each time. Before the starting point is captured, the minimum value Xmin and maximum value Xmax of the X axis, the minimum value Ymin and maximum value Ymax of the Y axis are all 0 by default.

[0048] An electronic whiteboard comprises the above-mentioned drawing device based on automatic correction of rectangles on the electronic whiteboard.

[0049] A storage medium stores a computer program, and the computer program can be run to execute the above-mentioned drawing method based on automatic correction of rectangles on an electronic whiteboard.

[0050] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection, an electrical connection, or communication with each other; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0051] The above is only for explaining the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention without creative work should be included in the protection scope of the present invention.

Claims

1. A drawing method for automatically correcting a rectangle based on an electronic whiteboard, characterized in that, it includes the following steps: Step 1: The user selects the shape of the drawn figure as a rectangle and draws a rectangle on the electronic whiteboard; Step 2: Capture the coordinates of the starting point, inflection points, and ending point of the trajectory drawn by the user on the electronic whiteboard, determine whether the trajectory is completed in one stroke, and determine whether the distance between the ending point and the starting point is within the error range. If so, go to Step 3; otherwise, discard the captured trajectory; Step 3: Capture several points on the paths between the starting point and the inflection points, between adjacent inflection points, and between the inflection points and the ending point respectively, and store the coordinates of all points in the key point set; Obtain the minimum and maximum values of the X-axis and the minimum and maximum values of the Y-axis based on the coordinate values of all points, so as to obtain the four vertices of a regular rectangle; The said Step 3 includes: Step 301: Get the coordinates of the starting point, denoted as A(X A , Y A ), and store it in the key point set; Step 302: Make the minimum value of the X axis Xmin=X A , the maximum value of the X axis Xmax=X A , so that the minimum value of the Y axis Ymin = Y A , the maximum value of the Y axis Ymax=Y A ; Step 303: Read the coordinate values (Xn, Yn) of other points in sequence and compare them with Xmin, Xmax, Ymin, and Ymax. If Xn < Xmin, then Xmin = Xn; if Xn > Xmax, then Xmax = Xn; if Yn < Ymin, then Ymin = Yn; if Yn > Ymax, then Ymax = Yn; Step 304: Finally, obtain the minimum and maximum values of the X-axis and the minimum and maximum values of the Y-axis, and form the four vertex coordinates of the rectangle.

2. A drawing device for automatically correcting a rectangle based on an electronic whiteboard, which is used to implement the steps of the drawing method described in claim 1, characterized in that, it includes a coordinate point acquisition module, a storage module, a calculation module, and a buffer module; where: The coordinate point acquisition module is used to capture the starting point, inflection points, and ending point coordinates, and capture the coordinates of several points on the paths between the starting point and the inflection points, between adjacent inflection points, and between the inflection points and the ending point; The storage module is used to store the coordinate values of all points captured by the coordinate point acquisition module; The calculation module, based on the coordinate values of all points, obtains the minimum and maximum values of the X-axis and the minimum and maximum values of the Y-axis, so as to obtain the four vertex coordinates of a regular rectangle.

3. An electronic whiteboard, characterized in that, it includes the drawing device for automatically correcting a rectangle based on an electronic whiteboard described in claim 2.

4. A storage medium, in which a computer program is stored, characterized in that, running the computer program can execute the drawing method for automatically correcting a rectangle based on an electronic whiteboard described in claim 1.

Citation Information

Patent Citations

  • Normalizing method and system of hand drawing geometric figures

    CN105719328A

  • Interface graph redrawing method and device

    CN110286992A

  • Contour plotting device

    JP1997326038A