Image processing method and device, computer equipment and readable storage medium

By locating character areas and evaluating clarity of the recognized image, and judging image clarity using the training model, the problem of image blur affecting recognition efficiency when shooting document materials is solved, and the accuracy and effectiveness of text recognition are improved.

CN119832554APending Publication Date: 2025-04-15ZHONGAN ONLINE P&C INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411839653.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When shooting document materials, it is easy to cause blurred document images, which affects text recognition efficiency.

Method used

By obtaining the image to be identified, positioning its character area, and evaluating whether the character area is clear. Using the trained discriminant model, the character area features of the to-be-identified image and its derived image are judged to determine the sharpness of the image.

Benefits of technology

Improve the accuracy of image text information clarity recognition, enhance the effectiveness of text recognition, and provide feedback when the image is not clear to reduce useless recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832554A_ABST
    Figure CN119832554A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an image processing method and device, computer equipment and a readable storage medium. The image processing method comprises the steps of obtaining a to-be-recognized image, and positioning a character region of the to-be-recognized image; evaluating whether characters in the character area are clear or not; and in response to judging that the characters are clear, judging that the to-be-recognized image is a character-clear image. By adopting the method, the accuracy of recognizing the definition of the text information of the image can be improved, so that a basis is provided for the effectiveness of character recognition of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an image processing device, a computer equipment, and a computer-readable storage medium. Background Art

[0002] With the rapid development of mobile Internet and artificial intelligence technology, the mode of electronic collection and processing of document materials has emerged, which has a wide range of application scenarios. The usual collection method is to take a photo of the document material and then perform optical character recognition to achieve automatic entry of various key field information. However, when photographing the document material, it is easy to have out-of-focus, jitter, movement, etc., which will cause the document image to be blurred, affecting the recognition efficiency. Summary of the invention

[0003] Based on this, it is necessary to provide an image processing method, an image processing device, a computer equipment and a computer-readable storage medium to address the above-mentioned technical problems, which can improve the accuracy of recognizing the clarity of text information in images, thereby providing a basis for the effectiveness of text recognition in images.

[0004] On the one hand, an image processing method is provided, the image processing method comprising: acquiring an image to be recognized, locating a character area of ​​the image to be recognized; evaluating whether the characters in the character area are clear; and in response to determining that the characters are clear, determining that the image to be recognized is a clear character image.

[0005] In one embodiment of the present application, evaluating whether characters in a character region are clear includes: performing a scale conversion process on the image to be recognized to obtain a plurality of derivative images; and determining whether characters in the character region of the image to be recognized and the derivative images are clear.

[0006] In one embodiment of the present application, determining whether the characters in the character area of ​​the image to be recognized and the derived image are clear includes: respectively acquiring the character area features of the image to be recognized and the derived image; concatenating the character area features of the image to be recognized and the derived image to form a combined character feature; inputting the combined character feature into a trained discriminant model, and using the discriminant model to determine whether the characters are clear.

[0007] In one embodiment of the present application, obtaining character area features includes: performing feature extraction on a target image to obtain global features of the target image; wherein the target image includes an image to be identified and a derived image; extracting feature values ​​of pixels representing the character area in the target image from the global features as first feature values; and using the first feature values ​​of several character areas of the target image as character area features.

[0008] In one embodiment of the present application, the representative pixels include: a center pixel of the character area and a plurality of pixels surrounding the center pixel.

[0009] In one embodiment of the present application, performing scale conversion processing on the image to be identified to obtain a plurality of derivative images includes: performing downsampling processing on the image to be identified to obtain a first derivative image and a second derivative image; wherein the size of the first derivative image is larger than the size of the second derivative image.

[0010] In one embodiment of the present application, evaluating whether characters in a character area are clear includes: using a trained discriminant model to discriminate the clarity of characters in the character area of ​​an image to be recognized; training the discriminant model includes: obtaining a sample image and a derived sample image of the sample image; splicing the category identification of the sample image, the character area features of the sample image and the character area features of the derived sample image to form a sample combination feature of the sample image; wherein the category identification is used to identify whether characters in the character area of ​​the sample image are clear; using the discriminant model to judge whether the characters are clear on the sample combination features to obtain a judgment output; and updating the discriminant model using the judgment output and the category identification.

[0011] On the other hand, an image processing device is provided, which includes: an input unit and a processing unit; the input unit is used to input an image to be recognized; and the processing unit is used to implement the image processing method in any of the above embodiments.

[0012] On the other hand, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: acquiring an image to be recognized and locating a character region of the image to be recognized; evaluating whether the characters in the character region are clear; and in response to determining that the characters are clear, determining that the image to be recognized is an image with clear characters.

[0013] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: acquiring an image to be recognized and locating a character area of ​​the image to be recognized; evaluating whether the characters in the character area are clear; and in response to determining that the characters are clear, determining that the image to be recognized is an image with clear characters.

[0014] The above-mentioned image processing method, image processing device, computer equipment and computer-readable storage medium locate the character area of ​​the image to be recognized in order to recognize the character clarity of the character area. Compared with the overall clarity recognition of the image to be recognized, it can focus on the accurate recognition of the area containing text information, improve the accuracy of the clarity recognition of the text information in the image, and provide a basis for the effectiveness of text recognition in the image. It can also provide feedback to the user to re-shoot when it is determined that the text information of the image is unclear, so as to reduce useless and low-precision text recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of an embodiment of the image processing method of the present application;

[0016] Figure 2 is a flowchart of another embodiment of the image processing method of the present application;

[0017] Figure 3 This is a flow chart of an embodiment of obtaining combined character features of the present application;

[0018] Figure 4 is a structural schematic diagram of an embodiment of an image processing device of the present application;

[0019] Figure 5 It is a structural diagram of an embodiment of a computer device of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0021] Taking the insurance claims scenario as an example, under the development trend of electronic insurance claims, users are usually required to take photos of relevant documents and upload them to the electronic system, so that various key field information can be automatically entered in the background through optical character recognition and other methods, so that the corresponding business personnel can quickly review and process them. However, when shooting through terminals such as mobile phones, the document image may be blurred due to loss of focus or movement, affecting the effect of automatic processing in the background, such as causing text recognition errors and table parsing failures. From the perspective of user experience, the quality and efficiency of claims review will be affected, resulting in a poor user experience.

[0022] In order to solve the technical problem of low accuracy of character recognition in related technologies, the present application provides an image processing method, an image processing device, a computer device and a computer-readable storage medium. The image processing method includes: obtaining an image to be recognized, locating a character area of ​​the image to be recognized; evaluating whether the characters in the character area are clear; and in response to determining that the characters are clear, determining that the image to be recognized is a character-clear image. The specific architecture and working principle of the present application are described below by example.

[0023] See also Figure 1 , Figure 1 It is a flowchart of an embodiment of the image processing method of the present application.

[0024] S101: Acquire an image to be recognized and locate a character area of ​​the image to be recognized.

[0025] In this embodiment, the image to be recognized refers to an image whose character area needs to be evaluated to see whether the characters are clear. The image to be recognized may generally include one or more character areas.

[0026] Characters can be considered as characters in a broad sense, that is, characters can include words, letters, numbers, symbols, special functional symbols, etc., which are not limited here.

[0027] In this embodiment, the entire character area of ​​the image to be recognized may be located, or a part of the character area may be located, or a character area containing specific characters may be located, which is not limited here.

[0028] S102: Evaluate whether the characters in the character area are clear.

[0029] In this embodiment, in response to locating the character region of the image to be recognized, it is evaluated whether the characters existing in the region to be recognized are clear.

[0030] For example, it is possible to determine whether the edges of characters are clear; or, to determine whether the length, width and other dimension ratios of characters and / or character areas are within a preset range; or, to use a pre-trained model to determine whether the characters in the character area are clear, which is not limited here.

[0031] S103: In response to determining that the characters are clear, determining that the image to be recognized is an image with clear characters.

[0032] In this embodiment, in response to determining that the characters of the image to be recognized are clear, it can be considered that processing such as text recognition can be performed on the image to be recognized relatively reliably, and the image to be recognized that has completed the character clarity check is determined to be a character clear image.

[0033] That is to say, in this embodiment, the clarity of the image to be recognized as a whole is not recognized, but the clarity of the character area is recognized. The design of this application takes into account that when the overall clarity recognition of the image to be recognized is performed, it is determined that the overall clarity of the image to be recognized meets the recognition requirements, and the image to be recognized is considered to be an image that can be reliably recognized with text, but the character area of ​​the image to be recognized may actually be blurred, resulting in unsatisfactory actual text recognition effect, wasting time and computing resources. Alternatively, when the overall clarity recognition of the image to be recognized is performed, it is determined that the overall clarity of the image to be recognized does not meet the recognition requirements, and the image to be recognized is considered to be an image that cannot be reliably recognized with text, but the character area of ​​the image to be recognized may actually be clear, and requesting a new image to be recognized will cause the current image to be recognized to be wasted, and unnecessarily prolong the text recognition process.

[0034] In this embodiment, the possible existence of the above-mentioned situation is further taken into consideration. Therefore, when recognizing the image to be recognized, the clarity of the character area including text, symbols, etc. will be specifically recognized to determine whether the characters in the character area are clear. This can improve the accuracy of the clarity recognition of the text information in the image, thereby providing a basis for the effectiveness of text recognition in the image and providing reliable basis information for subsequent other processing based on the image to be recognized.

[0035] See also Figure 2 , Figure 2 It is a flowchart of another embodiment of the image processing method of the present application.

[0036] In one embodiment, in order to further improve the reliability of the result of determining whether the character area is clear or not, after obtaining the image to be recognized, the image to be recognized can be scaled to evaluate whether the character area is clear by integrating image features of multiple scales.

[0037] That is to say, in this embodiment, the image to be identified can be scaled to obtain several derivative images. For example, the image to be identified can be scaled once to obtain a derivative image. Alternatively, the image to be identified can be scaled multiple times to obtain multiple derivative images, wherein the sizes of the multiple derivative images can be the same, or at least some of the derivative images have different sizes. Alternatively, after the image to be identified is scaled to obtain a derivative image, the derivative image can be scaled to obtain a derivative image based on the image to be identified, and then the derivative image can be scaled to obtain a derivative image based on the derivative image at the same time as the derivative image is obtained based on the image to be identified, which is not limited here.

[0038] Optionally, in this embodiment, the image to be identified may be downsampled to obtain a first derivative image. The image to be identified may also be downsampled to obtain a second derivative image. The size of the first derivative image is greater than the size of the second derivative image. For example, the image to be identified may be downsampled twice to obtain the first derivative image; the image to be identified may be downsampled four times to obtain the second derivative image.

[0039] Thus, in this embodiment, the image to be recognized is subjected to multiple scale conversion processes to obtain derivative images of multiple sizes, and the scale conversion process based on the image to be recognized is conducive to reducing the original feature loss of the image to be recognized, thereby further improving the accuracy of the assessment of the clarity of the characters in the character area. At the same time, downsampling the image to be recognized can reduce the amount of calculation of subsequent steps such as feature extraction, and can also enrich the global feature expression of the image to be recognized and the character area.

[0040] In other words, three scale images of the image to be recognized can be used as input images, and multi-scale image features can be modeled using models such as image encoders. The image encoder can map the input image from pixel space to multi-scale feature space, thereby achieving a compact expression of the clarity of the text structure in the document image, and performing multi-scale feature extraction on the input image based on the image encoder.

[0041] For example, the image encoder can be constructed using a shallow convolutional neural network to encode the input image into multi-scale image features. Take the image I to be identified as a three-dimensional matrix of H*W*3 as an example, where H represents the height of the image I to be identified, W represents the width of the image I to be identified, and 3 is the number of input channels. Therefore, the image feature f of the image I to be identified is a three-dimensional matrix of H / 4*W / 4*C, where H / 4 represents the feature matrix height of the image feature f, W / 4 represents the feature matrix width of the image feature f, and C represents the number of channels of the feature rectangle, and C can be an integer multiple of 64, such as 64, 256, 512, etc. Optionally, the image encoder can be implemented by 2 layers of 3*3 convolutions with a stride of 2 to obtain a feature map resolution of one-fourth of the input image.

