CN115457577A - Text font standardization processing method and system based on personnel file image - Google Patents

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

Info

Publication number
CN115457577A
CN115457577A CN202211063551.3A CN202211063551A CN115457577A CN 115457577 A CN115457577 A CN 115457577A CN 202211063551 A CN202211063551 A CN 202211063551A CN 115457577 A CN115457577 A CN 115457577A
Authority
CN
China
Prior art keywords
image
character
image data
standard
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211063551.3A
Other languages
Chinese (zh)
Inventor
周兵
李�浩
王俊淇
王培森
李凯江
李世华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan Zhengdaoke Information Technology Co ltd
Zhengzhou University
Original Assignee
Henan Zhengdaoke Information Technology Co ltd
Zhengzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan Zhengdaoke Information Technology Co ltd, Zhengzhou University filed Critical Henan Zhengdaoke Information Technology Co ltd
Priority to CN202211063551.3A priority Critical patent/CN115457577A/en
Publication of CN115457577A publication Critical patent/CN115457577A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06T3/04
    • G06T5/70
    • G06T5/73
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/242Division of the character sequences into groups prior to recognition; Selection of dictionaries
    • G06V30/244Division of the character sequences into groups prior to recognition; Selection of dictionaries using graphical properties, e.g. alphabet type or font

Abstract

The invention belongs to the technical field of digital archive management, and particularly relates to a text font standardization processing method and system based on personnel archive images, which are implemented by collecting archive image data to be processed; performing font deblurring standardization processing on the archive image data to be processed to obtain image data meeting a preset ambiguity standard; carrying out character gray level standardization processing on the image data which accords with the preset fuzziness standard to obtain the image data which accords with the preset gray level standard; and denoising and outputting the acquired image data which accords with the preset gray standard. The invention adopts a series of processing such as image denoising, character positioning, character contrast enhancement, high-definition processing and the like to realize character gray scale evaluation and character ambiguity evaluation, can carry out automatic intelligent evaluation, reduces the interference of human factors, is convenient to efficiently and conveniently realize the full one-key file image standardization process, improves the processing efficiency of file processing, and lays a solid foundation for the digital processing automation of paper files.

Description

Text font standardization processing method and system based on personnel file image
Technical Field
The invention belongs to the technical field of digital archive management, and particularly relates to a text font standardization processing method and system based on personnel archive images.
Background
With the rapid development of electronic government affairs, the digital processing of archives becomes a necessary trend. According to the requirements of the digitalized technical specification of personnel files, scanned digital file texts need to be deblurred, the contrast is enhanced, and original appearance is kept to the maximum extent according to standardized indexes, so that subjective influence caused by the standardization of the traditional manual processing texts is avoided.
In the traditional method, a histogram equalization method is used to effectively improve the quality of the character image, but the histogram equalization is at the cost of combining image gray levels and sacrificing resolution, and the original character has a certain degree of blurring, and the blurring degree of the character is increased by using histogram enhancement.
Disclosure of Invention
Therefore, the invention provides a text font standardization processing method and system based on personnel file images, which improve the file digitization processing efficiency and improve the visual effect of digital file images by carrying out denoising, positioning, deblurring, gray standardization and other processing on texts in the file images.
According to the design scheme provided by the invention, the text font standardization processing method based on personnel file images comprises the following contents:
collecting image data of a file to be processed;
performing font deblurring standardization on the archive image data to be processed to obtain image data meeting a preset fuzziness standard;
carrying out character gray level standardization processing on the image data which accords with the preset fuzziness standard to obtain the image data which accords with the preset gray level standard;
and denoising and outputting the acquired image data which accords with the preset gray standard.
As a text font standardization processing method based on personnel file images, furthermore, in font deblurring standardization processing, firstly, inner and outer boundary lines of character strokes in file image data to be processed are positioned, and then, edge fuzziness of corresponding side edges of the character strokes is obtained according to the gray average value of the inner and outer boundary vertical lines in each character area and the inner left and right boundaries of the character strokes; and comparing the acquired edge fuzziness with a preset fuzziness standard, sending the edge fuzziness archive character image data meeting the preset fuzziness standard into character gray level standardization processing, and optimizing the archive character image data by utilizing a trained generation countermeasure network aiming at the edge fuzziness archive character image data not meeting the preset fuzziness standard until the edge fuzziness archive character image data meeting the preset fuzziness standard is obtained.
As the text font standardization processing method based on personnel file images, the process of acquiring the edge fuzziness of the corresponding side edge of the character stroke further comprises the following contents: firstly, obtaining the character position in image data by using a preset maximum stable extremum region, and obtaining the coordinates of a character rectangular frame according to the starting point of the region where the character position is located and the length and the width of the region; then, filtering the acquired character rectangular frames to filter character rectangular frames without vertical strokes, and obtaining the inner boundary of a character vertical line through a horizontal projection drawing and the magnitude of an accumulated value aiming at each rectangular frame area; then, according to the horizontal projection drawing and the inner boundary, a simulation extreme value calculation algorithm is utilized to sequentially search left and right outer boundary rough estimation, maximum slopes of the inner boundary sequentially left and right are solved in the left and right outer boundary rough estimation intervals according to the left and right outer boundary rough estimation and the inner boundary, indexes corresponding to the maximum slopes left and right are recorded, an image at a corresponding position of the index interval is intercepted in original image data by utilizing an LSD linear detection algorithm, and the accurate outer boundary of a single character vertical line is positioned through index comparison and filtering.
The text font standardization processing method based on personnel file images further comprises a generation countermeasure network for optimizing file character image data, wherein the generation countermeasure network comprises a generator for generating images and a discriminator for discriminating the true or false of the images, the edge fuzziness file character image data which do not meet the preset fuzziness standard are input into the generator, the generator outputs the generated images, the discriminator is used for carrying out true or false discrimination on the generated images, and generator parameters are updated by fusing back propagation of image content loss and network countermeasure loss.
The text font standardization processing method based on the personnel file image further comprises the steps of utilizing an edge detection algorithm based on stroke trend prediction to obtain edge characteristics of a generated image and a preset clear image aiming at the generated image output by a generator, and obtaining the edge loss of the generated image by solving the mean square error of the edge characteristics of the two images; acquiring the blurring degree correction loss of the generated image by calculating the average absolute error of the two images based on the blurring degrees of the generated image and a preset sharp image; edge loss, blur degree correction loss and pixel difference loss are used as image content loss, and a combined optimization target loss function for generating a countermeasure network is constructed by combining network countermeasure loss.
As the text font standardization processing method based on the personnel file image, further, in the character gray level standardization processing, firstly, the gray level mean value of pixel points in the character handwriting is counted, and the gray level mean value is used as a character image gray level index matched with a preset gray level standard; and performing repeated treatment of font gray level standardization on the character image which does not accord with the preset gray level standard until the character image accords with the preset gray level standard.
As the text font standardization processing method based on personnel file images, the repeated processing process of font gray level standardization further comprises the following contents: firstly, positioning a character area in image data; then, traversing the gray value of each pixel in the text area, calculating an edge weighted value of a window center element by using a window function, acquiring the gray value of each pixel after transformation in the text area by using the edge weighted value, and performing matching processing with a preset gray standard again.
As the text font standardization processing method based on personnel file images, the formula for calculating the edge weighted value of the window center element by using the window function is further expressed as follows:
Figure BDA0003827267380000021
wherein, G ij Is the gray value, Δ, of the pixel with coordinate (i, j) in the window ij Is the pixel edge operator with coordinates (i, j) within the window, U represents the window area, θ represents the pixel points belonging to window U, and n × n is the window size.
As the text font standardization processing method based on the personnel file image, the invention further carries out denoising processing on the acquired image data which accords with the preset gray standard, firstly, the image is denoised for the first time based on the bilateral filtering denoising algorithm of the spatial domain pixel characteristics, and then, the image denoised for the first time is denoised again based on the wavelet transformation of the transformation domain.
Further, the present invention also provides a text font standardization processing system based on personnel file images, comprising: an image collecting module, an image fuzziness processing module, an image gray level processing module and an image denoising output module, wherein,
the image collection module is used for collecting the image data of the archive to be processed;
the image fuzziness processing module is used for carrying out font deblurring standardization processing on the archive image data to be processed to obtain image data meeting a preset fuzziness standard;
the image gray processing module is used for carrying out character gray standardization processing on the image data meeting the preset fuzziness standard to obtain the image data meeting the preset gray standard;
and the image denoising output module is used for denoising and outputting the acquired image data which accord with the preset gray standard.
The invention has the beneficial effects that:
according to the invention, a series of processing such as image denoising, character positioning, character contrast enhancement, high-definition processing and the like is adopted to realize character gray scale evaluation and character ambiguity evaluation, automatic intelligent evaluation can be carried out, the interference of human factors is reduced, the one-key file image standardization full flow is conveniently and efficiently realized, the processing efficiency of file processing is improved, and a solid foundation is laid for the digital processing automation of paper files.
Description of the drawings:
FIG. 1 is a schematic diagram of a text font standardization processing flow based on personnel file images in the embodiment;
FIG. 2 is a schematic diagram of the positioning effect of a single character vertical line in the embodiment;
FIG. 3 is a schematic flow of evaluation indexes in the examples;
FIG. 4 is a schematic diagram of a DeBlurGAN network framework in an embodiment;
FIG. 5 is a flow chart of an image deblurring algorithm in an embodiment;
FIG. 6 is a schematic diagram of the positioning effect of the text area in the embodiment;
FIG. 7 shows W in example nn Solving the schematic;
FIG. 8 shows example Δ ij Solving the schematic;
FIG. 9 is a schematic view of a sliding window in the embodiment.
The specific implementation mode is as follows:
in order to make the objects, technical solutions and advantages of the present invention clearer and more obvious, the present invention is further described in detail below with reference to the accompanying drawings and technical solutions.
In the traditional method, a histogram equalization method is used to effectively improve the quality of a character image, but the histogram equalization is at the cost of combining image gray levels and sacrificing resolution, and the original character has a certain degree of blurring, and the blurring of the character is increased by using histogram enhancement. The embodiment of the invention provides a text font standardization processing method based on personnel file images, which comprises the following steps: collecting image data of a file to be processed; carrying out font deblurring standardization processing on the archive image data to be processed to obtain image data meeting a preset fuzziness standard; carrying out character gray level standardization processing on the image data which accords with the preset fuzziness standard to obtain the image data which accords with the preset gray level standard; and denoising and outputting the acquired image data which accords with the preset gray standard.
The fonts of the file scanning images are standardized, and for file images which do not meet the standard, as shown in fig. 1, image input devices such as a scanner, a facsimile machine, a digital camera and the like can be adopted, and document images input by the input devices are used as image data to be standardized. Through a series of processing such as image denoising, character positioning, character contrast enhancement, high-definition processing and the like, the digital processing efficiency of the archives is improved, and meanwhile, the visual effect of the digital archives images is improved. Aiming at the problems of high repeatability, aesthetic fatigue, boring emotion and the like generated in processing work, in the embodiment of the scheme, automatic intelligent judgment can be realized according to the standard requirements in the digital technical specification of cadre personnel files, wherein the standard requirements comprise character gray scale evaluation and font ambiguity evaluation.
As a preferred embodiment, further, in the font deblurring standardization process, firstly, the inner and outer boundary lines of the character strokes in the archive image data to be processed are positioned, and then, the edge ambiguity of the corresponding side edges of the character strokes is obtained according to the gray average value of the vertical lines of the inner and outer boundaries in each character area and the inner left and right boundaries of the character strokes; and comparing the acquired edge fuzziness with a preset fuzziness standard, sending the edge fuzziness archive character image data meeting the preset fuzziness standard into character gray level standardization processing, and optimizing the archive character image data by utilizing a trained generation countermeasure network aiming at the edge fuzziness archive character image data not meeting the preset fuzziness standard until the edge fuzziness archive character image data meeting the preset fuzziness standard is obtained.
When the file image to be processed enters the ambiguity index evaluation, the ambiguity standard evaluation is required, firstly, the inner (mid) and outer (left, right) boundary lines of the vertical strokes of the image characters are positioned, and the specific implementation process can be designed as follows:
(1) A series of maximum stable extremum regions can be obtained by using an MSER algorithm to serve as preset maximum stable extremum data, and a maximum stable extremum region detection interface is called to obtain the (x, y) starting point and the (w, h) region length of the region where the characters in the image are located. Thus, all the character positions in the document image, namely a series of rectangular frame coordinates, are obtained.
(2) 1/5 of character rectangular boxes can be randomly selected for processing, firstly, character screening and filtering are carried out, the filtering condition is that images of the areas where the character boxes are located are horizontally projected to obtain a horizontal projection image, a row with the highest row number is solved, if the highest point value of the row is lower than 1/2 of the height of the image, it is considered that no vertical stroke exists in the character, therefore, filtering is carried out, and the types of the filtered characters are shown in (a) and (b) of fig. 2; otherwise, selecting.
(3) And aiming at each selected rectangular frame area, obtaining a horizontal projection graph by using horizontal projection, and defining a column with the highest accumulated value as an inner boundary mid of the vertical line of the characters.
(4) The horizontal projection graph and the inner boundary mid are obtained in the last step, then the horizontal projection graph needs to be processed, a simulation extremum solving algorithm is designed, the processing of the horizontal projection graph can be similar to the processing of extremum solving of a group data simulation function, the default mid is the maximum value of an array, the error-tolerant searching for the first index number which is increased from the beginning, namely the minimum value point, is sequentially searched leftwards and rightwards, and then left is roughly calculated to obtain left 0 、right 0 A boundary.
(5) The previous step resulted in left 0 、right 0 Mid, now requiring further precision of the inner and outer boundaries, the maximum slope is found by defining an algorithm at [ left 0 ,right 0 ]Interval(s)Sequentially obtaining the maximum slope K from mid to right 1 ,K 2 And recording the index subscript corresponding to the index as left 1 ,right 1
(6) To further refine the outer boundary, [ left ] can be truncated in the original image using the LSD line detection algorithm 1 ,right 1 ]Carrying out LSD (least squares distortion) linear detection on the image at the corresponding position to obtain a series of index subscripts, and carrying out user-defined boundary precise function processing on the index subscripts and left 1 ,right 1 And performing comparison and filtering to finally obtain accurate outer boundaries left and right. After twice accurate, the accurate boundary of the vertical line of the single character is positioned at this time, and the vertical stroke positioning effect is checked, as shown in fig. 2 (c) (d) (e).
(7) The positioning of the inner and outer boundaries of the vertical line in each character area is obtained, the gray level mean value of the vertical line of the inner boundary is Ymin, and the gray level mean values of the vertical line of the left and right boundaries are LYmax and RYmax respectively; according to the formula:
LY=Y min +70%*(LY max -Y min ) (1)
RY=Y min +70%*(RY max -Y min ) (2)
position coordinates LG and RG corresponding to LY and RY in the stroke are obtained, the ambiguity of the corresponding side edge of the stroke is recorded as B, and the formula is as follows:
Figure BDA0003827267380000051
i.e. the stroke ambiguity B is the average of the two side edge ambiguities.
(8) Calculating the character fuzziness standard B of the image according to 1/5 characters in the processed image, and comparing the character fuzziness standard B with the font fuzziness standard B in the file image standardized file T Comparison, less than B T The high-definition processing of the font fuzziness is not needed, and conversely, the high-definition processing is carried out. Fig. 3 is a schematic view of the overall evaluation index flow.
When B is present>B T Then, the file image is processed with font deblurring processing to obtain the characterThe body deblurring standardization module completes character deblurring based on a generated confrontation network GAN, the GAN comprises a generator and a discriminator, the generator and the discriminator game with each other in the whole generated confrontation network training, the capability of the generator and the discriminator is respectively improved, and finally an optimized balance state is achieved. The network framework is shown in fig. 4. The generator comprises two downsampling convolutions, 9 residual error network blocks and two upsampling transposed convolution blocks, wherein a dropout with the probability of 0.5 is added behind the first convolution layer in the residual error network blocks, the purpose is to prevent overfitting, and then each convolution layer also uses example normalization, so that the purpose is to accelerate the convergence of the network in the training process, and the statistics in the image are normalized by using the instant normalization, so that the influence of other images is avoided. The structure of the discrimination network of the discriminator network is similar to that of a common network, the characteristics are continuously extracted through a convolutional neural network, the probability that the image is false is finally output at the Sigmoid output end, and the discriminator feeds back the result to the generator so as to optimize the quality of the generated image.
In the Deblurgan, a generator is used for generating an image, a discriminator is used for discriminating the true and false of the image, loss used for optimizing a network comprises content loss and countermeasure loss, and edge loss and font fuzzy correction loss are added in a loss function in order to further optimize the image generation. The method comprises the following specific steps:
(1) The Image _ deblur Image and the clear Image generated by the processing generator are used for obtaining edge characteristics of the two images by using an edge detection algorithm based on stroke trend prediction, and the two images are subjected to mean square error at the characteristic level, namely edge loss. In the edge weighted font enhancement algorithm based on stroke trend prediction, firstly convolution is carried out on the character image and a preset stroke judgment template to obtain stroke trend information, then edge detection and weighting are carried out on the character according to the stroke trend, and finally the effects of improving the contrast of the character line, suppressing noise and further achieving image gray level standardization are achieved.
(2) Calculating the fuzziness B of the image and the clear image generated by the generator respectively through the fuzziness evaluation index algorithm i And the two are averaged to obtain the average absolute error, namely the ambiguity correction loss. Edge loss, blur correction loss, and other losses are combined to optimize image generation.
(3) Edge loss and blur correction loss are introduced into the image deblurring network based on the Deblurgan, the edge loss, the blur correction loss and the pixel difference loss are collectively called content loss, and the network is optimized together with the countermeasure loss. The generator parameters are optimized by feeding back the overall optimization loss back propagation to the generator, and the generator is continuously enabled to generate clearer images. The overall algorithm framework is shown in fig. 5. Inputting the blurred image (in the Tensor form) into a generator network, outputting the generated image, inputting the generated image (in the Tensor form) into a trained discriminator network model, and correspondingly outputting the probability that the image is false; meanwhile, the quality loss calculation is carried out on the generated image and the clear image, and finally the content loss of the image and the network countermeasure loss are fused and the parameters of the generator network are updated through back propagation, so that the quality of the generated image is optimized. And after the file image passes through the blurring standardization module, performing blurring degree standard judgment again, meeting the standard and performing next operation, otherwise, performing repeated font deblurring standardization.
As a preferred embodiment, further, in the character gray level standardization processing, firstly, a gray level mean value of a pixel point in the character handwriting is counted, and the gray level mean value is used as a character image gray level index for matching with a preset gray level standard; and performing repeated treatment of font gray level standardization on the character image which does not accord with the preset gray level standard until the character image accords with the preset gray level standard. Further, the repeated process of font gray level normalization includes the following steps: firstly, positioning a character area in image data; then, traversing the gray value of each pixel in the text area, calculating an edge weighted value of a window center element by using a window function, acquiring the gray value of each pixel after transformation in the text area by using the edge weighted value, and performing matching processing with a preset gray standard again.
The file image after font deblurring standardization enters the gray index judgment, firstly, fast characteristic can be usedThe point detection algorithm detects that the angular point is approximately positioned at the pixel point in the character handwriting, the average calculation is calculated by statistics to obtain the character gray average value which is used as the gray index G of the image and then is compared with the gray standard index G in the standard file T By comparison, if G>G T The image should be subjected to font gradation normalization processing; if G is<G T Then the gray level normalization process is skipped and the next image processing module is entered. When G is>G T During the process, the file image is subjected to gray level standardization, and the specific process can be designed as follows:
(1) The text area in the archive image is selected, the text detection model in paddleOcr can be used, the area coordinates of the image where the characters are located are obtained by setting relevant parameters such as det _ limit _ side _ len =1150, det _limit _ type = "max", and the like. Text region positioning effect, as shown in fig. 6.
(2) For a certain selected text box area, traversing the gray value of each pixel, taking each traversed pixel as a central position, taking the size of the window n × n, and solving the edge weighted value of the window, wherein the formula can be expressed as follows:
Figure BDA0003827267380000071
wherein: g ij Is the gray value, Δ, of each pixel within the window ij The edge operator of each pixel in the window, U represents the window area, theta represents the pixel point belonging to the window U, and the edge weighted value W of the window center element can be obtained by the formula nn And the index value is used as an adaptive judgment index value for positioning the window center pixel in the subsequent operation. A specific calculation process diagram is shown in fig. 7. For Δ ij The calculation can be carried out in a window U by utilizing an edge detection method based on stroke trend prediction n×n In order to find a for each pixel value ij In the process, firstly, an n multiplied by n neighborhood matrix of a certain pixel is obtained, then the n multiplied by n neighborhood matrix is convoluted with 12 stroke direction templates which are defined in advance, the convolution sum with the maximum output is the direction type of the stroke, and delta is carried out according to different edge detection operators of stroke direction transformation ij Is obtained, output is providedIf the template one is matched (namely, the stroke is predicted to be a transverse line), the calculation mode of the edge detection operator is as follows: the neighborhood 9 x 9 matrix block is taken and partitioned into 9 3 x 3 matrices named as upper left, upper right, left, middle, right, lower left, lower right and lower right. Template-corresponding Δ ij The calculation formula is as follows: delta ij =|X-X * Where X is the average gray level of the left, middle and right matrix blocks, X * As the mean value of the gray scale of the central block, predicting as other stroke templates X, X * Respectively corresponding to different calculated values. The process schematic is shown in fig. 8. The window sliding calculation method with optimized calculation speed can be utilized to copy the region where the text box is located to obtain an all-zero matrix, and corresponding delta is calculated in sequence ij Finally, a DetaIj matrix is obtained, and then a sliding window of n multiplied by n is taken for W nn The optimization speed is theoretically improved by a plurality of times compared with that of the simple traversal, and a specific implementation algorithm is shown in fig. 9.
(3) Traversing the pixels in the text box area one by one, and calculating the W of each pixel nn Gray value of pixel after conversion
G′ ij Can be expressed as:
Figure BDA0003827267380000072
and (4) after the gray level of the characters of the whole file image is standardized, judging the gray level standard again, meeting the standard and carrying out the next operation, otherwise, carrying out repeated font gray level standardization.
The file image is subjected to fuzzy standardization and gray standardization, noise can be generated in the image process, and therefore denoising processing is necessary. After the archive processing, the archive image meets the character gray level standard and the font fuzziness standard in the specified document, and the archive image enters the output unit to finish the output of the image.
Further, based on the foregoing method, an embodiment of the present invention further provides a text font standardization processing system based on personnel file images, including: an image collecting module, an image fuzziness processing module, an image gray level processing module and an image denoising output module, wherein,
the image collection module is used for collecting the image data of the archive to be processed;
the image ambiguity processing module is used for carrying out font deblurring standardization processing on the archive image data to be processed to obtain image data meeting a preset ambiguity standard;
the image gray processing module is used for carrying out character gray standardization processing on the image data meeting the preset fuzziness standard to obtain the image data meeting the preset gray standard;
and the image denoising output module is used for denoising and outputting the acquired image data meeting the preset gray standard.
In the embodiment of the scheme, aiming at the problem that the font ambiguity of the archive image does not meet the specified index in the standard file, a deblurring algorithm model based on a Deblurgan network can be utilized, and the Deblurgan generation countermeasure network comprises a former and a discriminator. In the model training process, edge loss and fuzzy correction loss are introduced to optimize the network, parameters of the generator are optimized by feeding back the overall optimization loss back propagation to the generator, and the generator is continuously prompted to generate clearer images meeting the ambiguity standard.
For the problem that the gray scale of the characters of the file image does not meet the specified indexes in the standard file, an edge weighting method based on font stroke trend prediction can be utilized. In the stroke prediction process, traversal pixels and 12 predefined direction templates are subjected to convolution and operation, the largest output value is solved as stroke direction prediction, and then the edge weighting calculation method of the next pixel level is defined according to the stroke direction, so that the gray level standardization of characters is realized.
Aiming at the problem that the noise generated in the gray level standardization and deblurring standardization processes of the archival image can reduce the quality of a standardized archival image, the archival image smoothing processing can be utilized, namely the smoothing processing is carried out by using a denoising algorithm based on bilateral filtering of airspace pixel characteristics, and the denoising processing is carried out by wavelet transformation based on a transformation domain, so that an archival image text can be accurately positioned, an archival standard evaluation index is established according to technical specifications, and the archival text content is enhanced by using self-adaptive gray level, so that the visual effect of the archival image is enhanced.
Unless specifically stated otherwise, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The elements of the various examples and method steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and the components and steps of the examples have been described in a functional generic sense in the foregoing description for clarity of hardware and software interchangeability. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Those skilled in the art will appreciate that all or part of the steps of the above methods can be implemented by a program instructing relevant hardware, and the program can be stored in a computer readable storage medium, such as: read-only memory, magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A text font standardization processing method based on personnel file images is characterized by comprising the following contents:
collecting image data of a file to be processed;
carrying out font deblurring standardization processing on the archive image data to be processed to obtain image data meeting a preset fuzziness standard;
carrying out character gray level standardization processing on the image data which accords with the preset fuzziness standard to obtain the image data which accords with the preset gray level standard;
and denoising and outputting the acquired image data which accords with the preset gray standard.
2. The human file image-based text font standardization processing method as claimed in claim 1, wherein in font deblurring standardization processing, firstly, the inner and outer boundary lines of character strokes in file image data to be processed are positioned, and then, the edge ambiguity of the corresponding side edge of the character strokes is obtained according to the gray average value of the vertical line of the inner and outer boundary in each character area and the left and right boundaries in the character strokes; and comparing the acquired edge fuzziness with a preset fuzziness standard, sending the edge fuzziness archive character image data meeting the preset fuzziness standard into character gray level standardization processing, and optimizing the archive character image data by utilizing a trained generation countermeasure network aiming at the edge fuzziness archive character image data not meeting the preset fuzziness standard until the edge fuzziness archive character image data meeting the preset fuzziness standard is obtained.
3. The personnel file image-based text font standardization processing method as claimed in claim 2, wherein the process of obtaining the edge ambiguity of the corresponding side of the character stroke comprises the following steps: firstly, obtaining the character position in image data by using a preset maximum stable extremum region, and obtaining the coordinates of a character rectangular frame according to the starting point of the region where the character position is located and the length and the width of the region; then, filtering the acquired character rectangular frames to filter character rectangular frames without vertical strokes, and obtaining the inner boundary of a character vertical line by a horizontal projection drawing and the magnitude of an accumulated value aiming at each rectangular frame area; then, according to the horizontal projection drawing and the inner boundary, a simulation extreme value calculation algorithm is utilized to sequentially search left and right outer boundary rough estimation, maximum slopes of the inner boundary sequentially left and right are solved in the left and right outer boundary rough estimation intervals according to the left and right outer boundary rough estimation and the inner boundary, indexes corresponding to the maximum slopes left and right are recorded, an image at a corresponding position of the index interval is intercepted in original image data by utilizing an LSD linear detection algorithm, and the accurate outer boundary of a single character vertical line is positioned through index comparison and filtering.
4. The human file image-based text font standardization processing method as claimed in claim 2, wherein the generation countermeasure network for performing optimization processing on the file text image data includes a generator for generating an image and a discriminator for discriminating the authenticity of the image, the edge fuzziness file text image data that does not meet a preset fuzziness standard is input into the generator, the generator outputs the generated image, the discriminator determines the authenticity of the generated image, and the generator parameters are updated by fusing back propagation of image content loss and network countermeasure loss.
5. The human file image-based text font standardization processing method as claimed in claim 4, wherein for the generated image output by the generator, edge features of the generated image and a preset clear image are obtained by using an edge detection algorithm based on stroke trend prediction, and edge loss of the generated image is obtained by solving a mean square error of the edge features of the two images; acquiring the blurring degree correction loss of the generated image by calculating the average absolute error of the two images based on the blurring degrees of the generated image and a preset sharp image; edge loss, blur degree correction loss and pixel difference loss are used as image content loss, and a combined optimization target loss function for generating a countermeasure network is constructed by combining network countermeasure loss.
6. The human file image-based text font standardization processing method as claimed in claim 1, wherein in the character gray level standardization processing, firstly, the gray level mean value of pixel points in the character handwriting is counted, and the gray level mean value is used as a character image gray level index for matching with a preset gray level standard; and performing repeated treatment of font gray level standardization on the character image which does not accord with the preset gray level standard until the character image accords with the preset gray level standard.
7. The human file image-based text font standardization processing method as claimed in claim 6, wherein the repeated processing procedure of font gray level standardization comprises the following steps: firstly, positioning a character area in image data; then, traversing the gray value of each pixel in the text area, calculating an edge weighted value of a window center element by using a window function, acquiring the gray value of each pixel after transformation in the text area by using the edge weighted value, and performing matching processing with a preset gray standard again.
8. The human file image-based text font normalization processing method according to claim 7, wherein the formula for calculating the edge weighting value of the window center element by using the window function is represented as:
Figure FDA0003827267370000021
wherein G is ij Is the gray value, Δ, of the pixel with coordinate (i, j) within the window ij Is the pixel edge operator with coordinates (i, j) within the window, U represents the window area, θ represents the pixel points belonging to window U, and n × n is the window size.
9. The method as claimed in claim 1, wherein in the denoising of the acquired image data meeting the predetermined gray scale standard, the image is first denoised by a bilateral filtering denoising algorithm based on spatial domain pixel characteristics, and then the image denoised for the first time is denoised again based on wavelet transformation of the transform domain.
10. A system for normalizing text fonts based on personnel file images, comprising: an image collecting module, an image fuzziness processing module, an image gray level processing module and an image denoising output module, wherein,
the image collection module is used for collecting the image data of the archive to be processed;
the image ambiguity processing module is used for carrying out font deblurring standardization processing on the archive image data to be processed to obtain image data meeting a preset ambiguity standard;
the image gray processing module is used for carrying out character gray standardization processing on the image data meeting the preset fuzziness standard to obtain the image data meeting the preset gray standard;
and the image denoising output module is used for denoising and outputting the acquired image data which accord with the preset gray standard.
CN202211063551.3A 2022-08-31 2022-08-31 Text font standardization processing method and system based on personnel file image Pending CN115457577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211063551.3A CN115457577A (en) 2022-08-31 2022-08-31 Text font standardization processing method and system based on personnel file image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211063551.3A CN115457577A (en) 2022-08-31 2022-08-31 Text font standardization processing method and system based on personnel file image

Publications (1)

Publication Number Publication Date
CN115457577A true CN115457577A (en) 2022-12-09

Family

ID=84299999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211063551.3A Pending CN115457577A (en) 2022-08-31 2022-08-31 Text font standardization processing method and system based on personnel file image

Country Status (1)

Country Link
CN (1) CN115457577A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116167597A (en) * 2023-04-26 2023-05-26 烟台市重科产业技术研究院有限公司 Intelligent maintenance management system for archival materials
CN116187717A (en) * 2023-04-24 2023-05-30 四川金投科技股份有限公司 File warehousing management method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187717A (en) * 2023-04-24 2023-05-30 四川金投科技股份有限公司 File warehousing management method and system
CN116187717B (en) * 2023-04-24 2023-07-11 四川金投科技股份有限公司 File warehousing management method and system
CN116167597A (en) * 2023-04-26 2023-05-26 烟台市重科产业技术研究院有限公司 Intelligent maintenance management system for archival materials
CN116167597B (en) * 2023-04-26 2023-07-18 烟台市重科产业技术研究院有限公司 Intelligent maintenance management system for archival materials

Similar Documents

Publication Publication Date Title
KR101795823B1 (en) Text enhancement of a textual image undergoing optical character recognition
CN115457577A (en) Text font standardization processing method and system based on personnel file image
US8457403B2 (en) Method of detecting and correcting digital images of books in the book spine area
JP3207690B2 (en) Image processing device
Motta et al. The iDUDE framework for grayscale image denoising
JP4253335B2 (en) Method and apparatus for filtering and clustering by means of image mean shift using kernel function values
US20060280366A1 (en) Systems and Methods for Content-Based Document Image Enhancement
CN111932646B (en) Image processing method for resisting attack
CN112819772A (en) High-precision rapid pattern detection and identification method
CN111353961B (en) Document curved surface correction method and device
CN112507617B (en) Training method of SRFlow super-resolution model and face recognition method
CN116071271B (en) Analysis method for image capturing of tablet personal computer
US8306335B2 (en) Method of analyzing digital document images
CN111767752B (en) Two-dimensional code identification method and device
CN111368856B (en) Book spine extraction method and device of book checking system based on vision
Zhang et al. Image inverse halftoning and descreening: a review
CN113379001B (en) Processing method and device for image recognition model
CN111241862A (en) Bar code positioning method based on edge characteristics
Konya et al. Adaptive methods for robust document image understanding
CN111383172B (en) Training method and device of neural network model and intelligent terminal
CN115908184B (en) Automatic removal method and device for mole pattern
JP6841254B2 (en) Image processing equipment and computer programs
WO2000060532A9 (en) Method and apparatus for restoration of low resolution images
KR100514734B1 (en) Method and apparatus for improvement of digital image quality
Aghajarian New Image Denoising Algorithms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination