Text font standardization processing method and system based on personnel file image

By using generative adversarial networks and character grayscale normalization, the resolution loss caused by histogram equalization and the subjectivity of traditional manual processing are solved, realizing automated and standardized processing of personnel file images and improving the efficiency and quality of file digitization.

CN115457577BActive Publication Date: 2026-03-03ZHENGZHOU UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

When processing personnel file images, existing technologies suffer from resolution loss due to histogram equalization, and traditional manual processing is subject to subjective influences, making it difficult to effectively remove blur and meet standardization requirements.

Method used

A deblurring algorithm based on generative adversarial networks is adopted, which combines character grayscale normalization and denoising. Through adversarial training between the generator and the discriminator, the image quality is optimized to achieve the preset blur and grayscale standards. Edge detection and wavelet transform are used for denoising to achieve automated evaluation.

Benefits of technology

It has achieved automated and intelligent evaluation of archival images, reduced human interference, improved the visual effect and processing efficiency of digital archival images, and meets the requirements of the "Technical Specifications for Digitization of Personnel Archives".

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115457577B_ABST
    Figure CN115457577B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of digital archives management, and particularly relates to a text font standardization processing method and system based on personnel archives images, which collects to-be-processed archives image data; and performs font deblurring standardization processing on the to-be-processed archives image data to obtain image data meeting a preset blurring degree standard; performs character gray scale standardization processing on the image data meeting the preset blurring degree standard to obtain image data meeting a preset gray scale standard; and performs de-noising processing on the obtained image data meeting the preset gray scale standard and outputs the same. The present application adopts a series of processing such as image de-noising, character positioning, character contrast enhancement, high-definition processing, etc., realizes character gray scale evaluation and character blurring degree evaluation, can automatically and intelligently judge, reduces the interference of human factors, is convenient for efficiently and conveniently realizing one-key archives image standardization whole process, improves the processing efficiency of archives processing, and lays a solid foundation for paper archives digital processing automation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital archives management technology, and specifically relates to a method and system for standardizing text fonts based on personnel file images. Background Technology

[0002] With the rapid development of e-government, the digitization of archives has become an inevitable trend. According to the "Technical Specifications for Digitization of Personnel Archives," scanned digital archive texts need to be deblurred, have their contrast enhanced, and retain their original appearance to the greatest extent possible based on standardized indicators, in order to avoid the subjective influence caused by the standardization of traditional manual text processing.

[0003] In traditional methods, a relatively effective way to improve the quality of text images is to use histogram equalization. However, histogram equalization sacrifices resolution by merging image gray levels. Since the original text already has a certain degree of blurriness, using histogram enhancement will increase the blurriness of the font. Summary of the Invention

[0004] Therefore, this invention provides a method and system for text font standardization processing based on personnel file images. By performing noise reduction, positioning, deblurring, and grayscale standardization on the text in the file images, the efficiency of digital file processing is improved and the visual effect of digital file images is enhanced.

[0005] According to the design scheme provided by this invention, a method for standardizing text fonts based on personnel file images is provided, comprising the following:

[0006] Collect image data of the archives to be processed;

[0007] The font deblurring and standardization process is performed on the archival image data to be processed to obtain image data that meets the preset blurriness standard;

[0008] Perform character grayscale normalization processing on image data that meets the preset fuzziness standard to obtain image data that meets the preset grayscale standard;

[0009] The acquired image data that conforms to the preset grayscale standard is denoised and then output.

[0010] As a text font standardization processing method based on personnel file images in this invention, further, in the font deblurring standardization processing, firstly, the inner and outer boundary lines of the character strokes in the file image data to be processed are located. Then, the edge blurring of the corresponding side of the character stroke is obtained based on the average gray value of the vertical lines of the inner and outer boundaries of each character region and the left and right boundaries inside the character strokes. The obtained edge blurring is compared with a preset blurring standard. The file text image data with edge blurring that meets the preset blurring standard is sent to the character grayscale standardization processing. For the file text image data with edge blurring that does not meet the preset blurring standard, the trained generative adversarial network is used to optimize the file text image data until the file text image data with edge blurring that meets the preset blurring standard is obtained.

