Black and white printing paper code point identification method for intelligent paper pen
Through the smart pen, the black and white printed paper is recorded and decoded in real time, which solves the problem of difficulty in identifying code points on the black and white printed paper, and realizes efficient and accurate code points recognition and automatic error correction, reducing costs and improving speed.
Patent Information
- Application Number
- CN202411730874.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Existing smart pens are difficult to effectively identify code points on black and white printed paper, especially in the case of continuous interference lines, resulting in high recognition error rates and high cost and slow speed of existing solutions.
Through the smart pen, the black and white printed paper is recorded in real time, the code point information and writing handwriting are obtained, decoded, corrected and restored, and finally the local writing images are transmitted to the server for summary to realize the identification of the overall writing content.
It realizes efficient and accurate identification of code points on paper printed by ordinary black and white printers, reduces the cost of use, improves printing speed, and has automatic error correction capabilities.
Smart Images

Figure CN119580291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart paper and pen, and in particular to a method for identifying code points of black-and-white printed paper used for smart paper and pen. Background Art
[0002] Existing smart pens can usually only recognize dot paper printed in color or with high precision. However, with the popularity of printers, many families will choose to print dot paper by themselves and use smart pens for work. However, due to factors such as the model and accuracy of small household printers, some code points may be stained or unclear, resulting in abnormal recognition; especially when printing in black and white and encountering continuous interference lines, the recognition error rate will be further increased. Existing solutions usually use color inkjet printing, where the code points are printed with carbon-containing black ink and the text is blended with red, blue and yellow; this method has a slow printing speed, requires more color ink, and has a high cost of use. In order to expand the scope of application of smart paper and pen, so that it can adapt to more ordinary small black and white printers in households, reduce the cost of use and increase the printing speed, there is an urgent need for a recognition method that can meet the efficient and accurate reading of code points on black and white printed paper. Summary of the invention
[0003] In view of the above problems, the present invention aims to provide a method for black-and-white printed paper code point recognition for a smart paper pen.
[0004] To achieve the technical purpose, the scheme of the present invention is: a method for identifying code points on black-and-white printed paper for smart paper and pen, preprocessing the job content to obtain a job print file containing code point information; printing the job print file in black and white to obtain a paper containing code point information;
[0005] The smart pen records the code point information and handwriting of the specified area on the paper in real time to obtain the handwriting data; the smart pen decodes the code points on the handwriting data, corrects and restores them to obtain the local writing image, and finally transmits it to the server; the server aggregates the local writing images according to the corresponding positional relationship of the code points to obtain the overall writing content.
[0006] Preferably, when recording, the smart pen can cover 4-9 complete code points in a single shot; when decoding, through code point A ij Parse the code point printed in the code area to obtain the code point A ij Corresponding coordinate information (i, j);
[0007] If the code point is stained or damaged, or partially covered by other text lines, and code point A0 cannot be parsed, other code points in the local writing image are parsed until the coordinates (a, b) are moved to obtain code point A with parsable coordinate information. mn , get the code point A mnThe corresponding coordinate information is (m, n), then the coordinates of code point A0 are (ma, nb);
[0008] During correction and restoration, the image of the handwriting data is distorted and adjusted to obtain a trapezoidal image, and the trapezoidal image is restored by trapezoidal correction to obtain a partial writing image.
[0009] Preferably, the size of the code point is 1.5 mm*1.5 mm, and the resolution of the smart pen is greater than or equal to 240*240.
[0010] Preferably, while the smart pen is recording, the writing pressure data of the writing process is also recorded in real time; when the writing pressure value is less than or equal to the initial value, it is judged that the writing has not started at this time, or the writing is completed and the pen is in the state of lifting, and the smart pen stops recording; when the writing pressure value is greater than the initial value, the writing action is in progress at this time, and the smart pen keeps recording;
[0011] While the smart pen is recording, it also records the pen-holding data of the writing process in real time. The pen-holding data includes the pen-holding direction and the pen-holding angle. When the pen-holding direction or the pen-holding angle does not meet the specifications, a reminder will be issued. At the same time, the pen-holding angle data is used to assist in the correction and restoration of handwriting data.
[0012] Preferably, the position of the partial writing image is marked by the coordinate information corresponding to the code point, and then the handwritings on the adjacent partial writing images are spliced and combined to obtain the overall writing content with complete handwriting;
[0013] When the writing pressure value is greater than the initial value, but there is no handwriting in the code area of the code point, and there is handwriting in the code area of the adjacent code point, there is a local stroke break. The endpoints with handwriting in the code area of the adjacent code point are connected and combined, and the connection lines that meet the requirements are selected according to the writing direction and stroke characteristics;
[0014] When the writing pressure value is greater than the initial value, but there is no handwriting in the code area of the code point, and there is no handwriting in the code area of the adjacent code points, there is continuous pen break. If the number of code points with continuous pen break exceeds the threshold, a reminder is issued.
[0015] Preferably, when the single shooting area of the smart pen can cover 4 complete code points, the coordinate information of each code point on each partial writing image is obtained, and the overlapping code points on two adjacent partial writing images where the code points change are analyzed, and the direction of the overlapping code points in the first partial writing image is the writing direction;
[0016] When the single shooting area of the smart pen can cover 9 complete code points, the coordinate information of each code point on each partial writing image is obtained to determine the central code point, and the line connecting the central code points on adjacent partial writing images with code point changes is the writing direction.
[0017] Preferably, the code point is a square, and a diagonal line is provided on the code point, and the code point is divided into a first area and a second area by the diagonal line, and the diagonal line of the code point is perpendicular to the diagonals of the four azimuth code points above, below, left and right; four adjacent first areas constitute a first position reference block, and four adjacent second areas constitute a second position reference block;
[0018] When the single shooting area of the smart pen can completely cover the first position reference block or the second position reference block, the coordinate information of the first area and the second area on each code point on each partial writing image is obtained.
[0019] A smart pen using the black-and-white printed paper code point recognition method for smart paper and pen, comprising:
[0020] The sensor is used to collect and obtain the handwriting data, writing pressure data and pen holding data generated by the user during the paper writing process;
[0021] The Bluetooth communication module can wirelessly communicate with the pen box and transmit the handwriting data to the pen box;
[0022] The power module provides power to the sensor, Bluetooth communication module and processor in the smart pen;
[0023] The processor can analyze and process the handwriting data, writing pressure data and pen holding data.
[0024] A computer-readable storage medium stores computer instructions for causing the computer to execute the aforementioned black-and-white printed paper code point recognition method for a smart paper pen.
[0025] The beneficial effects of the present invention are that the assignments of the present application can be printed using an ordinary black-and-white printer, with lower printing costs, faster printing speeds, and lower equipment requirements; at the same time, it is not easily affected by damage to the answer line, local code points, or unclear printing, and has a strong automatic error correction capability; at the same time, the present application can effectively monitor the writing state and pen holding state, and monitor whether the pen breaks. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of Embodiment 1 of the present invention;
[0027] Figure 2 This is a flow chart of Embodiment 2 of the present invention;
[0028] Figure 3 This is a flow chart of Embodiment 3 of the present invention;
[0029] Figure 4 Schematic diagram of the smart pen of the present invention. DETAILED DESCRIPTION
[0030] The following is combined with Figure 1-4 The present invention is further described in detail with reference to the accompanying drawings and specific embodiments.
[0031] Embodiment 1
[0032] A method for identifying black and white printed paper code points for smart paper and pen, the specific steps are as follows:
[0033] S101, pre-processing the job content to obtain a job print file containing code point information;
[0034] S102, printing the job print file in black and white to obtain a paper containing code point information; the size of the code point is 1.5mm*1.5mm;
[0035] S103, using the camera module of the smart pen to record the code point information and handwriting of the designated area on the paper in real time to obtain handwriting data, wherein the resolution of the smart pen is greater than or equal to 240*240; when recording, the smart pen can cover 4-9 complete code points in a single shot; the smart pen decodes the code points on the handwriting data, corrects and restores them to obtain a partial writing image, and finally transmits it to the server; when decoding, the code point A ij Parse the code point printed in the code area to obtain the code point A ij Corresponding coordinate information (i, j); if the code point is stained or damaged, or partially covered by other text lines, and code point A0 cannot be parsed, other code points in the local writing image are parsed until the coordinates (a, b) are moved to obtain code point A with parsable coordinate information mn , get the code point A mn The corresponding coordinate information is (m, n), then the coordinates of code point A0 are (ma, nb);
[0036] During correction and restoration, the image of the handwriting data is distorted and adjusted to obtain a trapezoidal image, and the trapezoidal image is restored by trapezoidal correction to obtain a partial writing image.
[0037] S104. The server records and aggregates the images of each local writing image according to the positional relationship between the code points to obtain the overall writing content.
[0038] The method of this application can effectively solve the interference of pure black underline on code points (the traditional method requires printing code points in black, and other printed content needs to be printed with three primary colors, which is costly). Normal Chinese grids and underlined test papers can be used normally. Since the higher the resolution of the photography module, the higher the computing power required for correction and restoration, 240*240 resolution is generally used, and it is best if a photo can cover an area of 2*2 or 3*3.
[0039] Embodiment 2
[0040] A method for identifying code points on black and white printed paper for a smart paper pen is used to better identify the start, stop or lift of the pen in the writing action, as well as the writing pressure during continuous writing. Therefore, a pressure sensor is used to collect the writing pressure value (a precise pressure collection module is formed by mutually adsorbed magnets and pressure sensors). The pressure value collected by the pressure sensor when not writing is the initial value. At the same time, a gyroscope is used to collect parameters such as the angle, direction and angular velocity of the pen.
[0041] S201, while the smart pen is recording, it also records the writing pressure data of the writing process in real time;
[0042] S202, when the writing pressure value is less than or equal to the initial value, it is determined that writing has not started at this time, or the writing is completed and the pen is in the lifting state, and the smart pen stops recording; when the writing pressure value is greater than the initial value, the writing action is in progress at this time, and the smart pen keeps recording;
[0043] S203, while the smart pen is recording, the pen holding data of the writing process is also recorded in real time, the pen holding data including the pen holding direction and the pen holding angle;
[0044] S204: When the pen holding direction or the pen holding angle does not meet the specification, a reminder is issued; at the same time, the data of the pen holding angle is used to assist in the correction and restoration of the handwriting data.
[0045] Embodiment 3
[0046] A method for identifying black and white printed paper code points for smart paper and pen. In order to avoid or reduce the situation of pen breakage during collection, it is necessary to perform self-repair or early warning of pen breakage. At the same time, since the number of code points collected in each local writing image of this application is greater than 1, it is necessary to compare the overlapping code points to determine the writing direction, which is different from the traditional low-resolution direction judgment method.
[0047] S301, marking the position of the partial writing image by using the coordinate information corresponding to the code point, and then combining the handwritings on the adjacent partial writing images to obtain the overall writing content with complete handwritings;
[0048] S302, when the writing pressure value is greater than the initial value, but there is no handwriting in the code area of the code point, and there is handwriting in the code area of the adjacent code point, there is a local stroke break, and the endpoints of the handwriting in the code area of the adjacent code point are connected and combined, and the connection lines that meet the requirements are selected according to the writing direction and stroke characteristics;
[0049] S303. When the single shooting area of the smart pen can cover 4 complete code points, the coordinate information of each code point on each partial writing image is obtained, and the overlapping code points on two adjacent partial writing images with code point changes are analyzed. The direction of the overlapping code point in the first partial writing image is the writing direction; when the single shooting area of the smart pen can cover 9 complete code points, the coordinate information of each code point on each partial writing image is obtained to determine the center code point, and the line connecting the center code points on adjacent partial writing images with code point changes is the writing direction.
[0050] S304: When the writing pressure value is greater than the initial value, but there is no handwriting in the code area of the code point, and there is no handwriting in the code areas of adjacent code points, there is continuous pen break. If the number of code points with continuous pen break exceeds the threshold, a reminder is issued.
[0051] Embodiment 4
[0052] A method for identifying code points on black and white printed paper for smart paper and pen, in order to solve the problem that the existing smart pen resolution is usually less than 180*180, and the processing power is also weak, and the installation of a larger-sized camera module (CCD) is also difficult. Only a small amount of computing power needs to be added to deal with the interference of diagonal lines on code points. The code point is a square, and a diagonal line (a dotted line composed of several points) is provided on the code point. The code point is divided into a first area and a second area by the diagonal line. The diagonal line of the code point is perpendicular to the diagonal lines of the four azimuth code points above, below, left and right; the four adjacent first areas constitute a first position reference block, and the four adjacent second areas constitute a second position reference block. When the single shooting area of the smart pen can completely cover the first position reference block or the second position reference block, the coordinate information of the first area and the second area on each code point on each partial writing image is obtained.
[0053] A smart pen using the black-and-white printed paper code point recognition method for smart paper and pen, comprising:
[0054] The sensor is used to collect and obtain the handwriting data, writing pressure data and pen holding data generated by the user during the paper writing process;
[0055] The Bluetooth communication module can wirelessly communicate with the pen box and transmit the handwriting data to the pen box;
[0056] The power module provides power to the sensor, Bluetooth communication module and processor in the smart pen;
[0057] The processor can analyze and process the handwriting data, writing pressure data and pen holding data.
[0058] A computer-readable storage medium stores computer instructions for causing the computer to execute the aforementioned black-and-white printed paper code point recognition method for a smart paper pen.
[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any slight modification, equivalent substitution and improvement made to the above embodiment based on the technical essence of the present invention should be included in the protection scope of the technical solution of the present invention.
Claims
1. A method for identifying code points on black and white printed paper for smart paper and pen, characterized in that: Pre-process the job content to obtain the job print file containing code point information; Print the job print file in black and white to obtain a paper containing code point information; The smart pen records the code point information and handwriting of the specified area on the paper in real time to obtain the handwriting data; the smart pen decodes the code points on the handwriting data, corrects and restores them to obtain the local writing image, and finally transmits it to the server; the server aggregates the local writing images according to the corresponding positional relationship of the code points to obtain the overall writing content.
2. The method for identifying black and white printed paper code points for a smart paper pen according to claim 1, characterized in that: When recording, the smart pen can cover 4-9 complete code points in a single shot; when decoding, through code point A ij Parse the code point printed in the code area to obtain the code point A ij Corresponding coordinate information (i, j); If the code point is stained or damaged, or partially covered by other text lines, and code point A0 cannot be parsed, other code points in the local writing image are parsed until the coordinates (a, b) are moved to obtain code point A with parsable coordinate information. mn , get the code point A mn The corresponding coordinate information is (m, n), then the coordinates of code point A0 are (ma, nb); During correction and restoration, the image of the handwriting data is distorted and adjusted to obtain a trapezoidal image, and the trapezoidal image is restored by trapezoidal correction to obtain a partial writing image.
3. The black-and-white printed paper code point recognition method for smart paper and pen according to claim 2, characterized in that: The size of the code point is 1.5 mm*1.5 mm, and the resolution of the smart pen is greater than or equal to 240*240.
4. The black-and-white printed paper code point recognition method for smart paper and pen according to claim 2, characterized in that: While the smart pen is recording, it also records the writing pressure data of the writing process in real time; When the writing pressure value is less than or equal to the initial value, it is judged that writing has not started at this time, or the writing is completed and the pen is in the state of lifting, and the smart pen stops recording; when the writing pressure value is greater than the initial value, the writing action is in progress at this time, and the smart pen keeps recording; While the smart pen is recording, it also records the pen-holding data of the writing process in real time. The pen-holding data includes the pen-holding direction and the pen-holding angle. When the pen-holding direction or the pen-holding angle does not meet the specifications, a reminder will be issued. At the same time, the pen-holding angle data is used to assist in the correction and restoration of handwriting data.
5. The black-and-white printed paper code point recognition method for smart paper and pen according to claim 4, characterized in that: The position of the partial writing image is marked by the coordinate information corresponding to the code point, and then the handwritings on the adjacent partial writing images are spliced and combined to obtain the overall writing content with complete handwriting; When the writing pressure value is greater than the initial value, but there is no handwriting in the code area of the code point, and there is handwriting in the code area of the adjacent code point, there is a local stroke break. The endpoints with handwriting in the code area of the adjacent code point are connected and combined, and the connection lines that meet the requirements are selected according to the writing direction and stroke characteristics; When the writing pressure value is greater than the initial value, but there is no handwriting in the code area of the code point, and there is no handwriting in the code area of the adjacent code points, there is continuous pen break. If the number of code points with continuous pen break exceeds the threshold, a reminder is issued.
6. The black-and-white printed paper code point recognition method for smart paper and pen according to claim 5, characterized in that: When the single shooting area of the smart pen can cover 4 complete code points, the coordinate information of each code point on each partial writing image is obtained, and the overlapping code points on two adjacent partial writing images with code point changes are analyzed. The direction of the overlapping code point in the first partial writing image is the writing direction; When the single shooting area of the smart pen can cover 9 complete code points, the coordinate information of each code point on each partial writing image is obtained to determine the central code point, and the line connecting the central code points on adjacent partial writing images with code point changes is the writing direction.
7. The method for identifying black and white printed paper code points for a smart paper pen according to claim 5, characterized in that: The code point is a square, and a diagonal line is provided on the code point, and the code point is divided into a first area and a second area by the diagonal line, and the diagonal line of the code point is perpendicular to the diagonals of the four azimuth code points above, below, left and right; four adjacent first areas constitute a first position reference block, and four adjacent second areas constitute a second position reference block; When the single shooting area of the smart pen can completely cover the first position reference block or the second position reference block, the coordinate information of the first area and the second area on each code point on each partial writing image is obtained.
8. A smart pen using the black-and-white printed paper code point recognition method for smart paper and pen as claimed in any one of claims 1 to 7, characterized in that: include: The sensor is used to collect and obtain the handwriting data, writing pressure data and pen holding data generated by the user during the paper writing process; The Bluetooth communication module can wirelessly communicate with the pen box and transmit the handwriting data to the pen box; The power module provides power to the sensor, Bluetooth communication module and processor in the smart pen; The processor can analyze and process the handwriting data, writing pressure data and pen holding data.
9. A computer-readable storage medium storing computer instructions for causing the computer to execute the black-and-white printed paper code point recognition method for a smart paper pen as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Handwriting pen handwriting offset compensation method, handwriting pen, storage medium and device
CN110069148A
Paper-pen handwritten content mobile phone synchronous display system
CN111679753A
Handwriting restoration method
CN112541377A
Coding and decoding method based on high-resolution dot matrix
CN113392828A
Handwriting processing method
CN113407048A