A calligraphy restoration method based on crowdsourcing

Through the crowdsourcing-based calligraphy restoration method, combined with image processing and expert crowdsourcing technology, and using the evaluation model of convex hull contour and stroke characteristics, the problem of time-consuming and loss of detailed characteristics in the existing technology is solved, and the calligraphy restoration effect is achieved with efficient and detailed retention.

CN114332874BActive Publication Date: 2025-04-15ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111647561.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-04-15
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The existing calligraphy restoration technology takes a long time, and automatic repair methods are difficult to retain the detailed characteristics of calligraphy fonts, and rely on a large amount of real data, making it difficult to apply to the fonts of calligraphers with fewer existing works.

Method used

The final repair font is selected through image denoising, binarization, connection area detection and expert crowdsourcing repair, combined with the evaluation score model of convex hull contour features, stroke features and font structure distribution features.

Benefits of technology

It improves the efficiency of calligraphy restoration, retains the detailed characteristics of calligraphy fonts, reduces dependence on real data, and is suitable for font restoration of different calligraphers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332874B_ABST
    Figure CN114332874B_ABST
Patent Text Reader

Abstract

The invention discloses a method for calligraphy restoration based on crowdsourcing, comprising separating complete structure fonts and incomplete structure fonts from a calligraphy image to be restored, restoring the incomplete structure fonts using an expert crowdsourcing method to obtain a restoration font set, selecting restoration fonts similar to the incomplete structure convex hull contour through a convex hull contour feature module to obtain a second restoration font set, selecting a third restoration font set similar to the complete structure stroke feature from the second restoration font set through a stroke feature module, selecting a final restoration font similar to the incomplete structure key position area from the third restoration font set through a font structure distribution feature module, and completing the restoration of the incomplete structure font. The method requires less real data and has a high restoration efficiency. The fonts restored using the method have better calligraphy font detail features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of text image restoration, and in particular relates to a calligraphy restoration method based on crowdsourcing. Background Art

[0002] Calligraphy is regarded as a form of expression with high artistic value in cultures all over the world. In the five thousand years of Chinese civilization, culture is an indispensable part of communication. my country has a long history and culture, and multi-ethnic cultures have merged with each other. There was once a glorious moment of a hundred schools of thought contending and a hundred flowers blooming. Over the long years, many of the historical relics we have discovered today are incomplete and damaged. Calligraphy characters are an important form of cultural communication. The protection of historical relics, the protection of the text in the incomplete historical relics, and the restoration of the text in the incomplete historical relics to their original state are the most urgent problems that many calligraphers, archaeologists and historical and cultural research enthusiasts need to solve.

[0003] Most of the existing calligraphy works were created in ancient times. Due to natural conditions such as time, temperature, and humidity, these works have been damaged to varying degrees in the process of inheritance and collection. This has certain obstacles to the study of historical culture, and it is difficult to fully appreciate the artistic conception and cultural background of the time when the author wrote this text. Studies have shown that the Chinese characters on the cultural relics left over from history are damaged to varying degrees, which is a bad phenomenon for studying ancient Chinese culture and protecting historical relics.

[0004] For example, the Yu Shinan version of "Lanting Xu" has 324 characters, but most of the font structures are seriously missing and the outlines are blurred, making it difficult to recognize its true appearance. "Lanting Xu" is known as "the best running script in the world" and is a treasure in the history of Chinese calligraphy and even in traditional culture. Using modern technology to restore calligraphy is of great significance to the protection of ancient books and cultural relics and the inheritance of Chinese culture.

[0005] At present, calligraphy restoration is divided into manual restoration and automated restoration. Manual restoration generally includes "washing" (clearing paper), "uncovering" (dividing paper), "repairing" (repairing characters), and "completeness" (polishing characters). The process is time-consuming and requires a lot of professional skills. Automated restoration includes traditional image restoration methods and image restoration based on deep learning. Compared with manual restoration, automated restoration is more efficient and does not require professional skills, but its restoration results often lose the characteristics of calligraphy fonts, such as "dry brush" and "flying white". In addition, automated restoration, especially restoration methods based on deep learning, rely on a large amount of real data and are not suitable for repairing the fonts of calligraphers with fewer surviving works.

[0006] Therefore, there is an urgent need to develop a restoration method that can avoid the long time-consuming process, the loss of detailed characteristics of the calligraphy font after restoration, and the reliance on a large amount of real data during the restoration process. Summary of the invention

[0007] The present invention provides a calligraphy restoration method based on crowdsourcing, which requires less real data and has higher restoration efficiency. The font restored by the method has better detail features of calligraphy fonts.

[0008] A calligraphy restoration method based on crowdsourcing, comprising:

[0009] (1) performing image denoising and image binarization on the first calligraphy image to be restored to obtain a second calligraphy image to be restored, using a connected region detection algorithm to segment the second calligraphy image to be restored to obtain a first complete structural font and an incomplete structural font, and using an expert crowdsourcing method to restore the incomplete structural font to obtain a first restored font set;

[0010] (2) constructing a repaired font evaluation score model, which includes a convex hull contour feature module, a stroke feature module, and a font structure distribution feature module;

[0011] Among them, the convex hull contour feature module is used to use Fourier coefficients to obtain the convex hull contour feature vectors of the incomplete structure font and each first repair font respectively, calculate the Euclidean distance between the convex hull contour feature vectors of the incomplete structure font and each of the first repair fonts, use the Euclidean distance as the convex hull contour similarity score, and select multiple repair fonts that reach the convex hull contour similarity score threshold from the first repair font set as the second repair font set; the stroke feature module is used to calculate the mean of the stroke feature probability distribution difference value between each second repair font and the complete structure font by using the KL divergence method, and select multiple repair fonts that reach the stroke feature difference value mean threshold from the second repair font set as the third repair font set;

[0012] The font structure distribution feature module is used to collect key point positions of the convex hull contours of the third repair font and the incomplete structure font using a skeleton refinement algorithm, and input the collection results into the cloud model to obtain the key position area feature vector of the third repair font and the key position area feature vector of the incomplete structure font respectively, and use the difference between the key position area feature vector of the third repair font and the key position area feature vector of the incomplete structure font as the structure key position area score, and select the repair font that reaches the structure key position area score threshold from the third repair font set as the final repair font to complete the incomplete structure font repair.

[0013] Performing image denoising and image binarization on the first calligraphy image to be restored to obtain a second calligraphy image to be restored, including:

[0014] The Guide-filter image denoising algorithm is used to denoise the first calligraphy image to be restored to obtain a third calligraphy image to be restored. The OTSU algorithm is used to determine the binarization threshold. Based on the binarization threshold, the third calligraphy image to be restored is binarized to obtain a second calligraphy image to be restored.

[0015] The connected region detection algorithm is used to segment the second calligraphy image to be repaired to obtain a complete structure font and an incomplete structure font, including:

[0016] Through the connected area detection algorithm, the fonts with a connected area less than 100 are regarded as complete structural fonts, and the fonts with a connected area greater than 100 are regarded as incomplete structural fonts.

[0017] After obtaining the first complete structural font, the image morphological processing method is used to fill the internal holes of the strokes of the first complete structural font, and the spots on the outer side of the strokes are removed to obtain the second complete structural font. Then, the middle finger filtering method is used to smooth the stroke contours of the second complete structural font to obtain the final complete structural font, so as to complete the repair of the first complete structural font.

[0018] The convex hull contour similarity score D is:

[0019]

[0020]

[0021]

[0022] Where z(k) is the Fourier coefficient of the kth pixel in the convex hull contour, p(k) is the coordinate of the kth pixel in the convex hull contour, j is an imaginary number, i is the order of the Fourier series, F is the number of Fourier coefficients, f is the convex hull contour feature vector, and f can is the convex hull contour feature vector of the first repaired font, f ori is the convex hull contour feature vector of the incomplete structural font, N is the number of convex hull contour pixel points, and n is a real number.

[0023] The stroke features include stroke inclination, stroke strength, stroke rectangularity and stroke roundness;

[0024] The steps of constructing the stroke inclination are first fitting the skeleton corresponding to the stroke into a skeleton straight line, and then taking the angle between the skeleton straight line and the horizontal direction as the stroke inclination;

[0025] The strength of the stroke is:

[0026]

[0027]

[0028] Among them, d i is the minimum distance between point i on the skeleton and other points on the skeleton contour, x i and i Respectively represent the horizontal and vertical coordinates of point i on the skeleton, X and Y represent the horizontal and vertical coordinate point sets on the convex hull contour except point i, M is the number of points on the skeleton, and d is the average value of the minimum distance of all points on the skeleton;

[0029] The stroke rectangularity is:

[0030] rectangularity=s1 / s2 (6)

[0031] Where s1 is the minimum enclosing rectangle area of ​​the stroke outline, and s2 is the area of ​​the stroke outline;

[0032] The stroke circularity is:

[0033]

[0034] Wherein, L represents the perimeter of the stroke outline.

[0035] Used to calculate the mean difference between the stroke feature probability distribution of each second repaired font and the complete structure font using the KL divergence method for:

[0036]

[0037]

[0038]

[0039] in, is the stroke feature probability distribution difference value when the stroke feature is λ, λ=1 means the stroke feature is the stroke inclination, λ=2 means the stroke feature is the stroke force, λ=3 means the stroke feature is the stroke rectangularity, λ=4 means the stroke feature is the stroke roundness, is the stroke feature probability distribution of the second repaired font, is the stroke feature probability distribution of the complete structural font, j is the stroke index, j=1, 2, 3, 4 represent horizontal, vertical, left-falling and right-falling strokes respectively, J is the number of stroke categories, σ 1,j,λ is the jth stroke set variance of the λth stroke feature of the second repaired font, σ 2,j,λ is the jth stroke set variance of the λth stroke feature of the complete structural font, μ 1,j,λis the j-th stroke set mean of the λ-th stroke feature of the second repaired font, μ 2j,λ is the j-th stroke set mean of the λ-th stroke feature of the complete structural font, is a hidden variable.

[0040] The difference between the feature vector of the third repaired font key position region and the feature vector of the incomplete structural font key position region is taken as the structural key position region score C:

[0041]

[0042] Among them, l is the key point index, S is the number of key points, E(l) is the feature vector of the key position area of ​​the incomplete structure font, F(l) is the feature vector of the key position area of ​​the third repaired font, and both E(l) and F(l) are represented by expectation, entropy and super entropy.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] (1) The present invention achieves the purpose of first screening the crowdsourced repair fonts by comparing the convex hull contour features of the incomplete structural fonts in the calligraphy original with the crowdsourced repair fonts, then compares the stroke features of the first screened crowdsourced repair fonts with the complete structural fonts through KL divergence, screens the crowdsourced repair fonts from the first screened crowdsourced repair fonts for a second time, then compares the convex hull contour key area features of the second screened crowdsourced repair fonts with the incomplete structural fonts, screens out the final crowdsourced repair fonts from the second screened crowdsourced repair fonts, and completes the repair of the incomplete structural fonts; because the method provided by the present invention retains the repair fonts with a high degree of similarity to the convex hull contour and its key area and stroke features in the original, the calligraphy font detail feature characteristics are relatively completely retained, and because only the complete structural fonts in the original are used to repair, less real data is used, thereby improving modeling and operation efficiency.

[0045] (2) The present invention utilizes image morphological processing methods and middle finger filtering methods to repair complete fonts, which has a higher repair efficiency compared to manual repair. In addition, the repair font evaluation score model is also used in the process of repairing incomplete structures, which further improves the repair efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a crowdsourcing-based calligraphy restoration method provided for a specific implementation;

[0047] Figure 2 A flowchart of font segmentation provided for a specific implementation method;

[0048] Figure 3 A schematic diagram of a convex hull outline of a font provided for a specific implementation;

[0049] Figure 4 A schematic diagram of font stroke features provided for a specific implementation method;

[0050] Figure 5 A schematic diagram of a combination font provided for a specific implementation method;

[0051] Figure 6 A schematic diagram of the locations of key points of a font provided for a specific implementation method;

[0052] Figure 7 A character segmentation interface in a system description interface constructed using a calligraphy repair method based on crowdsourcing provided for a specific implementation;

[0053] Figure 8 A character repair interface in a system description interface constructed using a calligraphy repair method based on crowdsourcing provided for a specific implementation;

[0054] Fig. 9 A character repair download interface in a system description interface constructed using a calligraphy repair method based on crowdsourcing provided for a specific implementation method;

[0055] Fig.10 A character evaluation interface in a system description interface constructed using a crowdsourcing-based calligraphy restoration method provided for a specific implementation;

[0056] Fig.11 Probability distribution diagram of evaluation of restored fonts selected by a calligraphy restoration method based on crowdsourcing and restored fonts selected by experts provided for a specific implementation;

[0057] Fig.12 The calligraphy restoration method based on crowdsourcing, deep learning method, and traditional method provided for the specific implementation method are used to obtain the restored font;

[0058] Fig.13 The crowdsourcing-based calligraphy restoration method, deep learning method, and traditional method provided for the specific implementation method obtain the restoration font selection probability map. DETAILED DESCRIPTION

[0059] The present invention provides a calligraphy restoration method based on crowdsourcing, such as Figure 1 As shown, the specific steps are as follows: the calligraphy image to be repaired is segmented into calligraphy fonts. Due to the complexity of the running script calligraphy, it is difficult for the automatic method to accurately identify the fonts for segmentation. The present invention adopts a human-machine collaborative method, such as Figure 2As shown, the Guide-filter image denoising algorithm is used to denoise the first calligraphy image to be repaired, and then the third calligraphy image to be repaired is obtained through expert repair, the OTSU algorithm is used to determine the binarization threshold, and based on the binarization threshold, the third calligraphy image to be repaired is binarized to obtain the second calligraphy image to be repaired, and the connected area detection algorithm is used to segment the second calligraphy image to be repaired, and the first complete structure font (font with a connected area less than 100) and incomplete structure font (font with a connected area greater than 100) are obtained through expert decision-making to complete the segmentation of the calligraphy font.

[0060] The first complete structural font is repaired by machine, and the internal holes of the strokes of the first complete structural font are filled by image morphological processing method, and the spots on the outer side of the strokes are removed to obtain the second complete structural font. Then, the middle finger filtering method is used to smooth the stroke contours of the second complete structural font to obtain the final complete structural font, so as to complete the repair of the first complete structural font. The incomplete structural font is repaired through expert crowdsourcing to obtain the first repaired font set.

[0061] A repair font evaluation score model is constructed to screen the first repair font set to obtain the final repair font of the incomplete structural font. The specific steps are:

[0062] Constructing a repaired font evaluation score model, which includes a convex hull contour feature module, a stroke feature module, and a font structure distribution feature module;

[0063] Among them, the convex hull contour feature module, such as Figure 3 As shown, it is used to use Fourier coefficients to obtain the convex hull contour feature vectors of the incomplete structural font (original character) and each first repair font (candidate character), calculate the Euclidean distance between the convex hull contour feature vectors of the incomplete structural font and each of the first repair fonts, use the Euclidean distance as the convex hull contour similarity score, and select multiple repair fonts that reach the convex hull contour similarity score threshold from the first repair font set as the second repair font set;

[0064] The convex hull contour similarity score D is:

[0065]

[0066]

[0067]

[0068] Where z(k) is the Fourier coefficient of the kth pixel in the convex hull contour, p(k) is the coordinate of the kth pixel in the convex hull contour, j is an imaginary number, i is the order of the Fourier series, F is the number of Fourier coefficients, f is the convex hull contour feature vector, and fcan is the convex hull contour feature vector of the first repaired font, f ori is the convex hull contour feature vector of the incomplete structural font, N is the number of convex hull contour pixel points, and n is a real number.

[0069] The stroke feature module is used to calculate the mean of the difference values ​​of the stroke feature probability distribution between each second repair font and the complete structure font by using the KL divergence method, and select multiple repair fonts that reach the stroke feature difference mean threshold from the second repair font set as the third repair font set;

[0070] Stroke features include stroke inclination, stroke strength, stroke rectangularity, and stroke roundness, such as Figure 4 As shown; wherein, the step of constructing the stroke inclination is first fitting the skeleton corresponding to the stroke into a skeleton straight line, and then taking the angle between the skeleton straight line and the horizontal direction as the stroke inclination;

[0071] The strength of the stroke is:

[0072]

[0073]

[0074] Among them, d i is the minimum distance between point i on the skeleton and other points on the skeleton contour, x i and i Respectively represent the horizontal and vertical coordinates of point i on the skeleton, X and Y represent the horizontal and vertical coordinate point sets on the convex hull contour except point i, M is the number of points on the skeleton, and d is the average value of the minimum distance of all points on the skeleton;

[0075] The stroke rectangularity is:

[0076] rectangularity=S1 / S2 (6)

[0077] Where S1 is the minimum enclosing rectangle area of ​​the stroke outline, and S2 is the area of ​​the stroke outline;

[0078] The stroke circularity is:

[0079]

[0080] Wherein, L represents the perimeter of the stroke outline.

[0081] Used to calculate the mean difference between the stroke feature probability distribution of each second repaired font and the complete structure font using the KL divergence method for:

[0082]

[0083]

[0084]

[0085] Among them, is the difference value of the stroke feature probability distribution with stroke feature λ. λ = 1 represents that the stroke feature is the stroke inclination, λ = 2 represents that the stroke feature is the stroke force, λ = 3 represents that the stroke feature is the stroke rectangularity, and λ = 4 represents that the stroke feature is the stroke circularity. is the stroke feature probability distribution of the second repaired font. is the stroke feature probability distribution of the complete structure font. j is the stroke index. j = 1, 2, 3, 4 represent horizontal, vertical, left-falling, and right-falling strokes respectively. J is the number of stroke categories, and σ 1,j,λ is the variance of the j-th stroke set of the λ-th stroke feature of the second repaired font, and σ 2,j,λ is the variance of the j-th stroke set of the λ-th stroke feature of the complete structure font, and μ 1,j,λ is the mean of the j-th stroke set of the λ-th stroke feature of the second repaired font, and μ 2j,λ is the mean of the j-th stroke set of the λ-th stroke feature of the complete structure font. is the latent variable.

[0086] The structures of calligraphy characters are divided into various types such as upper-lower structure, left-right structure, enclosed structure, semi-enclosed structure, etc. The glyph outlines of some structures with incomplete structures are severely damaged. In order to explore the possible forms of the repaired fonts with severely damaged outlines, new repaired fonts are generated by combining the repaired fonts with the same structure. For example, Figure 5 as shown, the "tu" part of font a in Figure 5 is replaced with the "tu" part of font b in Figure 5 to obtain font c in Figure 5 . In order to evaluate the quality of the repaired fonts, a distribution feature module of the font structure is defined based on the convex hull contour feature module.

[0087] The font structure distribution feature module, as shown in Figure 6As shown, a skeleton refinement algorithm is used to collect key point positions of the convex hull contour of the third repair font (repaired text) and the convex hull contour of the incomplete structure font (original text), and the collection results are input into the cloud model to obtain the key position area feature vector of the third repair font and the key position area feature vector of the incomplete structure font respectively, and the difference between the key position area feature vector of the third repair font and the key position area feature vector of the incomplete structure font is used as the structure key position area score, and the repair font that reaches the structure key position area score threshold is selected from the third repair font set as the final repair font of the incomplete structure font, and the repair of the calligraphy image to be repaired is completed by the final repair font of the incomplete structure font and the repair font of the complete structure.

[0088] The score C of the key structural position area is:

[0089]

[0090] Among them, l is the key point index, S is the number of key points, E(l) is the feature vector of the key position area of ​​the incomplete structure font, F(l) is the feature vector of the key position area of ​​the third repaired font, and both E(l) and F(l) are represented by expectation, entropy and super entropy.

[0091] The LanT system is constructed using the crowdsourcing-based calligraphy restoration method provided by the present invention:

[0092] The present invention designs a website to implement the entire restoration process, including three steps: character segmentation, character restoration, and character evaluation. First, the denoised image is displayed in the interface. Experts can use the eraser tool to remove residual noise or strokes, and then use the algorithm to mark the character rectangle in the binary image, such as Figure 7 All characters are segmented into separate images for the next step of character restoration. The characters with complete structures are restored by median filtering with different parameters, and the best character is selected from the waiting list by sliding the waiting list, as shown in Figure 8 As shown in Figure 2, experts select the best one from these repaired characters as the final result, and characters with incomplete structures are repaired by expert crowdsourcing. Fig. 9 As shown in , experts can download cards or upload completed cards. The cards collected by crowdsourcing are segmented into individual characters for evaluation, presenting the original characters (incomplete structural fonts) and candidate characters (repaired fonts), as shown in Fig.10 As shown in Figure 2, the distribution characteristics of key points in the convex hull contour of the character are used to visualize the difference between the restored character and the original character. A score is provided for each character based on the value of the feature difference. Experts can use the score and feature difference map to decide the final restoration result.

[0093] In order to evaluate the reliability of machine algorithms in the crowdsourcing process, 30 experts with calligraphy experience were invited to evaluate through an online questionnaire. Ten groups of fonts were prepared, each containing one incomplete institutional font and nine repaired fonts. For each group of fonts, each expert selected three fonts similar to the incomplete institutional font from the repaired fonts. The selected fonts received 1 point, and the unselected fonts received 0 points. Finally, the probability of the expert selecting each repaired font was obtained. Fig.11 The evaluation probability graph of the repaired fonts selected by experts and the calligraphy repair algorithm based on crowdsourcing. The results show that the indexes of the candidate characters most likely to be selected by experts are 1, 2, and 4, and the least likely to be selected are 3, 8, and 9. The indexes of the candidate characters most likely to be selected by the calligraphy repair method based on crowdsourcing are 1, 4, and 7, and the least likely to be selected are 3, 8, and 9. It shows that the machine algorithm and the expert selection are highly consistent, indicating that the font evaluation model proposed in this paper has a certain reliability.

[0094] To evaluate the credibility of expert crowdsourcing font restoration, the method of the present invention is compared with the traditional method and the deep learning method. The traditional method uses an extended erosion algorithm and a median filter for each font, and selects the top two results from each font for expert comparison. Ten groups of fonts are displayed online, each group contains 6 fonts, and these fonts are restored by the traditional method, the deep learning method, and the method of the present invention, such as Fig.12 Invite 20 participants with rich calligraphy knowledge to select the two best fonts in each group. The frequency distribution of the participants' choices is shown in Fig.13 The results show that 80% of the participants choose the method of the present invention, 13% of the participants choose the deep learning method, and 7% of the participants choose the traditional method, indicating that calligraphy font repair by the present invention has a certain degree of credibility.

Claims

1. A calligraphy restoration method based on crowdsourcing, characterized in that: include: (1) performing image denoising and image binarization on the first calligraphy image to be restored to obtain a second calligraphy image to be restored, using a connected region detection algorithm to segment the second calligraphy image to be restored to obtain a first complete structural font and an incomplete structural font, and using an expert crowdsourcing method to restore the incomplete structural font to obtain a first restored font set; (2) constructing a repaired font evaluation score model, which includes a convex hull contour feature module, a stroke feature module, and a font structure distribution feature module; The convex hull contour feature module is used to obtain the convex hull contour feature vectors of the incomplete structural font and each first repair font respectively by using Fourier coefficients, calculate the Euclidean distance between the convex hull contour feature vector of the incomplete structural font and the convex hull contour feature vector of each first repair font, use the Euclidean distance as the convex hull contour similarity score, and select multiple repair fonts that reach the convex hull contour similarity score threshold from the first repair font set as the second repair font set; The stroke feature module is used to calculate the mean of the difference values ​​of the stroke feature probability distribution between each second repair font and the complete structure font by using the KL divergence method, and select multiple repair fonts that reach the stroke feature difference mean threshold from the second repair font set as the third repair font set; The font structure distribution feature module is used to collect key point positions of the convex hull contours of the third repair font and the incomplete structure font using a skeleton refinement algorithm, and input the collection results into the cloud model to obtain the key position area feature vector of the third repair font and the key position area feature vector of the incomplete structure font respectively, and use the difference between the key position area feature vector of the third repair font and the key position area feature vector of the incomplete structure font as the structure key position area score, and select the repair font that reaches the structure key position area threshold from the third repair font set as the final repair font to complete the incomplete structure font repair.

2. The method for calligraphy restoration based on crowdsourcing according to claim 1, characterized in that: Performing image denoising and image binarization on the first calligraphy image to be restored to obtain a second calligraphy image to be restored, including: The Guide-filter image denoising algorithm is used to denoise the first calligraphy image to be restored to obtain a third calligraphy image to be restored. The OTSU algorithm is used to determine the binarization threshold. Based on the binarization threshold, the third calligraphy image to be restored is binarized to obtain a second calligraphy image to be restored.