[0011] As a text font standardization processing method based on personnel file images in this invention, the process of obtaining the edge ambiguity of the corresponding side of the character strokes includes the following: First, the position of the character in the image data is obtained using a preset maximum stable extreme value region, and the coordinates of the character rectangle are obtained according to the starting point and the length and width of the region where the character position is located; then, the obtained character rectangles are filtered to remove character rectangles without vertical strokes, and for each rectangle region, the inner boundary of the vertical line of the character is obtained through the horizontal projection map and the magnitude of the accumulated value; next, according to the horizontal projection map and the inner boundary, the left and right outer boundaries are coarsely estimated by using a simulated extreme value algorithm to find the left and right outer boundaries in sequence, and the maximum slope of the inner boundary is solved in sequence to the left and right within the coarse estimation interval of the left and right outer boundaries, and the index corresponding to the maximum slope to the left and right is recorded. The LSD line detection algorithm is used to extract the image at the corresponding position of the index interval in the original image data, and the precise outer boundary of the vertical line of a single character is located by index comparison filtering.

[0012] As a text font standardization processing method based on personnel file images in this invention, the generative adversarial network for optimizing the file text image data includes a generator for generating images and a discriminator for judging the authenticity of images. The file text image data with edge ambiguity that does not meet the preset ambiguity standard is input into the generator, the generator outputs the generated image, the discriminator judges the authenticity of the generated image, and the generator parameters are updated by backpropagation that fuses image content loss and network adversarial loss.

[0013] As a text font standardization processing method based on personnel file images in this invention, further, for the generated image output by the generator, an edge detection algorithm based on stroke trend prediction is used to obtain the edge features of the generated image and the preset clear image. The edge loss of the generated image is obtained by calculating the mean square error of the edge features of the two images. Based on the blurriness of the generated image and the preset clear image, the blurriness correction loss of the generated image is obtained by calculating the mean absolute error of the two images. The edge loss, blurriness correction loss and pixel difference loss are used as image content loss, and combined with network adversarial loss to construct a combined optimization objective loss function of generative adversarial network.

[0014] As a text font standardization processing method based on personnel file images of the present invention, further, in the character grayscale standardization processing, firstly, the average grayscale value of the pixels in the handwriting is calculated, and the average grayscale value is used as the grayscale index of the text image for matching with the preset grayscale standard; the font grayscale standardization processing is repeated for text images that do not conform to the preset grayscale standard until the text image conforms to the preset grayscale standard.

[0015] As a text font standardization processing method based on personnel file images of the present invention, the repeated processing of font grayscale standardization further includes the following: First, locate the text region in the image data; then, traverse the grayscale value of each pixel in the text region, use a window function to calculate the edge weighting value of the center element of the window, use the edge weighting value to obtain the transformed grayscale value of each pixel in the text region, and then perform matching processing with the preset grayscale standard again.

[0016] As a text font standardization processing method based on personnel file images in this invention, the formula for calculating the edge weighting value of the center element of the window using a window function is further expressed as follows: Among them, G ij It is the grayscale value of the pixel at coordinates (i, j) within the window, Δ ij It is a pixel edge operator with coordinates (i, j) within the window, where U represents the window region, θ represents the pixel point belonging to window U, and n×n is the window size.

[0017] As a text font standardization processing method based on personnel file images of the present invention, in the denoising process of the acquired image data that conforms to the preset grayscale standard, firstly, the image is denoised for the first time by a bilateral filtering denoising algorithm based on spatial domain pixel features, and then, the image after the first denoising is denoised again by wavelet transform in the transform domain.

[0018] Furthermore, the present invention also provides a text font standardization processing system based on personnel file images, comprising: an image collection module, an image blurring processing module, an image grayscale processing module, and an image denoising output module, wherein,

[0019] Image collection module, used to collect image data of the archives to be processed;

