Method for automatic management of whole process of accident work order

By analyzing the texture significance and gamma adjustment of the grayscale image of the identification certificate, the problem of poor applicability of image enhancement to outdoor certificates is solved, the text recognition efficiency is improved, and the reliability of automated work order management is enhanced.

CN119048012AActive Publication Date: 2024-11-29平湖市公安局交通警察大队

Patent Information

Application Number
CN202411169591.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-24
Publication Date
2024-11-29
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 obtaining the grayscale image of the document to be identified, analyzing the texture saliency and distribution position of each pixel point, and dividing the areas to be enhanced; according to the text saliency and pattern saliency of each area, obtaining gamma adjustment parameters and performing gamma adjustments according to the text saliency and pattern saliency of each area. Enhance the image.

Benefits of technology

It improves image quality, improves text recognition efficiency, and enhances the reliability of work order automation management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048012A_ABST
    Figure CN119048012A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image enhancement, in particular to a method for accident work order whole-process automatic management. The method comprises the following steps of: analyzing each pixel point in a to-be-identified certificate grayscale image from local grayscale confusion and continuous distribution to obtain texture saliency, and combining the distribution positions of the pixel points to obtain a to-be-enhanced region; analyzing from two aspects of a pixel value and an edge gradient in each region to be enhanced, respectively obtaining character saliency and pattern saliency, and obtaining gamma adjustment parameters required by each region; and performing image enhancement on the different to-be-enhanced areas through the gamma adjustment parameters to obtain an enhanced to-be-identified certificate image. According to the method, through regional analysis of the texture features of the pixel points, the enhancement condition of each region is adaptively adjusted based on the significant condition of the characters and the patterns, the image with higher quality is obtained, the character recognition efficiency is improved, and the work order automatic management reliability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of the Internet and big data technology, the informatization of accident work orders can quickly handle traffic accidents online, avoid traffic congestion at the accident site, and reduce the risk of secondary accidents. The work order status is automatically promoted according to the preset business rules to realize the automatic circulation of accident work orders. Through the full process of accident work order automation management, the processing progress of accident work orders is monitored in real time, and the processing results are fed back in time to ensure the transparency and traceability of accident handling.

[0003] In the full process of automated management of accident work orders, it is necessary to take photos of the ID cards of the people involved in the accident so that the text in the photos can be automatically recognized through optical character recognition technology, which can reduce manual intervention and reduce the error rate. However, since most accidents occur outdoors, the quality of the photos directly affects the accuracy of subsequent text recognition. When enhancing the photos, due to the anti-counterfeiting patterns on the driver's license and vehicle registration, the applicability of image enhancement to outdoor documents is poor, and the quality of the enhancement results is not high, which affects the efficiency of subsequent text recognition. Summary of the invention

[0004] In order to solve the technical problems in the prior art that image enhancement is poorly applicable to outdoor documents, the quality of the enhancement result is not high, and the efficiency of subsequent text recognition is affected, the purpose of the present invention is to provide a method for full-process automated management of accident work orders, and the technical solutions adopted are as follows:

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

[0006] Obtain a grayscale image of the document to be identified;

[0007] 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;

[0008] 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;

[0009] 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.

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

[0011] 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;

[0012] 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;

[0013] The texture saliency of the pixel is obtained by combining the continuous length of the pixel in all preset directions and the grayscale saliency.

[0014] Furthermore, 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:

[0015] 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;

[0016] 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;

[0017] The grayscale saliency of the pixel is obtained by combining the variation range and local disorder of the pixel.

[0018] Furthermore, the division based on the texture saliency and distribution position of the pixel points to obtain the area to be enhanced includes:

[0019] 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.

[0020] Furthermore, obtaining the text saliency of each area to be enhanced according to the grayscale contrast and gradient confusion of the pixels in each area to be enhanced includes:

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

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

[0023] The text saliency of the area to be enhanced is obtained by combining the text grayscale index and the text gradient index of the area to be enhanced.

[0024] Furthermore, 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 includes:

[0025] 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;

[0026] 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;

[0027] 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.

