Handwritten text evaluation method, device, computer equipment and storage medium

By identifying and splitting handwritten text images, comparing standard strokes with stylus, calculating attribute levels, the problem that the existing technology cannot evaluate the quality of handwritten text is solved, and effective evaluation of handwritten text and recommendation of high-quality content is achieved.

CN117727050BActive Publication Date: 2024-11-26SHUXING TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311267330.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2024-11-26
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

Existing text recognition technology can only recognize text information in images, cannot evaluate handwritten text, and lacks support for evaluation and recommendation of handwritten text quality.

Method used

By obtaining handwritten text images, text recognition, stroke splitting and alignment, comparing standard strokes with stylus, calculating stroke width ratio and pixel proportion, and determining the attribute level of handwritten text.

Benefits of technology

It realizes the attribute level assessment of handwritten text, which can provide students with writing feedback and content recommendations to provide quality assessments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117727050B_ABST
    Figure CN117727050B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, apparatus, computer equipment and storage medium for evaluating handwritten text, which obtain a handwritten text image; perform text recognition on the handwritten text image to obtain the image area corresponding to each text unit in the handwritten text image; perform stroke splitting processing on the handwritten text units in the image area to obtain the handwritten strokes of the handwritten text units; perform attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image. The embodiments of the present application perform text recognition on the handwritten text image and compare the standard strokes with the handwritten strokes, so as to not only identify the text information in the image from the handwritten text image, but also evaluate the handwritten text in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a handwritten text evaluation method, apparatus, computer equipment and storage medium, wherein the storage medium is a computer-readable storage medium. Background Art

[0002] In existing text recognition, usually only the text information contained in the image can be recognized. In some scenarios, in addition to recognizing the text contained in the image, it is very important to be able to give an evaluation of the handwritten text in the image. For example, for students, giving an evaluation of the words they write is conducive to students understanding their writing level in time and making adjustments; in the content recommendation scenario, the attribute level of the handwritten text in the content can be used as an indicator of whether the content is high-quality, so as to recommend high-quality content to users. Summary of the invention

[0003] The embodiments of the present application provide a handwritten text evaluation method, apparatus, computer device, and storage medium, which can evaluate the level of handwritten text in an image.

[0004] A handwritten text evaluation method provided in an embodiment of the present application includes:

[0005] Get handwritten text image;

[0006] Performing text recognition on the handwritten text image to obtain each text unit in the handwritten text image and an image area corresponding to each text unit in the handwritten text image;

[0007] Performing stroke splitting processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit;

[0008] According to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit, attribute level classification processing is performed on the text units in the image to obtain the attribute level of the handwritten text in the handwritten text image.

[0009] Accordingly, an embodiment of the present application further provides a handwritten text evaluation device, comprising:

[0010] An acquisition unit, used for acquiring a handwritten text image;

[0011] A recognition unit, configured to perform text recognition on the handwritten text image to obtain each text unit in the handwritten text image and an image region corresponding to each text unit in the handwritten text image;

[0012] A splitting unit, used for performing stroke splitting processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit;

[0013] The evaluation unit is used to perform attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit, so as to obtain the attribute level of the handwritten text in the handwritten text image.

[0014] In one embodiment, the splitting unit includes:

[0015] An image acquisition subunit, used for acquiring a standard text unit image corresponding to each text unit contained in the handwritten text image;

[0016] An alignment subunit, configured to perform image alignment processing on a corresponding image region in the handwritten text image based on a standard text unit image of each text unit, to obtain an aligned handwritten text unit image;

[0017] The stroke splitting subunit is used to perform stroke splitting processing on the aligned handwritten text unit image to obtain the handwritten strokes of the handwritten text unit.

[0018] In one embodiment, the evaluation unit comprises:

[0019] A standard text division subunit, used for performing stroke division on the standard text unit in the standard text unit image to obtain standard strokes corresponding to each text unit;

[0020] The comparison subunit is used to compare the standard strokes of each text unit with the corresponding handwritten strokes to obtain the attribute level of the handwritten text in the handwritten text image.

[0021] In one embodiment, the splitting unit includes:

[0022] A binarization processing subunit, used for performing binarization processing on the image region to obtain a binarized image region;

[0023] The handwritten stroke splitting subunit is used to perform stroke splitting processing on the handwritten text unit in the binary image area to obtain the handwritten strokes of the handwritten text unit.

[0024] In one embodiment, the standard strokes are included in a binary standard stroke image, and the evaluation unit includes:

[0025] A mapping subunit, used for mapping the binary image region and the binary standard stroke image, and determining the white pixels in the binary image region and the corresponding target pixels in the binary standard stroke image;

[0026] A calculation subunit, used to calculate the proportion of white pixels in the target pixels;

[0027] The text evaluation subunit is used to obtain the attribute level of the handwritten text in the handwritten text image according to the proportion.

[0028] In one embodiment, the text evaluation subunit includes:

[0029] A ratio calculation module, used for calculating the stroke width ratio of the handwritten stroke and the standard stroke according to the pixel distribution in the binarized image area and the binarized standard stroke image;

[0030] The attribute level determination module is used to calculate the score of each handwritten stroke according to the proportion and the stroke width ratio, and determine the attribute level of the handwritten text in the handwritten text image based on the score of each handwritten stroke.

[0031] In one embodiment, the ratio calculation module includes:

[0032] A first edge detection submodule, configured to perform edge detection according to pixel distribution of the binary standard stroke image, obtain contour information of the standard stroke, and determine a standard stroke width of the standard stroke according to the contour information;

[0033] A second edge detection submodule, configured to perform edge detection according to pixel distribution in the binary image region, obtain contour information of the handwritten strokes, and determine a handwritten stroke width of the handwritten strokes according to the contour information;

[0034] The width ratio calculation submodule is used to calculate the stroke width ratio of the standard stroke width and the handwritten stroke width.

[0035] Correspondingly, an embodiment of the present application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any handwritten text evaluation method provided in the embodiment of the present application.

[0036] Accordingly, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute any one of the handwritten text evaluation methods provided in the embodiments of the present application.

[0037] The embodiment of the present application obtains a handwritten text image; performs text recognition on the handwritten text image to obtain each text unit in the handwritten text image, and the image area corresponding to each text unit in the handwritten text image; performs stroke splitting processing on the handwritten text units in the image area to obtain the handwritten strokes of the handwritten text units; performs attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image. The embodiment of the present application performs text recognition on the handwritten text image and compares the standard strokes with the handwritten strokes, so as to not only identify the text information in the image from the handwritten text image, but also evaluate the handwritten text in the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 is a flow chart of a handwritten text evaluation method provided in an embodiment of the present application;

[0040] Figure 2 It is a schematic diagram of the network structure provided by the embodiment of the present application;

[0041] Figure 3 It is a schematic diagram of stroke splitting provided in an embodiment of the present application;

[0042] Figure 4 is a schematic diagram of text unit alignment provided in an embodiment of the present application;

[0043] Figure 5 is a schematic diagram of a handwritten text evaluation device provided in an embodiment of the present application;

[0044] Figure 6 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0046] The present application provides a handwritten text evaluation method, device, computer equipment and computer readable storage medium. The handwritten text evaluation device can be integrated in a computer equipment, which can be a server or a terminal.

[0047] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.

[0048] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.

[0049] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0050] This embodiment will be described from the perspective of a handwritten text evaluation device, which may be integrated into a computer device, which may be a server or a terminal.

[0051] The present application provides a handwritten text evaluation method, such as Figure 1 As shown, the specific process of the handwritten text evaluation method can be as follows:

[0052] 101. Obtain a handwritten text image.

[0053] The handwritten text image may be an image containing handwritten text. In a Chinese scenario, the handwritten text image may be an image containing handwritten characters.

[0054] In different application scenarios, the effect of evaluating handwritten text in handwritten text images is different. For example, if the handwriting of students is evaluated, students can understand their own writing conditions so that they can make timely adjustments and improvements. In social software, the attribute level of handwritten text images in the content can be used as an indicator of whether the content is high-quality, so as to recommend high-quality content to users.

[0055] 102. Perform text recognition on the handwritten text image to obtain an image region corresponding to each text unit in the handwritten text image.

[0056] Among them, text recognition can be performed on a handwritten text image by using optical character recognition (OCR) technology to obtain a recognition result, and the recognition result is a text unit corresponding to the handwritten text in the handwritten text image.

[0057] The text unit may be a unit constituting a text, for example, a “character” in Chinese or a word in English. In different languages, the text unit corresponds to different contents.

[0058] For example, text recognition may be performed on a handwritten text image to obtain a text recognition result of the handwritten text image, and to obtain text units contained in the handwritten text image, and an image area corresponding to each text unit in the handwritten text image.

[0059] Optionally, you can Figure 2 As shown, the area where the handwritten text is located, that is, the text image area, is detected from the handwritten text image through a text detection network, and then the text recognition network is used to perform text recognition on the text image area to obtain the recognition result, and the text segmentation network is used to segment the text image area to obtain the image area corresponding to each text unit in the recognition result, and each image area contains the post-written text unit corresponding to each text unit.

[0060] 103. Perform stroke splitting processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit.

[0061] For example, a segmentation algorithm may be used to separate the handwritten text in an image region into strokes to obtain handwritten strokes of a handwritten text unit, and the handwritten strokes may be included in an image.

[0062] In one embodiment, the outline of the handwritten text in the image area can be determined by an edge detection algorithm, and the position of each handwritten stroke can be determined. For each handwritten stroke, the area where the handwritten stroke is located in the image area is retained, and other areas are masked so that the obtained image only contains one handwritten stroke. The splitting effect can be as follows: Figure 3 shown.

[0063] Optionally, in order to improve the accuracy of stroke segmentation, text binarization processing may be performed on the image area to remove noise in the image area. That is, in one embodiment, the step of "performing stroke segmentation processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit" may specifically include:

[0064] Performing binarization processing on the image region to obtain a binarized image region;

[0065] The handwritten text unit in the binary image region is subjected to stroke segmentation processing to obtain the handwritten strokes of the handwritten text unit.

[0066] For example, the image area may be binarized to obtain a binary image area. In the binary image area, the color of the handwritten text unit is different from the color of other areas in the binary image area, so the strokes of the handwritten text in the binary image area are clear and the noise is less.

[0067] The handwritten text unit in the binary image region is subjected to stroke segmentation processing to obtain the handwritten strokes of the handwritten text unit.

[0068] Before performing stroke splitting on the handwritten text unit, the image region containing the handwritten text unit may be aligned with an image containing a standard text unit for comparison with the handwritten text unit, so that the posture of the handwritten strokes obtained by the stroke splitting is similar to the strokes of the standard text unit. That is, in one embodiment, the step of "performing stroke splitting processing on the handwritten text unit in the image region to obtain the handwritten strokes of the handwritten text unit" may specifically include:

[0069] Obtain a standard text unit image corresponding to each text unit contained in the handwritten text image;

[0070] Based on the standard text unit image of each text unit, image alignment processing is performed on the corresponding image area in the handwritten text image to obtain an aligned handwritten text unit image;

[0071] The aligned handwritten text unit image is subjected to stroke segmentation processing to obtain the handwritten strokes of the handwritten text unit.

[0072] For example, specifically, standard text unit images containing standard text units may be pre-stored in a database, and the standard text unit image corresponding to each text unit may be acquired according to the recognition result.

[0073] Based on the standard text image, the corresponding image area containing the handwritten text unit is aligned to obtain an aligned handwritten text unit image.

[0074] The alignment process can determine the pixel mapping relationship between the standard text image and the image area through the ICP registration algorithm, and then perform offset transformation, rotation transformation, and scaling transformation on the image area containing the handwritten text unit according to the positions of the two pixels with the mapping relationship in the standard text image and in the image area, so that the posture of the handwritten text unit in the aligned handwritten text unit image is similar to the posture of the standard text unit in the standard text unit image, and the aligned handwritten text unit image is obtained. The alignment effect can be shown as follows Figure 4 shown.

[0075] Optionally, the standard text image and the image region containing the handwritten text unit may be aligned through key point detection, feature matching, and image transformation; the alignment may also be performed through deep learning.

[0076] 104. Perform attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image.

[0077] The attribute level may include the level of attributes such as the aesthetics and size of the handwritten text.