[0020] The image blur processing module is used to perform font deblurring and standardization processing on the file image data to be processed, so as to obtain image data that meets the preset blur standard.

[0021] The image grayscale processing module is used to perform character grayscale standardization processing on image data that conforms to the preset fuzziness standard, and obtain image data that conforms to the preset grayscale standard.

[0022] The image denoising output module is used to denoise the acquired image data that conforms to the preset grayscale standard and then output it.

[0023] The beneficial effects of this invention are:

[0024] This invention employs a series of processes, including image denoising, text positioning, text contrast enhancement, and high-definition processing, to achieve character grayscale evaluation and character fuzziness evaluation. It enables automatic and intelligent judgment, reduces interference from human factors, and facilitates efficient and convenient one-click standardization of archival images throughout the entire process. This improves the processing efficiency of archival materials and lays a solid foundation for the automation of paper archive digitization. Attached image description:

[0025] Figure 1 This is a schematic diagram of the text font standardization process based on personnel file images in the embodiment;

[0026] Figure 2 This is a schematic diagram illustrating the vertical line positioning effect of a single character in the example.

[0027] Figure 3 This is a schematic diagram of the evaluation index process in the embodiment;

[0028] Figure 4 This is a schematic diagram of the DeBlurGAN network framework in the embodiment;

[0029] Figure 5 This is a schematic diagram of the image deblurring algorithm in the embodiment;

[0030] Figure 6 This is a schematic diagram illustrating the text region positioning effect in the embodiment;

[0031] Figure 7 W in the example nn Solution diagram;

[0032] Figure 8 In the example, Δ ij Solution diagram;

[0033] Figure 9 This is a schematic diagram of a sliding window in an embodiment. Detailed implementation method:

[0034] To make the objectives, technical solutions, and advantages of this invention clearer and more understandable, the invention will be further described in detail below with reference to the accompanying drawings and technical solutions.

[0035] In traditional methods, histogram equalization is a relatively effective way to improve the quality of text images. However, histogram equalization sacrifices resolution by merging image gray levels. Since the original text already has a certain degree of blurriness, using histogram enhancement in this case will increase the blurriness of the font. This invention provides a method for text font standardization processing based on personnel file images, comprising: collecting file image data to be processed; performing font deblurring and standardization processing on the file image data to be processed to obtain image data conforming to a preset blurriness standard; performing character grayscale standardization processing on the image data conforming to the preset blurriness standard to obtain image data conforming to the preset grayscale standard; and performing denoising processing on the obtained image data conforming to the preset grayscale standard and outputting it.

[0036] Standardize the fonts in scanned archival images. For archival images that do not conform to the standards, see [link / reference]. Figure 1 As shown, image input devices such as scanners, fax machines, and digital cameras can be used to input document images as image data to be standardized. Through a series of processes including image denoising, text positioning, text contrast enhancement, and high-definition processing, the efficiency of digitizing archives is improved, while simultaneously enhancing the visual effect of digital archive images. Addressing issues such as high repetition, aesthetic fatigue, and boredom in the processing work, this embodiment, in accordance with the requirements of the "Technical Specifications for Digitizing Cadre Personnel Files," enables automated intelligent evaluation, including character grayscale evaluation and font fuzziness evaluation.

[0037] As a preferred embodiment, further, in the font deblurring and standardization process, firstly, the inner and outer boundary lines of the character strokes in the archival image data to be processed are located. Then, the edge blurring of the corresponding side of the character strokes is obtained based on the average grayscale value of the vertical lines of the inner and outer boundaries of each character region and the left and right boundaries inside the character strokes. The obtained edge blurring is compared with a preset blurring standard. Archival text image data with edge blurring that meets the preset blurring standard is sent to the character grayscale standardization process. For archival text image data with edge blurring that does not meet the preset blurring standard, the trained generative adversarial network is used to optimize the archival text image data until the archival text image data with edge blurring that meets the preset blurring standard is obtained.

[0038] When the archive image to be processed enters the blur index evaluation, it is necessary to evaluate the blur standard. First, the inner (mid) and outer (left, right) boundary lines of the vertical strokes of the text in the image are located. The specific implementation process can be designed as follows:

[0039] (1) The MSER algorithm can be used to obtain a series of maximum stable extremum regions as preset maximum stable extremum data. The maximum stable region detection interface is then called to obtain the (x,y) starting point and (w,h) region length and width of the area where the text is located in the image. Thus, the positions of all text in the document image are obtained, i.e., a series of rectangular box coordinates.

[0040] (2) Randomly select 1 / 5 of the text rectangles for processing. First, perform text filtering. The filtering condition is to obtain a horizontal projection of the image of the area where the text box is located, and find the column with the highest column number. If the value of the highest point of the column is less than 1 / 2 of the image height, it is considered that the text has no vertical strokes, and therefore it is filtered out. The types of text to be filtered out are as follows: Figure 2 As shown in (a) and (b); otherwise, select the correct option.

[0041] (3) For each selected rectangular area, use horizontal projection to obtain a horizontal projection image, and define the column with the highest cumulative value as the inner boundary mid of the vertical line of the text.

[0042] (4) The previous step has obtained the horizontal projection map and the inner boundary mid. Next, the horizontal projection map needs to be processed. A simulation algorithm for finding the extreme value is designed. The processing of the horizontal projection map can be compared with the processing of the array data to simulate the function to find the extreme value. The default mid is the maximum value of the array. Search left and right in turn for the first index number that starts to increase, which is the minimum value point. At this time, the left0 and right0 boundaries are roughly calculated.

[0043] (5) The previous steps have yielded left0, right0, and mid. Now, we need to further refine the inner and outer boundaries. We need to use an algorithm to find the maximum slope. Within the interval [left0, right0], we can find the maximum slopes K1 and K2 from mid to the left and right respectively. The corresponding indexes are left1 and right1.

[0044] (6) To further refine the outer boundary, the LSD line detection algorithm can be used. The image corresponding to [left1, right1] is cropped from the original image, and LSD line detection is performed to obtain a series of index subscripts. After processing with a custom boundary precision function, the index subscripts are compared and filtered with left1 and right1, ultimately obtaining the precise outer boundaries left and right. After this second refinement, the precise boundary of the vertical line of a single character is now located. The vertical stroke positioning effect can be observed, as shown below. Figure 2 As shown in (c)(d)(e).

[0045] (7) The above steps have determined the location of the inner and outer boundaries of the vertical lines in each text region. The average gray value of the inner boundary vertical line is Ymin, and the average gray values ​​of the left and right boundary vertical lines are LYmax and RYmax, respectively. According to the formula:

[0046] LY = Y min +70%*(LY) max -Y min (1)

[0047] RY=Y min +70%*(RY) max -Y min (2)

[0048] Find the position coordinates LG and RG corresponding to LY and RY inside the stroke, and denote the blur degree of the corresponding side edge of the stroke as B. The formula is:

[0049]

[0050] That is, the ambiguity B of the stroke is the average of the ambiguity of the two edges.

[0051] (8) Calculate the standard B of text blur in the image based on 1 / 5 of the text in the processed image, and compare it with the standard B of font blur in the archive image standardization file. T Comparison, less than B T If the font is blurry, then no high-definition processing is needed; otherwise, high-definition processing is required. A schematic diagram of the entire evaluation process is shown below. Figure 3 As shown.

[0052] When B>B T At that time, the archival image undergoes text deblurring. The text deblurring and standardization module uses a Generative Adversarial Network (GAN) to perform text deblurring. The GAN consists of a generator and a discriminator. During the entire GAN training process, the generator and discriminator compete with each other, improving their respective abilities until an optimal equilibrium is reached. The network framework is as follows: Figure 4As shown, the generator includes two downsampling convolutions, nine residual network blocks, and two upsampling transposed convolutional blocks. A dropout with a probability of 0.5 is added after the first convolutional layer in the residual network block to prevent overfitting. Instance normalization is also used in each convolutional layer to accelerate network convergence during training. Instance normalization normalizes the statistics in the image, avoiding the influence of other images. The discriminator network has a similar structure to a regular discriminator network. It continuously extracts features through a convolutional neural network and finally outputs the probability of an image being fake at the sigmoid output. The discriminator feeds the result back to the generator to optimize the quality of the generated images.

[0053] DeblurGAN uses a generator to generate images and a discriminator to distinguish between real and fake images. The network's loss function includes content loss and adversarial loss. To further optimize image generation, edge loss and font blur correction loss are added to the loss function. The specific steps are roughly as follows:

[0054] (1) By processing the Image_deblur image and the clear image generated by the generator, the edge detection algorithm based on stroke trend prediction is used to obtain the edge features of the two images. The mean square error of the two at the feature level is the edge loss. The text image is composed of some lines. In the edge-weighted font enhancement algorithm based on stroke trend prediction, the stroke trend information is first obtained by convolving with the pre-set stroke judgment template. Then, the text is edge-detected and weighted according to the stroke trend, which ultimately improves the contrast of the text lines, suppresses noise, and achieves the effect of image grayscale standardization.

[0055] (2) Using the previously proposed blur evaluation index algorithm, the blur level B of the image generated by the generator and the clear image are calculated respectively. i The average absolute error between the two is the blur correction loss. The edge loss, blur correction loss, and other losses are combined to optimize image generation.

[0056] (3) Edge loss and blur correction loss are introduced into the DeblurGAN-based image deblurring network. Edge loss, blur correction loss, and pixel difference loss are collectively referred to as content loss, and together with adversarial loss, they are used to optimize the network. The overall optimized loss is backpropagated and fed back to the generator to optimize the generator parameters, continuously enabling the generator to produce clearer images. The overall algorithm framework is as follows: Figure 5As shown, a blurred image (in tensor form) is input into the generator network, which outputs a generated image. This generated image (in tensor form) is then input into a trained discriminator network model, which outputs the probability that the image is fake. Simultaneously, quality loss is calculated between the generated and clear images. Finally, the content loss of the image and the adversarial loss are fused and backpropagated to update the parameters of the generator network, thereby optimizing the quality of the generated image. After passing through the deblurring and standardization module, the archival image undergoes another blurriness standard evaluation. If the standard is met, the next step is performed; otherwise, repeated font deblurring and standardization are performed.

[0057] In a preferred embodiment, further, in the character grayscale normalization process, firstly, the average grayscale value of pixels within the character handwriting is calculated, and this average grayscale value is used as the grayscale index of the text image for matching with a preset grayscale standard; text images that do not conform to the preset grayscale standard undergo repeated font grayscale normalization processing until the text image conforms to the preset grayscale standard. Further, the repeated font grayscale normalization processing includes the following: firstly, locating the text region in the image data; then, traversing the grayscale value of each pixel in the text region, using a window function to calculate the edge weighting value of the center element of the window, using this edge weighting value to obtain the transformed grayscale value of each pixel within the text region, and again performing matching processing with the preset grayscale standard.

[0058] After font deblurring and standardization, the archive image undergoes grayscale index evaluation. First, the Fast feature point detection algorithm is used to detect corner points and roughly locate pixels within the text strokes. The average grayscale value of the text is then calculated and used as the grayscale index G of the image. This is then compared with the grayscale standard index G in the standard file. T Comparison, if G > G T The image should undergo font grayscale normalization; if G <G T If G > G, then skip the grayscale normalization process and proceed to the next image processing module. T At this time, the archival image undergoes grayscale standardization, and the specific process can be designed as follows:

[0059] (1) Select the text region in the archive image. You can use the text detection model in PaddleOcr and obtain the region coordinates of the text by setting parameters such as det_limit_side_len = 1150 and det_limit_type = "max". The text region localization effect is shown below. Figure 6 As shown.

[0060] (2) For a selected text box area, iterate through the grayscale value of each pixel, take each traversed pixel as the center position, take a window of size n×n, and calculate the edge weighting value of the window. The formula can be expressed as follows:

[0061]

[0062] Among them: G ij It is the grayscale value of each pixel within the window, Δ ij This is the edge operator for each pixel within the window, where U represents the window region and θ represents the pixel within window U. The edge weighting value W of the center element of the window can be obtained from the above formula. nn This serves as an adaptive evaluation metric for window center pixel positioning in subsequent operations. A diagram illustrating the specific calculation process is shown below. Figure 7 As shown. For Δ ij The edge detection method based on stroke trend prediction can be used to obtain the edge value within the window U. n×n Calculate the Δ value for each pixel. ij In the process, firstly, the n×n neighborhood matrix of a certain pixel is obtained, and then it is convolved with 12 predefined stroke direction templates. The output with the largest convolution sum is the stroke direction type. Different edge detection operators are then applied based on the stroke direction. ij To obtain the edge detection operator, if the output matches template one (i.e., the stroke is predicted to be a horizontal line), the calculation method is as follows: Take a 9×9 neighborhood matrix block, divide it into nine 3×3 matrices, and name them as top left, top, top right, left, middle, right, bottom left, bottom, and bottom right, respectively. The Δ corresponding to template one... ij The calculation formula is: Δ ij =|XX * |, where X is the average gray level of the left, middle, and right matrix blocks, X * The grayscale mean of the center block is used to predict other stroke templates X and X'. * Each corresponds to a different calculation value. A schematic diagram of the process is shown below. Figure 8 As shown. A window sliding calculation method, optimized for computational speed, can be used. Copying the area containing the text box yields a matrix of all zeros, and the corresponding Δ values ​​are then calculated sequentially. ij Finally, the DetaIj matrix is ​​obtained, and then an n×n sliding window is used for W. nn The computational speed optimization is theoretically several times faster than simple traversal. The specific implementation algorithm is as follows: Figure 9 As shown.

[0063] (3) The pixels within the text box area were traversed one by one, and the W value of each pixel was calculated. nn The grayscale value of the transformed pixel

[0064] G′ ij It can be represented as:

[0065]

[0066] After the text in the entire archival image is standardized in grayscale, it is evaluated again in terms of grayscale standard. If it meets the standard, the next step is carried out; otherwise, the grayscale standardization of the repeated text is performed.

[0067] The archival image undergoes deblurring, standardization, and grayscale standardization. This process may introduce noise, making denoising necessary. The input image is first processed using a bilateral filtering denoising algorithm based on spatial domain pixel features, followed by a wavelet transform denoising process based on the transform domain. After these archival processing steps, the archival image conforms to the specified character grayscale and font blur standards in the document. The archival image then enters the output unit to complete the image output.

[0068] Furthermore, based on the above method, this embodiment of the invention also provides a text font standardization processing system based on personnel file images, comprising: an image collection module, an image blurring processing module, an image grayscale processing module, and an image denoising output module, wherein,

[0069] Image collection module, used to collect image data of the archives to be processed;

[0070] The image blur processing module is used to perform font deblurring and standardization processing on the file image data to be processed, so as to obtain image data that meets the preset blur standard.

[0071] The image grayscale processing module is used to perform character grayscale standardization processing on image data that conforms to the preset fuzziness standard, and obtain image data that conforms to the preset grayscale standard.

[0072] The image denoising output module is used to denoise the acquired image data that conforms to the preset grayscale standard and then output it.

[0073] In this embodiment, to address the issue of font blurriness in archival images failing to meet the specified standards in the document, a deblurring algorithm based on the DeblurGAN network can be used. The DeblurGAN generative adversarial network consists of a generator and a discriminator. Within the network, these two components compete against each other, improving their respective abilities until a balance is reached. During model training, edge loss and blur correction loss are introduced to optimize the network. This overall optimization loss is backpropagated to the generator to refine its parameters, continuously prompting the generator to produce clearer images that meet the blurriness standards.

[0074] To address the issue of character grayscale in archival images not conforming to the specifications in the standard document, an edge-weighted method based on font stroke trend prediction can be used. During stroke prediction, pixels are convolved with 12 predefined direction templates, and the stroke direction prediction is obtained by selecting the value with the largest output. Then, based on the stroke direction, a pixel-level edge-weighting calculation method is defined, thus achieving character grayscale standardization.

[0075] To address the issue that noise generated during the grayscale standardization and deblurring standardization processes of archival images can degrade the quality of standardized archival images, archival image smoothing processing can be employed. This can be achieved by using a bilateral filtering denoising algorithm based on spatial domain pixel features, or by using wavelet transform based on the transform domain. This approach can accurately locate the text in the archival image and establish archival standard evaluation indicators according to technical specifications. Adaptive grayscale can be used to enhance the text content of the archival images, thereby improving their visual effect.

[0076] Unless otherwise specifically stated, the relative steps, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the invention.

[0077] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0078] The units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations are not considered to be beyond the scope of this invention.

[0079] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiments can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiments can be implemented in hardware or as a software functional module. This invention is not limited to any particular combination of hardware and software.

[0080] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for standardizing text fonts based on personnel file images, characterized in that, Includes the following content: Collect image data of the archives to be processed; The process involves font deblurring and standardization of the archival image data to be processed, resulting in image data that conforms to a preset blurriness standard. In this process, firstly, the inner and outer boundaries of the character strokes in the archival image data are located. Then, based on the average grayscale value of the vertical lines at the inner and outer boundaries of each character region and the left and right boundaries within the character strokes, the edge blurriness of the corresponding sides of the character strokes is obtained. The obtained edge blurriness is compared with the preset blurriness standard. Archival text image data with edge blurriness conforming to the preset blurriness standard is fed into character grayscale standardization. For archival text image data with edge blurriness that does not conform to the preset blurriness standard, a trained generative adversarial network is used to optimize the archival text image data until archival text image data with edge blurriness conforming to the preset blurriness standard is obtained. The process of obtaining the edge blur of the corresponding side of the character strokes includes the following: First, the position of the character in the image data is obtained using a preset maximum stable extreme value region. The coordinates of the character rectangle are obtained based on the starting point and the length and width of the region where the character is located. Then, the obtained character rectangles are filtered to remove those without vertical strokes. For each rectangle region, the inner boundary of the vertical line of the character is obtained through the horizontal projection map and the magnitude of the accumulated value. Next, based on the horizontal projection map and the inner boundary, the simulation extreme value algorithm is used to find the left and right outer boundaries coarsely estimated sequentially. Based on the coarse estimates of the left and right outer boundaries and the inner boundary, the maximum slope of the inner boundary is calculated sequentially to the left and right within the coarse estimate interval of the left and right outer boundaries. The index corresponding to the maximum slope to the left and right is recorded. The LSD line detection algorithm is used to extract the image at the corresponding position of the index interval in the original image data. The precise outer boundary of the vertical line of a single character is located by index comparison filtering. Perform character grayscale normalization processing on image data that meets the preset fuzziness standard to obtain image data that meets the preset grayscale standard; The acquired image data that conforms to the preset grayscale standard is denoised and then output.

2. The text font standardization processing method based on personnel file images according to claim 1, characterized in that, The generative adversarial network for optimizing archival text and image data includes a generator for generating images and a discriminator for judging the authenticity of images. Archival text and image data with edge ambiguity that does not meet the preset ambiguity standard is input into the generator. The generator outputs the generated image, and the discriminator judges the authenticity of the generated image. The generator parameters are updated by backpropagation that fuses image content loss and network adversarial loss.

3. The text font standardization processing method based on personnel file images according to claim 2, characterized in that, For the generated image output by the generator, an edge detection algorithm based on stroke trend prediction is used to obtain the edge features of the generated image and the preset clear image. The edge loss of the generated image is obtained by calculating the mean square error of the edge features of the two images. Based on the blur of the generated image and the preset clear image, the blur correction loss of the generated image is obtained by calculating the mean absolute error of the two images. The edge loss, blur correction loss and pixel difference loss are used as image content loss, and combined with network adversarial loss to construct a combined optimization objective loss function of generative adversarial network.

4. The text font standardization processing method based on personnel file images according to claim 1, characterized in that, In the character grayscale normalization process, firstly, the average grayscale value of the pixels within the character handwriting is calculated, and this average grayscale value is used as the grayscale index of the character image to match the preset grayscale standard; for character images that do not conform to the preset grayscale standard, the font grayscale normalization process is repeated until the character image conforms to the preset grayscale standard.

5. The text font standardization processing method based on personnel file images according to claim 4, characterized in that, The repeated processing of font grayscale standardization includes the following steps: First, locate the text region in the image data; then, traverse the grayscale value of each pixel in the text region, use a window function to calculate the edge weighting value of the center element of the window, use this edge weighting value to obtain the transformed grayscale value of each pixel in the text region, and then match it with the preset grayscale standard again.

6. The text font standardization processing method based on personnel file images according to claim 5, characterized in that, The formula for calculating the edge weighting of the center element of a window using a window function is expressed as follows: ,in, The coordinates within the window are pixel grayscale values, The coordinates within the window are pixel edge operator, Indicates the window area. This represents the pixel that belongs to window U. It refers to the window size.

7. The text font standardization processing method based on personnel file images according to claim 1, characterized in that, In the denoising process of the acquired image data that meets the preset grayscale standard, firstly, a bilateral filtering denoising algorithm based on spatial domain pixel features is used to denoise the image for the first time. Then, wavelet transform in the transform domain is used to denoise the image again after the first denoising.

8. A text font standardization processing system based on personnel file images, characterized in that, It includes: an image acquisition module, an image blur processing module, an image grayscale processing module, and an image denoising output module. Image collection module, used to collect image data of the archives to be processed; The image blurring processing module is used to perform font deblurring and standardization processing on the archival image data to be processed, so as to obtain image data that meets the preset blurring standard. In the font deblurring and standardization processing, firstly, the inner and outer boundary lines of the characters in the archival image data to be processed are located. Then, the edge blurring of the corresponding side of the characters is obtained based on the average gray value of the vertical lines of the inner and outer boundaries of each character region and the left and right boundaries inside the characters. The obtained edge blurring is compared with the preset blurring standard. The archival text image data with edge blurring that meets the preset blurring standard is sent to the character grayscale standardization processing. For the archival text image data with edge blurring that does not meet the preset blurring standard, the trained generative adversarial network is used to optimize the archival text image data until the archival text image data with edge blurring that meets the preset blurring standard is obtained. The process of obtaining the edge blur of the corresponding side of the character strokes includes the following: First, the position of the character in the image data is obtained using a preset maximum stable extreme value region. The coordinates of the character rectangle are obtained based on the starting point and the length and width of the region where the character is located. Then, the obtained character rectangles are filtered to remove those without vertical strokes. For each rectangle region, the inner boundary of the vertical line of the character is obtained through the horizontal projection map and the magnitude of the accumulated value. Next, based on the horizontal projection map and the inner boundary, the simulation extreme value algorithm is used to find the left and right outer boundaries coarsely estimated sequentially. Based on the coarse estimates of the left and right outer boundaries and the inner boundary, the maximum slope of the inner boundary is calculated sequentially to the left and right within the coarse estimate interval of the left and right outer boundaries. The index corresponding to the maximum slope to the left and right is recorded. The LSD line detection algorithm is used to extract the image at the corresponding position of the index interval in the original image data. The precise outer boundary of the vertical line of a single character is located by index comparison filtering. The image grayscale processing module is used to perform character grayscale standardization processing on image data that conforms to the preset fuzziness standard, and obtain image data that conforms to the preset grayscale standard. The image denoising output module is used to denoise the acquired image data that conforms to the preset grayscale standard and then output it.

Citation Information

Patent Citations

  • Process and system for reproduction of documents by segmentation and selective enhancement of images and texts

    EP1768049A2