Image quality detection method, electronic equipment, storage medium and program product
By performing text detection and clarity evaluation on images, using the mean value, variance and standard deviation of text confidence, the problem of low accuracy of image quality detection in the prior art is solved, and efficient and accurate image quality evaluation and unclearity are achieved Area recognition improves user experience and information processing efficiency.
Patent Information
- Application Number
- CN202411435905.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-17
AI Technical Summary
The existing image quality detection methods have low accuracy in evaluating quality such as image clarity with text, which affects the effect of information transmission, especially in scenarios where text information in images is needed.
By performing text detection processing on the image to be detected, text recognition results are obtained, image quality evaluation information is determined based on the text recognition results, and the image quality detection results are determined using the clarity evaluation information to compare with the threshold value to determine the image quality detection results, including the mean value of text confidence, variance and standards. Bad information.
Improve the accuracy and applicability of image quality evaluation, can reliably and accurately evaluate image quality, and improve user experience, especially when processing blurred documents, accurately locate unclear areas, reduce manual intervention, and improve information processing efficiency .
Smart Images

Figure CN119323719A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image quality detection method, electronic equipment, storage medium, and program product. Background Art
[0002] With the advent of the digital information age, images are widely used in various fields as an important medium for information transmission, such as document management, e-commerce, traffic management, medical imaging, education and training, etc. In practical applications, image quality directly affects the effect of information transmission, especially in scenarios where text information needs to be extracted from images, image clarity and other qualities are particularly important. At present, image clarity and other qualities are usually detected based on features such as image contrast and edge strength. However, the existing detection methods have low accuracy in evaluating the clarity and other qualities of images with text. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure is proposed. Embodiments of the present disclosure provide an image quality detection method, an electronic device, a storage medium and a computer program product.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image quality detection method, comprising: performing text detection processing on an image to be detected to obtain a text recognition result of the image to be detected; determining image quality judgment information of the image to be detected based on the text recognition result; and obtaining a quality detection result of the image to be detected using the image quality judgment information.
[0005] Optionally, the text recognition result includes text position and text confidence, and the image quality judgment information includes clarity judgment information; determining the quality detection result of the image to be detected based on the text recognition result includes: determining the clarity judgment information based on the text confidence, or the text position and the text confidence.
[0006] Optionally, using the image quality judgment information to obtain the quality detection result of the image to be detected includes: obtaining a clarity judgment threshold corresponding to the clarity judgment information; comparing the clarity judgment information with the clarity judgment threshold, and determining the quality detection result based on the comparison result.
[0007] Optionally, the clarity evaluation information includes at least one of the following information: text confidence average value information, text confidence variance information, and text confidence standard deviation information.
[0008] Optionally, comparing the clarity judgment information with the clarity judgment threshold, and determining the quality inspection result based on the comparison result includes: comparing a first text confidence average value with a first confidence average value threshold, wherein the first text confidence average value is the confidence average value of all texts in the image to be detected; when the first text confidence average value is greater than the first confidence average value threshold, comparing the first text confidence variance with the first confidence variance threshold, or comparing the first text confidence standard deviation with the first confidence standard deviation threshold; wherein the first text confidence variance is the text confidence variance of all texts in the image to be detected, and the first text confidence standard deviation is the text confidence standard deviation of all texts in the image to be detected; when the first text confidence variance is greater than the first confidence variance threshold, or the first text confidence standard deviation is greater than the first confidence standard deviation threshold, determining that the quality inspection result is that the image to be detected is unclear.
[0009] Optionally, when the first text confidence average value is less than or equal to the first confidence average value threshold value, the quality detection result is determined to be that the image to be detected is unclear.
[0010] Optionally, determining the clarity judgment information includes: segmenting the image to be detected to obtain multiple image areas; obtaining all the text located in the image area according to the text position information; and determining the clarity judgment information of the image area based on the confidence of all the text in the image area.
[0011] Optionally, comparing the clarity judgment information with the clarity judgment threshold and determining the quality detection result based on the comparison result includes: comparing a second text confidence average value with a second confidence average value threshold, wherein the second text confidence average value is the confidence average value of all texts in the image area; when the second text confidence average value is greater than the second confidence average value threshold, comparing the second text confidence variance with the second confidence variance threshold, or comparing the second text confidence standard deviation with the second confidence standard deviation threshold; wherein the second text confidence variance is the text confidence variance of all texts in the image area, and the second text confidence standard deviation is the text confidence standard deviation of all texts in the image area; when the second text confidence variance is greater than the second confidence variance threshold, or the second text confidence standard deviation is greater than the second confidence standard deviation threshold, determining that the quality detection result is that the image area is unclear.
[0012] Optionally, when the second text confidence average value is less than or equal to the second confidence average value threshold value, the quality detection result is determined to be that the image area is unclear.
[0013] Optionally, a comprehensive quality detection result of the image to be detected is determined according to the quality detection results of each of the image regions.
[0014] Optionally, based on the quality inspection result, the image to be inspected is annotated and a quality inspection report is generated.
[0015] Optionally, performing text detection processing on the image to be detected includes: performing text detection processing on the image to be detected using OCR technology.
[0016] According to a second aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the above method.
[0017] According to a third aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0018] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising computer program instructions, wherein the computer program instructions implement the above method when executed by a processor.
[0019] Based on the image quality detection method, electronic device, storage medium and computer program product provided by the above embodiments of the present disclosure, text detection processing is performed on the image to be detected to obtain the text recognition result of the image to be detected, and image quality judgment information of the image to be detected is determined based on the text recognition result to determine the quality detection result. It has high quality assessment accuracy and applicability, can reliably and accurately evaluate image quality, and effectively improves the user experience.
[0020] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present disclosure will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0022] Figure 1 A flowchart of an embodiment of the image quality detection method disclosed in the present invention;
[0023] Figure 2 A flowchart of determining a quality detection result in one embodiment of the image quality detection method disclosed herein;
[0024] Figure 3 A flowchart of determining a quality detection result in another embodiment of the image quality detection method disclosed herein;
[0025] Figure 4 A flowchart of determining the clarity judgment information of an image area in another embodiment of the image quality detection method disclosed in the present invention;
[0026] Figure 5 A flowchart of determining a quality detection result in another embodiment of the image quality detection method disclosed herein;
[0027] Figure 6 is a structural diagram of an embodiment of an electronic device disclosed herein. DETAILED DESCRIPTION
[0028] The exemplary embodiments according to the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0029] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0030] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0031] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0032] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0033] In addition, the term "and / or" in this disclosure is only a description of the association relationship of associated objects, indicating that there may be three relationships, such as A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this disclosure generally indicates that the associated objects before and after are in an "or" relationship.
[0034] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0035] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0036] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0037] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0038] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0039] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems or servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0040] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment. In a distributed cloud computing environment, tasks can be performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0041] Application Overview
[0042] In the process of implementing the present disclosure, the inventors found that when processing documents, it is often encountered that due to poor quality of scanning, shooting, etc., some of the text in the document is blurred, which affects the subsequent text recognition and information extraction. In the related art, the clarity and other qualities of the image are usually detected based on the contrast, edge strength and other features of the image. However, the existing detection method has low accuracy in evaluating the clarity and other qualities of the image with text.
[0043] The image quality detection method provided by the present invention performs text detection processing on the image to be detected to obtain the text recognition result of the image to be detected; based on the text recognition result, determines the image quality judgment information of the image to be detected; uses the image quality judgment information to obtain the quality detection result of the image to be detected; has high quality assessment accuracy and applicability, can reliably and accurately evaluate the image quality, and effectively improves the user experience.
[0044] Exemplary Methods
[0045] Figure 1 is a flow chart of an embodiment of the image quality detection method disclosed in the present invention, as shown in Figure 1 The method shown includes steps: S101-S103. Each step is described below.
[0046] Step S101, performing text detection processing on the image to be detected to obtain a text recognition result of the image to be detected.
[0047] The image to be detected may be a variety of two-dimensional images, and there may be text in the image to be detected, and the text may be Chinese or non-Chinese. A variety of detection technologies may be used to perform text detection processing on the image to be detected, for example, the detection technology is OCR (Optical Character Recognition) technology, etc. When the image to be detected is processed using OCR and other technologies, the text recognition result obtained includes information such as text position and text confidence.
[0048] For example, by performing text detection processing on an image to be detected based on OCR technology, the text in the image can be extracted and the confidence of text recognition can be provided. The text confidence is the probability value of outputting correct text based on OCR technology.
[0049] Step S102: determining image quality evaluation information of the image to be detected based on the text recognition result.
[0050] Step S103, using the image quality evaluation information, obtaining a quality detection result of the image to be detected.
[0051] The image quality detection method disclosed in the present invention performs text detection processing on the image to be detected to obtain the text recognition result of the image to be detected, and determines the image quality judgment information of the image to be detected based on the text recognition result to determine the quality detection result. The method has high quality assessment accuracy and applicability, and can reliably and accurately assess the image quality.
[0052] A variety of methods can be used to determine the quality test results of the image to be tested. The text recognition results include text position and text confidence, etc. The image quality judgment information includes clarity judgment information, etc. The clarity judgment information can be determined based on the text confidence, or the text position and text confidence. The position and text confidence of the text in the image to be tested can be used to accurately determine the clarity test results of the image.
[0053] Before performing text detection on an image to be detected, the image to be detected can be preprocessed to provide high-quality image input for subsequent text recognition. The preprocessing includes grayscale, binarization, noise removal and other processing; by grayscale processing, color information can be removed; by binarization processing, the image can be converted into a black and white image; noise removal processing can remove noise in the image and enhance the clarity of the image.
[0054] Figure 2 FIG. 1 is a flow chart of determining a quality detection result in an embodiment of the image quality detection method disclosed in the present invention. Figure 2 The method shown includes steps: S201-S202. Each step is described below.
[0055] S201, obtaining a clarity judgment threshold corresponding to clarity judgment information.
[0056] S202, comparing the clarity evaluation information with the clarity evaluation threshold, and determining a quality detection result based on the comparison result.
[0057] The clarity evaluation information includes at least one of the following information: text confidence average value information, text confidence variance information, and text confidence standard deviation information. The text confidence variance is the average standard deviation of the square value of the difference between each text confidence and the average of all text confidences; the text confidence standard deviation is the arithmetic square root of the text confidence variance. The text confidence variance information and the text confidence standard deviation information can be calculated using a variety of existing methods.
[0058] Statistical analysis can be performed based on text confidence, text confidence level, etc., to calculate one or more statistics including text confidence average information, text confidence variance information, and text confidence standard deviation information, and quality detection results such as image clarity can be determined based on the calculated statistics.
[0059] According to the detection requirements and the results of the previous detection experiments, corresponding thresholds can be set for the text confidence average information, text confidence variance information, and text confidence standard deviation information, and the clarity and other quality results of the image can be determined based on the clarity judgment information and the corresponding clarity judgment threshold.
[0060] Figure 3 FIG. 1 is a flowchart of determining a quality detection result in another embodiment of the image quality detection method disclosed in the present invention. Figure 3 The method shown includes steps: S301-S303. Each step is described below.
[0061] Step S301 : comparing a first character confidence average value with a first confidence average value threshold, wherein the first character confidence average value is the confidence average value of all characters in the image to be detected.
[0062] When the first character confidence average value is less than or equal to the first confidence average value threshold, the quality detection result is determined to be that the image to be detected is not clear. Alternatively, when the first character confidence average value is greater than the first confidence average value threshold, the quality detection result is determined to be that the image to be detected is clear.
[0063] Step S302, when the first character confidence average value is greater than the first confidence average value threshold, compare the first character confidence variance with the first confidence variance threshold, or compare the first character confidence standard deviation with the first confidence standard deviation threshold.
[0064] The first text confidence variance is the text confidence variance of all the text in the image to be detected, and the first text confidence standard deviation is the text confidence standard deviation of all the text in the image to be detected.
[0065] Step S303, when the first character confidence variance is greater than the first confidence variance threshold, or the first character confidence standard deviation is greater than the first confidence standard deviation threshold, determining that the quality detection result is that the image to be detected is unclear.
[0066] When the first character confidence variance is less than or equal to the first confidence variance threshold, or the first character confidence standard deviation is less than or equal to the first confidence standard deviation threshold, it is determined that the quality detection result is that the image to be detected is clear.
[0067] For example, the image to be detected is image A. Based on the OCR technology, text detection processing is performed on image A to obtain the text recognition result of image A. The text recognition result includes the set A of all the texts in image A, and the position and confidence of each text in the set A.
[0068] The first character confidence average is calculated as the confidence average of all characters in set A. The first character confidence average is compared with the first confidence average threshold, and if the first character confidence average is less than or equal to the first confidence average threshold, the quality detection result of image A is determined to be an unclear image.
[0069] If the first character confidence average value is greater than the first confidence average value threshold, the character confidence variance of all characters in set A is calculated as the first character confidence variance, or the character confidence standard deviation of all characters in set A is calculated as the first confidence standard deviation.
[0070] The first character confidence variance is compared with the first confidence variance threshold. If the first character confidence variance is less than or equal to the first confidence variance threshold, the quality detection result is that image A is clear; if the first character confidence variance is greater than the first confidence variance threshold, the quality detection result is that image A is not clear.
[0071] Alternatively, the first text confidence standard deviation is compared with the first confidence standard deviation threshold. If the first text confidence standard deviation is less than or equal to the first confidence standard deviation threshold, the quality detection result is that image A is clear; if the first text confidence standard deviation is greater than the first confidence standard deviation threshold, the quality detection result is that image A is not clear.
[0072] You can set thresholds corresponding to the text confidence average information, text confidence variance information, and text confidence standard deviation information. The thresholds can be adaptively adjusted according to the specific quality detection requirements of different images, which improves the accuracy and robustness of image detection and is suitable for a variety of application scenarios.
[0073] Figure 4 FIG. 1 is a flowchart of determining the clarity judgment information of an image area in another embodiment of the image quality detection method disclosed in the present invention. Figure 4 The method shown includes steps: S401-S403. Each step is described below.
[0074] Step S401, segment the image to be detected to obtain multiple image regions. The areas of the image regions may be the same or different.
[0075] Step S402, obtaining all the text in the image area according to the text position information.
[0076] Step S403, based on the confidence of all the text in the image area, determine the clarity judgment information of the image area. A variety of methods can be used to determine the text confidence average information, text confidence variance information and text confidence standard deviation information of the image area based on the confidence of all the text in the image area.
[0077] Figure 5 FIG. 1 is a flowchart of determining a quality detection result in another embodiment of the image quality detection method disclosed in the present invention. Figure 5 The method shown includes steps: S501-S503. Each step is described below.
[0078] Step S501, comparing the second character confidence average value with a second confidence average value threshold.
[0079] The second character confidence average is the confidence average of all characters in the image area. When the second character confidence average is less than or equal to the second confidence average threshold, the quality detection result is determined to be that the image area is unclear.
[0080] Step S502, when the second character confidence average value is greater than the second confidence average value threshold, the second character confidence variance is compared with the second confidence variance threshold, or the second character confidence standard deviation is compared with the second confidence standard deviation threshold.
[0081] The second text confidence variance is the text confidence variance of all texts in the image area, and the second text confidence standard deviation is the text confidence standard deviation of all texts in the image area.
[0082] Step S503, when the second character confidence variance is greater than the second confidence variance threshold, or the second character confidence standard deviation is greater than the second confidence standard deviation threshold, determine that the quality detection result is that the image area is unclear.
[0083] When the second character confidence variance is less than or equal to the second confidence variance threshold, or the second character confidence standard deviation is less than or equal to the second confidence standard deviation threshold, it is determined that the quality detection result is that the image area is clear.
[0084] For example, the image to be detected is image B. Based on the OCR technology, text detection processing is performed on image B to obtain the text recognition result of image B. The text recognition result includes a set B of all the texts in image B, and the position and confidence of each text in set B. Image B is segmented to obtain multiple image regions. According to the position information of each text in set B, all the texts located in each image region are obtained.
[0085] The confidence average of all the characters in the image area is calculated as the second character confidence average. The second character confidence average is compared with the second confidence average threshold, and if the second character confidence average is less than or equal to the second confidence average threshold, it is determined that the image area is unclear.
[0086] If the second text confidence average value is greater than the second confidence average value threshold, the text confidence variance of all texts in the image area is calculated as the second text confidence variance, or the text confidence standard deviation of all texts in the image area is calculated as the second text confidence standard deviation.
[0087] The second text confidence variance is compared with the second confidence variance threshold. If the second text confidence variance is less than or equal to the second confidence variance threshold, the quality detection result is that the image area is clear; if the second text confidence variance is greater than the second confidence variance threshold, the quality detection result is that the image area is unclear.
[0088] Alternatively, the second text confidence standard deviation is compared with the second confidence standard deviation threshold. If the second text confidence standard deviation is less than or equal to the second confidence standard deviation threshold, the quality detection result is that the image area is clear; if the second text confidence standard deviation is greater than the second confidence standard deviation threshold, the quality detection result is that the image area is unclear.
[0089] After determining the quality detection results of each image area, a variety of methods can be used to determine the comprehensive quality detection result of the image to be detected based on the quality detection results of each image area. For example, if the number of image areas whose quality detection results are unclear image areas is greater than the quantity threshold, or if the ratio of the total area of image areas whose quality detection results are unclear image areas to the area of the image to be detected is greater than the area ratio threshold, then the comprehensive quality detection result of the image to be detected is determined to be unclear; the quantity threshold can be half of the total number of image areas, etc., and the area ratio threshold can be 0.5, etc.
[0090] For example, image B is divided into image areas 1-4, and the quantity threshold is half of the total number of image areas 4, that is, the quantity threshold is 2; if the number of unclear image areas is 3, and 3 is greater than the quantity threshold 2, then the comprehensive quality detection result of the image to be detected is determined to be unclear.
[0091] Image B is divided into image areas 1-4, and the area ratio threshold can be 0.5; if the number of unclear image areas is 3, the ratio of the total area of these three unclear image areas to the area of image B is 0.6, and 0.6 is greater than the area ratio threshold 0.5, then the comprehensive quality detection result of the image to be detected is determined to be unclear.
[0092] Based on the quality inspection results, the image to be inspected can be annotated and a quality inspection report can be generated. For example, the entire image area and / or specific image area that is not clear can be annotated based on the quality inspection results, and a final evaluation report can be generated for user reference; it can effectively evaluate the clarity of the image and automatically annotate unclear pictures and areas, with efficient and accurate image clarity evaluation capabilities.
[0093] The image quality detection method in the above embodiment can evaluate the clarity of the entire image to be detected, and can accurately locate the unclear areas in the image. It has high quality assessment accuracy and applicability, can reliably and accurately evaluate the image quality, and help improve work efficiency and information processing quality; it can automatically identify and mark unclear pictures and areas, reduce manual intervention, and improve information processing efficiency; it can be used in e-commerce and other application scenarios with high image quality requirements, and can improve user experience and satisfaction.
[0094] Electronic devices
[0095] Figure 6 is a structural diagram of an embodiment of the electronic device disclosed in the present invention, such as Figure 6 As shown, the electronic device 61 includes one or more processors 611 and a memory 612 .
[0096] The processor 611 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 61 to perform desired functions.
[0097] The memory 612 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory, for example, may include: random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory, for example, may include: read-only memory (ROM), hard disk, and flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 611 may run the program instructions to implement the image quality detection method of each embodiment of the present disclosure above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0098] In one example, the electronic device 61 may also include: an input device 613 and an output device 614, etc., which are interconnected through a bus system and / or other forms of connection mechanisms (not shown). In addition, the input device 613 may also include, for example, a keyboard, a mouse, etc. The output device 614 may output various information to the outside. The output device 614 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0099] Of course, to simplify, Figure 6 Only some of the components related to the present disclosure in the electronic device 61 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 61 may also include any other appropriate components.
[0100] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the image quality detection method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0101] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0102] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the image quality detection method according to various embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0103] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive enumeration) of readable storage media can include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0104] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0105] The image quality detection method, electronic device, storage medium and computer program product in the above-mentioned embodiments obtain the text recognition result of the image to be detected by performing text detection processing on the image to be detected, and determine the image quality judgment information of the image to be detected based on the text recognition result to determine the quality detection result; it can evaluate the clarity of the entire image to be detected, and can accurately locate the unclear areas in the image, has high quality assessment accuracy and applicability, can reliably and accurately evaluate the image quality, and help to improve work efficiency and information processing quality; it can automatically identify and mark unclear pictures and areas, reduce manual intervention, and improve information processing efficiency; it can be used in e-commerce and other application scenarios with high image quality requirements, and can improve user experience and satisfaction.
[0106] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0107] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present disclosure are intended only as illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems may be connected, arranged, and configured in any manner. Words such as "include," "comprise," "have," and the like are open words, meaning "including but not limited to," and may be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and may be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and may be used interchangeably therewith.
[0108] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0109] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0110] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects, etc., will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0111] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. An image quality detection method, comprising: Performing text detection processing on the image to be detected to obtain a text recognition result of the image to be detected; Based on the text recognition result, determining image quality evaluation information of the image to be detected; The image quality evaluation information is used to obtain a quality detection result of the image to be detected.
2. The method of claim 1, wherein: The text recognition result includes text position and text confidence, and the image quality judgment information includes clarity judgment information; and determining the quality detection result of the image to be detected based on the text recognition result includes: The clarity judgment information is determined according to the text confidence, or the text position and the text confidence.
3. The method of claim 2, wherein: The obtaining of the quality detection result of the image to be detected by using the image quality judgment information includes: Acquiring a clarity judgment threshold corresponding to the clarity judgment information; The clarity judgment information is compared with the clarity judgment threshold, and the quality detection result is determined based on the comparison result.
4. The method of claim 3, wherein: The clarity evaluation information includes at least one of the following information: Text confidence mean information, text confidence variance information, and text confidence standard deviation information.
5. The method of claim 4, wherein: The comparing the clarity evaluation information with the clarity evaluation threshold and determining the quality detection result based on the comparison result includes: Compare the first character confidence average value with the first confidence average value threshold, wherein the first character confidence average value is the confidence average value of all characters in the image to be detected; When the first character confidence average value is greater than the first confidence average value threshold, comparing the first character confidence variance with the first confidence variance threshold, or comparing the first character confidence standard deviation with the first confidence standard deviation threshold; The first text confidence variance is the text confidence variance of all the text in the image to be detected, and the first text confidence standard deviation is the text confidence standard deviation of all the text in the image to be detected; When the first character confidence variance is greater than the first confidence variance threshold, or the first character confidence standard deviation is greater than the first confidence standard deviation threshold, it is determined that the quality detection result is that the image to be detected is unclear.
6. The method of claim 5, further comprising: When the first text confidence average value is less than or equal to the first confidence average value threshold, it is determined that the quality detection result is that the image to be detected is unclear.
7. The method of claim 4, wherein: Determining the clarity evaluation information includes: Segmenting the image to be detected to obtain multiple image regions; According to the text position information, obtaining all the text located in the image area; Based on the confidence of all the texts in the image area, clarity judgment information of the image area is determined.
8. The method of claim 7, wherein: The comparing the clarity evaluation information with the clarity evaluation threshold and determining the quality detection result based on the comparison result includes: Compare the second text confidence average with a second confidence average threshold, wherein the second text confidence average is the confidence average of all texts in the image area; When the second character confidence average value is greater than the second confidence average value threshold, comparing the second character confidence variance with the second confidence variance threshold, or comparing the second character confidence standard deviation with the second confidence standard deviation threshold; The second text confidence variance is the text confidence variance of all the text in the image area, and the second text confidence standard deviation is the text confidence standard deviation of all the text in the image area; When the second text confidence variance is greater than the second confidence variance threshold, or the second text confidence standard deviation is greater than the second confidence standard deviation threshold, it is determined that the quality detection result is that the image area is unclear.
9. The method of claim 8, further comprising: When the second text confidence average value is less than or equal to the second confidence average value threshold, it is determined that the quality detection result is that the image area is unclear.
10. The method according to claim 8 or 9, wherein: The comprehensive quality detection result of the image to be detected is determined according to the quality detection results of each of the image regions.
11. The method of claim 1, wherein: Based on the quality inspection result, the image to be inspected is annotated and a quality inspection report is generated.
12. The method according to any one of claims 1 to 11, wherein: The text detection process of the image to be detected includes: The OCR technology is used to perform text detection processing on the image to be detected.
13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 12.
14. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.
15. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, any one of the methods 1 to 12 above is implemented.