CN111949156B - Chinese character writing test method and system of writing device and writing device - Google Patents
Chinese character writing test method and system of writing device and writing device Download PDFInfo
- Publication number
- CN111949156B CN111949156B CN202010664284.XA CN202010664284A CN111949156B CN 111949156 B CN111949156 B CN 111949156B CN 202010664284 A CN202010664284 A CN 202010664284A CN 111949156 B CN111949156 B CN 111949156B
- Authority
- CN
- China
- Prior art keywords
- writing
- chinese character
- written
- stroke
- coordinate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000010998 test method Methods 0.000 title claims abstract description 21
- 239000011159 matrix material Substances 0.000 claims abstract description 74
- 239000013598 vector Substances 0.000 claims abstract description 61
- 238000012360 testing method Methods 0.000 claims abstract description 50
- 238000007781 pre-processing Methods 0.000 claims abstract description 12
- 238000000034 method Methods 0.000 claims description 39
- 230000006870 function Effects 0.000 claims description 28
- 230000009471 action Effects 0.000 claims description 12
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000004422 calculation algorithm Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 5
- 238000004088 simulation Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000003993 interaction Effects 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 230000002829 reductive effect Effects 0.000 description 3
- 238000000354 decomposition reaction Methods 0.000 description 2
- 230000000670 limiting effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000036961 partial effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/0418—Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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/04883—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/32—Digital ink
- G06V30/333—Preprocessing; Feature extraction
- G06V30/347—Sampling; Contour coding; Stroke extraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Controls And Circuits For Display Device (AREA)
- Electrically Operated Instructional Devices (AREA)
Abstract
The embodiment of the application relates to a Chinese character writing test method and system of a writing device and the writing device. The Chinese character writing test method of the writing device comprises the following steps: acquiring one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written; reading dot matrix information of each Chinese character to be written from a dot matrix word stock; preprocessing lattice information to obtain the coordinate position of a pixel point of each Chinese character to be written, which is pre-displayed on a touch screen of a writing device; decomposing each Chinese character into a plurality of strokes, and obtaining a coordinate vector and gesture corresponding to each stroke according to the writing direction; and displaying the writing handwriting of each Chinese character to be written on the touch screen of the writing device according to the coordinate vector and the gesture. The Chinese character writing test method of the writing device realizes automatic test of writing Chinese characters, reduces the workload of writing test, meets different writing test scenes, and expands the range of writing test.
Description
Technical Field
The embodiment of the application relates to the technical field of writing devices, in particular to a Chinese character writing test method and system of a writing device and the writing device.
Background
Along with the development of intelligent technology, the types of electronic products contacted by people in daily life are increasingly abundant, wherein interactive electronic products realized based on touch technology, such as intelligent interactive plates, are widely applied.
The whiteboard application is a common application on the intelligent interaction tablet, and can be used for acquiring the operation of a finger or a writing pen of a user on a whiteboard application interface, acquiring a plurality of touch points according to the operation of the user, and generating writing handwriting according to the plurality of touch points. The intelligent writing board is used as a special writing device, and can also acquire the operation of the finger of a user or the writing pen on the touch screen and generate writing handwriting according to the operation of the user.
In the conventional technology, when the writing device is used for writing test, a code is written in the Swipe function by calling the Swipe function, and the starting point coordinate and the ending point coordinate of each stroke of the Chinese character to be written are defined, so that each stroke of the Chinese character can be written according to the starting point coordinate and the ending point coordinate of each stroke.
Disclosure of Invention
The embodiment of the application provides a Chinese character writing test method and system of a writing device and the writing device, which realize automatic test of writing Chinese characters and reduce the workload of writing test; the display characteristics of the Chinese characters can be adjusted according to the needs, so that different writing test scenes can be met; the range of writing tests is also expanded.
In a first aspect, an embodiment of the present application provides a method for testing writing of chinese characters in a writing device, the method including:
acquiring one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written, wherein the display characteristic parameters comprise font size and writing position;
reading the dot matrix information of each Chinese character to be written from a dot matrix word stock;
preprocessing the dot matrix information according to the font size and the writing position to obtain the coordinate position of a pixel point pre-displayed by the touch screen of the writing device of each Chinese character to be written;
according to the coordinate position distribution of the pre-displayed pixel points, decomposing each Chinese character into a plurality of strokes, and according to a preset writing direction, obtaining a coordinate vector and gesture corresponding to each stroke;
And displaying the writing handwriting of each Chinese character to be written on a touch screen of the writing device according to the coordinate vector and the gesture.
Optionally, according to the coordinate position distribution of the pre-displayed pixel point, decomposing each Chinese character into a plurality of strokes includes:
judging whether other pre-displayed pixel points exist in the left-right direction and the up-down direction of each pixel point;
if other pre-displayed pixel points exist in the left-right direction of the pixel point, generating a transverse written stroke according to the pixel point and the other pre-displayed pixel points in the left-right direction;
if other pre-displayed pixel points exist in the up-down direction of the pixel point, generating a vertical writing stroke according to the pixel point and the other pre-displayed pixel points in the up-down direction;
if there is no other pixel point pre-displayed in the left-right direction and the up-down direction of the pixel point, generating a stroke of point writing according to the pixel point.
Optionally, according to a preset writing direction, converting each stroke into a coordinate vector and a gesture action, including:
for each transversely written stroke, generating a coordinate vector consistent with the writing direction and a transversely written gesture by taking the coordinate positions of pixel points at the left and right ends of the stroke as end points;
For each vertically written stroke, taking the coordinate positions of pixel points at the upper end and the lower end of the stroke as end points, and generating a coordinate vector consistent with the writing direction and a vertically written gesture;
and generating a coordinate vector of the point and a gesture of point writing according to the coordinate position of the pixel point of the point stroke aiming at the stroke of each point.
Optionally, before displaying the writing script of each Chinese character to be written on the touch screen of the writing device, the method further includes:
and determining the writing sequence of each stroke according to the writing direction.
Optionally, the writing direction includes:
from top to bottom, from left to right;
or,
from left to right, top to bottom.
Optionally, the display characteristic parameter further includes at least any one of the following:
font, stroke weight, font color.
Optionally, the method further comprises:
acquiring the resolution of a touch screen of the writing device;
and determining whether the writing coordinate area of the Chinese character to be written exceeds the display range of the touch screen of the writing device according to the resolution of the touch screen of the writing device and the coordinate position of the pre-displayed pixel point.
Optionally, after displaying the writing script of each Chinese character to be written on the touch screen of the writing device, the method further includes:
Acquiring a display coordinate area of each Chinese character on a touch screen of the writing device;
intercepting an image of a display coordinate area of each Chinese character;
determining whether each written Chinese character is the same as the Chinese character to be written or not through a graph comparison algorithm;
if the dot matrix information is different, the dot matrix information of the Chinese character is read again.
Optionally, when the Chinese character to be written does not exist in the dot matrix word stock, the method further includes:
judging whether the Chinese character to be written is in a strokes-able writing list, wherein the strokes-able writing list records historical coordinate information when the Chinese character is written through a Swipe function, and the historical coordinate information records writing starting point coordinates and ending point coordinates of each horizontal stroke or vertical stroke of the Chinese character;
and if so, calling a Swipe function and the history coordinate information to write the Chinese character to be written.
In a second aspect, embodiments of the present application provide a chinese character writing test system for a writing device, the system comprising:
the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written, and the display characteristic parameters comprise font size and writing position;
The dot matrix information reading module is used for reading dot matrix information of each Chinese character to be written from a dot matrix word stock;
the preprocessing module is used for preprocessing the dot matrix information according to the font size and the writing position to obtain the coordinate position of a pixel point of each Chinese character to be written, which is pre-displayed on a touch screen of the writing device;
the conversion module is used for decomposing each Chinese character into a plurality of strokes according to the coordinate position distribution of the pre-displayed pixel points, and obtaining a coordinate vector and gesture corresponding to each stroke according to a preset writing direction;
and the display module is used for displaying the writing handwriting of each Chinese character to be written on the touch screen of the writing device according to the coordinate vector and the gesture action.
In a third aspect, embodiments of the present application provide a writing device comprising:
at least one memory and at least one processor;
the memory is used for storing one or more programs;
the one or more programs, when executed by the at least one processor, cause the at least one processor to implement the steps of the chinese character writing test method of the writing device according to the first aspect of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of a chinese character writing test method of a writing device according to the first aspect of the embodiments of the present application.
In the embodiment of the application, after the Chinese characters to be written input by a user and the display characteristic parameters of the Chinese characters to be written are acquired, lattice information comprising strokes and the writing sequence of the strokes of each Chinese character to be written is acquired from a lattice character library, the coordinate positions of the pixel points of each Chinese character to be written, which are pre-displayed on a touch screen of a writing device, are obtained according to the font size and the writing position, each Chinese character is decomposed into a plurality of strokes according to the coordinate position distribution, so that the obtained corresponding strokes are converted into coordinate vectors and gesture actions according to the preset writing direction, the touch writing of the user can be simulated on the touch screen of the writing device directly according to the coordinate vectors and the gesture actions, the automatic test of writing Chinese characters is realized, program coding simulation and gesture writing are not required to be performed on each Chinese character according to the Swipe function simulation, and the work load of the writing test is greatly reduced; the display characteristic parameters of the Chinese characters can be flexibly adjusted according to the needs, so that different writing test scenes can be met; the Chinese characters in the dot matrix word stock can be written, so that the writing test range is expanded.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Drawings
FIG. 1 is a schematic diagram of a Chinese character writing test method application scenario of a writing device provided in an exemplary embodiment;
FIG. 2 is a flow chart of a method of testing Chinese character writing of a writing device provided in an exemplary embodiment;
FIG. 3 is a schematic diagram of a dot matrix font provided in one exemplary embodiment;
FIG. 4 is a flow chart of decomposing each Chinese character into a plurality of strokes provided in an exemplary embodiment;
FIG. 5 is a schematic diagram of decomposing each Chinese character into a plurality of strokes provided in an exemplary embodiment;
FIG. 6 is a flow chart of converting each stroke into a coordinate vector and gesture motion provided in one exemplary embodiment;
FIG. 7 is a flow chart of whether writing areas are out of range detection provided in one exemplary embodiment;
FIG. 8 is a flow chart for automatically detecting whether written content is correct, provided in one embodiment;
FIG. 9 is a flow chart of a method of testing Chinese character writing of a writing device provided in an exemplary embodiment;
FIG. 10 is a schematic diagram of a Chinese character writing test system of a writing device provided in an exemplary embodiment;
fig. 11 is a schematic view of a writing instrument provided in an exemplary embodiment.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the embodiments of the present application, are within the scope of the embodiments of the present application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims. In the description of this application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Referring to fig. 1, fig. 1 is a schematic view of a method for testing writing of chinese characters in a writing device according to the conventional art. In fig. 1, a chinese character writing test of the writing device is implemented by the writing device 100 and the input device 200.
The writing device 100 may be an intelligent handwriting device such as an electronic whiteboard, an electronic blackboard, a digital tablet, or an intelligent interactive tablet, and a writing area for displaying input content in response to a writing operation of a user is provided on a touch screen of the writing device 100, and when writing is performed in the writing area, for example, writing handwriting input by the user can be displayed in real time in the writing area of the touch screen by touching the touch screen with a stylus or a finger.
The input device 200 may be a keyboard or a computer device connected to the writing device 100, and in the conventional technology, when performing a writing test on the writing device, a Swipe function of the writing device 100 is called by the input device 200, a code is written in the Swipe function, and a start point coordinate and an end point coordinate of each stroke of a Chinese character to be written are defined, so that each stroke of the Chinese character is drawn.
The Swipe function typically includes the following parameters: swipe (int Start x, int Start y, int end x, int y, duration), the specific definition of the above parameters is: the x-axis coordinate of the int start x-start point; the y-axis coordinate of the int start y-start point; the x-axis coordinates of the int end x-end point; the y-axis coordinate of the end y-end point of int; duration writing time (default 5 milliseconds). The coordinates are usually defined as the starting point at the upper left corner of the screen, the coordinates are (0, 0), the starting point is the X axis toward the right, and the starting point is the Y axis below.
In a specific example, taking the example of writing a "positive" word by the Swipe function, the Swipe function needs to be called to write the following program code:
d.Swipe(400,500,500,500)
d.Swipe(450,500,450,600)
d.Swipe(450,550,500,550)
d.Swipe(400,600,500,600)
d.Swipe(400,600,400,550)
the method only can write Chinese characters according to the initial point coordinates, the end point coordinates and the distance between the initial point coordinates and the end point coordinates, so that the test process is inconvenient, and meanwhile, because the Swipe function only supports horizontal or vertical stroke writing, only Chinese characters formed by combining the horizontal and vertical strokes can be written, the written Chinese characters are limited, for example, most of Chinese characters which are simple strokes and square strokes of the "positive" character are written, and the method is limited.
In order to facilitate the writing test process of the writing device, the embodiment of the application provides a method for testing writing of Chinese characters of the writing device, as shown in fig. 2, in an exemplary embodiment, the method includes the following steps:
s201: and obtaining one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written, wherein the display characteristic parameters comprise font size and writing position.
In an embodiment, the writing device may call a preset function through an automation script to obtain the Chinese character to be written input by the user.
The display characteristic parameters indicate the display attribute of the Chinese character to be written when the Chinese character to be written is written on the touch screen of the writing device, and the display attribute comprises a font size and a writing position, wherein the writing position can be specifically represented by writing initial coordinates, writing center points, writing stroke parameters and the like. In other examples, the display characteristic parameters may further include one or more display attributes such as a font, a stroke weight, and a font color, and the dot matrix word stock is stored separately according to the font, and different dot matrix word stocks may be called according to the required font.
In some examples, all of the chinese characters to be written have the same font or font size, in other examples, different chinese characters to be written may also have corresponding fonts or font sizes, respectively.
In some examples, the writing start coordinate refers to the writing start coordinate of the first chinese character, where the writing start coordinate is combined with the font size of the chinese character to determine the writing coordinate area of the first chinese character on the touch screen of the writing device, while other chinese characters may be automatically arranged according to the font size according to a preset arrangement rule during writing to obtain the writing coordinate area of the next chinese character to be written, and in some examples, the automatic arrangement manner includes automatic line feed.
The arrangement rules can be rules including rules from left to right or from top to bottom, rules including whether to automatically feed lines or automatically feed columns, and the like.
In other examples, each Chinese character to be written may also have a corresponding writing start coordinate.
The display characteristic parameters may be preset parameters, and when a writing test is performed, a Chinese character to be written may be directly input, in some examples, the display characteristic parameters may also be input simultaneously when a Chinese character to be written is input, for example, when a preset function is called through an automatic script, the Chinese character to be written input by a user and the display characteristic parameters of the Chinese character to be written are obtained simultaneously.
S202: and reading the dot matrix information of each Chinese character to be written from a dot matrix word stock.
The dot matrix word library stores the stroke information of Chinese characters in the form of dot matrix fonts, each character is divided into a plurality of points according to the set size by the dot matrix fonts, for example, 16 x 16 or 24 x 24 points, and then the outline of the character is represented by the virtual reality of each point. As shown in fig. 3, fig. 3 is a 16×16 dot font.
In the dot matrix word library of Chinese characters, each bit of each byte represents a dot of a Chinese character, each Chinese character is composed of a rectangular dot matrix, 0 represents no dot, 1 represents a dot, and 0 and 1 are respectively drawn by different colors to form a Chinese character.
For a 16 x 16 lattice, the number of bits required is 16 x 16=256 bits, and each byte is 8 bits, so each chinese character needs to be represented by 256/8=32 bytes. That is, every two bytes represent 16 points of one row, 16 rows are required, and when displaying Chinese characters, only 32 bytes are required to be read at a time, so that the dot matrix information of each Chinese character can be obtained. The dot matrix information is usually stored for each dot in a set direction, for example, in the example of fig. 3, 256 dot location information is stored in 32 bytes in a direction from top to bottom, from left to right, or from left to right, from top to bottom. Therefore, this storage direction is also included in the read dot matrix information.
S203: and preprocessing the dot matrix information according to the font size and the writing position to obtain the coordinate position of the pixel point of each Chinese character to be written, which is pre-displayed on the touch screen of the writing device.
In this embodiment of the present application, scaling the read dot matrix information according to the resolution corresponding to the size of the font to be written and the scaling relationship between the dot matrix information, so as to obtain the pixel point of each pre-displayed pixel point of each Chinese character to be written on the touch screen of the writing device, and then obtaining the specific coordinate position of each pre-displayed pixel point on the touch screen of the writing device according to the writing position.
S204: and decomposing each Chinese character into a plurality of strokes according to the coordinate position distribution of the pre-displayed pixel points, and converting each stroke into a coordinate vector and gesture according to a preset writing direction.
S205: and displaying the writing handwriting of each Chinese character to be written on a touch screen of the writing device according to the writing direction according to the coordinate vector and the gesture action.
When writing, each Chinese character to be written needs to be automatically simulated and written through one stroke, so that the pixel point of each Chinese character pre-display needs to be decomposed into a plurality of strokes. Based on the continuity of strokes, in the embodiment of the application, each Chinese character is decomposed into a plurality of strokes according to the coordinate position distribution of the pre-displayed pixel points. In a specific implementation, an isolated pixel point may be used as a single dot of the stroke, and for a situation that a plurality of pixel points are adjacent, whether a preset stroke is formed by a manner that a plurality of pixel points are adjacent or a plurality of preset strokes are included may be determined, for example, if a preset stroke includes a dot, a horizontal and a vertical, whether a preset stroke is formed by a plurality of pixel points adjacent or a plurality of preset strokes are included may be determined, if a preset stroke is formed, the preset stroke may be generated according to a plurality of adjacent pixel points, and if a preset stroke is included, a plurality of preset strokes may be generated according to a plurality of adjacent pixel points. When generating a plurality of the preset strokes, each pixel point may participate in generating only one stroke or in generating a plurality of strokes.
In the embodiment of the present application, the width of each stroke may be one pixel or multiple pixels, and the thickness of each stroke may be different according to the number of adjacent pixel points.
In this embodiment of the present application, the preset stroke may be a stroke commonly used in a writing scene, for example, a horizontal stroke, a vertical stroke, a dot stroke, a lifting stroke, a horizontal skimming stroke, a right-falling stroke, etc., and in a specific example, the preset stroke may also include only relatively simple horizontal, vertical and dot strokes, when the preset stroke includes only a horizontal stroke, a vertical stroke and a dot stroke, the adjacent relationship of the plurality of pixel points refers to up-down or left-right adjacent, and when the preset stroke also includes a lifting stroke, a horizontal skimming stroke, a right-falling stroke, etc., the adjacent relationship may also refer to surrounding adjacent.
In an embodiment, in the process of decomposing each Chinese character into a plurality of strokes, the decomposition is preferably performed according to a preset writing direction, where the writing direction may be a direction from top to bottom, from left to right, or from left to right, from top to bottom, and the writing direction may be preset, or may be obtained according to a storage sequence of the dot matrix information during storage.
For example, if the writing direction is a direction from top to bottom and from left to right, the pixels in the pixel set 2 may be decomposed into vertical strokes 22 and horizontal strokes 21.
The coordinate vector indicates the writing direction, the writing position and the writing size of each stroke, and the gesture operation indicates the gesture operation of writing each stroke.
In one embodiment, each stroke is converted into a coordinate vector and a gesture through a preset conversion function, and the operation system of the writing device can simulate the touch operation of a human hand through the coordinate vector and the gesture operation of each stroke, so that the writing handwriting of each Chinese character to be written is displayed on the touch screen of the writing device.
In the above display process, the writing trace of each Chinese character to be written may be displayed simultaneously, or each stroke of each Chinese character to be written may be displayed sequentially according to the priority order of the strokes.
In this embodiment of the present application, the writing order of each stroke may be determined according to a preset writing direction, and in a specific judging process, the writing order of each stroke may also be determined by combining the preset writing direction and referring to a start coordinate point of a coordinate vector corresponding to each stroke, or referring to an end coordinate point of a coordinate vector corresponding to each stroke, or determining according to other judging modes.
In the embodiment of the application, after the Chinese characters to be written input by a user and the display characteristic parameters of the Chinese characters to be written are acquired, the dot matrix information of each Chinese character to be written is acquired from a dot matrix character library, the coordinate positions of the pixel points of each Chinese character to be written, which are pre-displayed on the touch screen of the writing device, are obtained according to the font size and the writing position, and each Chinese character is decomposed into a plurality of strokes according to the coordinate position distribution, so that the coordinate vector and gesture corresponding to each stroke can be obtained according to the preset writing direction, the touch writing of the user can be simulated on the touch screen of the writing device directly according to the coordinate vector and gesture, the automatic test of writing Chinese characters is realized, the program coding simulation gesture is not required to be performed for each Chinese character according to the Swipe function simulation, and the work load of the writing test is greatly reduced; the display characteristic parameters of the Chinese characters can be flexibly adjusted according to the needs, so that different writing test scenes can be met; the Chinese characters in the dot matrix word stock can be written, so that the writing test range is expanded.
In a specific embodiment, as shown in fig. 4, according to the coordinate position distribution of the pre-displayed pixel points, each kanji is decomposed into a plurality of strokes, which specifically includes:
S401: judging whether other pre-displayed pixel points exist in the left-right direction and the up-down direction of each pixel point;
s402: if other pre-displayed pixel points exist in the left-right direction of the pixel point, generating a transverse written stroke according to the pixel point and the other pre-displayed pixel points in the left-right direction;
s403: if other pre-displayed pixel points exist in the up-down direction of the pixel point, generating strokes for vertical writing according to the pixel point and the other pre-displayed pixel points in the left-right direction;
s404: if there is no other pixel point pre-displayed in the left-right direction and the up-down direction of the pixel point, generating a stroke of point writing according to the pixel point.
In a preferred example, the decomposition is performed according to a preset writing direction, and each pixel point may only participate in generating one stroke, and the coordinate position of the pixel point of the "Chinese" character pre-displayed on the touch screen of the writing device is taken as an example for illustration in fig. 5, and a partial stroke result obtained by decomposing the "Chinese" character according to the above steps is shown in fig. 5.
In a specific embodiment, as shown in fig. 6, converting each stroke into a coordinate vector and a gesture according to a preset writing direction includes:
S601: for each transversely written stroke, generating a coordinate vector consistent with the writing direction and a transversely written gesture by taking the coordinate positions of pixel points at the left and right ends of the stroke as end points;
s602: for each vertically written stroke, taking the coordinate positions of pixel points at the upper end and the lower end of the stroke as end points, and generating a coordinate vector consistent with the writing direction and a vertically written gesture;
s603: and generating a coordinate vector of the point and a gesture of point writing according to the coordinate position of the pixel point of the point stroke aiming at the stroke of each point.
In the example of fig. 5, taking the writing direction as the direction from top to bottom and from left to right as an example, the gesture motion of the stroke 1 is taken as a point, and the coordinate vector of the stroke 1 is (1, 0); the gesture action of the stroke 2 is vertical writing, the pixel points at the two ends of the stroke 2 are (4, 0) and (4, 4), and the coordinate vectors of the stroke 2 are determined to be (4, 0) to (4, 4) according to the writing direction; the gesture motion of the stroke 3 is used as transverse writing, the pixel points at two ends of the stroke 3 are (2, 1) and (3, 1), and the coordinate vector of the stroke 3 is (2, 1) to (3, 1).
In this embodiment of the present application, the writing direction may be a direction from top to bottom, from left to right, or a direction from left to right, from top to bottom, from left to right, where the top stroke is prioritized over the bottom stroke, for the same height of the stroke, the left stroke is prioritized over the right stroke, and from left to right, from top to bottom, where the left stroke is prioritized over the right stroke, for the same left stroke, the top stroke is prioritized over the bottom stroke. The upper, lower, left, and right of the strokes may be determined according to a start coordinate point of a coordinate vector corresponding to each stroke, or in some examples, may be determined according to an end coordinate point of a coordinate vector corresponding to each stroke, or may be determined according to other determination methods.
In the example of fig. 5, the sequence number of a stroke represents the sequence in which each stroke is written.
In an embodiment, as shown in fig. 7, the method for testing writing of chinese characters in the writing device according to the embodiment of the present application further includes the following steps of detecting whether the writing area is out of range:
s701: acquiring the resolution of a touch screen of the writing device;
s702: and determining whether the writing coordinate area of the Chinese character to be written exceeds the display range of the touch screen of the writing device according to the resolution of the touch screen of the writing device and the coordinate position of the pre-displayed pixel point.
In one example, when the writing range is detected to be out of the display range of the touch screen of the writing device, a reminder is sent to the user, in one specific example, when the reminder is sent to the user, the calculated coordinate position of each pixel point of the Chinese character to be written, which is pre-displayed on the touch screen of the writing device, can be displayed to the user, so that the user can more intuitively determine the Chinese character content out of the display range of the touch screen of the writing device.
In one embodiment, after displaying the writing trace of each Chinese character to be written on the touch screen of the writing device, as shown in fig. 8, the method further includes the following steps of automatically detecting whether the writing content is correct:
S801: acquiring a display coordinate area of each Chinese character on a touch screen of the writing device;
s802: intercepting an image of a display coordinate area of each Chinese character;
s803: determining whether each written Chinese character is the same as the Chinese character to be written or not through a graph comparison algorithm;
s804: if the dot matrix information is different, the dot matrix information of the Chinese character is read again.
In one example, the system screenshot method is called, the picture of each Chinese character is intercepted according to the coordinate range, the open source third party library OpenCV is called, the library is a cross-platform computer vision and machine learning software library, and the image recognition is carried out through the method of the library. The graphic comparison algorithm can adopt a picture similarity comparison algorithm, and before comparison, a standard image of the Chinese character is generated according to the Chinese character to be written and the display characteristic parameters of the Chinese character to be written, and then the standard image is compared with the intercepted image of the display coordinate area of the Chinese character.
Specifically, the comparison mode is to compare each pixel point of two images, if the two images are equal, the number of the similar points is increased by one, the two compared images can be scanned in the mode, the number of the similar points between the two images can be obtained, the number of the similar points is divided by the total number of the points, a value between 0 and 1 can be obtained, the similarity is obtained, when the similarity exceeds a set threshold value, the written Chinese character can be considered to be the same as the Chinese character to be written, if the similarity is lower than the set threshold value, the dot matrix information of the Chinese character needs to be read again, and the dot matrix information is preprocessed according to the font size and the writing position, so that the coordinate position of the pixel point of the Chinese character pre-displayed on the touch screen of the writing device is obtained; according to the coordinate position distribution of the pre-displayed pixel points, decomposing the Chinese character into a plurality of strokes, and according to a preset writing direction, obtaining a coordinate vector and gesture corresponding to each stroke; and redisplaying the writing handwriting of the Chinese character on a touch screen of the writing device according to the coordinate vector and the gesture.
In one example, when the Chinese character to be written does not exist in the dot matrix word stock, the method further comprises the following steps:
judging whether the Chinese character to be written is in a scratch-able writing list or not; the method comprises the steps of writing a Chinese character to be written, wherein the strokes-able writing list is recorded with historical coordinate information when the Chinese character is written through a Swipe function, the historical coordinate information is recorded with writing starting point coordinates and ending point coordinates of each horizontal stroke or each vertical stroke of the Chinese character, if yes, the SWIPE function and the historical coordinate information are called to write the Chinese character to be written, and if no, a prompt is sent out, or a writing test is ended.
In one example, after the dot matrix information of the Chinese character to be written is read, whether the dot matrix information is complete is also judged by judging whether the byte codes in the dot matrix information are complete, and if not, the dot matrix information of the Chinese character is read again.
As shown in fig. 9, in a specific example, taking a chinese character to be written as "true", the chinese character writing test method of the writing device according to the embodiment of the present application includes the following steps:
s901: the method comprises the steps of acquiring 'true' of a Chinese character to be written, which is input by a user, and the font, the font size and the writing starting coordinates of the Chinese character to be written through a function called by an automatic script, wherein the specific contents of the function can be as follows: shuxie (text= 'true', form = microsoft black, size = 3, location= (500, 500)).
S902: judging whether the Chinese character is true in the dot matrix word stock, if so, executing step S605, and if not, executing step S903.
S903: judging whether the Chinese character is true or not in the scratch-able writing list, and if not, ending writing.
S904: the dot matrix information of the Chinese character true is read from the dot matrix word stock.
S905: preprocessing the dot matrix information of the Chinese character 'true' according to the font size and the writing position to obtain the coordinate position of the pixel point of the Chinese character 'true' pre-displayed on the touch screen of the writing device;
s906: and detecting whether the coordinate position of the pre-displayed pixel point of the Chinese character 'true' exceeds the display range, if so, ending writing, and if not, executing step S907.
S907: according to the coordinate position distribution of the pre-displayed pixel points, the Chinese character is decomposed into a plurality of strokes, and according to the preset writing direction, the corresponding conversion of each stroke into a coordinate vector and gesture action is obtained.
S908: and displaying the true writing handwriting of the Chinese character on a touch screen of the writing device according to the coordinate vector and the gesture motion and the writing sequence.
S909: it is automatically detected whether the written contents are correct, if so, the writing is ended, and if not, step S905 is re-executed.
Corresponding to the Chinese character writing test method of the writing device, the embodiment of the application also provides a Chinese character writing test system of the writing device, after the Chinese characters to be written input by a user and the display characteristic parameters of the Chinese characters to be written are obtained, the dot matrix information of each Chinese character to be written is obtained from a dot matrix character library, the coordinate position of a pixel point pre-displayed on a touch screen of the writing device of each Chinese character to be written is obtained according to the font size and the writing position, and each Chinese character is decomposed into a plurality of strokes according to the coordinate position distribution, so that the coordinate vector and gesture corresponding to each stroke can be obtained according to the preset writing direction, the touch writing of the user can be simulated on the touch screen of the writing device directly according to the coordinate vector and the gesture, the automatic test of the Chinese characters to be written is realized, the program coding simulation gesture is not required to be performed according to each Chinese character according to the Swipe function simulation, and the writing test workload is greatly reduced; the display characteristic parameters of the Chinese characters can be flexibly adjusted according to the needs, so that different writing test scenes can be met; the Chinese characters in the dot matrix word stock can be written, so that the writing test range is expanded.
Fig. 10 is a schematic structural diagram of a chinese character writing test system of a writing device according to an embodiment of the present application, as shown in fig. 10, a chinese character writing test system 1000 of the writing device includes:
an obtaining module 1001, configured to obtain one or more chinese characters to be written and display characteristic parameters of each chinese character to be written, where the display characteristic parameters include a font size and a writing position;
the dot matrix information reading module 1002 is configured to read dot matrix information of each Chinese character to be written from a dot matrix word stock;
the preprocessing module 1003 is configured to preprocess the dot matrix information according to the font size and the writing position, so as to obtain a coordinate position of a pixel point of each Chinese character to be written, which is pre-displayed on a touch screen of the writing device;
the conversion module 1004 is configured to decompose each kanji into a plurality of strokes according to the coordinate position distribution of the pre-displayed pixel point, and obtain a coordinate vector and a gesture corresponding to each stroke according to a preset writing direction;
and a display module 1005, configured to display, on a touch screen of the writing device, a writing trace of each Chinese character to be written according to the coordinate vector and the gesture.
In an exemplary embodiment, the conversion module 1004 includes:
a judging unit for judging whether other pixel points pre-displayed exist in the left-right direction and the up-down direction of each pixel point;
a lateral stroke generating unit, configured to generate a lateral written stroke according to the pixel point and other pixel points pre-displayed in the left-right direction if there are other pixel points pre-displayed in the left-right direction of the pixel point;
a vertical stroke generating unit, configured to generate a vertical stroke according to the pixel point and other pixel points pre-displayed in the up-down direction if there are other pixel points pre-displayed in the up-down direction of the pixel point;
and the dot-and-stroke generating unit is used for generating a dot-written stroke according to the pixel point if other pre-displayed pixel points do not exist in the left-right direction and the up-down direction of the pixel point.
In an exemplary embodiment, the conversion module 1004 further includes:
a lateral gesture generating unit, configured to generate, for each lateral written stroke, a coordinate vector and a gesture action of the lateral writing, where the coordinate positions of pixel points at both ends in a left-right direction of the stroke are used as end points, the coordinate vector being consistent with the writing direction;
The vertical gesture generating unit is used for generating a coordinate vector consistent with the writing direction and a gesture action of vertical writing by taking the coordinate positions of pixel points at the upper end and the lower end of each vertical writing stroke as end points;
and the point gesture generating unit is used for generating a coordinate vector of each point and a gesture action of point writing according to the coordinate position of the pixel point of the point stroke.
In an exemplary embodiment, the chinese character writing test system 1000 of the writing device further includes:
and the writing sequence determining module is used for determining the writing sequence of each stroke according to the writing direction before the writing handwriting of each Chinese character to be written is displayed on the touch screen of the writing device.
In an exemplary embodiment, the writing direction includes:
from top to bottom, from left to right;
or,
from left to right, top to bottom.
In an exemplary embodiment, the display characteristic parameter further includes at least any one of the following:
font, stroke weight, font color.
In an exemplary embodiment, the chinese character writing test system 1000 of the writing device further includes:
The resolution obtaining module is used for obtaining the resolution of the touch screen of the writing device;
and the overscope determining module is used for determining whether the writing coordinate area of the Chinese character to be written exceeds the display range of the touch screen of the writing device according to the resolution of the touch screen of the writing device and the coordinate position of the pre-displayed pixel point.
In an exemplary embodiment, the chinese character writing test system 1000 of the writing device further includes:
the coordinate area acquisition module is used for acquiring a display coordinate area of each Chinese character on a touch screen of the writing device;
the intercepting module is used for intercepting the image of the display coordinate area of each Chinese character;
the comparison module is used for determining whether each written Chinese character is the same as the Chinese character to be written or not through a graph comparison algorithm;
and the re-reading module is used for re-reading the dot matrix information of the Chinese character if the dot matrix information is different.
In an exemplary embodiment, the chinese character writing test system 1000 of the writing device further includes:
the second judging module is used for judging whether the Chinese character to be written is in a strokes-able writing list or not when the Chinese character to be written does not exist in the dot matrix character library, wherein the strokes-able writing list records historical coordinate information when the Chinese character is written through a Swipe function, and the historical coordinate information records writing starting point coordinates and ending point coordinates of each horizontal stroke or vertical stroke of the Chinese character;
And the drawing writing module is used for calling a Swipe function and the history coordinate information to write the Chinese character to be written if the Chinese character to be written is the Chinese character to be written.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, modules and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
Corresponding to the Chinese character writing test method of the writing device, the embodiment of the application also provides the writing device. After the writing device acquires the Chinese characters to be written which are input by a user and the display characteristic parameters of the Chinese characters to be written, acquiring the dot matrix information of each Chinese character to be written from a dot matrix character library, obtaining the coordinate position of a pixel point of each Chinese character to be written which is pre-displayed on a touch screen of the writing device according to the font size and the writing position, and decomposing each Chinese character into a plurality of strokes according to the distribution of the coordinate position, so that the coordinate vector and gesture corresponding to each stroke can be obtained according to the preset writing direction, and the touch writing of the user can be directly simulated on the touch screen of the writing device according to the coordinate vector and the gesture action, thereby realizing the automatic test of writing Chinese characters, and not needing to perform program coding simulation gesture writing according to the simulation of a Swipe function for each Chinese character, thereby greatly reducing the workload of the writing test; the display characteristic parameters of the Chinese characters can be flexibly adjusted according to the needs, so that different writing test scenes can be met; the Chinese characters in the dot matrix word stock can be written, so that the writing test range is expanded.
As shown in fig. 11, fig. 11 is a block diagram illustrating a writing device according to an exemplary embodiment of the present application.
The writing device includes: a processor 800, a memory 801 and a display screen 802 with touch functionality. The number of processors 800 in the writing device may be one or more, one processor 800 being illustrated in fig. 11. The number of reservoirs 801 in the writing instrument may be one or more, one reservoir 801 being illustrated in fig. 11. The writing instrument processor 800, memory 801 and display screen 802 may be connected by a bus or other means, for example in fig. 11. In an embodiment, the writing device may be an intelligent handwriting device such as an electronic whiteboard, an electronic blackboard, a digital tablet, an intelligent interaction tablet, and the like. In this embodiment, a writing device is taken as an example of an intelligent interaction tablet.
The memory 801 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as a resource calling method program described in any embodiment of the present application, and program instructions/modules (for example, an acquisition module 1001, a lattice information reading module 1002, a preprocessing module 1003, a conversion module 1004, a display module 1005, and the like) corresponding to the resource calling method described in any embodiment of the present application. The memory 801 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the device, etc. In addition, the memory 801 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 801 may further include memory remotely located relative to processor 800, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The display screen 802 may be a touch-enabled display screen, which may be a capacitive screen, an electromagnetic screen, or an infrared screen. Generally, the display screen 802 is used for displaying data according to instructions of the processor 800, and is also used for receiving touch operations applied to the display screen 802 and transmitting corresponding signals to the processor 800 or other devices. Optionally, when the display screen 802 is an infrared screen, it further includes an infrared touch frame disposed around the display screen 802, which may also be used to receive infrared signals and transmit the infrared signals to the processor 800 or other device. In other examples, display 802 may also be a display without touch functionality.
The processor 800 executes software programs, instructions, and modules stored in the memory 801 to perform various functional applications of the apparatus and data processing, that is, to implement the chinese character writing test method of the writing device according to any of the above embodiments.
Specifically, in one exemplary embodiment, when the processor 800 executes one or more programs stored in the memory 801, the following operations are specifically implemented:
acquiring one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written, wherein the display characteristic parameters comprise font size and writing position;
Reading the dot matrix information of each Chinese character to be written from a dot matrix word stock;
preprocessing the dot matrix information according to the font size and the writing position to obtain the coordinate position of a pixel point pre-displayed by the touch screen of the writing device of each Chinese character to be written;
according to the coordinate position distribution of the pre-displayed pixel points, decomposing each Chinese character into a plurality of strokes, and according to a preset writing direction, obtaining a coordinate vector and gesture corresponding to each stroke;
and displaying the writing handwriting of each Chinese character to be written on a touch screen of the writing device according to the coordinate vector and the gesture.
On the basis of the above embodiment, according to the coordinate position distribution of the pre-displayed pixel points, decomposing each Chinese character into a plurality of strokes includes:
judging whether other pre-displayed pixel points exist in the left-right direction and the up-down direction of each pixel point;
if other pre-displayed pixel points exist in the left-right direction of the pixel point, generating a transverse written stroke according to the pixel point and the other pre-displayed pixel points in the left-right direction;
if other pre-displayed pixel points exist in the up-down direction of the pixel point, generating a vertical writing stroke according to the pixel point and the other pre-displayed pixel points in the up-down direction;
If there is no other pixel point pre-displayed in the left-right direction and the up-down direction of the pixel point, generating a stroke of point writing according to the pixel point.
On the basis of the above embodiment, converting each stroke into a coordinate vector and a gesture according to a preset writing direction includes:
for each transversely written stroke, generating a coordinate vector consistent with the writing direction and a transversely written gesture by taking the coordinate positions of pixel points at the left and right ends of the stroke as end points;
for each vertically written stroke, taking the coordinate positions of pixel points at the upper end and the lower end of the stroke as end points, and generating a coordinate vector consistent with the writing direction and a vertically written gesture;
and generating a coordinate vector of the point and a gesture of point writing according to the coordinate position of the pixel point of the point stroke aiming at the stroke of each point.
On the basis of the above embodiment, before displaying the writing script of each Chinese character to be written on the touch screen of the writing device, the method further includes:
and determining the writing sequence of each stroke according to the writing direction.
On the basis of the above embodiment, the writing direction includes:
From top to bottom, from left to right;
or,
from left to right, top to bottom.
On the basis of the above embodiment, the display characteristic parameter further includes at least any one of the following:
font, stroke weight, font color.
On the basis of the above embodiment, it includes:
acquiring the resolution of a touch screen of the writing device;
and determining whether the writing coordinate area of the Chinese character to be written exceeds the display range of the touch screen of the writing device according to the resolution of the touch screen of the writing device and the coordinate position of the pre-displayed pixel point.
On the basis of the above embodiment, after displaying the writing trace of each Chinese character to be written on the touch screen of the writing device, the method further includes:
acquiring a display coordinate area of each Chinese character on a touch screen of the writing device;
intercepting an image of a display coordinate area of each Chinese character;
determining whether each written Chinese character is the same as the Chinese character to be written or not through a graph comparison algorithm;
if the dot matrix information is different, the dot matrix information of the Chinese character is read again.
On the basis of the above embodiment, when the Chinese character to be written does not exist in the dot matrix word stock, the method further includes:
judging whether the Chinese character to be written is in a strokes-able writing list, wherein the strokes-able writing list records historical coordinate information when the Chinese character is written through a Swipe function, and the historical coordinate information records writing starting point coordinates and ending point coordinates of each horizontal stroke or vertical stroke of the Chinese character;
And if so, calling a Swipe function and the history coordinate information to write the Chinese character to be written.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for testing writing of chinese characters by the writing device according to any one of the embodiments.
The present invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-readable storage media include both non-transitory and non-transitory, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by the computing device.
It is to be understood that the embodiments of the present application are not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of embodiments of the present application is limited only by the appended claims.
The above examples merely represent a few implementations of the examples of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the embodiments of the present application, which are all within the scope of the embodiments of the present application.
Claims (10)
1. A method for testing writing of chinese characters in a writing device, the method comprising:
acquiring one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written, wherein the display characteristic parameters comprise font size and writing position;
reading the dot matrix information of each Chinese character to be written from a dot matrix word stock;
preprocessing the dot matrix information according to the font size and the writing position to obtain the coordinate position of a pixel point pre-displayed by the touch screen of the writing device of each Chinese character to be written;
According to the coordinate position distribution of the pre-displayed pixel points, decomposing each Chinese character into a plurality of strokes, and according to a preset writing direction, obtaining a coordinate vector and gesture corresponding to each stroke; judging whether other pre-displayed pixel points exist in the left-right direction and the up-down direction of each pixel point; if other pre-displayed pixel points exist in the left-right direction of the pixel point, generating a transverse written stroke according to the pixel point and the other pre-displayed pixel points in the left-right direction; if other pre-displayed pixel points exist in the up-down direction of the pixel point, generating a vertical writing stroke according to the pixel point and the other pre-displayed pixel points in the up-down direction; if no other pre-displayed pixel points exist in the left-right direction and the up-down direction of the pixel point, generating strokes of point writing according to the pixel point; for each transversely written stroke, generating a coordinate vector consistent with the writing direction and a transversely written gesture by taking the coordinate positions of pixel points at the left and right ends of the stroke as end points; for each vertically written stroke, taking the coordinate positions of pixel points at the upper end and the lower end of the stroke as end points, and generating a coordinate vector consistent with the writing direction and a vertically written gesture; for each point writing stroke, generating a coordinate vector of the point and a gesture of point writing according to the coordinate position of the point stroke pixel point;
And displaying the writing handwriting of each Chinese character to be written on a touch screen of the writing device according to the coordinate vector and the gesture.
2. The method for testing writing of chinese characters on a writing device of claim 1, further comprising, before displaying the writing script of each chinese character to be written on a touch screen of the writing device:
and determining the writing sequence of each stroke according to the writing direction.
3. The chinese character writing test method of a writing device of claim 2, wherein said writing direction comprises:
from top to bottom, from left to right;
or,
from left to right, top to bottom.
4. The chinese character writing test method of a writing instrument of claim 1, wherein:
the display characteristic parameters further include at least any one of the following:
font, stroke weight, font color.
5. The chinese character writing test method of a writing instrument of claim 1, further comprising:
acquiring the resolution of a touch screen of the writing device;
and determining whether the writing coordinate area of the Chinese character to be written exceeds the display range of the touch screen of the writing device according to the resolution of the touch screen of the writing device and the coordinate position of the pre-displayed pixel point.
6. The method for testing writing of chinese characters on a writing device of claim 1, further comprising, after displaying the writing trace of each chinese character to be written on a touch screen of the writing device:
acquiring a display coordinate area of each Chinese character on a touch screen of the writing device;
intercepting an image of a display coordinate area of each Chinese character;
determining whether each written Chinese character is the same as the Chinese character to be written or not through a graph comparison algorithm;
if the dot matrix information is different, the dot matrix information of the Chinese character is read again.
7. The method for testing writing of chinese characters in a writing device of claim 1, further comprising, when the chinese character to be written does not exist in the lattice word stock:
judging whether the Chinese character to be written is in a strokes-able writing list, wherein the strokes-able writing list records historical coordinate information when the Chinese character is written through a Swipe function, and the historical coordinate information records writing starting point coordinates and ending point coordinates of each horizontal stroke or vertical stroke of the Chinese character;
and if so, calling a Swipe function and the history coordinate information to write the Chinese character to be written.
8. A chinese character writing test system for a writing device, the system comprising:
the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring one or more Chinese characters to be written and display characteristic parameters of each Chinese character to be written, and the display characteristic parameters comprise font size and writing position;
the dot matrix information reading module is used for reading dot matrix information of each Chinese character to be written from a dot matrix word stock;
the preprocessing module is used for preprocessing the dot matrix information according to the font size and the writing position to obtain the coordinate position of a pixel point of each Chinese character to be written, which is pre-displayed on a touch screen of the writing device;
the conversion module is used for decomposing each Chinese character into a plurality of strokes according to the coordinate position distribution of the pre-displayed pixel points, and obtaining a coordinate vector and gesture corresponding to each stroke according to a preset writing direction; judging whether other pre-displayed pixel points exist in the left-right direction and the up-down direction of each pixel point; if other pre-displayed pixel points exist in the left-right direction of the pixel point, generating a transverse written stroke according to the pixel point and the other pre-displayed pixel points in the left-right direction; if other pre-displayed pixel points exist in the up-down direction of the pixel point, generating a vertical writing stroke according to the pixel point and the other pre-displayed pixel points in the up-down direction; if no other pre-displayed pixel points exist in the left-right direction and the up-down direction of the pixel point, generating strokes of point writing according to the pixel point; for each transversely written stroke, generating a coordinate vector consistent with the writing direction and a transversely written gesture by taking the coordinate positions of pixel points at the left and right ends of the stroke as end points; for each vertically written stroke, taking the coordinate positions of pixel points at the upper end and the lower end of the stroke as end points, and generating a coordinate vector consistent with the writing direction and a vertically written gesture; for each point writing stroke, generating a coordinate vector of the point and a gesture of point writing according to the coordinate position of the point stroke pixel point;
And the display module is used for displaying the writing handwriting of each Chinese character to be written on the touch screen of the writing device according to the coordinate vector and the gesture action.
9. A writing instrument, comprising:
at least one memory and at least one processor;
the memory is used for storing one or more programs;
when the one or more programs are executed by the at least one processor, the at least one processor implements the steps of the chinese character writing test method of the writing device of any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor performs the steps of a chinese character writing test method of a writing device according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010664284.XA CN111949156B (en) | 2020-07-10 | 2020-07-10 | Chinese character writing test method and system of writing device and writing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010664284.XA CN111949156B (en) | 2020-07-10 | 2020-07-10 | Chinese character writing test method and system of writing device and writing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111949156A CN111949156A (en) | 2020-11-17 |
CN111949156B true CN111949156B (en) | 2024-03-29 |
Family
ID=73340449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010664284.XA Active CN111949156B (en) | 2020-07-10 | 2020-07-10 | Chinese character writing test method and system of writing device and writing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111949156B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112364867B (en) * | 2020-11-24 | 2023-08-04 | 上海墨说科教设备有限公司 | Intelligent correcting method and system for handwriting operation, electronic equipment and storage medium |
CN112926419B (en) * | 2021-02-08 | 2023-10-27 | 北京百度网讯科技有限公司 | Character judgment result processing method and device and electronic equipment |
CN113763514B (en) * | 2021-07-15 | 2024-04-02 | 北京字节跳动网络技术有限公司 | Method, device and system for generating stroke order animation and electronic equipment |
CN113610948A (en) * | 2021-08-06 | 2021-11-05 | 天津洪恩完美未来教育科技有限公司 | Writing interaction method, system, device, equipment and storage medium |
CN114333723B (en) * | 2021-12-28 | 2023-08-18 | 浙江航芯科技有限公司 | Method, system, equipment and storage medium for displaying characters by LCD |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1088319A (en) * | 1992-11-09 | 1994-06-22 | 富士通株式会社 | Produce the method and apparatus of character |
CN1090937A (en) * | 1992-12-07 | 1994-08-17 | 富士通株式会社 | Method and device for generating characters |
CN1103032A (en) * | 1993-07-13 | 1995-05-31 | 富士通株式会社 | Character generation method and device |
CN1512313A (en) * | 2002-12-30 | 2004-07-14 | 文鼎科技开发股份有限公司 | stroke order character generating system and method |
JP2013167815A (en) * | 2012-02-16 | 2013-08-29 | Bunkeido Co Ltd | System and program for determining hand writing chinese character |
CN104821005A (en) * | 2015-05-12 | 2015-08-05 | 南京师范大学 | Method of writing process dynamic reproduction of Chinese character calligraphy works, capable of simulating gesture style |
-
2020
- 2020-07-10 CN CN202010664284.XA patent/CN111949156B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1088319A (en) * | 1992-11-09 | 1994-06-22 | 富士通株式会社 | Produce the method and apparatus of character |
CN1090937A (en) * | 1992-12-07 | 1994-08-17 | 富士通株式会社 | Method and device for generating characters |
CN1103032A (en) * | 1993-07-13 | 1995-05-31 | 富士通株式会社 | Character generation method and device |
CN1512313A (en) * | 2002-12-30 | 2004-07-14 | 文鼎科技开发股份有限公司 | stroke order character generating system and method |
JP2013167815A (en) * | 2012-02-16 | 2013-08-29 | Bunkeido Co Ltd | System and program for determining hand writing chinese character |
CN104821005A (en) * | 2015-05-12 | 2015-08-05 | 南京师范大学 | Method of writing process dynamic reproduction of Chinese character calligraphy works, capable of simulating gesture style |
Also Published As
Publication number | Publication date |
---|---|
CN111949156A (en) | 2020-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111949156B (en) | Chinese character writing test method and system of writing device and writing device | |
CN111798372B (en) | Image rendering method, device, equipment and readable medium | |
CN112115678B (en) | Information display method and device, storage medium and electronic equipment | |
CN112711362B (en) | Method and device for generating hand-drawn flow chart icon in standardized manner | |
CN109064525B (en) | Picture format conversion method, device, equipment and storage medium | |
CN104346071A (en) | Display control device, display control method, and computer program product | |
US20230367473A1 (en) | Ink data generation apparatus, method, and program | |
US20200242346A1 (en) | Preserving styles and ink effects in ink-to-text | |
CN112149561A (en) | Image processing method and apparatus, electronic device, and storage medium | |
KR102677200B1 (en) | Gesture stroke recognition in touch-based user interface input | |
JPS63123165A (en) | Correlation of cursor and display entity | |
JP2019028094A (en) | Character generation device, program and character output device | |
CN111709338B (en) | Method and device for table detection and training method of detection model | |
CN108369486B (en) | Universal inking support | |
CN108492349A (en) | Processing method, device and equipment for writing strokes and storage medium | |
CN112084103A (en) | Interface test method, device, equipment and medium | |
US10430458B2 (en) | Automated data extraction from a chart from user screen selections | |
CN107391015B (en) | Control method, device and equipment of intelligent tablet and storage medium | |
CN118885104A (en) | A method, device and electronic device for voice reading of page text | |
CN115019324A (en) | Interactive method, device, computer device and storage medium for text scanning | |
US9229608B2 (en) | Character display apparatus, character display method, and computer readable medium | |
CN110750501A (en) | File retrieval method and device, storage medium and related equipment | |
CN115705141A (en) | Handwriting erasing method and device, storage medium and electronic equipment | |
CN116071767A (en) | Table identification reconstruction method, apparatus, storage medium and interactive flat panel | |
JP7664897B2 (en) | Recognition processing device, recognition processing program, recognition processing method, and recognition processing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |