Chinese character recognition method and device in minority identity card and storage medium

By determining the initial detection frame in the ethnic minority ID card and performing orientation correction and dynamic boundary shrinkage, the problems of time-consuming template adaptation and inaccurate recognition were solved, achieving efficient and accurate Chinese character recognition.

CN120932243APending Publication Date: 2025-11-11PING AN INT FINANCIAL LEASING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511023912.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing technologies for recognizing Chinese characters on ethnic minority ID cards are time-consuming and labor-intensive due to template adaptation issues, and the differences in ID card layout among different people lead to inaccurate recognition.

Method used

By determining the initial detection box in the ID card image, text orientation correction and gradual dynamic boundary shrinkage are performed to ensure that the detection box only contains Chinese character positions.

Benefits of technology

It improves the accuracy and efficiency of Chinese character recognition on ethnic minority ID cards, avoiding incomplete or confused character recognition caused by detection frames that are too large or too small.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120932243A_ABST
    Figure CN120932243A_ABST
Patent Text Reader

Abstract

The invention discloses a Chinese character recognition method and device in a minority identity card and a storage medium, relates to the technical field of digital medical treatment and the technical field of financial science and technology, and aims to improve the Chinese character recognition precision and recognition efficiency in the minority identity card. Comprising the steps that an identity card image of a minority identity card to be recognized is acquired, an initial detection frame and a character direction of a field to be recognized in the identity card image are determined, and the initial detection frame comprises minority characters and Chinese characters; if the character direction is not the forward direction, rotating the initial detection frame and the to-be-identified field in the initial detection frame into the forward direction, and obtaining the corrected initial detection frame and the to-be-identified field in the initial detection frame; and carrying out gradual dynamic boundary shrinkage on the corrected initial detection frame, and finally taking each field in the detection frame meeting a shrinkage stopping condition as a Chinese character field. The method and the device are suitable for the scene of identifying the Chinese characters in the identity card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of digital medical technology and financial technology, and in particular to a method, device and storage medium for recognizing Chinese characters in ethnic minority identity cards. Background Technology

[0002] Ethnic minority ID cards have some special structures, such as displaying pinyin or ethnic minority script alongside Chinese characters. These ID cards need to be used nationwide, and Chinese characters are a script that all ethnic groups can recognize. Therefore, when conducting business based on ethnic minority ID cards, such as when patients are hospitalized or seeking medical treatment, or when applying for insurance, it is necessary to identify the Chinese characters in the ethnic minority ID card.

[0003] Currently, Chinese characters are typically located directly in the ethnic minority ID card to be tested based on the positions of Chinese characters and non-Chinese characters in the template. However, when the ID card layout is adjusted, the existing templates become completely ineffective, requiring the development of new, adapted templates, which is time-consuming and labor-intensive. In addition, in real-world scenarios, the length and height of names on different people's ID cards may vary, so template-based Chinese character recognition methods cannot accurately identify complete Chinese characters. Summary of the Invention

[0004] This invention provides a method, device, and storage medium for recognizing Chinese characters in ethnic minority identity cards, which mainly improves the accuracy and efficiency of Chinese character recognition in ethnic minority identity cards.

[0005] According to a first aspect of the present invention, a method for recognizing Chinese characters in a minority ethnic group's identity card is provided, comprising:

[0006] Obtain an image of the ID card of the ethnic minority to be identified, and determine the initial detection box and text direction of the field to be identified in the ID card image, wherein the initial detection box contains ethnic minority characters and Chinese characters;

[0007] If the text direction is not positive, then the initial detection box and the field to be recognized inside it are rotated to positive to obtain the corrected initial detection box and the field to be recognized inside it.

[0008] The corrected initial detection box is dynamically shrunk step by step, and finally each field in the detection box that meets the stop shrinking condition is taken as the Chinese character field.

[0009] Optionally, the method for determining the text direction of the field to be recognized in the ID card image includes:

[0010] In the ID card image, a plurality of reference fields adjacent to the field to be identified are determined, and angle information representing the degree of tilt of each reference field is determined respectively;

[0011] Based on the angle information, each of the reference fields is clustered to obtain reference fields under multiple cluster categories;

[0012] In each cluster category, determine the target cluster category with the most reference fields, and based on the cluster center angle of the target cluster category, determine the text direction of the field to be identified.

[0013] Optionally, the corrected initial detection box undergoes progressive dynamic boundary shrinkage, including:

[0014] The arrangement of non-Chinese characters and Chinese characters in the identity card of the ethnic minority to be identified is obtained. Based on the arrangement, the shrinkage direction of the corrected initial detection box is determined, and the shrinkage step size of the corrected initial detection box is determined based on the size of the characters in the identity card of the ethnic minority to be identified.

[0015] The corrected initial detection box is dynamically shrunk step by step according to the shrinkage direction and the shrinkage step size.

[0016] Optionally, the corrected initial detection box undergoes progressive dynamic boundary shrinking, and finally, each field within the detection box that meets the stopping shrinking condition is taken as a Chinese character field, including:

[0017] After each boundary shrinking of the corrected initial detection box, text content detection is performed on the current boundary-shrinkable initial detection box to obtain the current text content detection result. Based on the current text content detection result, it is determined whether the current boundary-shrinkable initial detection box meets the stop shrinking condition. If so, the Chinese character field is determined based on the current text content detection result. Otherwise, the boundary shrinking of the current boundary-shrinkable initial detection box continues until the initial detection box after the last boundary shrinking meets the stop shrinking condition. Finally, the Chinese character field is determined based on the text content retrieval result of the last boundary-shrinkable initial detection box.

[0018] Optionally, based on the current text content detection result, determining whether the initial detection box after the current boundary shrinkage meets the stop shrinkage condition includes:

[0019] Based on the current sub-text content detection result, determine whether the detection confidence of the initial detection box after the current sub-boundary contraction, which is entirely composed of Chinese characters, has increased sharply. If so, determine whether the current sub-text content detection result is in a stable state.

[0020] If the current text content detection result is in a stable state, then the initial detection box after the current boundary contraction is determined to meet the stop contraction condition; otherwise, the initial detection box after the current boundary contraction is determined not to meet the stop contraction condition.

[0021] Optionally, before determining the initial detection box and text direction of the field to be recognized in the ID card image, the method further includes:

[0022] Determine the illumination condition parameters of the ID card image, wherein the illumination condition parameters include the brightness defect value and illumination uniformity of the ID card image;

[0023] Based on the illumination condition parameters, the curve constraints of the image enhancement curve to be generated are determined, wherein the curve constraints include the expected pixel value range of the ID card image, the monotonicity and backpropagation of the image enhancement curve to be generated.

[0024] Based on the curve constraints, an image enhancement curve is constructed to enhance the image quality of the ID card image, and the image quality of the ID card image is enhanced using the image enhancement curve.

[0025] Optionally, the method for determining the text direction of the field to be recognized in the ID card image includes:

[0026] Determine the minimum bounding rectangle of the field to be recognized, and determine the text direction of the field to be recognized based on the angle of the minimum bounding rectangle.

[0027] According to a second aspect of the present invention, a Chinese character recognition device for ethnic minority identity cards is provided, comprising:

[0028] The acquisition unit is used to acquire an image of an ID card of a minority ethnic group to be identified, and to determine the initial detection box and text direction of the field to be identified in the ID card image, wherein the initial detection box contains minority ethnic characters and Chinese characters;

[0029] A rotation unit is used to rotate the initial detection box and the field to be recognized inside it to the positive direction if the text direction is not positive, so as to obtain the corrected initial detection box and the field to be recognized inside it.

[0030] The boundary shrinking unit is used to gradually and dynamically shrink the boundaries of the corrected initial detection box, and finally use each field in the detection box that meets the stop shrinking condition as the Chinese character field.

[0031] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method for recognizing Chinese characters in ethnic minority identity cards.

[0032] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-mentioned method for recognizing Chinese characters in ethnic minority identity cards.

[0033] According to the present invention, a method, apparatus, and storage medium for recognizing Chinese characters in ethnic minority identity cards are provided. Compared with the current method of directly locating Chinese characters in the identity card to be detected based on the positions of Chinese and non-Chinese characters in each ethnic minority identity card template, the present invention first determines the field to be recognized in the identity card with an initial detection frame, wherein the initial detection frame contains ethnic minority characters and Chinese characters. Then, the orientation of the initial detection frame is corrected, and finally, the corrected initial detection frame is dynamically shrunk step by step until the detection frame contains only the position of Chinese characters. Non-orthogonal characters may cause problems such as character tilting and deformation, increasing confusion and errors in the recognition process. Therefore, the present invention can improve the recognition accuracy and efficiency of Chinese characters in the identity card by adjusting the orientation of the field to be recognized. At the same time, the step-by-step dynamic boundary shrinking of the present invention can dynamically adjust the boundary of the detection frame according to the specific shape, stroke distribution, and layout of the Chinese characters, ensuring that the detection frame can quickly and completely contain all the strokes of the Chinese characters, avoiding the problem of incomplete Chinese character recognition or the introduction of too much interference information due to the detection frame being too large or too small. Thus, the present invention can improve the recognition accuracy and efficiency of Chinese characters in identity cards. Attached Figure Description

