Blurred image recognition method and device, computer equipment and storage medium
By adding image rotation preprocessing and classification pre-steps in blur image recognition, and using a separate Laplace variance threshold judgment to identify each sub-category, the problem of insufficient accuracy and robustness of blur image recognition in the prior art is solved, and a more efficient blur image recognition effect is achieved.
Patent Information
- Application Number
- CN202411763566.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-11
AI Technical Summary
The existing blur image recognition methods are not effective when dealing with specific types of blur (such as motion blur, etc.) and pictures under complex background conditions. Since different types of pictures have large differences in pixel characteristics, the method of filtering using simple thresholds has problems with insufficient accuracy and robustness of recognition.
By adding the preprocessing of easy image rotation and the pre-step of image classification, a separate Laplace variance threshold is used for each subdivided category during the blur recognition process. The specific steps include obtaining the original image, inputting it to the pre-trained image classification model for classification, calculating the first Laplace variance of the Laplace operator, calculating the mean of the variance, and comparing it with the control mean in the clear image library to determine the degree of blurring of the image.
It significantly improves the accuracy of fuzzy recognition, can more effectively process pictures under specific types of fuzzy and complex background conditions, and improves the robustness of recognition.
Smart Images

Figure CN119600369A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a fuzzy image recognition method, device, computer equipment and storage medium. Background Art
[0002] In the field of image recognition, it is uncontrollable whether the image to be recognized is blurry or clear. However, if a blurry image is directly recognized without being cleared, it will have a great impact on the image recognition result. As a pre-step of image analysis, blurry image recognition has a wide range of application scenarios, especially in the financial system, which has a huge amount of text images.
[0003] However, in current blurred image recognition, most of them are done by sharpening the image, calculating the standard deviation of pixel values (including after operator transformation) or the difference between adjacent pixels and other thresholds to judge the blurriness of the image, and using the same processing method for all images. This type of method is simple in principle and has high processing efficiency. However, it is not effective for specific types of blur (such as motion blur) and images under complex background conditions. And because different types of images have large differences in pixel features, the method of filtering using a simple threshold has the problem of insufficient recognition accuracy and robustness. Summary of the invention
[0004] The present application provides a fuzzy image recognition method, device, computer equipment and storage medium, which aims to solve the existing fuzzy image recognition, which is mostly to sharpen the picture, calculate the pixel value standard deviation (including after operator transformation), or the difference between adjacent pixels and other thresholds to judge the blurriness of the image, and use the same processing method for all pictures. This type of method is simple in principle and has high processing efficiency. However, it is not effective for specific types of blur (such as motion blur, etc.) and pictures under complex background conditions. And because different types of pictures have large differences in pixel features, the method of filtering using a simple threshold has the problem of insufficient recognition accuracy and robustness. The method provided adds a pre-processing for convenient image rotation and a pre-step for image classification. In the fuzzy recognition process, a separate Laplace variance threshold is used for each subdivision category, which greatly improves the accuracy of fuzzy recognition.
[0005] In a first aspect, the present application provides a fuzzy image recognition method, comprising:
[0006] Obtaining an original image to be recognized;
[0007] The original image is input into the pre-trained image classification model, and the image classification model analyzes the original image and outputs the original image type corresponding to the original image;
[0008] Calculate multiple Laplace operators corresponding to the original image and the first Laplace variance corresponding to each Laplace operator;
[0009] Calculate the mean of multiple first Laplace variances corresponding to the original image as the original mean;
[0010] Obtaining a comparison mean value of clear images corresponding to the original image type in a preset clear image library;
[0011] If the original mean is less than the control mean, the original image is determined to be blurred.
[0012] In some embodiments, before inputting the original image into a pre-trained image classification model, it also includes: obtaining the rotation angle corresponding to the original image to be identified; obtaining the correction angle corresponding to the original image according to the rotation angle, performing angle correction on the original image according to the correction angle, and inputting the corrected original image into the image classification model.
[0013] Exemplarily, obtaining a correction angle corresponding to the original image according to the rotation angle to perform angle correction on the original image according to the correction angle includes: obtaining the rotation angle corresponding to the original image; generating a first rotation angle and a second rotation angle according to the rotation angle; wherein the first rotation angle is n times 90 degrees, and the second rotation angle is less than 90 degrees; and rotating the original image according to the first rotation angle and then rotating the original image according to the second rotation angle.
[0014] In some embodiments, a clear image library is generated by a preset financial system; before the original image is input into a pre-trained image classification model, it also includes: parsing the clear image library to obtain the clear image type corresponding to each clear image in the clear image library; inputting each clear image in the clear image library into the pre-trained image classification model, the image classification model parses the clear image, and outputs the predicted image type corresponding to the clear image; and completing the training of the image classification model according to the predicted image type and the clear image type.
[0015] In some embodiments, before obtaining the control mean of the clear image corresponding to the original image type in a preset clear image library, it also includes: calculating the Laplace mean of each clear image in the clear image library as the control mean; generating a mapping relationship between the clear image type and the control mean of each clear image in the clear image library, so as to obtain the control mean corresponding to the original image type according to the original image type and the mapping relationship.
[0016] In some embodiments, the image classification model includes multiple sub-classification models, each sub-classification model corresponds to a different image type; the original image is input into a pre-trained image classification model, the image classification model parses the original image, and outputs the original image type corresponding to the original image, including: determining the input parameter type of each sub-classification model according to the image types corresponding to the multiple sub-classification models; performing feature extraction on the original image according to each input parameter type to obtain multiple image feature information; inputting each image feature information into the corresponding sub-classification model, and the sub-classification model outputs the corresponding recognition result, so as to determine the original image type according to the recognition result output by each sub-classification model.
[0017] In some embodiments, if the original mean is less than the control mean, after determining that the original image is blurred, it also includes: obtaining the first coordinate corresponding to each first Laplace variance in the original image; obtaining multiple second Laplace variances of the clear image corresponding to the original image type and the second coordinates corresponding to each second Laplace variance in the clear image in a preset clear image library; determining the second Laplace variance corresponding to each first Laplace variance based on matching the multiple first coordinates and the multiple second coordinates; determining the target variance from the multiple first Laplace variances based on the difference between the first Laplace variance and the second Laplace variance; and generating a blurred area corresponding to the original image based on the first coordinate corresponding to each target variance.
[0018] In a second aspect, the present application provides a fuzzy image recognition device, comprising:
[0019] An image acquisition module, used to acquire an original image to be identified;
[0020] An image classification module is used to input the original image into a pre-trained image classification model, and the image classification model analyzes the original image and outputs the original image type corresponding to the original image;
[0021] A variance calculation module, used for calculating a plurality of Laplace operators corresponding to the original image and a first Laplace variance corresponding to each Laplace operator;
[0022] A mean value calculation module, used for calculating the mean of multiple first Laplace variances corresponding to the original image as the original mean value;
[0023] A control acquisition module is used to obtain a control mean value corresponding to the original image type in a preset clear image library;
[0024] The blur determination module is used to determine that the original image is blurred if the original mean is less than the control mean.
[0025] In a third aspect, the present application further provides a computer device, including:
[0026] Memory and processor;
[0027] The memory is used to store computer programs;
[0028] The processor is used to execute the computer program and implement the steps of the blurred image recognition method described in the first aspect when executing the computer program.
[0029] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the steps of the blurred image recognition method described in the first aspect above.
[0030] The present application discloses a fuzzy image recognition method, device, computer equipment and storage medium. The method first obtains the original image to be recognized. Then the original image is input into a pre-trained image classification model, the image classification model parses the original image, and outputs the original image type corresponding to the original image. Then, multiple Laplace operators corresponding to the original image and the first Laplace variance corresponding to each Laplace operator are calculated. Further, the mean of the multiple first Laplace variances corresponding to the original image is calculated as the original mean. Furthermore, the comparison mean of the clear image corresponding to the original image type is obtained in a preset clear image library. Finally, if the original mean is less than the comparison mean, it is determined that the original image is blurred.
[0031] Furthermore, the provided method calculates multiple Laplace operators corresponding to the original image and the first Laplace variance corresponding to each Laplace operator according to the original image type corresponding to the original image, and then calculates the mean of the multiple first Laplace variances corresponding to the original image, and then obtains the control mean of the clear image corresponding to the original image type in a preset clear image library and compares it with the original mean, so that when the original mean is smaller than the control mean, it can be quickly determined that the original image is blurred.
[0032] Compared with the existing general blur recognition method, the method provided in the present application adds a preprocessing step for convenient image rotation and a pre-step for image classification. In the blur recognition process, a separate Laplace variance threshold judgment is used for each sub-category, which greatly improves the accuracy of blur recognition.
[0033] This method fills the gap in the current field of fuzzy recognition of specific materials for insurance company claims in the financial system. It identifies and intercepts whether the image is blurry during the submission of materials at the front end, and promptly notifies the user to upload a clear image to ensure that subsequent recognition functions and timeliness are not affected.
[0034] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 is a schematic flow chart of the steps of a fuzzy image recognition method provided by an embodiment of the present application;
[0037] Figure 2 is a schematic flow chart of the steps of a method for determining the type of an original image provided by an embodiment of the present application;
[0038] Figure 3 It is a schematic flowchart of a fuzzy image recognition method provided by an embodiment of the present application;
[0039] Figure 4 is a structural schematic diagram of a fuzzy image recognition device provided by an embodiment of the present application;
[0040] Figure 5 It is a schematic block diagram of the structure of a computer device provided in one embodiment of the present application.
[0041] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0044] It should be understood that, in order to facilitate the clear description of the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the difference.
[0045] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0046] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0047] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0048] In the field of image recognition, it is uncontrollable whether the image to be recognized is blurry or clear. However, if a blurry image is directly recognized without being cleared, it will have a great impact on the image recognition result. As a pre-step of image analysis, blurry image recognition has a wide range of application scenarios, especially in the financial system, which has a huge amount of text images.
[0049] However, in current blurred image recognition, most of them are done by sharpening the image, calculating the standard deviation of pixel values (including after operator transformation) or the difference between adjacent pixels and other thresholds to judge the blurriness of the image, and using the same processing method for all images. This type of method is simple in principle and has high processing efficiency. However, it is not effective for specific types of blur (such as motion blur) and images under complex background conditions. And because different types of images have large differences in pixel features, the method of filtering using a simple threshold has the problem of insufficient recognition accuracy and robustness.
[0050] To solve the above problems, please refer to Figure 1 , Figure 1 This is a schematic flow chart of a fuzzy image recognition method provided by an embodiment of the present application. The fuzzy image recognition method can be implemented by a computer device, which can be deployed on a single server or a server cluster. It can also be deployed on a handheld terminal, a laptop computer, a wearable device or a robot, etc.
[0051] The provided method can be applied to the financial field to achieve advanced fuzzy recognition of various claim pictures to be identified, such as claim materials, or other related pictures. After the recognition is correct, text recognition is performed. If it is fuzzy, it is processed before recognition to avoid data errors caused by the recognition of fuzzy pictures, which causes immeasurable losses. At the same time, this application can also be applied to other scenarios such as medical care, education, etc. that contain a large number of scenes that require image recognition, so the embodiments of this application do not limit the application scenarios of the provided method.
[0052] To solve the above problems, please refer to Figure 1 Specifically, Figure 1 As shown, the provided method includes steps S101 to S106. The details are as follows:
[0053] S101. Obtain an original image to be recognized.
[0054] Specifically, before uploading the corresponding picture to be identified in any scenario, the server equipped with the method provided by the present application first intercepts and identifies the original image to be identified, and then proceeds to the subsequent steps after confirming that the original image is a clear image. If the original image is blurred, it is processed before proceeding to the subsequent steps.
[0055] S102. Input the original image into a pre-trained image classification model. The image classification model parses the original image and outputs the original image type corresponding to the original image.
[0056] Specifically, the server inputs the acquired original image into a pre-trained image classification model (such as a binary classification model, a prediction model constructed by a multi-convolutional neural network), and then parses the original image through the image classification model, and outputs the original image type corresponding to the original image. The image type corresponding to the original image can be quickly determined, and then the present application can determine different fuzzy comparison measurements based on different image types to achieve targeted recognition of blurred images.
[0057] In some embodiments, before inputting the original image into a pre-trained image classification model, it also includes: obtaining the rotation angle corresponding to the original image to be identified; obtaining the correction angle corresponding to the original image according to the rotation angle, performing angle correction on the original image according to the correction angle, and inputting the corrected original image into the image classification model.
[0058] Before recognizing each original image, the server first obtains the rotation angle corresponding to the original image, such as by comparing the text or other markers in the original image with the standard control object to obtain the corresponding rotation angle, and inputs the rotated original image into the image classification model, which can ensure the consistency of the recognized original image and improve the accuracy of fuzzy image recognition.
[0059] Exemplarily, obtaining a correction angle corresponding to the original image according to the rotation angle to perform angle correction on the original image according to the correction angle includes: obtaining the rotation angle corresponding to the original image; generating a first rotation angle and a second rotation angle according to the rotation angle; wherein the first rotation angle is n times 90 degrees, and the second rotation angle is less than 90 degrees; and rotating the original image according to the first rotation angle and then rotating the original image according to the second rotation angle.
[0060] The present application splits the rotation angle into a first rotation angle and a second rotation angle, wherein the first rotation angle is n times of 90 degrees and the second rotation angle is less than 90 degrees, that is, the first rotation angle corresponding to 290 degrees is 270 degrees, the second rotation angle is 20 degrees, and so on. The method provided can rotate a large angle first and then a small angle, thereby improving the accuracy of the rotation of the original image.
[0061] In some embodiments, a clear image library is generated by a preset financial system; before the original image is input into a pre-trained image classification model, it also includes: parsing the clear image library to obtain the clear image type corresponding to each clear image in the clear image library; inputting each clear image in the clear image library into the pre-trained image classification model, the image classification model parses the clear image, and outputs the predicted image type corresponding to the clear image; and completing the training of the image classification model according to the predicted image type and the clear image type.
[0062] When the provided method is applied in a financial system, by first parsing the clear image library corresponding to the financial system, the type of each clear image used as a sample can be obtained, and then the model can be optimized and trained based on the label corresponding to the clear image and its clear image type and the predicted image type generated by the image classification model.
[0063] Exemplarily, in a financial system, the clear image type may include the following subcategories: "ordinary invoice hospitalization original", "ordinary invoice hospitalization copy", "ordinary outpatient invoice original with details", "ordinary outpatient invoice original without details", "ordinary outpatient invoice copy with details", "ordinary outpatient invoice copy without details", "electronic invoice hospitalization", "electronic outpatient invoice with cost details", "electronic outpatient invoice without cost details", "original VAT invoice", "copy of VAT invoice", "discharge summary", "admission record", "cost detail list", "other", "medical insurance settlement form", "prescription signature", "household register", "operation record", "authorization "Certificate", "Inspection Report", "Test Report", "Claim Application", "Pathology Report", "Third Party Separation Form", "Diagnosis Certificate", "ID Card", "Bank Card", "Outpatient Medical Record", "Liability Statement", "Traffic Liability Determination Letter", "Other Judicial Documents", "Medical Death Certificate", "Declaration of Death Issued by the Court", "Court Judgment", "Household Registration Cancellation Certificate", "Marriage Certificate", "Hong Kong, Macao and Taiwan Home Return Permit", "Birth Certificate", "Court Mediation Book", "Disability Assessment Certificate", "Accident Certificate", "Passport", "Notarization Certificate", "Hong Kong, Macao and Taiwan ID Card", "Corpse Disposal Certificate", "Physical Examination Report", "Non-materials".
[0064] In some embodiments, the image classification model includes multiple sub-classification models, each sub-classification model corresponding to a different image type. Figure 2 As shown, the original image is input into a pre-trained image classification model, the image classification model parses the original image, and outputs the original image type corresponding to the original image, including steps S102a to S102c.
[0065] like Figure 2 As shown, the provided original image type determination method includes the following steps:
[0066] S102a. Determine the input parameter type of each sub-classification model according to the image type corresponding to the multiple sub-classification models;
[0067] S102b respectively according to each input parameter type of the original image feature extraction, obtain multiple image feature information;
[0068] S102c. Input each image feature information into the corresponding sub-classification model, and the sub-classification model outputs the corresponding recognition result, so as to determine the original image type according to the recognition result output by each sub-classification model.
[0069] By training the corresponding sub-classification model based on each image type (the type of each sub-classification model can be the same or different), the corresponding input parameter type can be determined adaptively according to the characteristics of different sub-classification models, and the input of different models is different. Then, the corresponding image feature information can be extracted from the original image based on each input parameter type, so as to confirm the original image type that the original image finally corresponds to through the corresponding sub-classification model. Then, the type of each image can be accurately determined.
[0070] S103. Calculate multiple Laplace operators corresponding to the original image and a first Laplace variance corresponding to each Laplace operator.
[0071] Specifically, by calculating a plurality of Laplace operators corresponding to each region of the original image and a first Laplace variance corresponding to each Laplace operator, the blur feature of the image can be analyzed from a digital perspective.
[0072] S104. Calculate the mean of multiple first Laplace variances corresponding to the original image as the original mean.
[0073] Specifically, by obtaining the mean of the first Laplace variances of the original image, that is, the original mean, it can be used as a reference for determining whether the image is blurred. Figure 3 V2 shown is this original mean.
[0074] S105. Obtain a comparison mean value of clear images corresponding to the original image type in a preset clear image library.
[0075] Specifically, the comparison mean of the clear image corresponding to the original image type corresponding to the original image, that is, the value of the Laplace variance mean of the clear image of this type, is used as the comparison mean (such as Figure 3 The provided method can then quickly determine two means for clear comparison.
[0076] In some embodiments, before obtaining the control mean of the clear image corresponding to the original image type in a preset clear image library, it also includes: calculating the Laplace mean of each clear image in the clear image library as the control mean; generating a mapping relationship between the clear image type and the control mean of each clear image in the clear image library, so as to obtain the control mean corresponding to the original image type according to the original image type and the mapping relationship.
[0077] The provided method calculates the Laplace mean of each clear image (the calculation method is also to first calculate the Laplace operator, then calculate the variance of each Laplace operator and then obtain the mean). Then the server can generate a mapping relationship between the clear image type and the control mean of each clear image, so as to realize a quick query of the control mean corresponding to the original image type.
[0078] S106. If the original mean is smaller than the control mean, determine that the original image is blurred.
[0079] Specifically, the server determines the results of the original mean and the control mean. Since the edges of the blurred image are not clear, the variance corresponding to the Laplace mean will be smaller. Therefore, if Figure 3 The original mean V2 < the control mean V1 indicates a blurred image, and interception is performed. The original mean V2 > the control mean V1 indicates a non-blurred image, and the subsequent processing continues. Figure 3 The preprocessing process shown (corresponding to step S101 and its embodiment) acquires and rotates the original image, and then enters the image classification process (corresponding to step S102 and its embodiment) to determine the corresponding classification of the original image, and finally completes the acquisition of the original mean V2 and the control mean V1 for comparison through fuzzy image judgment (corresponding to steps S103 to S106 and its embodiment). Therefore, the fuzzy image recognition method for special scenes based on the Laplace operator proposed in this paper, compared with the existing general fuzzy recognition method, adds the preprocessing of image rotation convenience and the pre-step of image classification. In the fuzzy recognition process, for each subdivided category, a separate Laplace variance threshold judgment is used, which greatly improves the accuracy of fuzzy recognition. This method fills the gap in the current fuzzy recognition field for specific materials of insurance companies' claims, identifies whether the image is fuzzy and intercepts it during the front-end submission of materials, and promptly notifies the user to upload a clear image to ensure that subsequent recognition functions and timeliness are not affected.
[0080] In some embodiments, if the original mean is less than the control mean, after determining that the original image is blurred, it also includes: obtaining the first coordinate corresponding to each first Laplace variance in the original image; obtaining multiple second Laplace variances of the clear image corresponding to the original image type and the second coordinates corresponding to each second Laplace variance in the clear image in a preset clear image library; determining the second Laplace variance corresponding to each first Laplace variance based on matching the multiple first coordinates and the multiple second coordinates; determining the target variance from the multiple first Laplace variances based on the difference between the first Laplace variance and the second Laplace variance; and generating a blurred area corresponding to the original image based on the first coordinate corresponding to each target variance.
[0081] Furthermore, the provided method can quickly determine the blurred area in the original image by comparing the specific variance when determining that the original image is blurred, so as to repair the blurred area in a targeted manner, thereby realizing rapid blur detection and repair of the original image.
[0082] See also Figure 4 As shown, Figure 41 is a schematic diagram of the structure of a fuzzy image recognition device 200 provided in an embodiment of the present application. The fuzzy image recognition device 200 is used to perform the steps of the fuzzy image recognition method shown in the above embodiments. The fuzzy image recognition device 200 can be a single server or a server cluster, or the fuzzy image recognition device 200 can be a terminal, which can be a handheld terminal, a laptop computer, a wearable device or a robot, etc.
[0083] like Figure 4 As shown, the blurred image recognition device 200 includes:
[0084] An image acquisition module 201 is used to acquire an original image to be identified;
[0085] An image classification module 202 is used to input the original image into a pre-trained image classification model, and the image classification model analyzes the original image and outputs the original image type corresponding to the original image;
[0086] A variance calculation module 203, used for calculating a plurality of Laplace operators corresponding to the original image and a first Laplace variance corresponding to each Laplace operator;
[0087] A mean value calculation module 204 is used to calculate the mean of multiple first Laplace variances corresponding to the original image as the original mean value;
[0088] A control acquisition module 205 is used to acquire a control mean value corresponding to the original image type in a preset clear image library;
[0089] The blur determination module 206 is configured to determine that the original image is blurred if the original mean is less than the control mean.
[0090] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the fuzzy image recognition device and each module described above can refer to the corresponding processes in the fuzzy image recognition method embodiments described in the above embodiments, and will not be repeated here.
[0091] The above-mentioned fuzzy image recognition method can be implemented in the form of a computer program. The computer program can be used in Figure 4 Run on the device shown.
[0092] See also Figure 5 , Figure 5 1 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device includes a processor, a memory and a network interface connected via a device bus, wherein the memory may include a storage medium and an internal memory.
[0093] The storage medium can store an operating device and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any fuzzy image recognition method.
[0094] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0095] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any fuzzy image recognition method.
[0096] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 5 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal to which the scheme 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.
[0097] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0098] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0099] Obtaining an original image to be recognized;
[0100] The original image is input into the pre-trained image classification model, and the image classification model analyzes the original image and outputs the original image type corresponding to the original image;
[0101] Calculate multiple Laplace operators corresponding to the original image and the first Laplace variance corresponding to each Laplace operator;
[0102] Calculate the mean of multiple first Laplace variances corresponding to the original image as the original mean;
[0103] Obtaining a comparison mean value of clear images corresponding to the original image type in a preset clear image library;
[0104] If the original mean is less than the control mean, the original image is determined to be blurred.
[0105] In some embodiments, before inputting the original image into a pre-trained image classification model, it also includes: obtaining the rotation angle corresponding to the original image to be identified; obtaining the correction angle corresponding to the original image according to the rotation angle, performing angle correction on the original image according to the correction angle, and inputting the corrected original image into the image classification model.
[0106] Exemplarily, obtaining a correction angle corresponding to the original image according to the rotation angle to perform angle correction on the original image according to the correction angle includes: obtaining the rotation angle corresponding to the original image; generating a first rotation angle and a second rotation angle according to the rotation angle; wherein the first rotation angle is n times 90 degrees, and the second rotation angle is less than 90 degrees; and rotating the original image according to the first rotation angle and then rotating the original image according to the second rotation angle.
[0107] In some embodiments, a clear image library is generated by a preset financial system; before the original image is input into a pre-trained image classification model, it also includes: parsing the clear image library to obtain the clear image type corresponding to each clear image in the clear image library; inputting each clear image in the clear image library into the pre-trained image classification model, the image classification model parses the clear image, and outputs the predicted image type corresponding to the clear image; and completing the training of the image classification model according to the predicted image type and the clear image type.
[0108] In some embodiments, before obtaining the control mean of the clear image corresponding to the original image type in a preset clear image library, it also includes: calculating the Laplace mean of each clear image in the clear image library as the control mean; generating a mapping relationship between the clear image type and the control mean of each clear image in the clear image library, so as to obtain the control mean corresponding to the original image type according to the original image type and the mapping relationship.
[0109] In some embodiments, the image classification model includes multiple sub-classification models, each sub-classification model corresponds to a different image type; the original image is input into a pre-trained image classification model, the image classification model parses the original image, and outputs the original image type corresponding to the original image, including: determining the input parameter type of each sub-classification model according to the image types corresponding to the multiple sub-classification models; performing feature extraction on the original image according to each input parameter type to obtain multiple image feature information; inputting each image feature information into the corresponding sub-classification model, and the sub-classification model outputs the corresponding recognition result, so as to determine the original image type according to the recognition result output by each sub-classification model.
[0110] In some embodiments, if the original mean is less than the control mean, after determining that the original image is blurred, it also includes: obtaining the first coordinate corresponding to each first Laplace variance in the original image; obtaining multiple second Laplace variances of the clear image corresponding to the original image type and the second coordinates corresponding to each second Laplace variance in the clear image in a preset clear image library; determining the second Laplace variance corresponding to each first Laplace variance based on matching the multiple first coordinates and the multiple second coordinates; determining the target variance from the multiple first Laplace variances based on the difference between the first Laplace variance and the second Laplace variance; and generating a blurred area corresponding to the original image based on the first coordinate corresponding to each target variance.
[0111] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement the steps of the blurred image recognition method provided in the above embodiments of the present application.
[0112] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A fuzzy image recognition method, characterized in that: include: Obtaining the original image to be recognized; Inputting the original image into a pre-trained image classification model, the image classification model parses the original image and outputs the original image type corresponding to the original image; Calculating a plurality of Laplace operators corresponding to the original image and a first Laplace variance corresponding to each of the Laplace operators; Calculate the mean of the plurality of first Laplace variances corresponding to the original image as the original mean; Obtaining a comparison mean value of clear images corresponding to the original image type in a preset clear image library; If the original mean is less than the control mean, it is determined that the original image is blurred.
2. The method according to claim 1, characterized in that Before inputting the original image into the pre-trained image classification model, the method further includes: Obtain the rotation angle corresponding to the original image to be recognized; A correction angle corresponding to the original image is acquired according to the rotation angle, so as to perform angle correction on the original image according to the correction angle, and the corrected original image is input into the image classification model.
3. The method according to claim 2, characterized in that The acquiring a correction angle corresponding to the original image according to the rotation angle, so as to perform angle correction on the original image according to the correction angle, comprises: Obtaining the rotation angle corresponding to the original image; Generate a first rotation angle and a second rotation angle according to the rotation angle; wherein the first rotation angle is n times of 90 degrees, and the second rotation angle is less than 90 degrees; The original image is rotated according to the first rotation angle and then rotated according to the second rotation angle.
4. The method according to claim 1, characterized in that: The clear image library is generated by a preset financial system; before the original image is input into the pre-trained image classification model, it also includes: Parsing the clear image library to obtain a clear image type corresponding to each clear image in the clear image library; Inputting each of the clear images in the clear image library into a pre-trained image classification model, the image classification model parses the clear image, and outputs a predicted image type corresponding to the clear image; The image classification model is trained according to the predicted image type and the clear image type.
5. The method according to claim 1, characterized in that Before obtaining the comparison mean of the clear images corresponding to the original image type in the preset clear image library, the method further includes: Calculating the Laplace mean of each of the clear images in the clear image library as the control mean; A mapping relationship between the clear image type of each clear image in the clear image library and the control mean is generated, so as to obtain the control mean corresponding to the original image type according to the original image type and the mapping relationship.
6. The method according to claim 1, characterized in that The image classification model includes a plurality of sub-classification models, each sub-classification model corresponds to a different image type; the original image is input into a pre-trained image classification model, the image classification model parses the original image, and outputs the original image type corresponding to the original image, including: Determine the input parameter type of each sub-classification model according to the image types corresponding to the multiple sub-classification models; Extracting features from the original image according to each input parameter type to obtain multiple image feature information; Each of the image feature information is input into the corresponding sub-classification model, and the sub-classification model outputs a corresponding recognition result, so as to determine the original image type according to the recognition result output by each sub-classification model.
7. The method according to claim 1, characterized in that After determining that the original image is blurred if the original mean is less than the control mean, the method further includes: Obtain the first coordinate corresponding to each first Laplace variance in the original image; Acquire, from a preset clear image library, a plurality of second Laplace variances of clear images corresponding to the original image type, and a second coordinate corresponding to each second Laplace variance in the clear image; Matching the plurality of first coordinates and the plurality of second coordinates, and determining a second Laplace variance corresponding to each of the first Laplace variances; determining a target variance among a plurality of first Laplace variances according to a difference between the first Laplace variance and the second Laplace variance; A blurred area corresponding to the original image is generated according to the first coordinates corresponding to each of the target variances.
8. A fuzzy image recognition device, characterized in that: include: An image acquisition module, used to acquire an original image to be identified; An image classification module, used for inputting the original image into a pre-trained image classification model, wherein the image classification model parses the original image and outputs the original image type corresponding to the original image; A variance calculation module, used for calculating a plurality of Laplace operators corresponding to the original image and a first Laplace variance corresponding to each of the Laplace operators; A mean calculation module, used for calculating the mean of the plurality of first Laplace variances corresponding to the original image as the original mean; A control acquisition module, used for acquiring a control mean value corresponding to the original image type in a preset clear image library; The blur determination module is used to determine that the original image is blurred if the original mean value is less than the control mean value.
9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 7.