Method for Full-process Automatic Management of Accident Work Orders

By conducting local analysis and regional division of ID images, and combining text and pattern saliency for adaptive image enhancement, the problem of low quality of outdoor ID images in the prior art is solved, and text recognition efficiency and reliability of work order management are improved.

CN119048012BActive Publication Date: 2025-06-24平湖市公安局交通警察大队
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411169591.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-24
Publication Date
2025-06-24
Estimated Expiration
2044-08-24

AI Technical Summary

Technical Problem

In the prior art, image enhancement has poor applicability to outdoor documents, and the quality of the enhancement results is not high, which affects the efficiency of subsequent text recognition.

Method used

By performing local analysis of each pixel point in the ID image, the texture saliency is obtained, the areas to be enhanced are divided, and gamma adjustment parameters are obtained based on the text saliency and pattern saliency, and adaptive image enhancement is performed on different areas.

Benefits of technology

It improves image quality, enhances the efficiency of text recognition, and improves the reliability of automated management of accident work orders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048012B_ABST
    Figure CN119048012B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image enhancement, and particularly to a method for the full-process automatic management of accident work orders. This method analyzes each pixel point in the grayscale image of the document to be recognized from the aspects of local grayscale chaos and continuous distribution, obtains the texture saliency, and combines the distribution position of the pixel points to obtain the area to be enhanced; in each area to be enhanced, it analyzes from two aspects of pixel value and edge gradient, respectively obtains the text saliency and pattern saliency, and obtains the gamma adjustment parameter required for each area; performs image enhancement on different areas to be enhanced through the gamma adjustment parameter to obtain the enhanced image of the document to be recognized. The present invention analyzes by region based on the texture features of pixel points, adaptively adjusts the enhancement of each region based on the saliency of text and patterns, obtains an image with higher quality to improve the text recognition efficiency, so as to improve the reliability of work order automatic management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image enhancement, and particularly to a method for the full-process automated management of accident work orders. Background Art

[0002] With the development of Internet and big data technologies, the informatization of accident work orders enables the online and rapid handling of traffic accidents, avoiding traffic congestion at the accident scene and reducing the risk of secondary accidents. Automatically advancing the work order status according to preset business rules, realizing the automated transfer of accident work orders, and through the full-process automated management of accident work orders, real-time monitoring the processing progress of accident work orders and timely feedback of the processing results to ensure the transparency and traceability of accident handling.

[0003] In the full-process automated management of accident work orders, it is necessary to photograph the certificates of the involved persons to automatically identify the text in the photographed pictures through optical character recognition technology, which can reduce manual intervention and error rate. However, since the accident sites are mostly outdoors, the quality of the photographed pictures directly affects the accuracy of subsequent text recognition. When performing image enhancement on the photographed pictures, due to the anti-counterfeiting patterns on driving licenses and vehicle registration certificates, the applicability of image enhancement to outdoor certificates is poor, and the quality of the enhancement results is not high, affecting the efficiency of subsequent text recognition. Summary of the Invention

[0004] In order to solve the technical problem that in the prior art, the applicability of image enhancement to outdoor certificates is poor, the quality of the enhancement results is not high, and it affects the efficiency of subsequent text recognition, the purpose of the present invention is to provide a method for the full-process automated management of accident work orders, and the specific technical solution adopted is as follows:

[0005] The present invention provides a method for the full-process automated management of accident work orders, and the method includes:

[0006] Obtain a grayscale image of the certificate to be recognized;

[0007] According to the gray value chaos situation and continuous distribution situation of each pixel point locally in the grayscale image of the certificate to be recognized, obtain the texture saliency of each pixel point; based on the texture saliency and distribution position of the pixel points, perform division to obtain the area to be enhanced;

[0008] According to the gray contrast situation and gradient chaos situation of the pixel points in each area to be enhanced, obtain the text saliency of each area to be enhanced; according to the edge smoothing and pixel highlighting situation in each area to be enhanced, obtain the pattern saliency of each area to be enhanced;

[0009] Based on the text saliency and pattern saliency, obtain the gamma adjustment parameter of each area to be enhanced; perform image enhancement on different areas to be enhanced through the gamma adjustment parameter to obtain an enhanced image of the certificate to be recognized.

[0010] Further, the method for obtaining the texture saliency includes:

[0011] For any pixel point in the grayscale image of the document to be recognized, within the preset local range of the pixel point, the grayscale saliency of the pixel point is obtained according to the fluctuation range and numerical chaos of the grayscale values;

[0012] In each preset direction of the pixel point, the continuous length of the pixel point in each preset direction is obtained according to the run length of the grayscale value of the pixel point;

[0013] Combining the continuous lengths of the pixel point in all preset directions and the grayscale saliency, the texture saliency of the pixel point is obtained.

[0014] Further, the obtaining of the grayscale saliency of the pixel point according to the fluctuation range and numerical chaos of the grayscale values within the preset local range of the pixel point includes:

[0015] Taking the range of the grayscale values within the preset local range of the pixel point as the change range of the pixel point;

[0016] Taking the variance of the grayscale values of the pixel point within the preset local range as the local chaos degree of the pixel point;

[0017] Combining the change range and the local chaos degree of the pixel point, the grayscale saliency of the pixel point is obtained.

[0018] Further, the obtaining of the regions to be enhanced by partitioning based on the texture saliency and distribution position of the pixel points includes:

[0019] When the value after normalizing the texture saliency of the pixel point is greater than the preset saliency threshold, the corresponding pixel point is used as a pixel point to be enhanced; each connected domain composed of the pixel points to be enhanced is used as a region to be enhanced.

[0020] Further, the obtaining of the text saliency of each region to be enhanced according to the grayscale contrast situation and gradient chaos situation of the pixel points in each region to be enhanced includes:

[0021] For any region to be enhanced, the text grayscale index of the region to be enhanced is obtained according to the maximum grayscale deviation degree and grayscale value size of the pixel points in the region to be enhanced;

[0022] Counting the number of each gradient direction in the region to be enhanced, and taking the negative entropy of the number of all gradient directions as the text gradient index of the region to be enhanced;

[0023] Combining the text grayscale index and the text gradient index of the region to be enhanced, the text saliency of the region to be enhanced is obtained.

[0024] Further, obtaining the text gray level index of the area to be enhanced according to the maximum gray level deviation degree and gray level value of the pixel points in the area to be enhanced includes:

[0025] Taking the average value of the gray level values of all pixel points in the area to be enhanced as the gray level distribution index of the area to be enhanced;

[0026] Arranging the gray level values of all pixel points in the area to be enhanced in ascending order to obtain the gray level distribution sequence of the area to be enhanced; obtaining the difference sequence of the gray level distribution sequence, and taking the maximum difference value in the difference sequence as the gray level deviation index of the area to be enhanced;

[0027] Combining the gray level distribution quality guarantee and the gray level deviation index of the area to be enhanced to obtain the text gray level index of the area to be enhanced.

[0028] Further, obtaining the pattern saliency of each area to be enhanced according to the edge smoothing and pixel highlighting conditions in each area to be enhanced includes:

[0029] For any area to be enhanced, obtaining the gray level histogram of the pixel points in the area to be enhanced; obtaining the highlighting index of the area to be enhanced according to the proportion and concentration degree of the gray level value distribution in the gray level histogram;

[0030] Obtaining the smoothing index of the area to be enhanced according to the smooth change condition of the pixel points on each edge in the area to be enhanced;

[0031] Obtaining the pattern saliency of the area to be enhanced according to the highlighting index and the smoothing index of the area to be enhanced.

[0032] Further, the method for obtaining the highlighting index includes:

[0033] In the gray level histogram of the area to be enhanced, taking the gray level values greater than the preset highlighting threshold as the highlighting gray level values of the area to be enhanced;

[0034] Calculating the kurtosis of the distribution of the highlighting gray level values in the gray level histogram to obtain the highlighting concentration degree of the area to be enhanced; taking the proportion of the number of the highlighting gray level values in the number of all gray level values as the highlighting proportion of the area to be enhanced;

[0035] Taking the product of the highlighting concentration degree and the highlighting proportion of the area to be enhanced as the highlighting index of the area to be enhanced.

[0036] Further, the method for obtaining the smoothing index includes:

[0037] Obtain the gradient direction difference between every two adjacent pixel points on the edge of the area to be enhanced as the change deviation; perform a negative correlation mapping on the variance of all change deviations in the area to be enhanced to obtain the smoothness index of the area to be enhanced.

[0038] Further, obtaining the gamma adjustment parameter for each area to be enhanced according to the text saliency and pattern saliency includes:

[0039] Use the value obtained by normalizing the text saliency of the area to be enhanced as the text index of the area to be enhanced; use the value obtained by normalizing the pattern saliency of the area to be enhanced as the pattern index of the area to be enhanced;

[0040] For any area to be enhanced, when the text index of the area to be enhanced is greater than the preset text threshold and the pattern index is greater than the preset pattern threshold, set the gamma adjustment parameter of the area to be enhanced to the low gamma parameter;

[0041] When the text index of the area to be enhanced is greater than the preset text threshold and the pattern index is less than or equal to the preset pattern threshold, set the gamma adjustment parameter of the area to be enhanced to the medium gamma parameter;

[0042] When the text index of the area to be enhanced is less than or equal to the preset text threshold, set the gamma adjustment parameter of the area to be enhanced to the high gamma parameter.

[0043] The present invention has the following beneficial effects:

[0044] The present invention performs local analysis on each pixel point in the certificate image, obtains the texture saliency of each pixel point as a texture from the gray chaos and continuous distribution, thereby reflecting the possibility that the pixel point is a text texture or a pattern texture, and combines the distribution position of the pixel point to obtain the area to be enhanced, so as to perform adaptive enhancement adjustment according to different situations of the area. Further considering that not only some texts may have enhancement requirements, when there are more patterns in the area, the reflective patterns will cause stronger interference to the text part. Therefore, in each area to be enhanced, analyze from two aspects of pixel value and edge gradient to obtain the text saliency and pattern saliency respectively. Through the text saliency situation and pattern saliency situation, comprehensively analyze the gamma adjustment parameter required for each area, so as to perform adaptive enhancement of different areas of the image through the gamma adjustment parameter to obtain the enhanced certificate image to be recognized. The present invention analyzes by region based on the texture features of pixel points, adaptively adjusts the enhancement situation of each region based on the saliency of text and patterns, obtains an image with higher quality to improve the text recognition efficiency, so as to improve the reliability of work order automation management. Description of the Drawings

[0045] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0046] Figure 1 The flowchart of a method for full-process automated management of accident work orders provided by an embodiment of the present invention;

[0047] Figure 2 The partial schematic diagram of the grayscale image of the document to be recognized provided by an embodiment of the present invention;

[0048] Figure 3 The flowchart of a method for obtaining texture saliency provided by an embodiment of the present invention;

[0049] Figure 4 The flowchart of a method for obtaining text saliency provided by an embodiment of the present invention;

[0050] Figure 5 The flowchart of a method for obtaining pattern saliency provided by an embodiment of the present invention. Detailed implementation manners

[0051] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of a method for full-process automated management of accident work orders proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0053] The following specifically describes the specific solution of a method for full-process automated management of accident work orders provided by the present invention in combination with the accompanying drawings.

[0054] Please refer to Figure 1 , which shows the flowchart of a method for full-process automated management of accident work orders provided by an embodiment of the present invention. The method includes the following steps:

[0055] S1: Obtain the grayscale image of the document to be recognized.

[0056] An accident work order requires the traffic police to create an accident work order based on the information at the accident scene after arriving at the scene. For the entry of information about the accident parties, it is necessary to upload and identify the photos of the certificates for entry. The relevant certificates include the driver's license, vehicle license, and ID card. Since the shooting scene is outdoors and the shooting method has a high degree of randomness, the captured certificate images may have certain deformation or blurring. Therefore, it is necessary to perform image enhancement processing first. In the embodiment of the present invention, the captured certificate image is preprocessed to obtain a grayscale certificate image. Among them, the image preprocessing process may specifically include image grayscale processing and filtering denoising processing. It should be noted that the image preprocessing process is a well-known technical means for those skilled in the art. Specifically, the grayscale weighting method can be used for grayscaling and the bilateral filtering method can be used for filtering, etc., which will not be elaborated here.

[0057] At the same time, since the background part of the certificate image captured outdoors has a large interference, it is necessary to perform background removal processing. In the embodiment of the present invention, the region containing only the certificate part is obtained through the ROI extraction method, and the image after extracting the ROI region is used as the grayscale certificate image to be recognized. It should be noted that the background removal method of ROI extraction is a well-known technical means for those skilled in the art and will not be elaborated here.

[0058] S2: According to the gray value chaos situation and continuous distribution situation of each pixel point locally in the grayscale certificate image to be recognized, obtain the texture saliency of each pixel point; based on the texture saliency and distribution position of the pixel points, perform division to obtain the region to be enhanced.

[0059] In the grayscale certificate image to be recognized, it is necessary to further enhance the text part to improve the recognition of image text. At the same time, due to the random light angle outdoors, it will cause reflection on the surface of the certificate. However, the anti-counterfeiting pattern on the certificate will present relatively obvious texture features when reflecting light, and it will also block the text. Please refer to Figure 2 which shows a partial schematic diagram of a grayscale certificate image to be recognized provided by an embodiment of the present invention, and the reflective pattern will affect the text part.

[0060] For the text part that needs to be enhanced, it is determined based on the texture features. For the texture features, analyze from the relatively large local pixel changes of the pixel points and the continuous distribution features of the texture to obtain the texture saliency degree of the pixel points. The pixel points with a high texture saliency degree reflect the text part or the reflective pattern part.

[0061] Preferably, in some possible implementation manners of the embodiment of the present invention, for the method of obtaining the texture saliency, please refer to Figure 3 which shows a flowchart of a method for obtaining the texture saliency provided by an embodiment of the present invention. The method includes the following steps:

[0062] S201: For any pixel in the grayscale image of the document to be recognized, within the preset local range of this pixel, obtain the grayscale saliency of the pixel based on the fluctuation range and numerical chaos of the grayscale values.

[0063] The text texture part on the document has a large deviation in grayscale value distribution from the background, and there are more changes in local pixels. Therefore, for pixels with high texture, the local grayscale changes are more abundant and the contrast is stronger. Therefore, for each pixel, first analyze from the grayscale value distribution to obtain the significant situation of each pixel in terms of grayscale.

[0064] Preferably, in the embodiments of the present invention, the method for obtaining grayscale saliency includes:

[0065] First, take the range of grayscale values within the preset local range of this pixel as the change range of this pixel. The range of grayscale within the range reflects the grayscale contrast situation. When the range is larger, that is, the change range is larger, it indicates that the local contrast situation is more significant. Further, take the variance of the grayscale values of this pixel within the preset local range as the local chaos degree of this pixel. The variance reflects the chaos situation of the grayscale values. When the local chaos degree is higher, it indicates that more significant changes occur locally in the pixel.

[0066] Finally, combine the change range and local chaos degree of this pixel to obtain the grayscale saliency of this pixel. In the embodiments of the present invention, take the product of the change range and local chaos degree of this pixel as the grayscale saliency of this pixel. When the change range is larger and the local chaos degree is larger, it indicates that this pixel is more likely to be located in the significantly textured part from the aspect of grayscale, so the grayscale saliency is larger.

[0067] In a specific implementation method of the embodiments of the present invention, set the preset local range as a 9×9 window centered on the pixel. The specific size of the preset local range can be adjusted by the implementer according to the specific implementation scenario and is not limited here.

[0068] S202: In each preset direction of this pixel, obtain the continuous length of this pixel in each preset direction according to the run length of the grayscale value of this pixel.

[0069] At the same time, due to the continuous and regular characteristics of the text, the pixels have high continuity in the stroke direction. Therefore, the texture characteristics of the pixels are further analyzed from the distribution continuity situation. By the continuous situation of pixel values of each pixel in different directions, obtain the continuous length in each direction.

[0070] In an embodiment of the present invention, the continuous same length of the gray value of the pixel point in the preset direction is the run length of the gray value of the pixel point, and the continuous length is obtained to reflect the continuous distribution in a single direction. Among them, the preset directions are respectively the directions of 0°, 45°, 90°, 135°, 180°, 225°, 270° and 325°. In other embodiments of the present invention, the preset directions can also be the horizontal direction, the vertical direction and the diagonal direction, which are not limited here.

[0071] S203: Combine the continuous lengths of the pixel point in all preset directions and the gray significance to obtain the texture significance of the pixel point.

[0072] Comprehensively analyze from two aspects of the local gray value and continuous distribution of the pixel point to reflect the significant situation of the texture characteristics of the pixel point. When the continuous distribution of the pixel point in different directions is stronger and the texture significance in the gray performance is higher, it indicates that the pixel point is more likely to be located in the texture part.

[0073] In some possible implementation manners of the embodiment of the present invention, the method for obtaining the texture significance of a pixel point includes: taking the accumulated value of the continuous lengths of the pixel point in all preset directions as the continuous significance of the pixel point, comprehensively reflecting the continuous degree of the continuous distribution in all directions, and taking the product of the continuous significance and the gray significance of the pixel point as the texture significance of the pixel point. As an example, the expression of the texture significance is:

[0074] In the formula, W i represents the texture significance of the i-th pixel point, M represents the total number of preset directions, L i,m represents the continuous length of the i-th pixel point in the m-th preset direction, and F i represents the gray significance of the i-th pixel point. Among them, represents the continuous significance of the i-th pixel point.

[0075] So far, the analysis of the texture characteristics of the pixel points in the image is completed.

[0076] Since the text part to be enhanced is composed of the pixel point area distribution, it is further divided based on the texture significance and distribution position of the pixel point to obtain the area to be enhanced, and the pixel points with high texture characteristics and approximate distances are grouped into the area part to be enhanced.

[0077] Preferably, in some possible implementation methods of the embodiment of the present invention, the method for obtaining the area to be enhanced includes:

[0078] When the normalized value of the texture saliency of a pixel is greater than a preset saliency threshold, it indicates that the texture feature of the pixel is relatively obvious. The corresponding pixel is regarded as a pixel to be enhanced. When the pixels to be enhanced are connected in the distribution position, the pixels to be enhanced can form a region for subsequent analysis. Therefore, each connected component composed of the pixels to be enhanced is regarded as a region to be enhanced.

[0079] In other embodiments of the present invention, region growing can be performed on the pixels to be enhanced to obtain the growing region as the region to be enhanced. The growing point is the pixel to be enhanced with the maximum texture saliency that has not undergone growth. The growth criterion is that when the pixel to be enhanced is adjacent to the growing point that has already undergone growth, growth is performed. The specific process of obtaining the region is not limited here.

[0080] In a specific implementation manner of the embodiment of the present invention, the preset saliency threshold is set to 0.7. The specific value can be adjusted by the implementer according to the implementation scenario and is not limited here.

[0081] So far, the texture analysis of the grayscale image of the document to be recognized is completed, and the regions to be enhanced that may need to be enhanced are obtained.

[0082] S3: According to the gray-scale contrast situation and gradient confusion situation of the pixels in each region to be enhanced, obtain the text saliency of each region to be enhanced; according to the edge smoothing and pixel highlighting situations in each region to be enhanced, obtain the pattern saliency of each region to be enhanced.

[0083] Since the reflective pattern also has texture features, the selected pattern part does not need to be enhanced additionally. For the text part, it can be enhanced to improve the accuracy of subsequent text recognition. At the same time, since when there is a relatively high pattern situation in the text part of the image, the required enhancement effect for this part is higher to minimize the influence of the reflective pattern on the text part as much as possible. Therefore, in order to perform different enhancement adjustments on different regions to be recognized more comprehensively, the saliency situations of the text part and the pattern part reflected by the region are analyzed respectively to adjust the enhancement coefficient.

[0084] In the region to be enhanced, the gray-scale values of the pixels in the text part are generally low, and there is a relatively obvious gray-scale contrast with the background. Moreover, the direction of the text strokes is regular, that is, the gradient direction of the edge of the text part will be concentrated in several directions and the consistency is relatively high. Therefore, first analyze the possibility of the text in the region from the gray-scale contrast situation and the gradient distribution situation.

[0085] Preferably, in some possible implementation manners of the embodiment of the present invention, for the method of obtaining the text saliency, please refer to Figure 4 , which shows a flowchart of a method for obtaining the text saliency provided by an embodiment of the present invention. The method includes the following steps:

[0086] S301: For any region to be enhanced, obtain the text gray level index of the region to be enhanced according to the maximum gray level deviation degree and gray level value of the pixel points in the region to be enhanced.

[0087] Analyze from the gray level situation through the overall distribution size of the gray level in the region and the degree of obvious contrast. Preferably, in the embodiments of the present invention, first, take the average value of the gray level values of all pixel points in the region to be enhanced as the gray level distribution index of the region to be enhanced. The smaller the gray level distribution index, the more prominent the text part in the region in terms of gray level distribution.

[0088] Further, arrange the gray level values of all pixel points in the region to be enhanced in ascending order to obtain the gray level distribution sequence of the region to be enhanced, obtain the difference sequence of the gray level distribution sequence, and take the maximum difference value in the difference sequence as the gray level deviation index of the region to be enhanced. The maximum value in the case of gray level value difference reflects the significant degree of gray level contrast change in the region.

[0089] Finally, combine the gray level distribution index and the gray level deviation index of the region to be enhanced to obtain the text gray level index of the region to be enhanced. In the embodiments of the present invention, take the product of the inverse value of the gray level distribution index and the gray level deviation index as the text gray level index of the region to be enhanced. The lower the gray level distribution index and the larger the gray level deviation index, the more prominent the text characterized by the gray level situation in the region may be.

[0090] S302: Count the number of each gradient direction in the region to be enhanced, and take the negative entropy of the number of all gradient directions as the text gradient index of the region to be enhanced.

[0091] When the distribution of gradient directions in the region is more chaotic, it indicates that the texture change in the region is more complex and variable, which is less consistent with the text situation. Reflect the distribution of gradient directions through the distribution of the number of gradient directions. When the number of gradient directions is more uniform, it indicates that there are more gradient direction distributions. On the contrary, when the gradient direction distribution is more concentrated, it indicates that the distribution is more consistent.

[0092] In the embodiments of the present invention, obtain the text gradient index in the form of negative entropy to reflect the concentration of the distribution of the number of gradient directions. The larger the text gradient index, the more prominent the text characterized by the gradient distribution situation in the region may be. It should be noted that the acquisition of gradient directions is a well-known technical means for those skilled in the art and will not be elaborated here.

[0093] S303: Combine the text gray level index and the text gradient index of the region to be enhanced to obtain the text saliency of the region to be enhanced.

[0094] Finally, the saliency of the text in the region is obtained from two aspects: grayscale and gradient. In the embodiment of the present invention, the product of the text grayscale index and the text gradient index of the region to be enhanced is used to obtain the text saliency of the region to be enhanced. For regions where the text is more salient, the subsequent need for enhancement is higher.

[0095] Thus, the possible analysis of the text in the region is completed.

[0096] Furthermore, the possible situation of the pattern in the region is analyzed. The pattern is clearly visible under reflection and appears as a relatively bright part in the image. At the same time, the pattern on the certificate is usually used for anti-counterfeiting, with a relatively complex shape and smooth edges. Therefore, the saliency of the pattern is analyzed from the highlights and smooth edges of the pixel points in the region.

[0097] Preferably, in some possible implementation manners of the embodiment of the present invention, for the method of obtaining the pattern saliency, please refer to Figure 5 which shows a flowchart of a method for obtaining the pattern saliency provided by an embodiment of the present invention. The method includes the following steps:

[0098] S311: For any region to be enhanced, obtain the grayscale histogram of the pixel points in the region to be enhanced, and obtain the highlight index of the region to be enhanced according to the proportion and concentration of the grayscale value distribution in the grayscale histogram.

[0099] Since the texture feature analysis of the region to be enhanced is based on local features, there are local background pixel points in the text or pattern region in the region to be enhanced. In order to improve the accuracy of the analysis of the highlight situation of the pixel points, the grayscale distribution can be intuitively reflected by the grayscale histogram, and it can be characterized by the grayscale distribution on the right side of the histogram.

[0100] Preferably, in the embodiment of the present invention, first in the grayscale histogram of the region to be enhanced, the grayscale values greater than the preset highlight threshold are used as the highlight grayscale values of the region to be enhanced, and the kurtosis of the distribution of the highlight grayscale values in the grayscale histogram is calculated to obtain the highlight concentration of the region to be enhanced. When the distribution of the highlight part is more concentrated, the kurtosis of the distribution is higher, and the saliency of the reflective pattern is higher.

[0101] Furthermore, the proportion of the number of highlight grayscale values in the total number of all grayscale values is used as the highlight ratio of the region to be enhanced. When the proportion of the number of pixels with higher grayscale values is larger, it indicates that the saliency of the pattern in the region is higher. Finally, the product of the highlight concentration and the highlight ratio of the region to be enhanced is used as the highlight index of the region to be enhanced. Combining the concentration and proportion of the highlight part to obtain the highlight index, when the highlight index is larger, it indicates that the pixel points in the region are more salient in the highlight feature, and the possibility of the reflective pattern is higher.

[0102] In a specific implementation manner of the embodiment of the present invention, the preset highlight threshold is set to 170, and the specific value can be adjusted by the implementer himself / herself without limitation here. It should be noted that the methods for obtaining the grayscale histogram and kurtosis are well-known technical means to those skilled in the art and will not be elaborated here.

[0103] S312: Obtain the smoothness index of the area to be enhanced according to the smooth change situation of each pixel point on each edge in the area to be enhanced.

[0104] Since the patterns have rich details and mostly intertwined shape features, and their edges mostly change smoothly and continuously, the degree of smooth continuous change is further analyzed to further analyze the possibility of the existence of patterns.

[0105] Preferably, in the embodiment of the present invention, obtain the gradient direction difference between every two adjacent pixel points on the edge of the area to be enhanced as the change deviation, and reflect the degree of edge direction change through the degree of change of the gradient direction between every two adjacent pixel points on the edge. Further, perform a negative correlation mapping on the variances of all change deviations in the area to be enhanced to obtain the smoothness index of the area to be enhanced. The smooth change degree of the edge is reflected by the variance. When the variance is larger, it indicates that the change deviations are more chaotic, the degree of edge change is more complex and intense, the smooth change degree is lower, and the possibility of patterns in the area is lower.

[0106] S313: Obtain the pattern saliency of the area to be enhanced according to the highlight index and smoothness index of the area to be enhanced.

[0107] Combining the highlight situation and the edge change situation to reflect the possible degree of the existence of patterns in the area. In the embodiment of the present invention, the product of the highlight index and the smoothness index is used as the pattern saliency of the area to be enhanced. When the highlight degree and the edge smoothness situation in the area are more significant, the possibility of the existence of patterns in the area to be enhanced is more obvious.

[0108] So far, the analysis of the pattern saliency in the area is completed.

[0109] S4: Obtain the gamma adjustment parameter of each area to be enhanced according to the text saliency and pattern saliency; perform image enhancement on different areas to be enhanced through the gamma adjustment parameter to obtain the enhanced image of the document to be recognized.

[0110] Finally, through the different text saliency and pattern saliency situations in the area, the adjustment situation of each area to be enhanced is adaptively obtained. Gamma change can improve the brightness and contrast in the image, but the selection of the gamma parameter will affect the degree of image enhancement. For the part where the text is more severely affected, a smaller gamma parameter should be used for gamma change to enhance the contrast situation and reduce the influence of light occlusion. Therefore, for different areas to be enhanced, the gamma parameter is adjusted according to different saliency situations.

[0111] Preferably, in some possible implementation manners of the embodiments of the present invention, the method for obtaining the gamma adjustment parameter includes:

[0112] Taking the value obtained by normalizing the text saliency of the area to be enhanced as the text index of the area to be enhanced, taking the value obtained by normalizing the pattern saliency of the area to be enhanced as the pattern index of the area to be enhanced, and performing a saliency comparison analysis through normalization. It should be noted that normalization is a well-known technical means in the art, and the selection of normalization can be linear normalization or standard normalization, etc. The specific normalization method is not limited herein.

[0113] For any area to be enhanced, when the text index of the area to be enhanced is greater than the preset text threshold and the pattern index is greater than the preset pattern threshold, it indicates that there is a high possibility of text in the area to be enhanced and there is also a high pattern situation. At this time, the degree of enhancement required is extremely high to eliminate the occlusion effect as much as possible. Therefore, the gamma adjustment parameter of the area to be enhanced is set to a low gamma parameter.

[0114] When the text index of the area to be enhanced is greater than the preset text threshold and the pattern index is less than or equal to the preset pattern threshold, it indicates that there is a high possibility of text in the area to be enhanced, but the pattern situation is not significant. At this time, the text part is enhanced to a certain extent and overexposure is prevented, and the gamma adjustment parameter of the area to be enhanced is set to a medium gamma parameter;

[0115] When the text index of the current area to be enhanced is less than or equal to the preset text threshold, it indicates that the distribution of text in the area to be enhanced may be low and the enhancement requirement is low. The gamma adjustment parameter of the area to be enhanced is set to a high gamma parameter.

[0116] In a specific implementation manner of the embodiments of the present invention, the preset text threshold can be set to 0.5, the preset pattern threshold can be set to 0.7, the low gamma parameter is set to 0.3, the medium gamma parameter is set to 0.6, and the high gamma parameter is set to 0.8. The implementer can adjust the numerical settings by himself / herself and is not limited herein.

[0117] In the embodiments of the present invention, each area to be enhanced in the grayscale image of the document to be recognized can use the corresponding gamma adjustment parameter as the gamma parameter in the gamma transformation to perform gamma transformation, complete the enhancement of the area, and obtain an enhanced grayscale image of the document to be recognized. Subsequently, text recognition can be performed based on the enhanced grayscale image of the document to be recognized, and the recognition result is uploaded to complete the information filling of the accident work order.

[0118] In summary, the present invention performs local analysis on each pixel point in the document image, obtains the texture saliency of each pixel point as a texture from the gray-scale chaos and continuous distribution, thereby reflecting the possibility that the pixel point is a text texture or a pattern texture, and combines the distribution position of the pixel point to obtain the area to be enhanced, so as to perform adaptive enhancement adjustment according to different situations of the area. Further considering that not only some texts may have enhancement requirements, when there are many patterns in the area, the reflective patterns will cause stronger interference to the text part. Therefore, in each area to be enhanced, analysis is performed from two aspects of pixel value and edge gradient to obtain the text saliency and the pattern saliency respectively. Through the text saliency situation and the pattern saliency situation, the gamma adjustment parameter required for each area is comprehensively analyzed, so as to perform adaptive enhancement of different areas of the image through the gamma adjustment parameter, and obtain the enhanced document image to be recognized. The present invention performs regional analysis through the texture features of pixel points, adaptively adjusts the enhancement situation of each area based on the saliency of text and patterns, obtains an image with higher quality to improve the text recognition efficiency, so as to improve the reliability of work order automation management.

[0119] It should be noted that the above sequence of embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0120] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments.

Claims

1. A method for full-process automated management of accident work orders, characterized in that: The method comprises: Obtain a grayscale image of the document to be identified; According to the local gray value chaos and continuous distribution of each pixel in the gray image of the document to be identified, the texture saliency of each pixel is obtained; based on the texture saliency and distribution position of the pixel, the area to be enhanced is obtained by division; According to the grayscale contrast and gradient confusion of the pixels in each area to be enhanced, the text saliency of each area to be enhanced is obtained; according to the edge smoothness and pixel highlighting of each area to be enhanced, the pattern saliency of each area to be enhanced is obtained; The method for obtaining the text saliency is as follows: for any area to be enhanced, according to the maximum grayscale deviation degree and grayscale value of the pixel points in the area to be enhanced, the text grayscale index of the area to be enhanced is obtained; the number of each gradient direction in the area to be enhanced is counted, and the negative entropy of the number of all gradient directions is used as the text gradient index of the area to be enhanced; the text grayscale index and the text gradient index of the area to be enhanced are combined to obtain the text saliency of the area to be enhanced; The method for obtaining the pattern saliency is as follows: for any area to be enhanced, a grayscale histogram of the pixels in the area to be enhanced is obtained; a highlight index of the area to be enhanced is obtained according to the proportion and concentration of the grayscale value distribution in the grayscale histogram; a smoothness index of the area to be enhanced is obtained according to the continuous and smooth change of the pixels on each edge of the area to be enhanced; and the pattern saliency of the area to be enhanced is obtained according to the highlight index and the smoothness index of the area to be enhanced. According to the text prominence and the pattern prominence, the gamma adjustment parameter of each area to be enhanced is obtained; the image of different areas to be enhanced is enhanced by the gamma adjustment parameter to obtain an enhanced document image to be identified.