3. The method for calligraphy restoration based on crowdsourcing according to claim 1, characterized in that: The connected region detection algorithm is used to segment the second calligraphy image to be repaired to obtain a complete structure font and an incomplete structure font, including: Through the connected area detection algorithm, the fonts with a connected area less than 100 are regarded as complete structural fonts, and the fonts with a connected area greater than 100 are regarded as incomplete structural fonts.

4. The method for calligraphy restoration based on crowdsourcing according to claim 1 or 3, characterized in that: After obtaining the first complete structural font, the image morphological processing method is used to fill the internal holes of the strokes of the first complete structural font, and the spots on the outer side of the strokes are removed to obtain the second complete structural font. Then, the middle finger filtering method is used to smooth the stroke contours of the second complete structural font to obtain the final complete structural font, so as to complete the repair of the first complete structural font.

5. The method for calligraphy restoration based on crowdsourcing according to claim 1, characterized in that: The convex hull contour similarity score D is: Where z(k) is the Fourier coefficient of the kth pixel in the convex hull contour, p(k) is the coordinate of the kth pixel in the convex hull contour, j is an imaginary number, i is the order of the Fourier series, F is the number of Fourier coefficients, f is the convex hull contour feature vector, and f can is the convex hull contour feature vector of the first repaired font, f ori is the convex hull contour feature vector of the incomplete structural font, N is the number of convex hull contour pixel points, and n is a real number.

6. The method for calligraphy restoration based on crowdsourcing according to claim 1, characterized in that: Stroke features include stroke inclination, stroke strength, stroke rectangularity, and stroke roundness; The steps of constructing the stroke inclination are first fitting the skeleton corresponding to the stroke into a skeleton straight line, and then taking the angle between the skeleton straight line and the horizontal direction as the stroke inclination; The strength of the stroke is: Among them, d i is the minimum distance between point i on the skeleton and other points on the skeleton contour, x i and i Respectively represent the horizontal and vertical coordinates of point i on the skeleton, X and Y represent the horizontal and vertical coordinate point sets on the convex hull contour except point i, M is the number of points on the skeleton; d is the average value of the minimum distance of all points on the skeleton; The stroke rectangularity is: rectangularity=S1 / S2 (6) Among them, S1 is the minimum enclosing rectangle area of ​​the stroke outline, and S2 is the area of ​​the stroke outline; The circularity of the stroke is: Wherein, L represents the perimeter of the stroke outline.

7. The method for calligraphy restoration based on crowdsourcing according to claim 1, characterized in that: Used to calculate the mean of the difference between the stroke feature probability distribution of each second repaired font and the complete structure font using the KL divergence method for: in, is the stroke feature probability distribution difference value when the stroke feature is λ, λ=1 means the stroke feature is the stroke inclination, λ=2 means the stroke feature is the stroke force, λ=3 means the stroke feature is the stroke rectangularity, λ=4 means the stroke feature is the stroke roundness, is the stroke feature probability distribution of the second repaired font, is the stroke feature probability distribution of the complete structural font, j is the stroke index, j=1, 2, 3, 4 represent horizontal, vertical, left-falling, right-falling, J is the number of stroke categories, σ 1,j,λ is the jth stroke set variance of the λth stroke feature of the second repaired font, σ 2,j,λ is the jth stroke set variance of the λth stroke feature of the complete structural font, μ 1,j,λ is the j-th stroke set mean of the λ-th stroke feature of the second repaired font, μ 2j,λ is the j-th stroke set mean of the λ-th stroke feature of the complete structural font, is a hidden variable.

8. The method for calligraphy restoration based on crowdsourcing according to claim 1, characterized in that: The difference between the feature vector of the third repaired font key position region and the feature vector of the incomplete structural font key position region is taken as the structural key position region score C: Among them, l is the key point index, S is the number of key points, E(l) is the feature vector of the key position area of ​​the incomplete structure font, F(l) is the feature vector of the key position area of ​​the third repaired font, and both E(l) and F(l) are represented by expectation, entropy and super entropy.