[0028] Furthermore, obtaining the pattern prominence of each area to be enhanced according to the edge smoothness and pixel highlighting in each area to be enhanced includes:

[0029] For any area to be enhanced, a grayscale histogram of pixels in the area to be enhanced is obtained; and a highlight index of the area to be enhanced is obtained according to the proportion and concentration of grayscale value distribution in the grayscale histogram;

[0030] According to the smoothness of the continuous change of each pixel point on the edge of the area to be enhanced, a smoothness index of the area to be enhanced is obtained;

[0031] The pattern prominence of the area to be enhanced is obtained according to the highlight index and the smoothness index of the area to be enhanced.

[0032] Furthermore, the method for obtaining the highlight indicator includes:

[0033] 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;

[0034] 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;

[0035] 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.

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

[0037] 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.

[0038] Furthermore, obtaining the gamma adjustment parameter of each area to be enhanced according to the text prominence and the pattern prominence includes:

[0039] 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;

[0040] 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;

[0041] 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;

[0042] 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.

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

[0044] The present invention performs local analysis on each pixel in the document image, obtains the texture saliency of each pixel as a texture from the grayscale chaos and continuous distribution, thereby reflecting the possibility that the pixel is a text texture or a pattern texture, and combines the distribution position of the pixel to obtain the area to be enhanced, so as to perform adaptive enhancement adjustment according to different conditions in the area. Further considering that not only the text may have a part of the enhancement demand, when there are many patterns in the area, the reflective pattern will have a stronger interference on the text part, so in each area to be enhanced, the pixel value and the edge gradient are analyzed from two aspects, and the text saliency and the pattern saliency are obtained respectively. According to the text saliency and the pattern saliency, the gamma adjustment parameters required for each area are comprehensively analyzed, so as to perform adaptive enhancement of different areas of the image through the gamma adjustment parameters, and obtain an enhanced document image to be identified. The present invention analyzes the texture features of the pixel points by region, and adaptively adjusts the enhancement of each area based on the saliency of the text and the pattern, so as to obtain a higher quality image, improve the text recognition efficiency, and improve the reliability of the work order automation management. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A flow chart of a method for full-process automated management of accident work orders provided by one embodiment of the present invention;

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

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

[0049] Figure 4 A flow chart of a method for obtaining text prominence provided by an embodiment of the present invention;

[0050] Figure 5 A flow chart of a method for obtaining pattern prominence provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method for the full-process automated management of accident work orders proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

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

[0053] The following is a detailed description of a method for full-process automated management of accident work orders provided by the present invention in conjunction with the accompanying drawings.

[0054] See also Figure 1 , which shows a method flow chart for full-process automated management of accident work orders provided by an embodiment of the present invention, the method comprising the following steps:

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

[0056] The accident work order requires the traffic police to create an accident work order based on the information of the accident scene after arriving at the accident scene. The information of the parties involved in the accident needs to be entered by taking photos of the documents and uploading and identifying them. The relevant documents include the driver's license, vehicle registration certificate and ID card. Since the shooting scene is outdoors and the shooting technique is highly random, the captured document image may have certain deformation or blur, so the image needs to be enhanced first. In an embodiment of the present invention, the captured document image is subjected to image preprocessing to obtain a document grayscale image, wherein the image preprocessing process can specifically include image grayscale processing and filtering and denoising processing. It should be noted that the image preprocessing process is a technical means well known to those skilled in the art, and specifically grayscale weighting method can be used for grayscale and bilateral filtering method for filtering, etc., which will not be elaborated here.

[0057] At the same time, since the document image taken outdoors may have a background part with large interference, background removal processing is required. In the embodiment of the present invention, a region containing only the document part is obtained by a ROI extraction method, and the image after the ROI region is extracted is used as the grayscale image of the document to be identified. It should be noted that the background removal method of ROI extraction is a technical means well known to those skilled in the art and will not be described in detail here.

[0058] S2: 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.

[0059] In the grayscale image of the document to be identified, the text part needs to be further enhanced to improve the image text recognition. At the same time, due to the random angle of outdoor light, the surface of the document will reflect light. However, the anti-counterfeiting pattern in the document will show more obvious texture characteristics when reflecting light, and the text will be blocked. Please refer to Figure 2 , which shows a partial schematic diagram of a grayscale image of a document to be identified provided by an embodiment of the present invention, and the reflective pattern will affect the text part.

[0060] The text part that needs to be enhanced is determined based on the texture features. The texture features are analyzed from the large local pixel changes and the continuous distribution characteristics of the texture to obtain the texture significance of the pixel. The pixel with high texture significance reflects the text part or the reflective pattern part.

[0061] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining texture saliency can be found in Figure 3 , which shows a flow chart of a method for obtaining texture saliency provided by an embodiment of the present invention, the method comprising the following steps:

[0062] S201: 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.

[0063] The grayscale value distribution of the text texture on the certificate deviates greatly from the background, and the local pixel points change more. Therefore, for pixels with high texture, the local grayscale changes are richer and the contrast is stronger. Therefore, for each pixel point, we first analyze the grayscale value distribution to obtain the grayscale significance of each pixel point.

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

[0065] First, the range of the grayscale value within the preset local range of the pixel point is used as the variation range of the pixel point. The grayscale contrast is reflected by the range of the grayscale. The larger the range, the larger the variation range, which means the more significant the local contrast. Further, the variance of the grayscale value within the preset local range of the pixel point is used as the local disorder of the pixel point. The disorder of the grayscale value is reflected by the variance. When the local disorder is high, it means that the pixel point has a more significant change locally.

[0066] Finally, the gray significance of the pixel is obtained by combining the variation range and the local disorder of the pixel. In the embodiment of the present invention, the product of the variation range and the local disorder of the pixel is used as the gray significance of the pixel. The larger the variation range and the larger the local disorder, the more likely the pixel is to be located in the significant part of the texture from the grayscale analysis, so the gray significance is greater.

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

[0068] S202: 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.

[0069] At the same time, due to the continuous regularity of text, the pixels have high continuity in the stroke direction. Therefore, the pixel texture features are further analyzed from the distribution continuity. The continuous length in each direction is obtained through the continuity of the pixel values ​​of each pixel in different directions.

[0070] In the embodiment of the present invention, the continuous quotient is obtained by the continuous same length of the gray value of the pixel in the preset direction, that is, the run length of the gray value of the pixel, reflecting the continuous distribution in a single direction. The preset directions are respectively 0°, 45°, 90°, 135°, 180°, 225°, 270° and 325°. In other embodiments of the present invention, the preset directions may also be horizontal, vertical and diagonal directions, which are not limited here.

[0071] S203: Combining the continuous length of the pixel point in all preset directions and the grayscale saliency, obtain the texture saliency of the pixel point.

[0072] A comprehensive analysis of the local grayscale and continuous distribution of pixels reflects the significance of the texture features of the pixels. The stronger the continuous distribution of pixels in different directions, the higher the texture significance in grayscale expression, which means that the pixel is more likely to be located in the texture part.

[0073] In some possible implementations of the embodiments of the present invention, the method for obtaining the texture saliency of a pixel point includes: taking the cumulative value of the continuous length of the pixel point in all preset directions as the continuous saliency of the pixel point, integrating the continuous reflection distribution continuity of all directions, and taking the product of the continuous saliency of the pixel point and the grayscale saliency as the texture saliency of the pixel point. As an example, the expression of texture saliency is:

[0074] Where W i is represented by the texture saliency of the i-th pixel, M is represented by the total number of preset directions, and L i,m It is represented as the continuous length of the i-th pixel in the m-th preset direction, F i It is expressed as the gray level significance of the i-th pixel. It is represented as the continuous saliency of the i-th pixel.

[0075] At this point, the analysis of the texture features of the pixels in the image is completed.

[0076] Since the text part that needs to be enhanced is composed of the regional distribution of pixels, it is further divided based on the texture saliency and distribution position of the pixels to obtain the area to be enhanced, and the pixels with high texture features and similar distances form the area part that needs to be enhanced.

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

[0078] When the normalized value of the texture saliency of a pixel is greater than the preset saliency threshold, it means that the texture feature of the pixel is more obvious, and the corresponding pixel is taken as the 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 domain composed of the pixels to be enhanced is taken as the region to be enhanced.

[0079] In other embodiments of the present invention, regional growth can be performed on the pixel points to be enhanced, and the obtained growth area is the area to be enhanced, the growth point is the pixel point to be enhanced with the maximum texture significance that has not been grown, and the growth criterion is that when the pixel point to be enhanced is adjacent to the position of the growth point that has been grown, growth is performed, and the specific area acquisition process is not limited here.

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

[0081] At this point, the texture analysis in the grayscale image of the document to be identified is completed, and the area to be enhanced that may need to be enhanced is obtained.

[0082] S3: 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.

[0083] Since the reflective pattern also has texture characteristics, the selected pattern part does not need additional enhancement, but the text part can be enhanced to improve the accuracy of subsequent text recognition. At the same time, when the text part also has a high pattern in the image, the enhancement effect required for this part is higher, so as to minimize the impact of the reflective pattern on the text part. Therefore, in order to make different enhancement adjustments for different areas to be recognized more comprehensively, the significant situation of the text part and the significant situation of the pattern part reflected in the area are analyzed separately to adjust the enhancement coefficient.

[0084] In the area to be enhanced, the grayscale values ​​of the pixels in the text part are generally low, which will produce a more obvious grayscale contrast with the background, and 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 have high consistency. Therefore, the possibility of text in the area is analyzed from the grayscale contrast and gradient distribution.

[0085] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the text prominence is described in Figure 4 , which shows a flow chart of a method for obtaining text prominence provided by an embodiment of the present invention, the method comprising the following steps:

[0086] S301: For any area to be enhanced, according to the maximum grayscale deviation and grayscale value of pixels in the area to be enhanced, obtain the text grayscale index of the area to be enhanced.

[0087] The grayscale situation is analyzed by the overall distribution size of the grayscale in the region and the degree of obvious contrast. Preferably, in an embodiment of the present invention, the mean grayscale value of all pixels in the region to be enhanced is first used as the grayscale distribution index of the region to be enhanced. The smaller the grayscale distribution index is, the more prominent the text portion in the region is in the grayscale distribution.

[0088] Furthermore, the grayscale values ​​of all pixels in the area to be enhanced are arranged in ascending order to obtain the grayscale distribution sequence of the area to be enhanced, and the differential sequence of the grayscale distribution sequence is obtained. The maximum differential value in the differential sequence is used as the grayscale deviation index of the area to be enhanced. The maximum value in the grayscale value differential case reflects the significance of the grayscale contrast change in the area.

[0089] Finally, the grayscale index of the text in the area to be enhanced is obtained by combining the grayscale distribution index and the grayscale deviation index of the area to be enhanced. In the embodiment of the present invention, the product of the inverse proportional value of the grayscale distribution index and the grayscale deviation index is used as the text grayscale index of the area to be enhanced. The lower the grayscale distribution index and the larger the grayscale deviation index, the more significant the text represented by the grayscale situation in the area may be.

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

[0091] The more chaotic the distribution of gradient directions in the region is, the more complex and changeable the texture changes in the region are, and the less consistent with the text situation is. The distribution of the number of gradient directions reflects the distribution of gradient directions. When the number of gradient directions is more uniform, it means that there are more gradient directions distributed. Conversely, when the gradient direction distribution is more concentrated, the distribution is more consistent.

[0092] In the embodiment of the present invention, the text gradient index is obtained in the form of negative entropy, reflecting the distribution concentration of the number of gradient directions. When the text gradient index is larger, the text represented by the gradient distribution in the region may be more significant. It should be noted that the acquisition of gradient direction is a technical means well known to those skilled in the art and will not be described in detail here.

[0093] S303: Combining the text grayscale index and the text gradient index of the area to be enhanced, obtaining the text saliency of the area to be enhanced.

[0094] Finally, the prominence of the text in the area is obtained from the grayscale and gradient aspects. In an embodiment of the present invention, the product of the text grayscale index and the text gradient index of the area to be enhanced is used to obtain the text prominence of the area to be enhanced. For an area with more prominent text, the demand for subsequent enhancement is higher.

[0095] At this point, the possible analysis of the text in the area is completed.

[0096] Further analysis is conducted based on the possible situations of the patterns in the area. The patterns are obvious in reflective conditions and appear as relatively bright parts in the image. At the same time, the patterns in documents are usually used for anti-counterfeiting, and their shapes are relatively complex and their edges are smoothly changing. Therefore, the prominence of the patterns is analyzed from the highlights and edge smoothness of the pixels in the area.

[0097] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the pattern prominence is described in Figure 5 , which shows a flow chart of a method for obtaining pattern prominence provided by an embodiment of the present invention, the method comprising the following steps:

[0098] S311: For any region to be enhanced, a grayscale histogram of pixels in the region to be enhanced is obtained, and a highlight index of the region to be enhanced is obtained according to the proportion and concentration of grayscale value distribution in the grayscale histogram.

[0099] Since the texture feature analysis of the area to be enhanced is based on local features, there are local background pixels in the text or pattern area in the area to be enhanced. In order to improve the accuracy of the analysis of pixel highlights, the grayscale histogram is used to intuitively reflect the grayscale distribution, which can be represented by the grayscale distribution on the right side of the histogram.

[0100] Preferably, in an embodiment of the present invention, first, 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, and the kurtosis of the distribution of the highlight grayscale value in the grayscale histogram is calculated to obtain the highlight concentration of the area to be enhanced. The more concentrated the distribution of the highlight part, the higher the kurtosis of the distribution, and the higher the significance of the reflective pattern.

[0101] Furthermore, the proportion of the number of highlight grayscale values ​​in the number of all grayscale values ​​is taken as the highlight proportion of the area to be enhanced. The greater the proportion of pixels with higher grayscale values, the more significant the pattern in the area. Finally, the product of the highlight concentration and the highlight proportion of the area to be enhanced is taken as the highlight index of the area to be enhanced. The highlight index is obtained by combining the distribution concentration and proportion of the highlight part. The larger the highlight index, the more significant the pixel points in the area are in the highlight feature, and the more likely the reflective pattern is.

[0102] In a specific implementation of an embodiment of the present invention, the preset highlight threshold is set to 170. The specific value can be adjusted by the implementer and is not limited here. It should be noted that the method for obtaining the grayscale histogram and kurtosis is a technical means well known to technical personnel in this field and will not be elaborated here.

[0103] S312: Obtain a smoothness index of the area to be enhanced according to the smoothness of continuous changes of pixels on each edge of the area to be enhanced.

[0104] Since the patterns are rich in details and mostly have intertwined shape features, and their edge changes are mostly smooth and continuous, we further analyze the degree of smoothness of the continuous changes and the possibility of the pattern.

[0105] Preferably, in an embodiment of the present invention, the gradient direction difference between each two adjacent pixels on the edge of the region to be enhanced is obtained as a change deviation, and the degree of change in the gradient direction of each two adjacent pixels on the edge is used to reflect the degree of change in the edge direction. The variance of all change deviations in the region to be enhanced is further negatively correlated to obtain a smoothness index of the region to be enhanced, and the degree of smooth change of the edge is reflected by the variance. The larger the variance, the more chaotic the change deviation, the more complex and drastic the degree of edge change, the lower the degree of smooth change, and the lower the degree of possible pattern in the region.

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

[0107] The highlight situation and edge change situation are combined to reflect the possibility 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 prominence of the area to be enhanced. The more significant the highlight level and edge smoothness in the area are, the more obvious the existence of the pattern in the area to be enhanced is.

[0108] At this point, the analysis of the significant patterns in the area is completed.

[0109] S4: Obtain gamma adjustment parameters for each area to be enhanced according to the text prominence and the pattern prominence; perform image enhancement on different areas to be enhanced by using the gamma adjustment parameters to obtain an enhanced document image to be identified.

[0110] Finally, the adjustment of each area to be enhanced is obtained adaptively through the different text and pattern prominence in the area. The brightness and contrast in the image can be improved through gamma change, but the selection of gamma parameters will affect the degree of image enhancement. For the part where the text is more seriously affected, the smaller gamma parameter should be used for gamma change to enhance the contrast and reduce the occlusion effect of light. Therefore, for different areas to be enhanced, the gamma parameters are adjusted according to different prominence conditions.

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

[0112] 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, and 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, and the saliency comparison analysis is performed through normalization. It should be noted that normalization is a technical means well known to those skilled in the art, and the choice of normalization can be linear normalization or standard normalization, etc., and the specific normalization method is not limited here.

[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 means that there is a high possibility of text and a high possibility of pattern in the area to be enhanced. At this time, the degree of enhancement 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 means that there is a high possibility of text in the area to be enhanced, but the pattern 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 the medium gamma parameter;

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

[0116] In a specific implementation of an embodiment 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 implementers can adjust the numerical settings at their own discretion and are not limited here.

[0117] In the embodiment of the present invention, each region to be enhanced in the grayscale image of the document to be identified can be gamma-transformed by using the corresponding gamma adjustment parameter as the gamma parameter in the gamma transformation to complete the enhancement of the region and obtain the enhanced document image to be identified. Subsequently, text recognition can be performed based on the enhanced document image to be identified, and the recognition result can be uploaded to complete the information filling of the accident work order.

[0118] In summary, the present invention performs local analysis on each pixel in the document image, obtains the texture saliency of each pixel as a texture from the grayscale chaos and continuous distribution, thereby reflecting the possibility that the pixel is a text texture or a pattern texture, and combines the distribution position of the pixel to obtain the area to be enhanced, so as to perform adaptive enhancement adjustment through different situations in the area. Further considering that not only the text may have a part of the enhancement demand, when there are many patterns in the area, the reflective pattern will have a stronger interference on the text part, so in each area to be enhanced, the pixel value and edge gradient are analyzed from two aspects, and the text saliency and pattern saliency are obtained respectively. According to the text saliency and pattern saliency, the gamma adjustment parameters required for each area are comprehensively analyzed, so as to perform adaptive enhancement of different areas of the image through the gamma adjustment parameters, and obtain an enhanced document image to be identified. The present invention analyzes the texture features of the pixel points by region, and adaptively adjusts the enhancement of each area based on the saliency of the text and the pattern, so as to obtain a higher quality image and improve the text recognition efficiency, so as to improve the reliability of the work order automation management.

[0119] It should be noted that the sequence of the above 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 results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0120] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on 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; 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 saliency of each area to be enhanced according to the grayscale contrast and gradient confusion of the pixels in each area to be enhanced comprises: For any area to be enhanced, the text grayscale index of the area to be enhanced is obtained according to the maximum grayscale deviation degree and grayscale value of the pixel points in the area to be enhanced; Counting the number of each gradient direction in the area to be enhanced, and using the negative entropy of the number of all gradient directions as the text gradient index of the area to be enhanced; The text saliency of the area to be enhanced is obtained by combining the text grayscale index and the text gradient index of the area to be enhanced.

6. A method for full-process automated management of accident work orders according to claim 5, 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.

7. A method for full-process automated management of accident work orders according to claim 1, characterized in that: The step of obtaining the pattern saliency of each area to be enhanced according to the edge smoothness and pixel highlighting conditions in each area to be enhanced comprises: For any area to be enhanced, a grayscale histogram of pixels in the area to be enhanced is obtained; and a highlight index of the area to be enhanced is obtained according to the proportion and concentration of grayscale value distribution in the grayscale histogram; According to the smoothness of the continuous change of each pixel point on the edge of the area to be enhanced, a smoothness index of the area to be enhanced is obtained; The pattern prominence of the area to be enhanced is obtained according to the highlight index and the smoothness index of the area to be enhanced.

8. A method for full-process automated management of accident work orders according to claim 7, 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.

9. A method for full-process automated management of accident work orders according to claim 7, 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.

10. 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

  • Deep learning-based bill OCR (Optical Character Recognition) method and system

    CN118430000A

  • Printing and typesetting abnormity detection method and device based on image recognition

    CN118447020A

Cited By

  • Abdominal B-ultrasonic data intelligent analysis system for gynaecology and obstetrics

    CN119722668A