2. A method for full-process automated management of accident work orders according to claim 1, characterized in that: The method for obtaining the texture saliency comprises: For any pixel in the grayscale image of the document to be identified, the grayscale significance of the pixel is obtained within a preset local range of the pixel according to the fluctuation range of the grayscale value and the value disorder; In each preset direction of the pixel point, according to the run length of the gray value of the pixel point, obtain the continuous length of the pixel point in each preset direction; The texture saliency of the pixel is obtained by combining the continuous length of the pixel in all preset directions and the grayscale saliency.

3. A method for full-process automated management of accident work orders according to claim 2, characterized in that: The gray significance of the pixel point is obtained according to the fluctuation range of the gray value and the numerical disorder within the preset local range of the pixel point, including: The extreme difference of the grayscale value within the preset local range of the pixel point is used as the variation range of the pixel point; The variance of the grayscale value of the pixel point within a preset local range is used as the local disorder degree of the pixel point; The grayscale saliency of the pixel is obtained by combining the variation range and local disorder of the pixel.

4. According to claim 1, a method for full-process automated management of accident work orders is characterized in that: The division based on the texture saliency and distribution position of the pixel points to obtain the area to be enhanced includes: When the texture saliency of a pixel point is normalized and the value is greater than a preset saliency threshold, the corresponding pixel point is taken as a pixel point to be enhanced; and each connected domain composed of the pixel points to be enhanced is taken as a region to be enhanced.

5. According to claim 1, a method for full-process automated management of accident work orders is characterized in that: The step of obtaining the text grayscale index of the area to be enhanced according to the maximum grayscale deviation degree and grayscale value of the pixels in the area to be enhanced comprises: The average of the grayscale values ​​of all pixels in the area to be enhanced is used as the grayscale distribution index of the area to be enhanced; The grayscale values ​​of all pixels in the area to be enhanced are arranged in ascending order to obtain a grayscale distribution sequence of the area to be enhanced; a differential sequence of the grayscale distribution sequence is obtained, and the maximum differential value in the differential sequence is used as a grayscale deviation index of the area to be enhanced; The text grayscale index of the area to be enhanced is obtained by combining the grayscale distribution quality assurance and the grayscale deviation index of the area to be enhanced.

6. A method for full-process automated management of accident work orders according to claim 1, characterized in that: The method for obtaining the highlight indicator includes: In the grayscale histogram of the area to be enhanced, the grayscale value greater than the preset highlight threshold is used as the highlight grayscale value of the area to be enhanced; Calculate the kurtosis of the distribution of highlight grayscale values ​​in the grayscale histogram to obtain the highlight concentration of the area to be enhanced; take the proportion of the number of highlight grayscale values ​​in the number of all grayscale values ​​as the highlight proportion of the area to be enhanced; The product of the highlight concentration and the highlight ratio of the area to be enhanced is used as the highlight index of the area to be enhanced.

7. A method for full-process automated management of accident work orders according to claim 6, characterized in that: The method for obtaining the smoothing index includes: The gradient direction difference between every two adjacent pixel points on the edge of the area to be enhanced is obtained as the variation deviation; the variances of all variation deviations in the area to be enhanced are negatively correlated to obtain the smoothness index of the area to be enhanced.

8. A method for full-process automated management of accident work orders according to claim 1, characterized in that: The step of obtaining the gamma adjustment parameters of each area to be enhanced according to the text prominence and the pattern prominence includes: The value after normalization of the text saliency of the area to be enhanced is used as the text index of the area to be enhanced; the value after normalization of the pattern saliency of the area to be enhanced is used as the pattern index of the area to be enhanced; For any area to be enhanced, when the text index of the area to be enhanced is greater than a preset text threshold and the pattern index of the area to be enhanced is greater than a preset pattern threshold, the gamma adjustment parameter of the area to be enhanced is set to a low gamma parameter; When the text index of the area to be enhanced is greater than a preset text threshold and the pattern index is less than or equal to a preset pattern threshold, the gamma adjustment parameter of the area to be enhanced is set to a medium gamma parameter; When the text index of the current enhanced area is less than or equal to the preset text threshold, the gamma adjustment parameter of the area to be enhanced is set to a high gamma parameter.

Citation Information

Patent Citations

  • Image contrast enhancement implementation method based on local adaptive gamma correction

    CN110599415A

  • Image processing method, equipment and device

    CN115100048A