Calligraphy scoring method, device, storage medium and electronic device
By calculating the similarity between the outline and centroid of single characters and tracing words in calligraphy works, the efficiency and accuracy of calligraphy scores are achieved, and the problems of low score accuracy and slow speed in the existing technology are solved.
Patent Information
- Application Number
- CN202210474795.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-04-29
AI Technical Summary
In the prior art, the calligraphy scoring method has low accuracy and slow recognition speed, making it difficult to effectively assist beginners in obtaining real-time feedback during the practice.
By obtaining the image of the calligraphy works, determining the single-character area, calculating the outline similarity and center of mass of the single-character and the red-tracing text, and finally determining the calligraphy score results based on these similarities.
It improves the accuracy and efficiency of calligraphy scores, saves a lot of manpower and time, reduces the subjectivity of manual scores, and does not rely on database construction.
Smart Images

Figure CN114782962B_ABST
Abstract
Claims
1. A calligraphy scoring method, characterized in that, it includes: Obtain a calligraphy work image; Determine the single-character area corresponding to a single character in the calligraphy work image; According to the single-character area, determine the first contour area of the single character and the second contour area of the traced character corresponding to the single character; According to the first contour area and the second contour area, determine the contour similarity and centroid similarity between the single character and the traced character; According to the contour similarity and the centroid similarity, determine the calligraphy scoring result; The determining the contour similarity between the single character and the traced character according to the first contour area and the second contour area includes: Resample the first contour area and the second contour area to obtain a first point sequence corresponding to the first contour area and a second point sequence corresponding to the second contour area; According to the first point sequence and the second point sequence, determine the inner chord, outer chord and maximum chord height of the first contour area, and the inner chord, outer chord and maximum chord height of the second contour area; According to the inner chord, outer chord and maximum chord height of the first contour area, and the inner chord, outer chord and maximum chord height of the second contour area, determine the first local fluctuation factor sequence of the first contour area and the second local fluctuation factor sequence of the second contour area, where the inner chord is the sum of the lengths of multiple chord segments falling within the contour surface, the outer chord is the sum of the lengths of multiple chord segments falling outside the contour surface, the maximum chord height is the maximum distance from the curve segment of the point sequence to the chord, and the fluctuation factor characterizes the volatility of the contour segment around the chord; According to the first local fluctuation factor sequence and the second local fluctuation factor sequence, determine the first contour feature matrix of the first contour area and the second contour feature matrix of the traced character; According to the first contour feature matrix and the second contour feature matrix, determine the contour similarity between the first contour area and the second contour area to determine the contour similarity between the single character and the traced character.
2. The method according to claim 1, characterized in that, The determining the centroid similarity between the single character and the traced character according to the first contour area and the second contour area includes: According to the first point sequence and the second point sequence, determine the first centroid coordinate of the first contour area, the second centroid coordinate of the second contour area, and the maximum value of the second centroid coordinate in the coordinate direction; According to the first centroid coordinate, the second centroid coordinate and the maximum value of the second centroid coordinate in the coordinate direction, determine the centroid similarity.
3. The method according to claim 1 or 2, characterized in that, The determining the calligraphy scoring result according to the contour similarity and the centroid similarity includes: According to the contour similarity and the centroid similarity, determine the initial scoring result; Introduce a scaling factor and a translation factor, and adjust the initial scoring result through a logistic regression function to obtain the calligraphy scoring result.
4. The method according to claim 3, It is characterized in that the scaling factor and the translation factor are determined in the following manner: Determine a calligraphy work sample image, and each calligraphy work sample image includes multiple scoring results; Determine the average value of the multiple scoring results as the target scoring result; Minimize the error between multiple calligraphy work sample images and the calligraphy scoring results through the BP algorithm to determine the scaling factor and the translation factor.
5. The method according to claim 1, It is characterized in that the determination of the single-character region corresponding to a single character in the calligraphy work image includes: Input the calligraphy work image into a line detection model to obtain the line detection result output by the line detection model, and the line detection result includes an image marked with all the lines in the calligraphy work image; Determine the text region image according to the line detection result; Perform perspective transformation on the text region image to correct the angle of the text region image to obtain a corrected image; Perform mapping on the corrected image to determine the text spacing lines in the corrected image; Crop the corrected image according to the text spacing lines to determine the single-character region corresponding to a single character in the calligraphy work image.
6. The method according to claim 1, It is characterized in that the determination of the first contour region of the single character and the second contour region of the traced character corresponding to the single character according to the single-character region includes: Input the single-character region into a contour extraction model to obtain the contour extraction result output by the contour extraction model, and the contour extraction result includes the first contour region of the single character and the second contour region of the traced character corresponding to the single character; In the case where there are two or more connected components in the first contour region or the second contour region, the following operations are repeatedly executed: Calculate the shortest distance between each connected component and other connected components in the first contour region or the second contour region; Connect two connected components with the shortest distance.
7. A calligraphy scoring device, It is characterized in that it includes: An acquisition module configured to acquire a calligraphy work image; A first determination module configured to determine the single-character region corresponding to a single character in the calligraphy work image; A second determination module configured to determine the first contour region of the single character and the second contour region of the traced character corresponding to the single character according to the single-character region; A third determination module configured to determine the contour similarity and centroid similarity between the single character and the traced character according to the first contour region and the second contour region; A fourth determination module configured to determine the calligraphy scoring result according to the contour similarity and the centroid similarity; The third determination module is configured to: Resample the first contour region and the second contour region to obtain a first point sequence corresponding to the first contour region and a second point sequence corresponding to the second contour region; According to the first point sequence and the second point sequence, determine the inner chord, outer chord, and maximum chord height of the first contour region, and the inner chord, outer chord, and maximum chord height of the second contour region; Determine a first local fluctuation factor sequence of the first contour region and a second local fluctuation factor sequence of the second contour region according to the inner chord, outer chord, and maximum chord height of the first contour region, and the inner chord, outer chord, and maximum chord height of the second contour region, where the inner chord is the sum of the lengths of a plurality of chord segments falling within the contour surface, the outer chord is the sum of the lengths of a plurality of chord segments falling outside the contour surface, the maximum chord height is the maximum distance from the curve segment of the point sequence to the chord, and the fluctuation factor characterizes the volatility of the contour segment around the chord; Determine a first contour feature matrix of the first contour region and a second contour feature matrix of the traced text according to the first local fluctuation factor sequence and the second local fluctuation factor sequence; Determine the contour similarity between the first contour region and the second contour region according to the first contour feature matrix and the second contour feature matrix, so as to determine the contour similarity between the single character and the traced text.
8. A non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, the steps of the method according to any one of claims 1-6 are implemented.
9. An electronic device, characterized in that, comprising: a memory, on which a computer program is stored; a processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1-6.
Citation Information
Patent Citations
Calligraphy copy intelligent evaluation and guidance method based on computer vision
CN112800936A