[0078] The standard strokes may be pre-stored strokes for comparison with the handwritten strokes. Optionally, the standard strokes may also be extracted from an image containing standard text units, that is, in one embodiment, the step of "classifying the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image" includes:

[0079] Perform stroke division on the standard text unit in the standard text unit image to obtain the standard strokes corresponding to each text unit;

[0080] The standard strokes of each text unit are compared with the corresponding handwritten strokes to obtain the attribute level of the handwritten text in the handwritten text image.

[0081] For example, a segmentation algorithm may be used to perform stroke segmentation on a standard text unit in a standard text unit image to obtain standard strokes of the standard text unit.

[0082] In one embodiment, the outline of the standard text unit in the standard text unit image can be determined by an edge detection algorithm, and the position of each standard stroke can be determined. For each standard stroke, the area where the standard stroke is located in the image area is retained, and other areas are masked so that the obtained image only contains one standard stroke.

[0083] After obtaining the standard strokes, each standard stroke corresponding to the text unit in the recognition result is compared one by one with each handwritten stroke of the handwritten text unit to obtain the score of each handwritten stroke of the handwritten text unit. This score can be used to measure the difference between the handwritten stroke and the standard stroke, that is, it can indicate the beauty and size difference of the handwritten stroke.

[0084] The similarity between two handwritten strokes and a standard stroke can be predicted by a neural network model, and then the score of the handwritten stroke is determined based on the similarity.

[0085] According to the score of each handwritten stroke of the handwritten text unit, the unit score of the handwritten text unit can be obtained. For example, the average score of the handwritten strokes is used as the unit score of the handwritten text unit, and then according to the unit score of each text unit, the attribute level of the handwritten text in the handwritten text image can be obtained.

[0086] The handwritten text may also be evaluated by pixel comparison. That is, in one embodiment, the standard strokes are included in the binary standard stroke image, and the step of "classifying the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image" includes:

[0087] Mapping the binary image region and the binary standard stroke image to determine the white pixels in the binary image region and the corresponding target pixels in the binary standard stroke image;

[0088] Calculate the proportion of white pixels in the target pixel;

[0089] The attribute level of the handwritten text in the handwritten text image is obtained according to the proportion.

[0090] The white pixels are pixels that appear white in the binary image area.

[0091] For example, each white pixel in the region of the binary image may be mapped to the binary standard stroke image according to the position of the pixel, and the corresponding target pixel in the binary standard stroke image may be determined for each white pixel in the binary image.

[0092] If the target pixel corresponding to a white pixel is a black pixel, it can be considered that the handwritten stroke exceeds the range of the standard stroke and is not standard enough. Therefore, the proportion of white pixels in the target pixel can be counted. The higher the proportion, the closer the handwritten stroke is to the standard stroke, and the lower the proportion, the greater the difference between the handwritten stroke and the standard stroke. Therefore, the attribute level of the handwritten text in the handwritten text image can be determined based on the proportion of white pixels in the target pixel. The higher the proportion of white pixels, the lower the attribute level, and the lower the proportion of white pixels, the higher the attribute level.

[0093] It can be understood that if the color of the text unit in the binary image is black pixels and the background is white pixels, the proportion of black pixels in the target pixels can be calculated.

[0094] Since the stroke thickness of handwritten characters and standard characters is different, if the stroke width of standard characters is much larger than that of handwritten characters, it is difficult for handwritten characters to exceed the stroke range of standard characters if they are written neatly. Therefore, the stroke width of the standard text unit and the stroke width of the handwritten text can be combined to evaluate the handwritten text. That is, in one embodiment, the step of "obtaining the attribute level of the handwritten text in the handwritten text image according to the proportion" can specifically include:

[0095] Calculating the stroke width ratio of the handwritten stroke and the standard stroke according to the pixel distribution in the binary image area and the binary standard stroke image;

[0096] A score of each handwritten stroke is calculated according to the proportion and the stroke width ratio, and an attribute level of the handwritten text in the handwritten text image is determined based on the score of each handwritten stroke.

[0097] For example, the number of white pixels in the binary image area (i.e., the first number) and the number of white pixels in the binary standard stroke image (i.e., the second number) can be counted, and then the ratio of the second number to the second number can be calculated to obtain the stroke width ratio.

[0098] The stroke width ratio may be used as a weight for adjusting the score, and the proportion of white pixels in the target pixel may be multiplied by the stroke width ratio, and the obtained score may be used as the attribute level of the handwritten text.

[0099] Optionally, edge detection may be performed based on pixel distribution to extract the outline of the stroke and then determine the stroke width. That is, in one embodiment, the step of "calculating the stroke width ratio of the handwritten stroke and the standard stroke based on the pixel distribution in the binarized image area and the binarized standard stroke image" may specifically include:

[0100] Perform edge detection according to pixel distribution of the binary standard stroke image to obtain contour information of the standard stroke, and determine the standard stroke width of the standard stroke according to the contour information;

[0101] Performing edge detection based on pixel distribution in the binary image region to obtain contour information of the handwritten strokes, and determining the handwritten stroke width of the handwritten strokes based on the contour information;

[0102] Calculate the stroke width ratio of the handwritten stroke width and the standard stroke width.

[0103] For example, edge detection may be performed on the binary standard stroke image and the binary image region respectively to extract the contour information of the standard stroke and the contour information of the handwritten stroke.

[0104] The stroke width of the standard stroke and the stroke width of the handwritten stroke may be determined according to the outline information, and then the stroke width ratio of the handwritten stroke width to the standard stroke width may be calculated.

[0105] Optionally, if the handwritten stroke width is greater than the standard stroke width, the binary standard stroke image may be expanded to make the standard stroke width equal to or slightly greater than the handwritten stroke width, so as to detect whether the handwritten stroke is standard based on the standard stroke.

[0106] As can be seen from the above, the embodiment of the present application obtains a handwritten text image; performs text recognition on the handwritten text image to obtain each text unit in the handwritten text image, and the image area corresponding to each text unit in the handwritten text image; performs stroke splitting processing on the handwritten text units in the image area to obtain the handwritten strokes of the handwritten text units; performs attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image. The embodiment of the present application performs text recognition on the handwritten text image and compares the standard strokes with the handwritten strokes, so as to not only identify the text information in the image from the handwritten text image, but also evaluate the handwritten text in the image.

[0107] In order to facilitate better implementation of the handwritten text evaluation method provided in the embodiment of the present application, a handwritten text evaluation device is also provided in one embodiment. The meanings of the terms are the same as those in the above-mentioned handwritten text evaluation method, and the specific implementation details can refer to the description in the method embodiment.

[0108] The handwritten text evaluation device can be integrated into a computer device, such as Figure 5 As shown, the handwritten text evaluation device may include: an acquisition unit 301, a recognition unit 302, a splitting unit 303 and an evaluation unit 304, which are specifically as follows:

[0109] (1) Acquisition unit 301: used to acquire a handwritten text image.

[0110] (2) Recognition unit 302: used to perform text recognition on the handwritten text image to obtain each text unit in the handwritten text image and the image area corresponding to each text unit in the handwritten text image.

[0111] (3) Splitting unit 303: used to perform stroke splitting processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit.

[0112] In one embodiment, the splitting unit 303 may include:

[0113] Image acquisition subunit: used to acquire a standard text unit image corresponding to each text unit contained in the handwritten text image;

[0114] Alignment subunit: used for performing image alignment processing on the corresponding image area in the handwritten text image based on the standard text unit image of each text unit to obtain the aligned handwritten text unit image;

[0115] Stroke splitting subunit: used to perform stroke splitting processing on the aligned handwritten text unit image to obtain the handwritten strokes of the handwritten text unit.

[0116] In one embodiment, the splitting unit 303 may include:

[0117] Binarization processing subunit: used for performing binarization processing on the image area to obtain a binary image area;

[0118] Handwritten stroke splitting subunit: used to perform stroke splitting processing on the handwritten text unit in the binary image area to obtain the handwritten strokes of the handwritten text unit.

[0119] (4) Evaluation unit 304: used to classify the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit, so as to obtain the attribute level of the handwritten text in the handwritten text image.

[0120] In one embodiment, the evaluation unit 304 may include:

[0121] Standard text division subunit: used to divide the standard text unit in the standard text unit image into strokes to obtain the standard strokes corresponding to each text unit;

[0122] Comparison subunit: used to compare the standard strokes of each text unit with the corresponding handwritten strokes to obtain the attribute level of the handwritten text in the handwritten text image.

