Handwriting sample extraction system and method
By designing a handwriting sample extraction system, the image module and verification module are used to automatically extract handwriting trace sample data, solving the problem of low labeling efficiency in the existing technology, achieving efficient acquisition of diverse handwriting samples, and improving learning efficiency.
Patent Information
- Application Number
- CN202411365663.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
The labeling method of handwritten handwriting samples in the prior art is inefficient, resulting in complex sample collection and difficult to obtain a large and diverse handwriting samples.
Design a handwriting sample extraction system, including image module, image evaluation module, image processing module and verification module, through preprocessing, feature state evaluation, segmentation processing and answer verification, automatically extract handwritten trace sample data, and reuse test paper images To improve sample acquisition efficiency.
It has achieved efficient collection of handwriting samples, which is convenient to operate, and obtained a large number of handwriting sample data for answering different handwriting habits at one time, improving the sample extraction learning efficiency.
Smart Images

Figure CN119206746A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of handwriting extraction, and in particular to a handwriting sample extraction system and method. Background Art
[0002] At present, artificial intelligence is developing rapidly, and OCR has always been a hot topic in artificial intelligence. At present, the accuracy of printed text OCR recognition is extremely high, and it has been widely used in various products, greatly improving people's work efficiency and application scenarios. However, for smart education, how to accurately and quickly recognize handwriting is very important. When building a handwriting recognition model, how to obtain a large amount of sample data is the key to the success of the model, because everyone's handwriting is different. If samples are simply made deliberately, this will lead to low accuracy in some scenarios or handwriting recognition. Therefore, how to obtain a large number of handwriting samples with many types extracted from actual applications is extremely important;
[0003] Secondly, after obtaining the handwriting sample, it is necessary to further annotate and mark the correct text corresponding to the handwriting sample image. Usually this step is done through manual annotation or manual review and annotation after using general OCR, but this annotation method is extremely inefficient, which leads to complex sample volume annotation and collection. How to efficiently collect handwriting samples is an urgent problem to be solved. Summary of the invention
[0004] To this end, the present invention provides a handwriting sample extraction system and method to overcome the problem of low efficiency of the annotation method in the prior art leading to complex annotation and collection of handwriting samples.
[0005] To achieve the above object, the present invention provides a handwriting sample extraction system, comprising:
[0006] Image module, used to import target images and perform preprocessing operations on target images;
[0007] An image evaluation module, which is connected to the verification module and is used to determine the characteristic state of the target image according to the font spacing parameter and the font complexity parameter of the target image;
[0008] An image processing module, which is connected to the image evaluation module and is used to determine whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image;
[0009] A verification module, which is connected to the image module and the image processing module, and is used to obtain an answer corresponding to the target image and determine whether the target image is a correct sample target according to the character data in the target image;
[0010] The processing module is connected to the verification module and is used to slice the correct sample target and automatically extract the handwriting trace sample data as the sample data set.
[0011] Furthermore, the target image is at least one of a test paper image, a homework image, and a teaching aid image.
[0012] Furthermore, the image module also includes an image processing submodule for performing at least one preprocessing operation of inversion correction, rectangle correction, image binarization, and image positioning on the target image.
[0013] Further, the image evaluation module determines a characteristic state of the target image according to a font spacing parameter and a font complexity parameter of the target image;
[0014] If the font spacing parameter is greater than the preset font spacing parameter or the font complexity parameter is greater than the preset font complexity parameter, the characteristic state of the target image is the first preset characteristic state;
[0015] If the font spacing parameter is less than or equal to the preset font spacing parameter and the font complexity parameter is less than or equal to the preset font complexity parameter, the feature state of the target image is the second preset feature state.
[0016] Furthermore, the image processing module determines whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image;
[0017] If the characteristic state of the target image is the first preset characteristic state, the image processing module determines that it is not necessary to perform segmentation processing on the characters in the target image in sequence;
[0018] If the characteristic state of the target image is the second preset characteristic state, the image processing module determines to perform segmentation processing on the characters in the target image in sequence.
[0019] Furthermore, the verification module is used to determine whether the target image is a correct sample target according to the character data in the target image;
[0020] If the character data of the target image are all equal to the preset threshold, the target image is a correct sample target;
[0021] The character data includes at least one verification condition of the number of characters, the number of Chinese characters, the number of letters, the number of numbers, the number of Chinese characters, and the number of words.
[0022] Furthermore, the verification module obtains the answer to the sample target corresponding to the target image and locates the answer to the corresponding test question, so that the answer to the question can be obtained from the test question bank.
[0023] Furthermore, the answer corresponding to the target image is a fixed answer.
[0024] The present invention also provides a handwriting sample extraction method applied to the system, comprising:
[0025] Import the target image and perform preprocessing operations on the target image;
[0026] Determine a characteristic state of the target image according to a font spacing parameter and a font complexity parameter of the target image;
[0027] Determine whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image;
[0028] Obtain the answer corresponding to the target image and determine whether the target image is a correct sample target based on the character data in the target image;
[0029] The correct sample target is sliced and the handwriting trace sample data is automatically extracted as the sample data set.
[0030] Compared with the prior art, the beneficial effect of the present invention lies in that, by reusing the images of completed test papers, the present invention effectively extracts the students' handwritten answers and associates and binds the correctly corrected answers with the corresponding answers, thereby ultimately achieving the purpose of obtaining handwriting samples. The operation is convenient, and a large amount of handwriting sample data of answers with different handwriting habits can be obtained at one time, thereby improving the efficiency of sample extraction learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a schematic diagram of a handwriting sample extraction system of the present invention;
[0032] Figure 2 Schematic diagram of the handwriting sample extraction method of the present invention. DETAILED DESCRIPTION
[0033] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0034] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0035] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0036] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0037] See also Figure 1 As shown, it is a schematic diagram of the handwriting sample extraction system of the present invention;
[0038] The present invention provides a handwriting sample extraction system, comprising:
[0039] Image module, used to import target images and perform preprocessing operations on target images;
[0040] An image evaluation module, which is connected to the verification module and is used to determine the characteristic state of the target image according to the font spacing parameter and the font complexity parameter of the target image;
[0041] An image processing module, which is connected to the image evaluation module and is used to determine whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image;
[0042] A verification module, which is connected to the image module and the image processing module, and is used to obtain an answer corresponding to the target image and determine whether the target image is a correct sample target according to the character data in the target image;
[0043] The processing module is connected to the verification module and is used to slice the correct sample target and automatically extract the handwriting trace sample data as the sample data set.
[0044] Specifically, the target image is at least one of a test paper image, a homework image, and a teaching aid image.
[0045] Specifically, the image module also includes an image processing submodule for performing at least one preprocessing operation of inversion correction, rectangle correction, image binarization, and image positioning on the target image.
[0046] Specifically, the image evaluation module determines the characteristic state of the target image according to the font spacing parameter and the font complexity parameter of the target image;
[0047] If the font spacing parameter is greater than the preset font spacing parameter or the font complexity parameter is greater than the preset font complexity parameter, the characteristic state of the target image is the first preset characteristic state;
[0048] If the font spacing parameter is less than or equal to the preset font spacing parameter and the font complexity parameter is less than or equal to the preset font complexity parameter, the feature state of the target image is the second preset feature state.
[0049] The font spacing parameter is confirmed by detecting the total area of characters in the target image, and the font spacing parameter = the total area of the target image / the total area of characters. The font complexity parameter is confirmed by detecting the sub-complexity parameters of each character and recording the average value of the sub-complexity parameters of each character as the font complexity parameter. The sub-complexity parameters of a single character are confirmed by establishing a recognition box around the character.
[0050] Two baselines are established with the geometric center of the identification frame as the reference point. The two baselines are perpendicular to each other and are perpendicular to different sides of the identification frame.
[0051] The recognition frame is divided into four recognition areas by the baseline;
[0052] Compare the image of each recognition area with the pre-stored images in the pre-stored database and calculate the similarity;
[0053] The sub-complexity parameter of a single character is the ratio of the number of recognition areas that are successfully matched.
[0054] If there is at least one pre-stored image in the recognition area whose similarity is greater than the preset similarity, the recognition area is matched successfully. Otherwise, the match fails. The value of the preset similarity can be determined by the user based on the actual application scenario and the requirements for data processing accuracy, which will not be elaborated here.
[0055] The user can determine the values of the preset font spacing parameter and the preset font complexity parameter based on historical data processing experience and deep learning networks. It can be understood that the larger the value of the preset font spacing parameter and the smaller the preset font complexity parameter, the greater the user's required accuracy for target image recognition.
[0056] Specifically, the image processing module determines whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image;
[0057] If the characteristic state of the target image is the first preset characteristic state, the image processing module determines that it is not necessary to perform segmentation processing on the characters in the target image in sequence;
[0058] If the characteristic state of the target image is the second preset characteristic state, the image processing module determines to perform segmentation processing on the characters in the target image in sequence.
[0059] It can be understood that the font spacing parameter or font complexity parameter in the first preset feature state is larger than the font spacing parameter or font complexity parameter in the second preset feature state. The font spacing parameter is used to characterize the closeness between characters, and the font complexity parameter is used to characterize the degree of standardization of font writing compared to pre-stored characters, thereby reflecting the difficulty of characters. The characteristic state of the target image reflects the difficulty of recognizing the target image. In the second preset feature state, the characters in the target image are segmented in turn, so that the character image after segmentation can more effectively meet the recognition of subsequent character data.
[0060] Specifically, the verification module is used to determine whether the target image is a correct sample target based on the character data in the target image;
[0061] If the character data of the target image are all equal to the preset threshold, the target image is a correct sample target;
[0062] The character data includes at least one verification condition of the number of characters, the number of Chinese characters, the number of letters, the number of numbers, the number of Chinese characters, and the number of words.
[0063] The value of the preset threshold can be set by the user according to the actual application scenario. It is understandable that the user can determine the preset threshold corresponding to each character data according to the answer obtained in the question bank. This is easy to understand for technical personnel in this field and will not be elaborated here.
[0064] Specifically, the verification module obtains the answer to the sample target corresponding to the target image and locates the answer to the corresponding test question, so that the answer to the question can be obtained from the test question bank.
[0065] Specifically, the answer corresponding to the target image is a fixed answer.
[0066] See also Figure 2 As shown, it is a schematic diagram of the handwriting sample extraction method of the present invention;
[0067] The present invention also provides a handwriting sample extraction method applied to the system, characterized by comprising:
[0068] S1, importing the target image and performing preprocessing operations on the target image;
[0069] S2, determining a characteristic state of the target image according to a font spacing parameter and a font complexity parameter of the target image;
[0070] S3, determining whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image;
[0071] S4, obtaining the answer corresponding to the target image and determining whether the target image is a correct sample target according to the character data in the target image;
[0072] S5, slicing the correct sample target and automatically extracting handwriting trace sample data as a sample data set.
[0073] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A handwriting sample extraction system, characterized in that: include: Image module, used to import target images and perform preprocessing operations on target images; An image evaluation module, which is connected to the verification module and is used to determine the characteristic state of the target image according to the font spacing parameter and the font complexity parameter of the target image; An image processing module, which is connected to the image evaluation module and is used to determine whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image; A verification module, which is connected to the image module and the image processing module, and is used to obtain an answer corresponding to the target image and determine whether the target image is a correct sample target according to the character data in the target image; The processing module is connected to the verification module and is used to slice the correct sample target and automatically extract the handwriting trace sample data as the sample data set.
2. The handwriting sample extraction system according to claim 1, characterized in that: The target image is at least one of a test paper image, a homework image, and a teaching aid image.
3. The handwriting sample extraction system according to claim 2, characterized in that: The image module also includes an image processing submodule for performing at least one preprocessing operation of inversion correction, rectangle correction, image binarization, and image positioning on the target image.
4. The handwriting sample extraction system according to claim 3, characterized in that: The image evaluation module determines the characteristic state of the target image according to the font spacing parameter and the font complexity parameter of the target image; If the font spacing parameter is greater than the preset font spacing parameter or the font complexity parameter is greater than the preset font complexity parameter, the characteristic state of the target image is the first preset characteristic state; If the font spacing parameter is less than or equal to the preset font spacing parameter and the font complexity parameter is less than or equal to the preset font complexity parameter, the feature state of the target image is the second preset feature state.
5. The handwriting sample extraction system according to claim 4, characterized in that: The image processing module determines whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image; If the characteristic state of the target image is the first preset characteristic state, the image processing module determines that it is not necessary to perform segmentation processing on the characters in the target image in sequence; If the characteristic state of the target image is the second preset characteristic state, the image processing module determines to perform segmentation processing on the characters in the target image in sequence.
6. The handwriting sample extraction system according to claim 5, characterized in that: The verification module is used to determine whether the target image is a correct sample target according to the character data in the target image; If the character data of the target image are all equal to the preset threshold, the target image is a correct sample target; The character data includes at least one verification condition of the number of characters, the number of Chinese characters, the number of letters, the number of numbers, the number of Chinese characters, and the number of words.
7. The handwriting sample extraction system according to claim 6, characterized in that: The verification module obtains the answer to the sample target corresponding to the target image and locates the answer to the corresponding test question, so that the answer to the question can be obtained from the test question bank.
8. The handwriting sample extraction system according to claim 7, characterized in that: The answer corresponding to the target image is a fixed answer.
9. A handwriting sample extraction method applied to the system according to any one of claims 1 to 8, characterized in that: include: Import the target image and perform preprocessing operations on the target image; Determine a characteristic state of the target image according to a font spacing parameter and a font complexity parameter of the target image; Determine whether to perform segmentation processing on the characters in the target image in sequence to obtain a plurality of character images according to the characteristic state of the target image; Obtain the answer corresponding to the target image and determine whether the target image is a correct sample target based on the character data in the target image; The correct sample target is sliced and the handwriting trace sample data is automatically extracted as the sample data set.
Citation Information
Cited By
Handwriting extraction system, method and equipment based on multiple prior information fusion and medium
CN121884368A