[0034] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0035] Figure 1 This invention provides a flowchart of a method for recognizing Chinese characters in the identity cards of ethnic minorities.

[0036] Figure 2 This invention provides a flowchart of another method for recognizing Chinese characters in ethnic minority identity cards, according to an embodiment of the present invention.

[0037] Figure 3 This invention provides a schematic diagram of the structure of a Chinese character recognition device in a minority ethnic group's identity card, according to an embodiment of the present invention.

[0038] Figure 4 This invention provides a schematic diagram of the structure of another Chinese character recognition device for ethnic minority identity cards, according to an embodiment of the present invention.

[0039] Figure 5A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0040] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.

[0041] Currently, the method of directly locating Chinese characters in the ethnic minority ID card based on the position of Chinese characters and non-Chinese characters in each ethnic minority ID card template is time-consuming and labor-intensive. When the ID card layout is adjusted, a new template needs to be developed to adapt to the new template. In addition, in real-world scenarios, the length and height of the name on different people's ID cards may be different. Therefore, the template-based Chinese character recognition method cannot accurately identify complete Chinese characters.

[0042] To address the aforementioned problems, embodiments of the present invention provide a method for recognizing Chinese characters in ethnic minority identity cards, such as... Figure 1 As shown, the method includes:

[0043] 101. Obtain the image of the ethnic minority ID card to be identified, and determine the initial detection box and text direction of the field to be identified in the ID card image. The initial detection box contains ethnic minority characters and Chinese characters.

[0044] In this embodiment of the invention, if a user wants to purchase insurance or rent a car, it is necessary to recognize the Chinese characters in the user's ID card to complete the insurance or rental business. Similarly, if a user wants to be hospitalized, it is also necessary to recognize the Chinese characters in the ID card to complete the hospitalization business. To ensure the accuracy of Chinese character recognition, the ID card image first needs to be enhanced in quality. Based on this, the method includes: determining the illumination condition parameters of the ID card image, wherein the illumination condition parameters include the brightness loss value and illumination uniformity of the ID card image; based on the illumination condition parameters, determining the curve constraint conditions of the image enhancement curve to be generated, wherein the curve constraint conditions include the expected pixel value range of the ID card image, the monotonicity and backpropagation of the image enhancement curve to be generated; based on the curve constraint conditions, constructing an image enhancement curve to enhance the image quality of the ID card image, and using the image enhancement curve to enhance the quality of the ID card image.

[0045] Specifically, firstly, a grayscale histogram is plotted on the ID card image. Based on the grayscale histogram, the total number of pixels at each grayscale level in the ID card image is counted, and the number of low-resolution pixels (wherein the preset threshold is set according to actual needs) is calculated. The ratio of the number of low-resolution pixels to the total number of pixels is taken as the underexposure ratio of the ID card image. The corresponding brightness defect value is determined in a preset brightness defect value configuration table, which stores brightness defect values ​​corresponding to different underexposure ratio ranges. When determining the illumination balance of the ID card image, the ID card image is first divided into multiple non-overlapping image blocks. The grayscale mean is calculated for each image block, and the variance corresponding to each grayscale mean is determined. Finally, the illumination balance of the ID card image is determined based on the variance. For example, the larger the variance, the more uneven the illumination of the ID card image. Further, after determining the brightness defect value, illumination balance, and other illumination condition parameters of the ID card image, the expected pixel value range, monotonicity, and retransmissionability of the ID card image are set according to the illumination condition parameters. For example, if the ID card image has significant brightness loss and uneven illumination, the minimum brightness of the output image is constrained to 10, and the maximum brightness to 240 (for an 8-bit image). This ensures that details in dark areas are visible and highlights are not overexposed. Adaptive equalization is applied to the histogram of the ID card image to generate a target histogram distribution, which then constrains the output range of the image enhancement curve. Simultaneously, the image enhancement curve must satisfy the monotonicity of a strict positive correlation between input and output pixel values ​​to avoid brightness inversion or artifacts. Furthermore, the slope of each segment of the image enhancement curve must be greater than zero, and interpolation is used to ensure overall continuity. Additionally, for any output pixel value y, there exists a unique corresponding input pixel value x, ensuring reversible image processing and achieving curve backpropagation. Finally, based on the curve constraints, an image enhancement curve is constructed to enhance the ID card image. This ensures the image enhancement curve is monotonic and gradient backpropagation is possible. A monotonic curve maintains the contrast of the original image, and gradient backpropagation allows for optimization of the image enhancement curve parameters, ensuring that each pixel value of the image adjusted by the image enhancement curve falls within the required range. If each pixel value in the enhanced result falls within the range of [0,1], the aim is to avoid information loss due to overflow or truncation. Further, each pixel value in the ID card image is determined; each pixel value is remapped using the image enhancement curve to obtain each mapped pixel value, and the enhanced ID card image is composed of each mapped pixel value. This embodiment of the invention, by enhancing the quality of the ID card image, can avoid the influence of noise in the image on Chinese character recognition, thereby improving the recognition efficiency and accuracy of Chinese characters in the ID card.

[0046] The method extracts text edge points from the enhanced ID card image and draws an initial rectangular detection box based on the extracted text edge points, ensuring that the initial detection box contains minority ethnic characters and Chinese characters. Further, it is necessary to determine the text direction of the field to be recognized within the initial detection box. Based on this, the method includes: determining the minimum bounding rectangle of the field to be recognized, and determining the text direction of the field to be recognized based on the angle of the minimum bounding rectangle.

[0047] Specifically, draw the smallest bounding rectangle of the field to be recognized, and determine the angle between the center line of the smallest bounding rectangle and the horizontal direction. Use this angle as the text direction of the field to be recognized.

[0048] 102. If the text direction is not positive, rotate the initial detection box and the field to be recognized inside it to positive to obtain the corrected initial detection box and the field to be recognized inside it.

[0049] In this embodiment of the invention, if the text direction is tilted, i.e., not perpendicular to the horizontal direction, the initial detection box is rotated until the direction of the field to be recognized inside it is perpendicular to the horizontal direction. This embodiment of the invention, by correcting the text direction, facilitates subsequent Chinese character recognition, thereby improving the recognition efficiency and accuracy.

[0050] 103. The initial detection box after correction is dynamically shrunk step by step, and finally each field in the detection box that meets the stop shrinkage condition is taken as the Chinese character field.

[0051] In this embodiment of the invention, in order to accurately perform dynamic boundary shrinking on the initial detection box, it is first necessary to determine the shrinking direction and shrinking step size of the initial detection box. Based on this, the method includes: obtaining the arrangement of non-Chinese characters and Chinese characters on the identity card of the ethnic minority to be identified; determining the shrinking direction of the corrected initial detection box based on the arrangement; and determining the shrinking step size of the corrected initial detection box based on the character size in the identity card of the ethnic minority to be identified; and performing gradual dynamic boundary shrinking on the corrected initial detection box according to the shrinking direction and the shrinking step size.

[0052] Specifically, if a non-Chinese character field is positioned above a Chinese character field, the top border of the initial detection box shrinks downwards; if a non-Chinese character field is positioned below a Chinese character field, the bottom border of the initial detection box shrinks upwards; if a non-Chinese character field is positioned to the left of a Chinese character field, the left border of the initial detection box shrinks to the right; and if a non-Chinese character field is positioned to the right of a Chinese character field, the right border of the initial detection box shrinks to the left. Simultaneously, if the text in the ID card image is large, a larger shrinkage step size is set for the initial detection box; if the text in the ID card image is small, a smaller shrinkage step size is set for the initial detection box. Finally, the initial detection box is dynamically shrunk step by step according to the above shrinkage direction and shrinkage step size. Therefore, this invention, by pre-setting the shrinkage direction and shrinkage step size for the initial detection box, can improve the efficiency and accuracy of subsequent Chinese character recognition.

[0053] According to the present invention, a method for recognizing Chinese characters in ethnic minority identity cards differs from the current method of directly locating Chinese characters in the identity card based on the positions of Chinese and non-Chinese characters in each ethnic minority identity card template. This invention first determines the field to be recognized in the identity card with an initial detection frame, which contains both ethnic minority characters and Chinese characters. Then, the initial detection frame undergoes orientation correction, and finally, the corrected initial detection frame is dynamically shrunk until it contains only the Chinese character positions. Non-orthogonal characters may cause character tilting or deformation, increasing confusion and errors during recognition. Therefore, this invention improves the accuracy and efficiency of Chinese character recognition in the identity card by adjusting the orientation of the field to be recognized. Simultaneously, the progressive dynamic boundary shrinking of this invention can dynamically adjust the boundary of the detection frame according to the specific shape, stroke distribution, and layout of the Chinese character, ensuring that the detection frame can quickly and completely contain all the strokes of the Chinese character. This avoids problems such as incomplete Chinese character recognition or the introduction of excessive interference information due to an overly large or small detection frame. Therefore, this invention improves the accuracy and efficiency of Chinese character recognition in identity cards.

[0054] Furthermore, to better illustrate the process of recognizing Chinese characters in ethnic minority identity cards, as a refinement and extension of the above embodiments, this invention provides another method for recognizing Chinese characters in ethnic minority identity cards, such as... Figure 2 As shown, the method includes:

[0055] 201. Obtain the ID card image of the ethnic minority ID card to be identified, and determine the initial detection box and text direction of the field to be identified in the ID card image. The initial detection box contains ethnic minority characters and Chinese characters.

[0056] In this embodiment of the invention, in order to accurately recognize the Chinese characters in the initial detection frame, it is first necessary to determine the text direction of the field to be recognized in the initial detection frame. Based on this, step 201 specifically includes: determining multiple reference fields adjacent to the field to be recognized in the ID card image, and determining the angle information representing the tilt degree of each reference field; clustering each reference field based on the angle information to obtain reference fields under multiple cluster categories; determining the target cluster category with the most reference fields in each cluster category, and determining the text direction of the field to be recognized based on the cluster center angle of the target cluster category.

[0057] Specifically, the angle information of each field in the ID card image is determined. Then, multiple reference fields adjacent to the field to be identified are determined within each field. The reference fields are then clustered as follows: Angle feature vectors corresponding to the angle information of each reference field are determined; centroid vectors corresponding to different clusters are initialized; the distance between the angle feature vectors and the centroid vectors corresponding to the different clusters is calculated, and the reference field is assigned to the different clusters based on the distance; updated centroid vectors corresponding to the reference fields in the different clusters are obtained based on the angle feature vectors; the angle feature vectors are reassigned to the different clusters based on the updated centroid vectors, until the updated centroid vectors do not change. The reference fields finally assigned to the different clusters are determined as reference fields under different cluster categories. Finally, the cluster center angle corresponding to the cluster category with the most reference fields is used as the text direction of the field to be identified.

[0058] In another embodiment of the present invention, the method for determining the text direction of a field to be identified includes: determining each field in an ID card image, and determining adjacent fields that are adjacent to the field to be identified in each field; determining the field angle of each adjacent field, sorting each adjacent field based on the field angle to obtain sorted adjacent fields; determining the median angle in the sorted adjacent fields, and determining the text direction of the field to be identified based on the median angle.

[0059] 202. If the text direction is not positive, rotate the initial detection box and the field to be recognized inside it to positive to obtain the corrected initial detection box and the field to be recognized inside it.

[0060] Specifically, if the field to be identified is not positive, the field to be identified will be corrected to be positive.

[0061] 203. Perform progressive dynamic boundary shrinking on the corrected initial detection box. After each boundary shrinking of the corrected initial detection box, perform text content detection on the current boundary-shrinking initial detection box to obtain the current text content detection result. Based on the current text content detection result, determine whether the current boundary-shrinking initial detection box meets the stopping shrinking condition. If so, determine the Chinese character field based on the current text content detection result. Otherwise, continue to shrink the boundary of the current boundary-shrinking initial detection box until the final boundary-shrinking initial detection box meets the stopping shrinking condition. Finally, determine the Chinese character field based on the text content retrieval result of the final boundary-shrinking initial detection box. The method for determining whether the initial detection box after the current sub-boundary contraction meets the stopping contraction condition includes: based on the current sub-text content detection result, determining whether the detection confidence of the initial detection box after the current sub-boundary contraction consisting entirely of Chinese characters increases sharply; if so, determining whether the current sub-text content detection result is in a stable state; if the current sub-text content detection result is in a stable state, determining that the initial detection box after the current sub-boundary contraction meets the stopping contraction condition; otherwise, determining that the initial detection box after the current sub-boundary contraction does not meet the stopping contraction condition.

[0062] Specifically, the initial detection box is first shrunk sequentially according to the shrinking direction and step size. During each shrinking process, the confidence level is determined if the shrunk detection box contains only Chinese characters. If, for example, the confidence level suddenly increases after the 6th shrinking, the detection box is shrunk at least once more, and the content of the subsequent shrinking detection boxes is compared to the content of the 6th shrinking detection box. If they are the same, the field in the 6th shrinking detection box is considered a Chinese character field. If the content of the subsequent shrinking detection boxes is different from the 6th shrinking detection box, the detection box continues to shrink until the detected content is identical. In other words, by continuously shrinking the detection box boundary until the recognition confidence level suddenly increases and the recognition result stabilizes with minimal fluctuations, it indicates that the non-Chinese character portion has been excluded, and this result is taken as the final recognition result. This embodiment of the invention uses a dual judgment mechanism of confidence level and result stability to shrink the detection box, which can improve the accuracy of Chinese character recognition.

[0063] According to another method for recognizing Chinese characters in ethnic minority ID cards provided by this invention, compared with the current method of directly locating Chinese characters in the ID card to be detected based on the positions of Chinese and non-Chinese characters in each ethnic minority ID card template, this invention first determines the field to be recognized in the ethnic minority ID card to be recognized with an initial detection frame, wherein the initial detection frame contains ethnic minority characters and Chinese characters. Then, the orientation of the initial detection frame is corrected, and finally, the corrected initial detection frame is dynamically shrunk step by step until the detection frame contains only the position of Chinese characters. Non-orthogonal characters may cause problems such as character tilting and deformation, increasing confusion and errors in the recognition process. Therefore, this invention can improve the recognition accuracy and efficiency of Chinese characters in the ID card by adjusting the orientation of the field to be recognized. At the same time, the step-by-step dynamic boundary shrinking of this invention can dynamically adjust the boundary of the detection frame according to the specific shape, stroke distribution and layout of the Chinese characters, ensuring that the detection frame can quickly and completely contain all the strokes of the Chinese characters, avoiding the problem of incomplete Chinese character recognition or the introduction of too much interference information due to the detection frame being too large or too small. Thus, this invention can improve the recognition accuracy and efficiency of Chinese characters in ID cards.

[0064] Furthermore, as Figure 1 In a specific implementation, this invention provides a Chinese character recognition device for ethnic minority identity cards, such as... Figure 3 As shown, the device includes: an acquisition unit 31, a rotation unit 32, and a boundary contraction unit 33.

[0065] The acquisition unit 31 can be used to acquire an image of an ID card of a minority ethnic group to be identified, and determine the initial detection box and text direction of the field to be identified in the ID card image, wherein the initial detection box contains minority ethnic characters and Chinese characters.

[0066] The rotation unit 32 can be used to rotate the initial detection box and the field to be recognized inside it to the positive direction if the text direction is not positive, so as to obtain the corrected initial detection box and the field to be recognized inside it.

[0067] The boundary shrinking unit 33 can be used to gradually and dynamically shrink the boundary of the corrected initial detection box, and finally use each field in the detection box that meets the stop shrinking condition as a Chinese character field.

[0068] In specific application scenarios, to determine the text direction of the fields to be recognized in an ID card, such as... Figure 4 As shown, the acquisition unit 31 includes a first determining module 311 and a clustering module 312.

[0069] The first determining module 311 can be used to determine multiple reference fields adjacent to the field to be identified in the ID card image, and to determine angle information representing the tilt degree of each reference field.

[0070] The clustering module 312 can be used to cluster each of the reference fields based on the angle information to obtain reference fields under multiple clustering categories.

[0071] The first determining module 311 can also be used to determine the target cluster category with the most reference fields in each cluster category, and determine the text direction of the field to be identified based on the cluster center angle of the target cluster category.

[0072] In specific application scenarios, in order to gradually and dynamically shrink the boundary of the corrected initial detection box, the boundary shrinkage unit 33 includes a second determination module 331 and a boundary shrinkage module 332.

[0073] The second determining module 331 can be used to obtain the arrangement of non-Chinese characters and Chinese characters in the identity card of the ethnic minority to be identified, determine the shrinkage direction of the corrected initial detection box based on the arrangement, and determine the shrinkage step of the corrected initial detection box based on the size of the characters in the identity card of the ethnic minority to be identified.

[0074] The boundary shrinkage module 332 can be used to perform gradual dynamic boundary shrinkage on the corrected initial detection box according to the shrinkage direction and the shrinkage step size.

[0075] In specific application scenarios, in order to identify Chinese character fields in ID cards, the boundary shrinking module 332 can also be used to perform text content detection on the initial detection box after each boundary shrinking of the corrected initial detection box, obtain the current text content detection result, and determine whether the initial detection box after the current boundary shrinking meets the stop shrinking condition based on the current text content detection result. If so, the Chinese character field is determined based on the current text content detection result; otherwise, the boundary shrinking of the initial detection box after the current boundary shrinking continues until the initial detection box after the last boundary shrinking meets the stop shrinking condition. Finally, the Chinese character field is determined based on the text content retrieval result of the initial detection box after the last boundary shrinking.

[0076] In specific application scenarios, in order to determine whether the initial detection box after the current sub-boundary contraction meets the stop contraction condition, the boundary contraction module 332 can be used to determine, based on the current sub-text content detection result, whether the detection confidence of the initial detection box after the current sub-boundary contraction containing only Chinese characters increases sharply. If so, it is determined whether the current sub-text content detection result is in a stable state. If the current sub-text content detection result is in a stable state, it is determined that the initial detection box after the current sub-boundary contraction meets the stop contraction condition; otherwise, it is determined that the initial detection box after the current sub-boundary contraction does not meet the stop contraction condition.

[0077] In specific application scenarios, in order to enhance the quality of ID card images, the device also includes an enhancement unit 34.

[0078] The enhancement unit 34 can be used to determine the illumination condition parameters of the ID card image, wherein the illumination condition parameters include the brightness loss value and illumination uniformity of the ID card image; based on the illumination condition parameters, determine the curve constraint conditions of the image enhancement curve to be generated, wherein the curve constraint conditions include the expected pixel value range of the ID card image, the monotonicity and backpropagation of the image enhancement curve to be generated; based on the curve constraint conditions, construct an image enhancement curve to enhance the image quality of the ID card image, and use the image enhancement curve to enhance the quality of the ID card image.

[0079] In specific application scenarios, in order to determine the text direction of the field to be recognized in an ID card image, the first determining module 311 can also be used to determine the minimum bounding rectangle of the field to be recognized, and determine the text direction of the field to be recognized based on the angle of the minimum bounding rectangle.

[0080] It should be noted that other corresponding descriptions of the functional modules involved in the Chinese character recognition device in the ethnic minority ID card provided in this embodiment of the invention can be found in [reference needed]. Figure 1 The corresponding description of the method shown will not be repeated here.

[0081] Based on the above, Figure 1Accordingly, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: acquiring an image of an ID card of a minority ethnic group to be identified, and determining the initial detection box and text direction of the field to be identified in the ID card image, wherein the initial detection box contains minority ethnic characters and Chinese characters; if the text direction is not positive, rotating the initial detection box and the field to be identified inside it to positive, obtaining the corrected initial detection box and the field to be identified inside it; performing progressive dynamic boundary shrinking on the corrected initial detection box, and finally identifying each field in the detection box that meets the stop shrinking condition as a Chinese character field.

[0082] Based on the above, Figure 1 The method shown and as Figure 3 The embodiment of the device shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 5 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor. Both the memory 42 and the processor 41 are mounted on a bus 43. When the processor 41 executes the program, it performs the following steps: acquiring an image of a minority ethnic group's ID card to be identified, and determining the initial detection frame and text direction of the fields to be identified in the ID card image. The initial detection frame contains minority ethnic characters and Chinese characters. If the text direction is not positive, the initial detection frame and the fields to be identified within it are rotated to a positive direction to obtain a corrected initial detection frame and the fields to be identified within it. The corrected initial detection frame undergoes gradual dynamic boundary shrinkage, and finally, each field within the detection frame that meets the stop-shrinkage condition is taken as a Chinese character field.

[0083] The technical solution of this invention first identifies a field to be recognized with an initial detection frame in the identity card of a minority ethnic group, where the initial detection frame contains both minority ethnic characters and Chinese characters. Then, the orientation of the initial detection frame is corrected. Finally, the corrected initial detection frame is dynamically shrunk step-by-step until it contains only the Chinese characters. Non-orthogonal characters may cause problems such as character tilting and deformation, increasing confusion and errors during the recognition process. Therefore, this invention improves the accuracy and efficiency of Chinese character recognition in the identity card by adjusting the orientation of the field to be recognized. Simultaneously, the step-by-step dynamic boundary shrinking of this invention can dynamically adjust the boundary of the detection frame according to the specific shape, stroke distribution, and layout of the Chinese characters, ensuring that the detection frame can quickly and completely contain all the strokes of the Chinese characters. This avoids problems such as incomplete Chinese character recognition or the introduction of excessive interference information due to the detection frame being too large or too small. Therefore, this invention improves the accuracy and efficiency of Chinese character recognition in identity cards.

[0084] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0085] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for recognizing Chinese characters in ethnic minority identity cards, characterized in that, include: Obtain an image of the ID card of the ethnic minority to be identified, and determine the initial detection box and text direction of the field to be identified in the ID card image, wherein the initial detection box contains ethnic minority characters and Chinese characters; If the text direction is not positive, then the initial detection box and the field to be recognized inside it are rotated to positive to obtain the corrected initial detection box and the field to be recognized inside it. The corrected initial detection box is dynamically shrunk step by step, and finally each field in the detection box that meets the stop shrinking condition is taken as the Chinese character field.

2. The method according to claim 1, characterized in that, The method for determining the text direction of the field to be recognized in the ID card image includes: In the ID card image, a plurality of reference fields adjacent to the field to be identified are determined, and angle information representing the degree of tilt of each reference field is determined respectively; Based on the angle information, each of the reference fields is clustered to obtain reference fields under multiple cluster categories; In each cluster category, determine the target cluster category with the most reference fields, and based on the cluster center angle of the target cluster category, determine the text direction of the field to be identified.

3. The method according to claim 1, characterized in that, The corrected initial detection box undergoes progressive dynamic boundary shrinkage, including: The arrangement of non-Chinese characters and Chinese characters in the identity card of the ethnic minority to be identified is obtained. Based on the arrangement, the shrinkage direction of the corrected initial detection box is determined, and the shrinkage step size of the corrected initial detection box is determined based on the size of the characters in the identity card of the ethnic minority to be identified. The corrected initial detection box is dynamically shrunk step by step according to the shrinkage direction and the shrinkage step size.

4. The method according to claim 1, characterized in that, The corrected initial detection box is subjected to progressive dynamic boundary shrinkage. Finally, each field within the detection box that meets the stopping shrinkage condition is taken as a Chinese character field, including: After each boundary shrinking of the corrected initial detection box, text content detection is performed on the current boundary-shrinkable initial detection box to obtain the current text content detection result. Based on the current text content detection result, it is determined whether the current boundary-shrinkable initial detection box meets the stop shrinking condition. If so, the Chinese character field is determined based on the current text content detection result. Otherwise, the boundary shrinking of the current boundary-shrinkable initial detection box continues until the initial detection box after the last boundary shrinking meets the stop shrinking condition. Finally, the Chinese character field is determined based on the text content retrieval result of the last boundary-shrinkable initial detection box.

5. The method according to claim 4, characterized in that, Based on the current text content detection result, determine whether the initial detection box after the current boundary shrinkage meets the stop shrinkage condition, including: Based on the current sub-text content detection result, determine whether the detection confidence of the initial detection box after the current sub-boundary contraction, which is entirely composed of Chinese characters, has increased sharply. If so, determine whether the current sub-text content detection result is in a stable state. If the current text content detection result is in a stable state, then the initial detection box after the current boundary contraction is determined to meet the stop contraction condition; otherwise, the initial detection box after the current boundary contraction is determined not to meet the stop contraction condition.

6. The method according to claim 1, characterized in that, Before determining the initial detection bounding box and text direction of the field to be recognized in the ID card image, the method further includes: Determine the illumination condition parameters of the ID card image, wherein the illumination condition parameters include the brightness defect value and illumination uniformity of the ID card image; Based on the illumination condition parameters, the curve constraints of the image enhancement curve to be generated are determined, wherein the curve constraints include the expected pixel value range of the ID card image, the monotonicity and backpropagation of the image enhancement curve to be generated. Based on the curve constraints, an image enhancement curve is constructed to enhance the image quality of the ID card image, and the image quality of the ID card image is enhanced using the image enhancement curve.

7. The method according to claim 1, characterized in that, The method for determining the text direction of the field to be recognized in the ID card image includes: Determine the minimum bounding rectangle of the field to be recognized, and determine the text direction of the field to be recognized based on the angle of the minimum bounding rectangle.

8. A Chinese character recognition device for a minority ethnic group's identity card, characterized in that, include: The acquisition unit is used to acquire an image of an ID card of a minority ethnic group to be identified, and to determine the initial detection box and text direction of the field to be identified in the ID card image, wherein the initial detection box contains minority ethnic characters and Chinese characters; A rotation unit is used to rotate the initial detection box and the field to be recognized inside it to the positive direction if the text direction is not positive, so as to obtain the corrected initial detection box and the field to be recognized inside it. The boundary shrinking unit is used to gradually and dynamically shrink the boundaries of the corrected initial detection box, and finally use each field in the detection box that meets the stop shrinking condition as the Chinese character field.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.