[0123] In one embodiment, the standard strokes are included in the binary standard stroke image, and the evaluation unit 304 may include:

[0124] Mapping subunit: used to map the binary image area and the binary standard stroke image, and determine the white pixels in the binary image area and the corresponding target pixels in the binary standard stroke image;

[0125] Calculation subunit: used to calculate the proportion of white pixels in the target pixel;

[0126] Text evaluation subunit: used to obtain the attribute level of the handwritten text in the handwritten text image according to the proportion.

[0127] In one embodiment, the text evaluation subunit may include:

[0128] Ratio calculation module: used to calculate the stroke width ratio of the handwritten stroke and the standard stroke according to the pixel distribution in the binary image area and the binary standard stroke image;

[0129] Attribute level determination module: used to calculate the score of each handwritten stroke according to the proportion and stroke width ratio, and determine the attribute level of the handwritten text in the handwritten text image based on the score of each handwritten stroke.

[0130] In one embodiment, the ratio calculation module may include:

[0131] The first edge detection submodule is used to perform edge detection according to the pixel distribution of the binary standard stroke image, obtain the contour information of the standard stroke, and determine the standard stroke width of the standard stroke according to the contour information;

[0132] The second edge detection submodule is used to perform edge detection according to the pixel distribution of the binary image area, obtain the contour information of the handwritten stroke, and determine the handwritten stroke width of the handwritten stroke according to the contour information;

[0133] Width ratio calculation submodule: used to calculate the stroke width ratio of the handwritten stroke width and the standard stroke width.

[0134] As can be seen from the above, the handwritten text evaluation device in the embodiment of the present application obtains a handwritten text image through the acquisition unit 301; the recognition unit 302 performs text recognition on the handwritten text image to obtain each text unit in the handwritten text image, and the image area corresponding to each text unit in the handwritten text image; the splitting unit 303 performs stroke splitting processing on the handwritten text units in the image area to obtain the handwritten strokes of the handwritten text units; the evaluation unit 304 performs attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image. The embodiment of the present application performs text recognition on the handwritten text image and compares the standard strokes with the handwritten strokes, so as to not only identify the text information in the image from the handwritten text image, but also evaluate the handwritten text in the image.

[0135] The present application also provides a computer device, which may be a terminal or a server. Figure 6 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:

[0136] The computer device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that Figure 6The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0137] The processor 1001 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 1002 and calling data stored in the memory 1002, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and computer programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1001.

[0138] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.

[0139] The computer device also includes a power supply 1003 for supplying power to various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 1003 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0140] The computer device may further include an input unit 1004, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0141] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically, in this embodiment, the processor 1001 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 1002 according to the following instructions, and the processor 1001 will run the computer programs stored in the memory 1002, thereby realizing various functions, as follows:

[0142] Get handwritten text image;

[0143] Performing text recognition on the handwritten text image to obtain each text unit in the handwritten text image and the image area corresponding to each text unit in the handwritten text image;

[0144] Performing stroke splitting processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit;

[0145] According to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit, the text units in the image are classified into attribute levels to obtain the attribute levels of the handwritten text in the handwritten text image.

[0146] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.

[0147] As can be seen from the above, the computer device of the embodiment of the present application can obtain a handwritten text image; perform text recognition on the handwritten text image to obtain each text unit in the handwritten text image, and the image area corresponding to each text unit in the handwritten text image; perform stroke splitting processing on the handwritten text units in the image area to obtain the handwritten strokes of the handwritten text units; perform attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image. The embodiment of the present application can not only identify the text information in the image from the handwritten text image, but also evaluate the handwritten text in the image by performing text recognition on the handwritten text image and comparing the standard strokes with the handwritten strokes.

[0148] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations in the above-mentioned embodiments.

[0149] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0150] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute any handwritten text evaluation method provided in the embodiment of the present application.

[0151] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0152] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0153] Since the computer program stored in the computer-readable storage medium can execute any of the handwritten text evaluation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the handwritten text evaluation methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0154] The above is a detailed introduction to a handwritten text evaluation method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A handwritten text evaluation method, characterized in that: include: Acquire a handwritten text image, wherein the handwritten text image includes a plurality of handwritten text units; Performing text recognition on the handwritten text image to obtain text units in the handwritten text image and an image area corresponding to each text unit in the handwritten text image; Obtaining a standard text unit image corresponding to each of the text units; Based on the standard text unit image of each text unit, performing image alignment processing on the corresponding image area in the handwritten text image to obtain an aligned handwritten text unit image, wherein the posture of the handwritten text unit in the aligned handwritten text unit image is similar to the posture of the text unit in the standard text unit image; Performing stroke splitting processing on the handwritten text unit in the aligned handwritten text unit image to obtain the handwritten strokes of the handwritten text unit; According to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit, attribute level classification processing is performed on the text units in the image to obtain the attribute level of the handwritten text in the handwritten text image.

2. The method according to claim 1, characterized in that The method of performing attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image includes: Performing stroke division on the standard text units in the standard text unit image to obtain standard strokes corresponding to each text unit; Comparing the standard strokes of each text unit with the corresponding handwritten strokes to obtain the matching degree between the standard strokes of each text unit and the corresponding handwritten strokes; The attribute level of the handwritten text in the handwritten text image is obtained based on the matching degree.

3. The method according to claim 1, characterized in that The step of performing stroke splitting processing on the handwritten text unit in the image area to obtain the handwritten strokes of the handwritten text unit includes: Performing binarization processing on the image region to obtain a binarized image region; The handwritten text unit in the binary image region is subjected to stroke segmentation processing to obtain the handwritten strokes of the handwritten text unit.

4. The method according to claim 3, characterized in that The standard strokes are included in the binary standard stroke image, and the attribute level classification process is performed on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit to obtain the attribute level of the handwritten text in the handwritten text image, including: Mapping the binarized image region and the binarized standard stroke image to determine the white pixels in the binarized image region and the corresponding target pixels in the binarized standard stroke image; Calculating the proportion of white pixels in the target pixels; The attribute level of the handwritten text in the handwritten text image is obtained according to the proportion.

5. The method according to claim 4, characterized in that The step of obtaining the attribute level of the handwritten text in the handwritten text image according to the proportion includes: Calculating the stroke width ratio of the handwritten stroke and the standard stroke according to the pixel distribution in the binarized image area and the binarized standard stroke image; The score of each handwritten stroke is calculated according to the proportion and the stroke width ratio, and the attribute level of the handwritten text in the handwritten text image is determined based on the score of each handwritten stroke.

6. The method according to claim 5, characterized in that The calculating the stroke width ratio of the handwritten stroke and the standard stroke according to the pixel distribution in the binarized image area and the binarized standard stroke image comprises: Performing edge detection according to pixel distribution of the binary standard stroke image to obtain contour information of the standard stroke, and determining a standard stroke width of the standard stroke according to the contour information; Performing edge detection according to pixel distribution in the binary image region to obtain contour information of the handwritten strokes, and determining a handwritten stroke width of the handwritten strokes according to the contour information; A stroke width ratio of the handwritten stroke width to the standard stroke width is calculated.

7. A handwritten text evaluation device, characterized in that: include: An acquisition unit, used for acquiring a handwritten text image, wherein the handwritten text image includes a plurality of handwritten text units; A recognition unit, configured to perform text recognition on the handwritten text image to obtain each text unit in the handwritten text image and an image region corresponding to each text unit in the handwritten text image; A splitting unit is used to obtain a standard text unit image corresponding to each of the text units; based on the standard text unit image of each text unit, perform image alignment processing on the corresponding image area in the handwritten text image to obtain an aligned handwritten text unit image, wherein the posture of the handwritten text unit in the aligned handwritten text unit image is similar to the posture of the text unit in the standard text unit image; perform stroke splitting processing on the handwritten text unit in the aligned handwritten text unit image to obtain the handwritten strokes of the handwritten text unit; The evaluation unit is used to perform attribute level classification processing on the text units in the image according to the standard strokes of each text unit and the handwritten strokes of the corresponding handwritten text unit, so as to obtain the attribute level of the handwritten text in the handwritten text image.

8. A computer device, characterized in that: The invention comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the handwritten text evaluation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the handwritten text evaluation method according to any one of claims 1 to 6.