[0042] Please continue reading Figure 2 In one embodiment, the character regions of the image to be recognized and the derived image can be obtained respectively. For example, the image to be recognized and the derived image can be used as input images of a text detector, so as to use a lightweight text detector to obtain one or more character regions in the input image to provide character position information for evaluating whether the characters are clear, and the character position information is combined with multi-scale image features through a subsequent feature pooler, thereby realizing feature expression for text area clarity.

[0043] In response to obtaining the character region of the image to be recognized, the character region features of the image to be recognized can be obtained respectively. In response to obtaining the character region of the derived image, the character region features of the derived image can be obtained. In other words, the character region features of the image to be recognized and the derived image can be obtained respectively.

[0044] The character area features of the image to be recognized and the derived image can be combined to form a combined character feature. Figure 2 As shown in the example, multi-scale image features and character region information can be input into the feature pooler. The feature pooler can combine the character region positioning information obtained by the text detector with the multi-scale image features to provide corresponding feature expressions for character regions of each scale, so as to provide input feature sequences (i.e., combined character features) for subsequent functions such as the Transformer encoder.

[0045] The specific steps of obtaining character region features and forming combined character features will be described below with examples.

[0046] Furthermore, in this embodiment, the combined character features may be input into a trained discriminant model, and the discriminant model may be used to determine whether the characters are clear.

[0047] Specifically, the combined character features can be input into an encoder such as a Transformer encoder to capture information in the combined character features as an input sequence and model its features. The output of the encoder is input into a discriminant model, and the discriminant model is used to determine whether the character area of ​​the image to be recognized is clear.

[0048] For example, the discriminant model can output the probability and / or confidence score of whether the characters in the character area are clear or unclear. Alternatively, the discriminant model can perform a two-category classification of whether the characters are clear or not, and output its result of whether the characters are clear based on the probability judgment, which is not limited here. For example, the discriminant model can evaluate the character clarity confidence score S, and compare the confidence score S with the score threshold t, where t can be a pre-set empirical value or a value obtained by statistical analysis. If S>t, it can be considered that the characters in the character area representing the image to be recognized are clear; if S≤t, it can be considered that the characters in the character area representing the image to be recognized are unclear.

[0049] The following is an example of the specific steps of obtaining character region features and forming combined character features.

[0050] See also Figure 3 , Figure 3 It is a flowchart of an embodiment of the present application for obtaining combined character features.

[0051] S201: Extract features of a target image to obtain global features of the target image.

[0052] In this embodiment, the target image includes an image to be recognized and a derived image. When acquiring the character region feature, the image to be recognized and the derived image may be acquired separately.

[0053] This can be done by Figure 2 The image encoder in performs feature extraction on the target image to obtain the global features of the target image.

[0054] S202: Extract feature values ​​representing pixels in the character area in the target image from the global feature as the first feature value.

[0055] In this embodiment, in response to the completion of the character region positioning of the target image, the first characteristic value can be obtained for each character region, and a preset number of character regions with the largest area can be selected as processing objects, which is not limited here. Optionally, a preset number N of character regions can be selected as processing objects to constrain the length and magnitude of the character region features.

[0056] As the name implies, representation pixels can be considered as pixels that can express the main features and information of the character area.

[0057] Optionally, the characterizing pixel may include a center pixel of the character region and several surrounding pixels of the center pixel. The surrounding pixels may include several pixels adjacent to the center pixel; and / or several pixels with several spacing pixels between the center pixel; and / or several vertex pixels of the character region, etc., which are not limited here.

[0058] For example, the center point of all pixels inside each character area can be calculated and the center point pixel is recorded as (x i ,y i ), where x and y represent the horizontal and vertical coordinates of the center point, and i represents the i-th character area; i=1, 2, 3, ..., N.

[0059] Four pixels adjacent to the center pixel may be obtained as surrounding pixels. For example, four pixels above, below, left and right of the center pixel may be taken as surrounding pixels, and the four surrounding pixels and the center pixel may be taken as representative pixels.

[0060] The expression representing a pixel can be as follows:

[0061] D i ={f(x i ,y i ), f(x i-1 ,y i ), f(x i+1 ,y i ), f(x i ,y i-1 ), f(x i ,y i+1 )}

[0062] Among them, D i Represents the representative pixel of the i-th character area.

[0063] In layman's terms, the features representing the pixels can be found from the global features, and the feature vectors of each pixel in the representation pixels can be stacked to form a feature that can be used as the current character area, that is, the first eigenvalue.

[0064] S203: taking the first feature values ​​of the plurality of character regions of the target image as character region features.

[0065] In this embodiment, the expression of the character region feature can be as follows:

[0066] f i =concat(x∈Di )

[0067] Among them, f i The first eigenvalue of the i-th character region is represented by the concat() method, which is used to connect two or more first eigenvalues. In this way, the N character regions can be correspondingly formed into a feature vector sequence of length N, that is, the feature sequence of the current scale of the target image.

[0068] Furthermore, in response to obtaining character region features of both the image to be recognized and the derived image, the character region features of the image to be recognized and the derived image can be fused by splicing to obtain a multi-scale feature sequence of length 3N, i.e., a combined character feature. The combined character feature is used as an input sequence of a feature extractor such as a Transformer encoder.

[0069] The following is an example of the training process of the image processing device.

[0070] A sample set may be obtained, and the sample set includes a plurality of sample images. For example, the number of sample images may be in the order of hundreds, tens of thousands, or hundreds of thousands, etc., which is not limited herein. The sample images may be subjected to the scale conversion processing described above to obtain a number of derivative sample images of each sample image, so as to obtain the sample image and the derivative sample images of the sample image. Thus, in addition to being able to fuse the feature expressions of the same image at multiple sizes, this embodiment can also use images of multiple sizes to model multi-scale image features, so as to improve the image processing device's ability to distinguish the clarity of images of different resolutions and characters of different specifications therein.

[0071] At the same time, the sample images may be made to carry category identification. For example, whether the characters of each sample image are clear can be manually evaluated and the category identification can be assigned respectively. And / or, a sample image with clear characters can be obtained, and a sample image with unclear characters can be obtained through blurring processing such as Gaussian blur and motion blur, and the category identification can be assigned respectively. For example, the category identification can include two states, 0 indicates that the characters of the sample image are unclear, and 1 indicates that the characters of the sample image are clear.

[0072] Next, the sample image and the derived sample image can be encoded using an image encoder to obtain global features. The character regions of the sample image and the derived sample image can also be located. The combined character features of the sample image are obtained using the location information of the character region and the global features. The specific implementation method can be described as an example in the previous text, and will not be repeated here.

[0073] Furthermore, the category identification and the combined character features of the sample image can be spliced. That is, the category identification of the sample image, the character area features of the sample image, and the character area features of the derived sample image can be spliced ​​to form a sample combined feature of the sample image. Among them, the category identification is used to identify whether the character area of ​​the sample image is clear. Combined with the examples in the previous article, the sample combined feature can be expressed as {[cls], f1, f2, ..., f 3N}; where [cls] represents the category label of the sample image. After the feature sequence of length 3N+1 is input into a feature extractor such as a Transformer encoder, it can be converted into an output feature sequence of the same length. On the one hand, the feature extractor allows the image to contain different numbers of text regions, and on the other hand, it can model the contextual association between the classification token (i.e., category identifier) ​​and the features of different text regions. The classification token [cls] in the output sequence is input into subsequent discriminant models such as MLP (Multilayer Perceptron) classifiers for subsequent processing.

[0074] In other words, the discriminant model can be used to judge whether the characters are clear or not based on the sample combination features to obtain the judgment output. The judgment output and the category identifier are used to update the discriminant model. The discriminant model can include two layers of fully connected (FC) layers and an activation layer. The input of the discriminant model can be the classification token and features encoded by the Transformer encoder, and the output is a two-category classification label (i.e., clear characters and unclear characters). The occurrence probability of these two categories can be obtained through the softmax function (normalized exponential function).

[0075] During the training process of the image processing device, iterative updates can be performed through loss functions such as a cross-entropy loss function (CE).

[0076] It should be understood that although Figures 1 to 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 1 to 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0077] See also Figure 4 , Figure 4 It is a structural schematic diagram of an embodiment of the image processing device of the present application.

[0078] In one embodiment, the image processing apparatus may include an input unit 11 and a processing unit 12 .

[0079] The input unit 11 is used to input an image to be recognized.

[0080] The processing unit 12 is used to implement the image processing method as described in any of the above embodiments.

[0081] For example, the processing unit 12 may acquire the image to be recognized, locate the character region of the image to be recognized, evaluate whether the characters in the character region are clear, and in response to determining that the characters are clear, determine that the image to be recognized is an image with clear characters.

[0082] For the specific definition of the image processing device, please refer to the definition of the image processing method above, which will not be repeated here. Each module in the above image processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0083] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the image processing method described above are implemented, which will not be described in detail here.

[0084] See also Figure 5 , Figure 5 It is a schematic diagram of the structure of an embodiment of a computer device of the present application.

[0085] In one embodiment, the computer device may be a server or a terminal such as a computer, which is not limited here.

[0086] Taking the computer device as a server as an example, its internal structure diagram can be as follows Figure 5 As shown in the example. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image processing method is implemented.

[0087] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0088] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps may be implemented:

[0089] S101: Acquire an image to be recognized and locate a character area of ​​the image to be recognized.

[0090] S102: Evaluate whether the characters in the character area are clear.

[0091] S103: In response to determining that the characters are clear, determining that the image to be recognized is an image with clear characters.

[0092] In one embodiment, when evaluating whether the characters in the character area are clear, the processor can also implement the following steps when executing the computer program: scale conversion processing is performed on the image to be recognized to obtain a number of derivative images; and it is determined whether the characters in the character area of ​​the image to be recognized and the derivative images are clear.

[0093] In one embodiment, when judging whether the characters in the character area of ​​the image to be recognized and the derived image are clear, the processor can also implement the following steps when executing the computer program: respectively obtaining the character area features of the image to be recognized and the derived image; combining the character area features of the image to be recognized and the derived image to form a combined character feature; inputting the combined character feature into a trained discriminant model, and using the discriminant model to judge whether the characters are clear.

[0094] In one embodiment, when obtaining character area features, the processor can also implement the following steps when executing the computer program: perform feature extraction on the target image to obtain global features of the target image; wherein the target image includes an image to be identified and a derived image; extract feature values ​​of pixels representing the character area in the target image from the global features as first feature values; and use the first feature values ​​of several character areas of the target image as character area features.

[0095] In one embodiment, the representative pixels include: a center pixel of the character area and a number of pixels surrounding the center pixel.

[0096] In one embodiment, when the image to be identified is scaled and processed to obtain a plurality of derivative images, the processor may further implement the following steps when executing the computer program: downsampling the image to be identified to obtain a first derivative image and a second derivative image; wherein the size of the first derivative image is larger than the size of the second derivative image.

[0097] In one embodiment, when evaluating whether the characters in the character area are clear, the processor can also implement the following steps when executing the computer program: using a trained discriminant model to perform character clarity discrimination on the character area of ​​the image to be identified; when training the discriminant model, the processor can also implement the following steps when executing the computer program: obtaining a sample image and a derived sample image of the sample image; splicing the category identification of the sample image, the character area features of the sample image and the character area features of the derived sample image to form a sample combination feature of the sample image; wherein the category identification is used to identify whether the characters in the character area of ​​the sample image are clear; using the discriminant model to judge whether the characters are clear on the sample combination features to obtain a judgment output; and updating the discriminant model using the judgment output and the category identification.

[0098] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:

[0099] S101: Acquire an image to be recognized and locate a character area of ​​the image to be recognized.

[0100] S102: Evaluate whether the characters in the character area are clear.

[0101] S103: In response to determining that the characters are clear, determining that the image to be recognized is an image with clear characters.

[0102] In one embodiment, when evaluating whether the characters in the character area are clear, the computer program can also implement the following steps when executed by the processor: scale the image to be recognized to obtain several derivative images; determine whether the characters in the character area of ​​the image to be recognized and the derivative images are clear.

