Artificial intelligence-based handwritten font erasing method, device, equipment and medium
Through the handwritten font erasing method based on artificial intelligence, preprocessing, correction and feature matching technologies are used to identify and erase handwritten fonts, solving the problem of low accuracy of printed and handwritten recognition in the existing technology, and realizing non-standard Efficient text recognition and processing.
Patent Information
- Application Number
- CN202210610130.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-05-31
AI Technical Summary
It is difficult to accurately identify and distinguish printed and handwritten fonts with existing technology, especially non-standard text, resulting in low recognition accuracy.
The handwritten font erasing method based on artificial intelligence is used to obtain the printed feature set and Chinese character lattice through preprocessing, correction, and segmentation of the image, for matching and recognition, fine matching of handwritten font image blocks, and erasure processing.
It improves the accuracy of handwritten font recognition and automatic erasure effect, reduces recognition errors, and achieves accurate recognition and processing of non-standard text.
Smart Images

Figure CN114937274B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based handwritten font erasing method, device, equipment and medium. Background Art
[0002] With the continuous development of artificial intelligence, more and more complex and repetitive tasks have been performed by machines instead of humans.
[0003] In the field of text recognition, the recognition of printed and handwritten fonts has great application prospects in the fields of intelligent marking, test paper restoration, scan cleaning, and digitization of ancient books. By erasing handwritten fonts, the original printed content can be effectively restored.
[0004] However, printed text includes not only text in various fonts, but also various non-text contents. How to automatically recognize these contents to distinguish printed text from handwritten fonts is still a big challenge. In addition, most of the current processing methods can only recognize printed text, and cannot accurately recognize various non-standard texts. Summary of the invention
[0005] In view of the above, it is necessary to provide a handwriting erasing method, device, equipment and medium based on artificial intelligence, aiming to solve the problem that various non-standard characters cannot be accurately recognized.
[0006] A method for erasing handwritten fonts based on artificial intelligence, the method for erasing handwritten fonts based on artificial intelligence comprising:
[0007] When receiving an image to be processed, preprocessing the image to be processed to obtain a first image;
[0008] Correcting the first image to obtain a second image;
[0009] Segmenting the second image to obtain at least one image block;
[0010] Acquire a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result;
[0011] identifying at least one candidate image block from the at least one image block according to the first matching result;
[0012] Acquire a printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result;
[0013] identifying a handwritten font image block from the at least one candidate image block according to the second matching result;
[0014] The handwritten font image block is erased from the image to be processed to obtain a target image.
[0015] According to a preferred embodiment of the present invention, preprocessing the image to be processed to obtain the first image includes:
[0016] Traversing each pixel in the image to be processed, and calculating the grayscale value of each traversed pixel;
[0017] Determine the grayscale threshold;
[0018] Determine the pixel points whose grayscale value is greater than or equal to the grayscale threshold as white, and determine the pixel points whose grayscale value is less than the grayscale threshold as black, to obtain a first intermediate image;
[0019] The first intermediate image is filtered to obtain the first image.
[0020] According to a preferred embodiment of the present invention, determining the grayscale threshold comprises:
[0021] Get the minimum grayscale value and the maximum grayscale value from the grayscale value of each pixel;
[0022] Calculate the average value of the sum of the minimum grayscale value and the maximum grayscale value to obtain the initial value of the grayscale threshold;
[0023] Iterate from the initial value until the gray threshold converges, and then stop iterating;
[0024] Determine the current value of the grayscale threshold as the grayscale threshold;
[0025] Among them, in each iteration, the value of the grayscale threshold in the current iteration process is determined as the segmentation basis, the image to be processed is segmented into foreground and background, the average grayscale value of the pixels of the foreground is calculated as the first grayscale value, and the average grayscale value of the pixels of the background is calculated as the second grayscale value, the average of the first grayscale value and the second grayscale value is calculated, and the value of the grayscale threshold in the next iteration is obtained.
[0026] According to a preferred embodiment of the present invention, correcting the first image to obtain the second image includes:
[0027] Denoising the first image to obtain a second intermediate image;
[0028] calculating an image gradient of the second intermediate image, and determining a first candidate edge of the second intermediate image according to the image gradient;
[0029] Using a non-maximum suppression algorithm to select a second candidate edge from the first candidate edge;
[0030] Obtaining a preconfigured first threshold and a second threshold, wherein the first threshold is greater than the second threshold;
[0031] Establishing a first edge set using edges in the second candidate edges that are greater than the first threshold;
[0032] Establishing a second edge set using edges in the second candidate edges that are less than or equal to the first threshold and greater than or equal to the second threshold;
[0033] Establishing a third edge set using edges in the second candidate edges that are smaller than the second threshold;
[0034] Deleting edges from the second candidate edge set;
[0035] retaining edges in the second edge set that are greater than the first threshold value from among the second candidate edges, and retaining edges in the first edge set, to obtain an edge image of the first image;
[0036] Identifying a non-closed contour in the edge image, and performing dilation processing on the non-closed contour to obtain a dilated image;
[0037] Performing transmission transformation on the dilated image to obtain the second image.
[0038] According to a preferred embodiment of the present invention, before obtaining the pre-constructed printed feature set, the method further includes:
[0039] Get training samples;
[0040] Using the training samples to train the Mask R-CNN network to obtain a feature extraction model;
[0041] Obtain historical printed images;
[0042] Extracting features of the historical printed image using the feature extraction model;
[0043] The printed feature set is constructed using the extracted features.
[0044] According to a preferred embodiment of the present invention, identifying at least one candidate image block from the at least one image block according to the first matching result comprises:
[0045] Get pre-configured feature thresholds;
[0046] When the first matching result shows that the similarity between any image block and the features of the printed feature set is less than the feature threshold, the any image block is determined as the candidate image block.
[0047] According to a preferred embodiment of the present invention, erasing the handwritten font image block from the image to be processed to obtain a target image comprises:
[0048] On the image to be processed, connecting the lines of the handwritten font image block to obtain a connection area;
[0049] Obtaining the background color of the image to be processed;
[0050] Filling the connected area with the background color to obtain a third intermediate image;
[0051] The third intermediate image is filtered to obtain the target image.
[0052] A handwriting font erasing device based on artificial intelligence, the handwriting font erasing device based on artificial intelligence comprising:
[0053] A preprocessing unit, configured to preprocess the image to be processed to obtain a first image when receiving the image to be processed;
[0054] A correction unit, used for correcting the first image to obtain a second image;
[0055] a segmentation unit, configured to segment the second image to obtain at least one image block;
[0056] A matching unit, configured to obtain a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result;
[0057] an identification unit, configured to identify at least one candidate image block from the at least one image block according to the first matching result;
[0058] The matching unit is further used to obtain a printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result;
[0059] The recognition unit is further configured to recognize a handwritten font image block from the at least one candidate image block according to the second matching result;
[0060] The erasing unit is used to erase the handwritten font image block from the image to be processed to obtain a target image.
[0061] A computer device, comprising:
[0062] a memory storing at least one instruction; and
[0063] The processor executes the instructions stored in the memory to implement the artificial intelligence-based handwriting erasing method.
[0064] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the artificial intelligence-based handwriting font erasing method.
[0065] It can be seen from the above technical solutions that the present invention can, when receiving an image to be processed, pre-process the image to be processed to obtain a first image to reduce the error and difficulty of a subsequent image processing process, correct the first image to obtain a second image to improve the accuracy of subsequent image processing, segment the second image to obtain at least one image block, obtain a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result, identify at least one candidate image block from the at least one image block according to the first matching result, and combine the printed features containing multiple types of printed features to obtain a first matching result. The feature set can not only recognize printed text types, but also recognize a variety of other types of printed text, reduce recognition errors, obtain printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result, identify a handwritten font image block from the at least one candidate image block according to the second matching result, perform a more refined secondary matching on the image block initially determined to be handwritten, further improve the accuracy of handwritten image block recognition, erase the handwritten font image block from the image to be processed, obtain the target image, and then combine artificial intelligence means to realize accurate and automatic erasure of handwritten fonts. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a flow chart of a preferred embodiment of the handwriting font erasing method based on artificial intelligence of the present invention.
[0067] Figure 2 It is a functional module diagram of a preferred embodiment of the handwriting font erasing device based on artificial intelligence of the present invention.
[0068] Figure 3 It is a structural schematic diagram of a computer device of a preferred embodiment of the present invention for implementing a handwriting font erasing method based on artificial intelligence. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0070] like Figure 1 FIG. 1 is a flowchart of a preferred embodiment of the handwriting font erasing method based on artificial intelligence of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0071] The artificial intelligence-based handwriting erasing method is applied to one or more computer devices, wherein the computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0072] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0073] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0074] The server can be an independent server 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, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0075] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0076] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0077] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0078] S10: When an image to be processed is received, preprocess the image to be processed to obtain a first image.
[0079] In this embodiment, the image to be processed may be a scanned image or a photo, etc., which is not limited in the present invention.
[0080] In at least one embodiment of the present invention, preprocessing the image to be processed to obtain the first image includes:
[0081] Traversing each pixel in the image to be processed, and calculating the grayscale value of each traversed pixel;
[0082] Determine the grayscale threshold;
[0083] Determine the pixel points whose grayscale value is greater than or equal to the grayscale threshold as white, and determine the pixel points whose grayscale value is less than the grayscale threshold as black, to obtain a first intermediate image;
[0084] The first intermediate image is filtered to obtain the first image.
[0085] Specifically, a Gaussian filtering algorithm may be used to filter the first intermediate image, and the present invention does not limit the filtering algorithm used.
[0086] In the above implementation, the image to be processed is first converted into a grayscale image to remove the color difference caused by color, lighting, etc., so as to reduce the difficulty of subsequent image processing, and then the image to be processed is made smoother through filtering to reduce the error of the subsequent image processing process.
[0087] Specifically, determining the grayscale threshold comprises:
[0088] Get the minimum grayscale value and the maximum grayscale value from the grayscale value of each pixel;
[0089] Calculate the average value of the sum of the minimum grayscale value and the maximum grayscale value to obtain the initial value of the grayscale threshold;
[0090] Iterate from the initial value until the gray threshold converges, and then stop iterating;
[0091] Determine the current value of the grayscale threshold as the grayscale threshold;
[0092] Among them, in each iteration, the value of the grayscale threshold in the current iteration process is determined as the segmentation basis, the image to be processed is segmented into foreground and background, the average grayscale value of the pixels of the foreground is calculated as the first grayscale value, and the average grayscale value of the pixels of the background is calculated as the second grayscale value, the average of the first grayscale value and the second grayscale value is calculated, and the value of the grayscale threshold in the next iteration is obtained.
[0093] For example, when the grayscale threshold is taken as A during a certain iteration, if the grayscale threshold is still taken as A during the next iteration and converges to A all the time, the iteration can be stopped and A can be determined as the final value of the grayscale threshold.
[0094] In the above implementation, the grayscale threshold can be automatically determined in an iterative manner, making the determination of the grayscale threshold more intelligent.
[0095] S11, correcting the first image to obtain a second image.
[0096] It should be noted that due to different shooting or scanning angles, the first image may have wrinkles, which may affect the image recognition effect. Therefore, the first image needs to be corrected.
[0097] In at least one embodiment of the present invention, correcting the first image to obtain the second image includes:
[0098] Denoising the first image to obtain a second intermediate image;
[0099] calculating an image gradient of the second intermediate image, and determining a first candidate edge of the second intermediate image according to the image gradient;
[0100] Using a non-maximum suppression algorithm to select a second candidate edge from the first candidate edge;
[0101] Obtaining a preconfigured first threshold and a second threshold, wherein the first threshold is greater than the second threshold;
[0102] Establishing a first edge set using edges in the second candidate edges that are greater than the first threshold;
[0103] Establishing a second edge set using edges in the second candidate edges that are less than or equal to the first threshold and greater than or equal to the second threshold;
[0104] Establishing a third edge set using edges in the second candidate edges that are smaller than the second threshold;
[0105] Deleting edges from the second candidate edge set;
[0106] retaining edges in the second edge set that are greater than the first threshold value from among the second candidate edges, and retaining edges in the first edge set, to obtain an edge image of the first image;
[0107] Identifying a non-closed contour in the edge image, and performing dilation processing on the non-closed contour to obtain a dilated image;
[0108] Performing transmission transformation on the dilated image to obtain the second image.
[0109] The first threshold and the second threshold can be customized according to actual needs, which is not limited by the present invention.
[0110] Among them, through the expansion processing, it is possible to achieve local amplification of image features, which is convenient for subsequent processing.
[0111] Among them, through the transmission transformation, it is possible to realize processing such as rotation, stretching and wrinkle removal of the image to correct the direction of the image.
[0112] In the above-mentioned embodiment, the edge of the image is extracted and the extracted edge is locally enlarged to ensure that the features are clear and easy to process. The enlarged image is further automatically converted into a vertical angle from top to bottom through a transmission transformation. At the same time, the image stretching and wrinkle removal operations are realized, thereby realizing image correction to improve the accuracy of subsequent image processing.
[0113] S12: Segment the second image to obtain at least one image block.
[0114] In this embodiment, the second image may be segmented according to graphics, text, tables, lines, etc., which will not be described in detail here.
[0115] S13, obtaining a pre-constructed printed feature set, and matching each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result.
[0116] In at least one embodiment of the present invention, before obtaining the pre-built printed feature set, the method further includes:
[0117] Get training samples;
[0118] Using the training samples to train a Mask R-CNN (Mask Regions with CNN feature) network to obtain a feature extraction model;
[0119] Obtain historical printed images;
[0120] Extracting features of the historical printed image using the feature extraction model;
[0121] The printed feature set is constructed using the extracted features.
[0122] The training samples may be a large number of images with printed fonts.
[0123] The historical printed images are images with printed fonts that have been used in history.
[0124] The constructed printed feature set may include various types of printed features, such as text, tables, lines, etc. According to different requirements, the printed feature set can be continuously updated and improved to cover more and more comprehensive printed types, such as non-standard fonts such as ancient books, which can also be included in the printed feature set.
[0125] Through the above implementation, a printed feature set including various types of printed features is established based on artificial intelligence means, so that not only text type printed bodies can be recognized subsequently, but also various other types of printed bodies can be recognized, thereby reducing recognition errors.
[0126] Furthermore, when matching each image block in the at least one image block with the features of the printed feature set, the similarity between the features may be calculated (such as calculating the cosine similarity between the features, etc.), which will not be elaborated herein.
[0127] S14: Identify at least one candidate image block from the at least one image block according to the first matching result.
[0128] In at least one embodiment of the present invention, identifying at least one candidate image block from the at least one image block according to the first matching result comprises:
[0129] Get pre-configured feature thresholds;
[0130] When the first matching result shows that the similarity between any image block and the features of the printed feature set is less than the feature threshold, the any image block is determined as the candidate image block.
[0131] Through the above implementation, it is possible to implement preliminary screening of image blocks to screen out possible handwritten image blocks.
[0132] In this embodiment, when the first matching result shows that the similarity between any image block and the features of the printed feature set is greater than or equal to the feature threshold, it means that the current image block has a high similarity with the features in the printed feature set and is a printed image block.
[0133] S15, obtaining a printed Chinese character dot matrix, and matching each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result.
[0134] In this embodiment, the printed Chinese character dot matrix is universal and can be obtained online or on a related platform, and the present invention is not limited thereto.
[0135] In this embodiment, the method of "matching each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix" is similar to the method of "matching each image block in the at least one image block with the features of the printed feature set" described above, and will not be repeated here.
[0136] It is understandable that handwritten fonts are different from printed fonts in terms of image smoothness, color difference, writing traces, etc. Therefore, images smaller than the threshold value need to be compared in detail to determine whether they are printed fonts or typed fonts.
[0137] Through the above implementation, a more refined secondary matching can be performed on the image block initially determined to be handwritten, thereby further improving the accuracy of handwritten image block recognition.
[0138] S16: Identify a handwritten font image block from the at least one candidate image block according to the second matching result.
[0139] In this embodiment, the method of "identifying a handwritten font image block from the at least one candidate image block based on the second matching result" is similar to the method of "identifying at least one candidate image block from the at least one image block based on the first matching result" described above, and will not be repeated here.
[0140] Specifically, when performing matching and identification, different thresholds can be configured as a basis for similarity comparison according to actual needs.
[0141] S17, erasing the handwritten font image block from the image to be processed to obtain a target image.
[0142] In at least one embodiment of the present invention, erasing the handwritten font image block from the image to be processed to obtain a target image comprises:
[0143] On the image to be processed, connecting the lines of the handwritten font image block to obtain a connection area;
[0144] Obtaining the background color of the image to be processed;
[0145] Filling the connected area with the background color to obtain a third intermediate image;
[0146] The third intermediate image is filtered to obtain the target image.
[0147] Specifically, Gaussian filtering may be used to perform filtering processing on the third intermediate image.
[0148] In the above embodiment, the lines are first connected, and the image in the area formed after the connection is erased with the background color to preliminarily obtain an image after erasing the handwriting, and the noise in the image (such as small black dots remaining after erasing) is further weakened by filtering processing to obtain an image with better erasing effect of the handwriting.
[0149] It should be noted that in order to further improve the security of data and prevent data from being maliciously tampered with, the target image can be stored in a blockchain node.
[0150] It can be seen from the above technical solutions that the present invention can, when receiving an image to be processed, pre-process the image to be processed to obtain a first image to reduce the error and difficulty of a subsequent image processing process, correct the first image to obtain a second image to improve the accuracy of subsequent image processing, segment the second image to obtain at least one image block, obtain a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result, identify at least one candidate image block from the at least one image block according to the first matching result, and combine the printed features containing multiple types of printed features to obtain a first matching result. The feature set can not only recognize printed text types, but also recognize a variety of other types of printed text, reduce recognition errors, obtain printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result, identify a handwritten font image block from the at least one candidate image block according to the second matching result, perform a more refined secondary matching on the image block initially determined to be handwritten, further improve the accuracy of handwritten image block recognition, erase the handwritten font image block from the image to be processed, obtain the target image, and then combine artificial intelligence means to realize accurate and automatic erasure of handwritten fonts.
[0151] like Figure 2 , which is a functional module diagram of a preferred embodiment of the handwriting font erasing device based on artificial intelligence of the present invention. The handwriting font erasing device based on artificial intelligence 11 includes a preprocessing unit 110, a correction unit 111, a segmentation unit 112, a matching unit 113, a recognition unit 114, and an erasing unit 115. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and can complete fixed functions, which are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0152] When receiving the image to be processed, the preprocessing unit 110 preprocesses the image to be processed to obtain a first image.
[0153] In this embodiment, the image to be processed may be a scanned image or a photo, etc., which is not limited in the present invention.
[0154] In at least one embodiment of the present invention, the preprocessing unit 110 preprocesses the image to be processed to obtain the first image, which includes:
[0155] Traversing each pixel in the image to be processed, and calculating the grayscale value of each traversed pixel;
[0156] Determine the grayscale threshold;
[0157] Determine the pixel points whose grayscale value is greater than or equal to the grayscale threshold as white, and determine the pixel points whose grayscale value is less than the grayscale threshold as black, to obtain a first intermediate image;
[0158] The first intermediate image is filtered to obtain the first image.
[0159] Specifically, a Gaussian filtering algorithm may be used to filter the first intermediate image, and the present invention does not limit the filtering algorithm used.
[0160] In the above implementation, the image to be processed is first converted into a grayscale image to remove the color difference caused by color, lighting, etc., so as to reduce the difficulty of subsequent image processing, and then the image to be processed is made smoother through filtering to reduce the error of the subsequent image processing process.
[0161] Specifically, determining the grayscale threshold comprises:
[0162] Get the minimum grayscale value and the maximum grayscale value from the grayscale value of each pixel;
[0163] Calculate the average value of the sum of the minimum grayscale value and the maximum grayscale value to obtain the initial value of the grayscale threshold;
[0164] Iterate from the initial value until the gray threshold converges, and then stop iterating;
[0165] Determine the current value of the grayscale threshold as the grayscale threshold;
[0166] Among them, in each iteration, the value of the grayscale threshold in the current iteration process is determined as the segmentation basis, the image to be processed is segmented into foreground and background, the average grayscale value of the pixels of the foreground is calculated as the first grayscale value, and the average grayscale value of the pixels of the background is calculated as the second grayscale value, the average of the first grayscale value and the second grayscale value is calculated, and the value of the grayscale threshold in the next iteration is obtained.
[0167] For example, when the grayscale threshold is taken as A during a certain iteration, if the grayscale threshold is still taken as A during the next iteration and converges to A all the time, the iteration can be stopped and A can be determined as the final value of the grayscale threshold.
[0168] In the above implementation, the grayscale threshold can be automatically determined in an iterative manner, making the determination of the grayscale threshold more intelligent.
[0169] The correction unit 111 corrects the first image to obtain a second image.
[0170] It should be noted that due to different shooting or scanning angles, the first image may have wrinkles, which may affect the image recognition effect. Therefore, the first image needs to be corrected.
[0171] In at least one embodiment of the present invention, the correction unit 111 corrects the first image to obtain the second image, including:
[0172] Denoising the first image to obtain a second intermediate image;
[0173] calculating an image gradient of the second intermediate image, and determining a first candidate edge of the second intermediate image according to the image gradient;
[0174] Using a non-maximum suppression algorithm to select a second candidate edge from the first candidate edge;
[0175] Obtaining a preconfigured first threshold and a second threshold, wherein the first threshold is greater than the second threshold;
[0176] Establishing a first edge set using edges in the second candidate edges that are greater than the first threshold;
[0177] Establishing a second edge set using edges in the second candidate edges that are less than or equal to the first threshold and greater than or equal to the second threshold;
[0178] Establishing a third edge set using edges in the second candidate edges that are smaller than the second threshold;
[0179] Deleting edges from the second candidate edge set;
[0180] retaining edges in the second edge set that are greater than the first threshold value from among the second candidate edges, and retaining edges in the first edge set, to obtain an edge image of the first image;
[0181] Identifying a non-closed contour in the edge image, and performing dilation processing on the non-closed contour to obtain a dilated image;
[0182] Performing transmission transformation on the dilated image to obtain the second image.
[0183] The first threshold and the second threshold can be customized according to actual needs, which is not limited by the present invention.
[0184] Among them, through the expansion processing, it is possible to achieve local amplification of image features, which is convenient for subsequent processing.
[0185] Among them, through the transmission transformation, it is possible to realize processing such as rotation, stretching and wrinkle removal of the image to correct the direction of the image.
[0186] In the above-mentioned embodiment, the edge of the image is extracted and the extracted edge is locally enlarged to ensure that the features are clear and easy to process. The enlarged image is further automatically converted into a vertical angle from top to bottom through a transmission transformation. At the same time, the image stretching and wrinkle removal operations are realized, thereby realizing image correction to improve the accuracy of subsequent image processing.
[0187] The segmentation unit 112 segments the second image to obtain at least one image block.
[0188] In this embodiment, the second image may be segmented according to graphics, text, tables, lines, etc., which will not be described in detail here.
[0189] The matching unit 113 obtains a pre-constructed printed feature set, and matches each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result.
[0190] In at least one embodiment of the present invention, before obtaining the pre-constructed printed feature set, a training sample is obtained;
[0191] Using the training samples to train a Mask R-CNN (Mask Regions with CNN feature) network to obtain a feature extraction model;
[0192] Obtain historical printed images;
[0193] Extracting features of the historical printed image using the feature extraction model;
[0194] The printed feature set is constructed using the extracted features.
[0195] The training samples may be a large number of images with printed fonts.
[0196] The historical printed images are images with printed fonts that have been used in history.
[0197] The constructed printed feature set may include various types of printed features, such as text, tables, lines, etc. According to different requirements, the printed feature set can be continuously updated and improved to cover more and more comprehensive printed types, such as non-standard fonts such as ancient books, which can also be included in the printed feature set.
[0198] Through the above implementation, a printed feature set including various types of printed features is established based on artificial intelligence means, so that not only text type printed bodies can be recognized subsequently, but also various other types of printed bodies can be recognized, thereby reducing recognition errors.
[0199] Furthermore, when matching each image block in the at least one image block with the features of the printed feature set, the similarity between the features may be calculated (such as calculating the cosine similarity between the features, etc.), which will not be elaborated herein.
[0200] The identification unit 114 identifies at least one candidate image block from the at least one image block according to the first matching result.
[0201] In at least one embodiment of the present invention, the identifying unit 114 identifies at least one candidate image block from the at least one image block according to the first matching result, including:
[0202] Get pre-configured feature thresholds;
[0203] When the first matching result shows that the similarity between any image block and the features of the printed feature set is less than the feature threshold, the any image block is determined as the candidate image block.
[0204] Through the above implementation, it is possible to implement preliminary screening of image blocks to screen out possible handwritten image blocks.
[0205] In this embodiment, when the first matching result shows that the similarity between any image block and the features of the printed feature set is greater than or equal to the feature threshold, it means that the current image block has a high similarity with the features in the printed feature set and is a printed image block.
[0206] The matching unit 113 obtains a printed Chinese character dot matrix, and matches each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result.
[0207] In this embodiment, the printed Chinese character dot matrix is universal and can be obtained online or on a related platform, and the present invention is not limited thereto.
[0208] In this embodiment, the method of "matching each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix" is similar to the method of "matching each image block in the at least one image block with the features of the printed feature set" described above, and will not be repeated here.
[0209] It is understandable that handwritten fonts are different from printed fonts in terms of image smoothness, color difference, writing traces, etc. Therefore, images smaller than the threshold value need to be compared in detail to determine whether they are printed fonts or typed fonts.
[0210] Through the above implementation, a more refined secondary matching can be performed on the image block initially determined to be handwritten, thereby further improving the accuracy of handwritten image block recognition.
[0211] The recognition unit 114 recognizes a handwritten font image block from the at least one candidate image block according to the second matching result.
[0212] In this embodiment, the method of "identifying a handwritten font image block from the at least one candidate image block based on the second matching result" is similar to the method of "identifying at least one candidate image block from the at least one image block based on the first matching result" described above, and will not be repeated here.
[0213] Specifically, when performing matching and identification, different thresholds can be configured as a basis for similarity comparison according to actual needs.
[0214] The erasing unit 115 erases the handwritten font image block from the image to be processed to obtain a target image.
[0215] In at least one embodiment of the present invention, the erasing unit 115 erases the handwritten font image block from the image to be processed to obtain the target image, including:
[0216] On the image to be processed, connecting the lines of the handwritten font image block to obtain a connection area;
[0217] Obtaining the background color of the image to be processed;
[0218] Filling the connected area with the background color to obtain a third intermediate image;
[0219] The third intermediate image is filtered to obtain the target image.
[0220] Specifically, Gaussian filtering may be used to perform filtering processing on the third intermediate image.
[0221] In the above embodiment, the lines are first connected, and the image in the area formed after the connection is erased with the background color to preliminarily obtain an image after erasing the handwriting, and the noise in the image (such as small black dots remaining after erasing) is further weakened by filtering processing to obtain an image with better erasing effect of the handwriting.
[0222] It should be noted that in order to further improve the security of data and prevent data from being maliciously tampered with, the target image can be stored in a blockchain node.
[0223] It can be seen from the above technical solutions that the present invention can, when receiving an image to be processed, pre-process the image to be processed to obtain a first image to reduce the error and difficulty of a subsequent image processing process, correct the first image to obtain a second image to improve the accuracy of subsequent image processing, segment the second image to obtain at least one image block, obtain a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result, identify at least one candidate image block from the at least one image block according to the first matching result, and combine the printed features containing multiple types of printed features to obtain a first matching result. The feature set can not only recognize printed text types, but also recognize a variety of other types of printed text, reduce recognition errors, obtain printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result, identify a handwritten font image block from the at least one candidate image block according to the second matching result, perform a more refined secondary matching on the image block initially determined to be handwritten, further improve the accuracy of handwritten image block recognition, erase the handwritten font image block from the image to be processed, obtain the target image, and then combine artificial intelligence means to realize accurate and automatic erasure of handwritten fonts.
[0224] like Figure 3, which is a schematic diagram of the structure of a computer device of a preferred embodiment of the present invention for implementing the handwriting font erasing method based on artificial intelligence.
[0225] The computer device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a handwriting erasing program based on artificial intelligence.
[0226] Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may be a bus-type structure or a star-type structure. The computer device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.
[0227] It should be noted that the computer device 1 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.
[0228] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 can also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 can also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed in the computer device 1, such as the code of a handwriting font erasing program based on artificial intelligence, but also can be used to temporarily store data that has been output or is to be output.
[0229] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and uses various interfaces and lines to connect various components of the entire computer device 1, and executes or executes programs or modules stored in the memory 12 (for example, executing a handwriting font erasing program based on artificial intelligence, etc.), and calls data stored in the memory 12 to execute various functions of the computer device 1 and process data.
[0230] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned embodiments of the handwriting font erasing method based on artificial intelligence, for example Figure 1 Steps shown.
[0231] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a preprocessing unit 110, a correction unit 111, a segmentation unit 112, a matching unit 113, a recognition unit 114, and an erasing unit 115. The preprocessing unit 110, the correction unit 111, the segmentation unit 112, the matching unit 113, the recognition unit 114, and the erasing unit 115.
[0232] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute the part of the handwriting font erasing method based on artificial intelligence described in various embodiments of the present invention.
[0233] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0234] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.
[0235] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0236] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0237] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by only one straight line, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.
[0238] Although not shown, the computer device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 13 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The computer device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0239] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.
[0240] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device 1 and to display a visual user interface.
[0241] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0242] Figure 3 Only the computer device 1 having components 12-13 is shown, and it can be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0243] Combination Figure 1 , the memory 12 in the computer device 1 stores a plurality of instructions to implement a handwriting font erasing method based on artificial intelligence, and the processor 13 can execute the plurality of instructions to implement:
[0244] When receiving an image to be processed, preprocessing the image to be processed to obtain a first image;
[0245] Correcting the first image to obtain a second image;
[0246] Segmenting the second image to obtain at least one image block;
[0247] Acquire a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result;
[0248] identifying at least one candidate image block from the at least one image block according to the first matching result;
[0249] Acquire a printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result;
[0250] identifying a handwritten font image block from the at least one candidate image block according to the second matching result;
[0251] Erasing the handwritten font image block from the image to be processed to obtain a target image. When the image to be processed is received, preprocessing the image to be processed to obtain a first image;
[0252] Correcting the first image to obtain a second image;
[0253] Segmenting the second image to obtain at least one image block;
[0254] Acquire a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result;
[0255] identifying at least one candidate image block from the at least one image block according to the first matching result;
[0256] Acquire a printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result;
[0257] identifying a handwritten font image block from the at least one candidate image block according to the second matching result;
[0258] The handwritten font image block is erased from the image to be processed to obtain a target image.
[0259] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0260] It should be noted that the data involved in this case were all obtained legally.
[0261] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0262] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0263] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0264] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0265] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0266] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0267] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0268] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A handwriting erasing method based on artificial intelligence, characterized in that: The artificial intelligence-based handwriting erasing method comprises: When receiving an image to be processed, preprocessing the image to be processed to obtain a first image; Correcting the first image to obtain a second image; Segmenting the second image to obtain at least one image block; Acquire a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result; identifying at least one candidate image block from the at least one image block according to the first matching result; Acquire a printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result; identifying a handwritten font image block from the at least one candidate image block according to the second matching result; Erasing the handwritten font image block from the image to be processed to obtain a target image; The correcting the first image to obtain the second image comprises: Denoising the first image to obtain a second intermediate image; calculating an image gradient of the second intermediate image, and determining a first candidate edge of the second intermediate image according to the image gradient; Using a non-maximum suppression algorithm to select a second candidate edge from the first candidate edge; Obtaining a preconfigured first threshold and a second threshold, wherein the first threshold is greater than the second threshold; Establishing a first edge set using edges in the second candidate edges that are greater than the first threshold; Establishing a second edge set using edges in the second candidate edges that are less than or equal to the first threshold and greater than or equal to the second threshold; Establishing a third edge set using edges in the second candidate edges that are smaller than the second threshold; Deleting edges from the second candidate edge set; retaining edges in the second edge set that are greater than the first threshold value from among the second candidate edges, and retaining edges in the first edge set, to obtain an edge image of the first image; Identifying a non-closed contour in the edge image, and performing dilation processing on the non-closed contour to obtain a dilated image; Performing a transmission transformation on the dilated image to obtain the second image; The step of identifying at least one candidate image block from the at least one image block according to the first matching result comprises: Get pre-configured feature thresholds; When the first matching result shows that the similarity between any image block and the feature of the printed feature set is less than the feature threshold, determining the any image block as the candidate image block; When the first matching result shows that the similarity between any image block and the feature of the printed feature set is greater than or equal to the feature threshold, determining the any image block as a printed image block; The printed feature set includes one or more of the following printed features: text, table and line.
2. The artificial intelligence-based handwriting erasing method according to claim 1, characterized in that: The preprocessing of the image to be processed to obtain the first image comprises: Traversing each pixel in the image to be processed, and calculating the grayscale value of each traversed pixel; Determine the grayscale threshold; Determine the pixel points whose grayscale value is greater than or equal to the grayscale threshold as white, and determine the pixel points whose grayscale value is less than the grayscale threshold as black, to obtain a first intermediate image; The first intermediate image is filtered to obtain the first image.
3. The artificial intelligence-based handwriting erasing method according to claim 2, characterized in that: Determining the grayscale threshold comprises: Get the minimum grayscale value and the maximum grayscale value from the grayscale value of each pixel; Calculate the average value of the sum of the minimum grayscale value and the maximum grayscale value to obtain the initial value of the grayscale threshold; Iterate from the initial value until the gray threshold converges, and then stop iterating; Determine the current value of the grayscale threshold as the grayscale threshold; Among them, in each iteration, the value of the grayscale threshold in the current iteration process is determined as the segmentation basis, the image to be processed is segmented into foreground and background, the average grayscale value of the pixels of the foreground is calculated as the first grayscale value, and the average grayscale value of the pixels of the background is calculated as the second grayscale value, the average of the first grayscale value and the second grayscale value is calculated, and the value of the grayscale threshold in the next iteration is obtained.
4. The artificial intelligence-based handwriting erasing method according to claim 1, characterized in that: Before obtaining the pre-built printed feature set, the method further includes: Get training samples; Using the training samples to train the Mask R-CNN network to obtain a feature extraction model; Obtain historical printed images; Extracting features of the historical printed image using the feature extraction model; The printed feature set is constructed using the extracted features.
5. The artificial intelligence-based handwriting erasing method according to claim 1, characterized in that: Erasing the handwritten font image block from the image to be processed to obtain a target image comprises: On the image to be processed, connecting the lines of the handwritten font image block to obtain a connection area; Obtaining the background color of the image to be processed; Filling the connected area with the background color to obtain a third intermediate image; The third intermediate image is filtered to obtain the target image.
6. A handwriting erasing device based on artificial intelligence, characterized in that: The handwriting font erasing device based on artificial intelligence comprises: A preprocessing unit, configured to preprocess the image to be processed to obtain a first image when receiving the image to be processed; A correction unit, used for correcting the first image to obtain a second image; a segmentation unit, configured to segment the second image to obtain at least one image block; A matching unit, configured to obtain a pre-constructed printed feature set, and match each image block in the at least one image block with a feature of the printed feature set to obtain a first matching result; an identification unit, configured to identify at least one candidate image block from the at least one image block according to the first matching result; The matching unit is further used to obtain a printed Chinese character dot matrix, and match each candidate image block in the at least one candidate image block with the printed Chinese character dot matrix to obtain a second matching result; The recognition unit is further configured to recognize a handwritten font image block from the at least one candidate image block according to the second matching result; An erasing unit, used for erasing the handwritten font image block from the image to be processed to obtain a target image; The correction unit corrects the first image to obtain a second image, comprising: Denoising the first image to obtain a second intermediate image; calculating an image gradient of the second intermediate image, and determining a first candidate edge of the second intermediate image according to the image gradient; Using a non-maximum suppression algorithm to select a second candidate edge from the first candidate edge; Obtaining a preconfigured first threshold and a second threshold, wherein the first threshold is greater than the second threshold; Establishing a first edge set using edges in the second candidate edges that are greater than the first threshold; Establishing a second edge set using edges in the second candidate edges that are less than or equal to the first threshold and greater than or equal to the second threshold; Establishing a third edge set using edges in the second candidate edges that are smaller than the second threshold; Deleting edges from the second candidate edge set; retaining edges in the second edge set that are greater than the first threshold value from among the second candidate edges, and retaining edges in the first edge set, to obtain an edge image of the first image; Identifying a non-closed contour in the edge image, and performing dilation processing on the non-closed contour to obtain a dilated image; Performing a transmission transformation on the dilated image to obtain the second image; The identifying unit identifying at least one candidate image block from the at least one image block according to the first matching result includes: Get pre-configured feature thresholds; When the first matching result shows that the similarity between any image block and the feature of the printed feature set is less than the feature threshold, determining the any image block as the candidate image block; When the first matching result shows that the similarity between any image block and the feature of the printed feature set is greater than or equal to the feature threshold, determining the any image block as a printed image block; The printed feature set includes one or more of the following printed features: text, table and line.
7. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the handwriting font erasing method based on artificial intelligence as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the artificial intelligence-based handwriting font erasing method as described in any one of claims 1 to 5.