[0103] In one embodiment, when judging whether the characters in the character area of ​​the image to be recognized and the derived image are clear, the computer program can also implement the following steps when executed by the processor: respectively obtaining the character area features of the image to be recognized and the derived image; concatenating the character area features of the image to be recognized and the derived image to form a combined character feature; inputting the combined character feature into a trained discriminant model, and using the discriminant model to judge whether the characters are clear.

[0104] In one embodiment, when obtaining character area features, the computer program can also implement the following steps when executed by the processor: perform feature extraction on the target image to obtain global features of the target image; wherein the target image includes an image to be identified and a derived image; extract feature values ​​of pixels representing the character area in the target image from the global features as first feature values; and use the first feature values ​​of several character areas of the target image as character area features.

[0105] In one embodiment, the representative pixels include: a center pixel of the character area and a number of pixels surrounding the center pixel.

[0106] In one embodiment, when the image to be identified is scaled to obtain a plurality of derivative images, the computer program can also implement the following steps when executed by the processor: downsampling the image to be identified to obtain a first derivative image and a second derivative image; wherein the size of the first derivative image is larger than the size of the second derivative image.

[0107] In one embodiment, when evaluating whether the characters in a character area are clear, the computer program can also implement the following steps when being executed by the processor: using a trained discriminant model to perform character clarity discrimination on the character area of ​​the image to be identified; when training the discriminant model, the computer program can also implement the following steps when being executed by the processor: obtaining a sample image and a derived sample image of the sample image; splicing the category identification of the sample image, the character area features of the sample image and the character area features of the derived sample image to form a sample combination feature of the sample image; wherein the category identification is used to identify whether the characters in the character area of ​​the sample image are clear; using the discriminant model to judge whether the characters are clear on the sample combination features to obtain a judgment output; and updating the discriminant model using the judgment output and the category identification.

[0108] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0109] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Acquire an image to be recognized, and locate a character area of ​​the image to be recognized; Evaluating whether the characters in the character area are clear; In response to determining that the characters are clear, determining that the image to be recognized is a clear character image.

2. The image processing method according to claim 1, characterized in that: The evaluating whether the characters in the character area are clear includes: Performing a scale conversion process on the image to be identified to obtain a plurality of derivative images; It is determined whether the characters in the character area of ​​the image to be recognized and the derived image are clear.

3. The image processing method according to claim 2, characterized in that: The determining whether the characters in the character area of ​​the image to be recognized and the derived image are clear includes: Respectively obtaining the character region features of the image to be recognized and the derived image; splicing the image to be recognized and the character region features of the derived image to form a combined character feature; The combined character features are input into a trained discrimination model, and the discrimination model is used to determine whether the characters are clear.

4. The image processing method according to claim 3, characterized in that: Obtaining character area features includes: Extracting features of a target image to obtain global features of the target image; wherein the target image includes the image to be identified and the derived image; Extracting feature values ​​of pixels representing the character area in the target image from the global features as first feature values; The first feature values ​​of the plurality of character regions of the target image are used as the character region features.

5. The image processing method according to claim 4, characterized in that: The representative pixels include: a center pixel of the character area and a number of pixels surrounding the center pixel.

6. The image processing method according to claim 2, characterized in that: The scaling process of the image to be identified is performed to obtain a plurality of derivative images, including: Downsampling the image to be recognized to obtain a first derivative image and a second derivative image; The size of the first derivative image is greater than the size of the second derivative image.

7. The image processing method according to claim 1, characterized in that: The evaluating whether the characters in the character area are clear includes: using a trained discrimination model to discriminate the clarity of the characters in the character area of ​​the image to be recognized; Training the discriminant model comprises: Acquire a sample image and a derivative sample image of the sample image; splicing the category identification of the sample image, the character area feature of the sample image and the character area feature of the derived sample image to form a sample combination feature of the sample image; wherein the category identification is used to identify whether the character area of ​​the sample image is clear; Using the discrimination model to judge whether the characters of the sample combination features are clear or not, and obtaining a judgment output; The discriminant model is updated using the determination output and the category identifier.

8. An image processing device, characterized in that: The image processing device comprises: An input unit, used for inputting an image to be recognized; A processing unit, used to implement the image processing method as described in any one of claims 1 to 7.

9. 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 processor executes the computer program, the steps of the image processing method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.