An image evaluation method, device and computer equipment
By performing local texture and lighting analysis on images, the limitations of global color cast and brightness assessment in existing technologies are overcome, a comprehensive assessment of image quality is achieved, clear assessment scores are provided, and the accuracy and comprehensiveness of the assessment are improved.
Patent Information
- Application Number
- CN202211738453.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing technologies have certain limitations in dealing with global color cast and brightness issues in images and lack effective overall quality assessment solutions.
By performing local texture analysis and local illumination analysis on the image to be evaluated, clarity and brightness evaluation results are obtained, respectively. Based on these results, a comprehensive assessment of image quality is performed. The specific method involves performing convolution operations and illumination analysis on subregions of the image, calculating local texture and brightness features, screening high-quality subregions, and dividing illumination regions to ultimately generate an image quality assessment score.
It achieves a comprehensive assessment of the overall image quality, can more accurately reflect the image clarity and brightness issues, provide intuitive quality assessment scores, and improve the accuracy and comprehensiveness of image quality assessment.
Smart Images

Figure CN116091439B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image technology, and in particular to an image evaluation method and device and computer equipment. BACKGROUND
[0002] An electronic nasopharyngoscope can check the morphology of tissues in the nose, pharynx and larynx, and can retain all image data during the checking process. The saved image data can be repeatedly checked later to ensure the accuracy of tumors or other lesions.
[0003] The prior art uses a trained quality detection network to detect a to-be-detected image to determine the quality problems existing in the to-be-detected image. However, this approach has certain limitations in dealing with global color cast and brightness problems.
[0004] Currently, there is no effective solution to the problem of how to evaluate the overall quality of an image. SUMMARY
[0005] Therefore, it is necessary to provide an image evaluation method, device and computer equipment to solve the above technical problems.
[0006] In a first aspect, the present application provides an image evaluation method. The method comprises:
[0007] performing local texture analysis on a to-be-evaluated image to obtain a definition evaluation result of the to-be-evaluated image;
[0008] performing local illumination analysis on the to-be-evaluated image to obtain a brightness evaluation result of the to-be-evaluated image;
[0009] evaluating the quality of the to-be-evaluated image based on the definition evaluation result and the brightness evaluation result.
[0010] In one embodiment, the performing local texture analysis on a to-be-evaluated image to obtain a definition evaluation result of the to-be-evaluated image comprises:
[0011] receiving the to-be-evaluated image;
[0012] performing convolution operation on each sub-region in the received to-be-evaluated image to calculate the local texture features of each sub-region in the to-be-evaluated image;
[0013] determining the definition evaluation result of the to-be-evaluated image based on the calculation result of the local texture features.
[0014] In one embodiment, the performing convolution operation on each sub-region in the received to-be-evaluated image to calculate the local texture features of each sub-region in the to-be-evaluated image comprises:
[0015] performing convolution operation on each sub-region in the received image to be evaluated to obtain convolution calculation result of each sub-region in the image to be evaluated; performing point multiplication operation on the convolution calculation result of each sub-region in the image to be evaluated to obtain convolution point multiplication result of each sub-region in the image to be evaluated;
[0016] performing point multiplication operation on each sub-region in the received image to be evaluated to obtain point multiplication calculation result of each sub-region in the image to be evaluated; performing convolution operation on the point multiplication calculation result of each sub-region in the image to be evaluated to obtain point multiplication convolution result of each sub-region in the image to be evaluated;
[0017] calculating difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region, and taking the difference as local texture feature value of each sub-region in the image to be evaluated.
[0018] In one of the embodiments, based on the calculation result of the local texture feature, the definition evaluation result of the image to be evaluated is determined, including:
[0019] from the calculation result of the local texture feature, the sub-region with the local texture feature value greater than the preset texture feature threshold is screened out as a high-quality sub-region;
[0020] based on the proportion of the number of the high-quality sub-region in the image to be evaluated in the number of all sub-regions in the image to be evaluated, the definition evaluation result of the image to be evaluated is generated.
[0021] In one of the embodiments, the local light analysis on the image to be evaluated is performed to obtain the brightness evaluation result of the image to be evaluated, including:
[0022] dividing the image to be evaluated into multiple sub-regions;
[0023] performing light analysis on each sub-region of the image to be evaluated to obtain light analysis result of the sub-region of the image to be evaluated;
[0024] obtaining the brightness evaluation result of the image to be evaluated according to the light analysis result of the sub-region of the image to be evaluated.
[0025] In one of the embodiments, the image to be evaluated is divided into multiple sub-regions, including:
[0026] dividing initial sub-region of the image to be evaluated;
[0027] calculating average brightness of the initial sub-region of the image to be evaluated and global average brightness of the image to be evaluated;
[0028] According to a difference between the average brightness of the initial sub-region of the image to be evaluated and a global average brightness of the image to be evaluated, the range of the initial sub-region of the image to be evaluated is adjusted until the average brightness of each sub-region after adjustment is less than or equal to the global average brightness, to obtain a final divided sub-region of the image to be evaluated.
[0029] In one of the embodiments, a light analysis is performed on each sub-region of the image to be evaluated to obtain a light analysis result of the sub-region of the image to be evaluated, including:
[0030] In a case where the average brightness of the sub-region of the image to be evaluated is greater than a preset first brightness threshold, the light analysis result of the sub-region of the image to be evaluated is set to 1;
[0031] In a case where the average brightness of the sub-region of the image to be evaluated is less than a preset second brightness threshold, the light analysis result of the sub-region of the image to be evaluated is set to -1; wherein the preset second brightness threshold is less than the preset first brightness threshold;
[0032] In a case where the average brightness of the sub-region of the image to be evaluated is greater than or equal to the preset second brightness threshold and less than or equal to the preset first brightness threshold, the light analysis result of the sub-region of the image to be evaluated is set to 0;
[0033] According to the light analysis result of the sub-region of the image to be evaluated, a brightness evaluation result of the image to be evaluated is obtained, including:
[0034] Based on a proportion of the sub-region of the image to be evaluated with the light analysis result of 1 in all sub-regions, an over-brightness score of the image to be evaluated is generated;
[0035] Based on a proportion of the sub-region of the image to be evaluated with the light analysis result of -1 in all sub-regions, an over-darkness score of the image to be evaluated is generated.
[0036] In one of the embodiments, based on the clarity evaluation result and the brightness evaluation result, a quality of the image to be evaluated is evaluated, including:
[0037] The clarity evaluation result of the image to be evaluated and an average of the over-brightness score of the image to be evaluated and the over-darkness score of the image to be evaluated are calculated to generate a quality evaluation score of the image to be evaluated.
[0038] In a second aspect, the present application further provides an image evaluation device. The device includes:
[0039] a texture analysis module configured to perform local texture analysis on the image to be evaluated to obtain a definition evaluation result of the image to be evaluated;
[0040] a light analysis module configured to perform local light analysis on the image to be evaluated to obtain a brightness evaluation result of the image to be evaluated;
[0041] and a quality evaluation module configured to evaluate the quality of the image to be evaluated based on the definition evaluation result and the brightness evaluation result.
[0042] In a third aspect, the present application provides a computer device. The computer device comprises a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the image evaluation method in the first aspect.
[0043] The image evaluation method, the image evaluation device and the computer device described above are based on the image to be evaluated, and then the definition evaluation result of the image to be evaluated is obtained through local texture analysis on the image to be evaluated. The brightness evaluation result of the image to be evaluated is obtained according to the local light analysis on the image to be evaluated. The quality of the image to be evaluated is evaluated according to the definition evaluation result of the image to be evaluated and the brightness evaluation result of the image to be evaluated. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 a hardware structure block diagram of a terminal of the image evaluation method provided by an embodiment of the present application;
[0045] Figure 2 a flowchart of the image evaluation method provided by an embodiment of the present application;
[0046] Figure 3 a flowchart of the image evaluation method provided by a preferred embodiment of the present application;
[0047] Figure 4 a structure block diagram of the image evaluation device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and explained in detail below in conjunction with the drawings and embodiments.
[0049] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the same meaning as those commonly understood by a person of ordinary skill in the art to which the present application belongs. The terms "one", "a", "an", "the", "these", and similar terms in the present application do not indicate quantity of limitation, and they can be singular or plural. The terms "include", "contain", "have", and any variants thereof in the present application are intended to cover non-exclusive inclusion; for example, a process, method, and system, product or device containing a series of steps or modules (units) are not limited to the listed steps or modules (units), but can include steps or modules (units) not listed, or can include other steps or modules (units) inherent to the process, method, product or device. The terms "connect", "connected", "couple" and similar terms in the present application are not limited to physical or mechanical connection, but can include electrical connection, whether direct or indirect. The term "multiple" in the present application refers to two or more. The term "and / or" describes the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. Generally, the character " / " represents an "or" relationship between the associated objects. The terms "first", "second", "third" and the like in the present application are only used to distinguish similar objects, and do not represent a specific order of the objects.
[0050] The method embodiments provided in the present embodiment can be executed in a terminal, a computer or a similar computing device. For example, the method embodiments are executed on a terminal, Figure 1 is a hardware structure block diagram of the terminal of the image evaluation method of the present embodiment. As shown in Figure 1 , the terminal can include one or more (only one is shown in Figure 1 ) processor 102 and memory 104 for storing data, wherein the processor 102 can include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA. The above terminal can also include a transmission device 106 for communication function and an input / output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above terminal. For example, the terminal can include more or less components than Figure 1 shown, or have a different configuration from Figure 1 shown.
[0051] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the image evaluation method in the embodiment. The processor 102 can execute various functional applications and data processing, i.e., implement the method described above, by running the computer program stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include memories remotely arranged with respect to the processor 102, which can be connected to the terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0052] The transmission device 106 is configured to receive or send data via a network. The network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network interface controller (NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.
[0053] For the purpose, technical solutions and advantages of the present application to be clearer, further detailed description will be given to the present application in combination with the accompanying drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application, and are not used to limit the present application.
[0054] In one embodiment, an image evaluation method is provided, Figure 2 is a flowchart of the image evaluation method provided by an embodiment of the present application, as shown in Figure 2 The flowchart includes the following steps:
[0055] In step S210, local texture analysis is performed on the image to be evaluated to obtain a definition evaluation result of the image to be evaluated.
[0056] In this step, the local texture analysis described above can be a calculation result of obtaining the local texture features of the image to be evaluated. Specifically, a convolution operation can be performed on the sub-regions of the image to be evaluated to obtain the calculation result of the local texture features of the image to be evaluated. The definition of the clarity evaluation result of the image to be evaluated can be the proportion of the number of sub-regions with local texture features greater than a preset texture feature threshold in the total number of sub-regions in the calculation result of the local texture features of the image to be evaluated. The higher the proportion of the number of sub-regions with local texture features greater than the preset texture feature threshold in the total number of sub-regions in the calculation result of the local texture features of the image to be evaluated, the higher the clarity evaluation score of the image to be evaluated. The lower the proportion of the number of sub-regions with local texture features greater than the preset texture feature threshold in the total number of sub-regions in the calculation result of the local texture features of the image to be evaluated, the lower the clarity evaluation score of the image to be evaluated. This step performs image quality evaluation on the image to be evaluated by obtaining the clarity evaluation result of the image to be evaluated.
[0057] In step S220, local illumination analysis is performed on the image to be evaluated to obtain a brightness evaluation result of the image to be evaluated.
[0058] In this step, the local illumination analysis described above can be an analysis of the brightness of the local illumination of the image to be evaluated. Specifically, the illumination analysis result of the sub-regions of the image to be evaluated can be obtained by calculating the average brightness of the sub-regions of the image to be evaluated and comparing the average brightness of the sub-regions of the image to be evaluated with a preset brightness threshold. The definition of the brightness evaluation result of the image to be evaluated can be the proportion of the number of over-bright sub-regions of the image to be evaluated to the total number of sub-regions, and the proportion of the number of over-dark sub-regions of the image to be evaluated to the total number of sub-regions. When the proportion of the number of over-bright sub-regions of the image to be evaluated to the total number of sub-regions is higher, the over-bright score of the image to be evaluated is higher; when the proportion of the number of over-bright sub-regions of the image to be evaluated to the total number of sub-regions is lower, the over-bright score of the image to be evaluated is lower. When the proportion of the number of over-dark sub-regions of the image to be evaluated to the total number of sub-regions is higher, the over-dark score of the image to be evaluated is higher; when the proportion of the number of over-dark sub-regions of the image to be evaluated to the total number of sub-regions is lower, the over-dark score of the image to be evaluated is lower. This step performs image quality evaluation on the image to be evaluated from the aspect of brightness by obtaining the brightness evaluation result of the image to be evaluated.
[0059] In step S230, the quality of the image to be evaluated is evaluated based on the clarity evaluation result and the brightness evaluation result.
[0060] In the step, the quality of the to-be-evaluated image can be evaluated by averaging the score of the clarity evaluation result and the score of the brightness evaluation result to obtain the score of the quality of the to-be-evaluated image. The score can intuitively reflect the quality of the to-be-evaluated image. The step can comprehensively analyze the clarity evaluation result and the brightness evaluation result to obtain the quality evaluation result of the to-be-evaluated image, and the score can intuitively reflect the quality of the to-be-evaluated image.
[0061] The steps S210 to S230 can obtain the calculation result of the local texture feature of the to-be-evaluated image by performing the convolution operation on the sub-regions of the to-be-evaluated image, and obtain the clarity evaluation result of the to-be-evaluated image according to the calculation result of the local texture feature of the to-be-evaluated image. The step S220 can obtain the illumination analysis result of the sub-regions of the to-be-evaluated image by performing the illumination analysis on the sub-regions of the to-be-evaluated image, and obtain the brightness evaluation result of the to-be-evaluated image according to the illumination analysis result of the sub-regions of the to-be-evaluated image. Finally, the step S230 can obtain the score of the quality of the to-be-evaluated image by averaging the score of the clarity evaluation result and the score of the brightness evaluation result. The step S230 can comprehensively analyze the clarity evaluation result and the brightness evaluation result to evaluate the overall quality of the image.
[0062] In another embodiment, the step S210 can perform the local texture analysis on the to-be-evaluated image to obtain the clarity evaluation result of the to-be-evaluated image, and can include the following steps.
[0063] The step S212 can receive the to-be-evaluated image.
[0064] The step S214 can perform the convolution operation on each sub-region in the received to-be-evaluated image to calculate the local texture feature of each sub-region in the to-be-evaluated image.
[0065] Specifically, the convolution operation on each sub-region in the received image to be evaluated can be: first, performing convolution operation on each sub-region in the received image to be evaluated to obtain the convolution calculation result of each sub-region in the image to be evaluated, and then performing point multiplication operation on the convolution calculation result of each sub-region in the image to be evaluated to obtain the convolution point multiplication result of each sub-region in the image to be evaluated. Alternatively, first, performing point multiplication operation on each sub-region in the received image to be evaluated to obtain the point multiplication calculation result of each sub-region in the image to be evaluated, and then performing convolution operation on the point multiplication calculation result of each sub-region in the image to be evaluated to obtain the point multiplication convolution result of each sub-region in the image to be evaluated. The local texture feature of each sub-region in the image to be evaluated can be calculated based on the point multiplication convolution result and the convolution point multiplication result of each sub-region in the image to be evaluated obtained in the above manner, and the difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region is taken as the local texture feature value of each sub-region in the corresponding image to be evaluated. In this step, by performing convolution operation on each sub-region in the received image to be evaluated, the point multiplication convolution result and the convolution point multiplication result of each sub-region in the image to be evaluated are obtained, and the difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region is taken as the local texture feature value of each sub-region in the corresponding image to be evaluated, so that the calculation of the local texture feature value of each sub-region in the image to be evaluated is realized.
[0066] In step S216, the definition evaluation result of the image to be evaluated is determined based on the calculation result of the local texture feature.
[0067] In this step, the sub-region with the local texture feature value greater than the preset texture feature threshold can be screened out according to the calculation result of the local texture feature of the image to be evaluated, and the definition evaluation result of the image to be evaluated can be determined according to the proportion of the number of sub-regions with the local texture feature value greater than the preset texture feature threshold to the number of all sub-regions. The higher the proportion of the number of sub-regions with the local texture feature value greater than the preset texture feature threshold to the number of all sub-regions, the higher the score of the definition evaluation result of the image to be evaluated. The lower the proportion of the number of sub-regions with the local texture feature value greater than the preset texture feature threshold to the number of all sub-regions, the lower the score of the definition evaluation result of the image to be evaluated. In this step, a preset texture feature threshold is first set, and the definition of the image is evaluated by the proportion of the number of sub-regions with the local texture feature value greater than the preset texture feature threshold to the number of all sub-regions.
[0068] Additionally, in an embodiment, step S214 described above, the convolution operation is performed on each sub-region in the received image to be evaluated to calculate the local texture feature of each sub-region in the image to be evaluated, which can specifically include the following steps:
[0069] In step S2142, a convolution operation is performed on each sub-region in the received image to be evaluated to obtain a convolution calculation result of each sub-region in the image to be evaluated; and a point multiplication operation is performed on the convolution calculation result of each sub-region in the image to be evaluated to obtain a convolution point multiplication result of each sub-region in the image to be evaluated.
[0070] Specifically, first, a convolution operation is performed on each sub-region in the image to be evaluated. That is, a convolution kernel is convolved with each sub-region in the image to be evaluated to obtain a convolution calculation result of each sub-region in the image to be evaluated. The specific formula is as follows: μ = Conv(x), where μ is the convolution calculation result of each sub-region in the image to be evaluated, and x is each sub-region image of the image to be evaluated. Preferably, the convolution kernel can use a standard deviation of 1.5, the convolution kernel can be set as a Gaussian kernel with a size of 11x11, and no bias is used when performing convolution, and the boundary padding value padding is set to 0. Then, a point multiplication operation is performed on the convolution calculation result of each sub-region in the image to be evaluated. The specific formula is as follows: μ 2 = · μ, where μ 2 is the convolution point multiplication result of each sub-region in the image to be evaluated.
[0071] In step S2144, a point multiplication operation is performed on each sub-region in the received image to be evaluated to obtain a point multiplication calculation result of each sub-region in the image to be evaluated; and a convolution operation is performed on the point multiplication calculation result of each sub-region in the image to be evaluated to obtain a point multiplication convolution result of each sub-region in the image to be evaluated.
[0072] Specifically, first, a point multiplication operation is performed on each sub-region in the received image to be evaluated. The specific formula is as follows: x 2 = · x, where x is each sub-region image of the image to be evaluated, and x 2 is the point multiplication calculation result of each sub-region in the image to be evaluated. Then, a convolution operation is performed on the point multiplication calculation result of each sub-region in the image to be evaluated. That is, a convolution kernel is convolved with the point multiplication calculation result of each sub-region in the image to be evaluated to obtain a point multiplication convolution result of each sub-region in the image to be evaluated. The specific formula is as follows: μ' = onv(x 2 ), where μ' is the point multiplication convolution result of each sub-region in the image to be evaluated. Preferably, the convolution kernel can use a standard deviation of 1.5, the convolution kernel can be set as a Gaussian kernel with a size of 11x11, and no bias is used when performing convolution, and the boundary padding value padding is set to 0.
[0073] Step S2146, calculate the difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region, and take the difference as the local texture feature value of each sub-region in the corresponding to-be-evaluated image.
[0074] In this step, the difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region is calculated, and the calculation result is the local texture feature value of each sub-region in the to-be-evaluated image. The specific formula is as follows: δ 2 2 , wherein δ 2 is the local texture feature value of each sub-region in the to-be-evaluated image.
[0075] The steps S2142 to S2146 above, by performing convolution operation on each sub-region in the received to-be-evaluated image, obtain the point multiplication convolution result and the convolution point multiplication result of each sub-region in the to-be-evaluated image, and take the difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region as the local texture feature value of each sub-region in the corresponding to-be-evaluated image, realizing the calculation of the local texture feature value of each sub-region in the to-be-evaluated image.
[0076] In another embodiment, the step S216 above determines the definition evaluation result of the to-be-evaluated image based on the calculation result of the local texture feature, which can specifically include the following steps:
[0077] Step S2162, from the calculation result of the local texture feature, filter out the sub-region with a local texture feature value greater than a preset texture feature threshold as a high-quality sub-region.
[0078] In this step, a preset texture feature threshold can be set to filter out the high-quality sub-region with a local texture feature value greater than the preset texture feature threshold. Specifically, the preset texture feature threshold can be set to β, and when the local texture feature value δ 2 of the sub-region of the to-be-evaluated image is greater than the preset texture feature threshold β, the sub-region of the to-be-evaluated image is a high-quality sub-region.
[0079] Step S2164, based on the proportion of the number of high-quality sub-regions in the to-be-evaluated image in the number of all sub-regions in the to-be-evaluated image, generate the definition evaluation result of the to-be-evaluated image.
[0080] The definition evaluation result of the to-be-evaluated image above can be the proportion of the number of high-quality sub-regions in the to-be-evaluated image in the number of all sub-regions. The specific formula is as follows: Wherein, T is the definition evaluation result of the to-be-evaluated image, n is the number of high-quality sub-regions in the to-be-evaluated image, and Ntotal is the number of all sub-regions of the to-be-evaluated image. The percentage value is converted into a score value. For example, if the number of high-quality sub-regions in the to-be-evaluated image accounts for 50% of the number of all sub-regions, the definition evaluation result of the to-be-evaluated image is 50 points. As can be seen, the higher the proportion of the number of high-quality sub-regions in the to-be-evaluated image to the number of all sub-regions, the higher the score of the definition evaluation result of the to-be-evaluated image. The lower the proportion of the number of high-quality sub-regions in the to-be-evaluated image to the number of all sub-regions, the lower the score of the definition evaluation result of the to-be-evaluated image.
[0081] The steps S2162 to S2164 above, by screening out the high-quality sub-regions with the local texture feature value greater than the preset texture feature threshold, and calculating the definition evaluation result of the to-be-evaluated image according to the proportion of the number of high-quality sub-regions in the to-be-evaluated image to the number of all sub-regions, obtain the score of the definition evaluation result of the to-be-evaluated image, and realize the evaluation of the definition of the image.
[0082] Additionally, in one embodiment, the step S220 above, the local illumination analysis is performed on the to-be-evaluated image to obtain the brightness evaluation result of the to-be-evaluated image, which can specifically include the following steps:
[0083] Step S222, the to-be-evaluated image is divided into a plurality of sub-regions.
[0084] Step S224, the illumination analysis is performed on each sub-region of the to-be-evaluated image to obtain the illumination analysis result of the sub-region of the to-be-evaluated image.
[0085] Wherein, the illumination analysis result of the sub-region of the to-be-evaluated image can be divided into an over-bright sub-region, an over-dark sub-region and a normal brightness sub-region. Specifically, the average brightness of each sub-region of the to-be-evaluated image can be calculated, and a first brightness threshold and a second brightness threshold can be set, and the first brightness threshold is greater than the second brightness threshold. When the average brightness of the sub-region of the to-be-evaluated image is greater than the first brightness threshold, the illumination analysis result of the sub-region of the to-be-evaluated image can be set to 1, and the sub-region of the to-be-evaluated image at this time is an over-bright sub-region. When the average brightness of the sub-region of the to-be-evaluated image is less than the second brightness threshold, the illumination analysis result of the sub-region of the to-be-evaluated image can be set to -1, and the sub-region of the to-be-evaluated image at this time is an over-dark sub-region. When the average brightness of the sub-region of the to-be-evaluated image is greater than or equal to the second brightness threshold and less than or equal to the first brightness threshold, the illumination analysis result of the sub-region of the to-be-evaluated image can be set to 0, and the sub-region of the to-be-evaluated image at this time is a normal brightness sub-region.
[0086] Step S226, obtaining the brightness evaluation result of the image to be evaluated according to the light analysis result of the sub-region of the image to be evaluated.
[0087] In this step, the brightness evaluation result of the image to be evaluated can be the over-brightness score and the over-darkness score of the image to be evaluated. Specifically, the light analysis result of the image to be evaluated can be the number of over-brightness sub-regions, the proportion of the number of all sub-regions, to generate the over-brightness score of the image to be evaluated; the light analysis result of the image to be evaluated can be the number of over-darkness sub-regions, the proportion of the number of all sub-regions, to generate the over-darkness score of the image to be evaluated.
[0088] The steps S222 to S226 divide the sub-regions of the image to be evaluated into over-brightness sub-regions, over-darkness sub-regions and normal brightness sub-regions according to the average brightness of the sub-regions of the image to be evaluated, and generate the over-brightness score and the over-darkness score of the image to be evaluated according to the proportion of the number of over-brightness sub-regions to the number of all sub-regions, and the proportion of the number of over-darkness sub-regions to the number of all sub-regions. The higher the over-brightness score or the over-darkness score, the more distinct the brightness of the image to be evaluated, and the better the image quality; the lower the over-brightness score or the over-darkness score, the lower the brightness distinction of the image to be evaluated, and the worse the image quality.
[0089] In another embodiment, the step S222 of dividing the image to be evaluated into a plurality of sub-regions can specifically include the following steps:
[0090] Step S2222, dividing the initial sub-regions of the image to be evaluated.
[0091] In this step, the image to be evaluated can be divided into a plurality of initial sub-regions, and each initial sub-region is set to a region range of 32x32, i.e. each initial sub-region is set to a block-shaped region of 32 rows and 32 columns. For example, the initial sub-region Φ a,b , a represents the a-th row, and a = 1, 2, 3, …, 32, b represents the b-th column, and b = 1, 2, 3, …, 32, Φ a,b is an a-th row b-th column sub-region of an initial sub-region of 32 rows and 32 columns.
[0092] Step S2224, calculating the average brightness of the initial sub-regions of the image to be evaluated and the global average brightness of the image to be evaluated.
[0093] In this step, first, the average brightness of the initial sub-regions of the image to be evaluated is calculated. The specific calculation formula is as follows: wherein, is the average brightness of each initial sub-region of the image to be evaluated, is the luminance of the i-th row and j-th column corresponding to the a-row and b-column sub-region. Then, the global average luminance of the image to be evaluated is calculated. The specific calculation formula is as follows: wherein, is the global average luminance of the image to be evaluated, X m,n is the luminance of the m-th row and n-th column of the image to be evaluated, M is the total number of rows of the image to be evaluated, and N is the total number of columns of the image to be evaluated.
[0094] Step S2226, according to the difference between the average luminance of the initial sub-region of the image to be evaluated and the global average luminance of the image to be evaluated, the range of the initial sub-region of the image to be evaluated is adjusted until the average luminance of each sub-region after adjustment is less than or equal to the global average luminance, and the finally divided sub-region of the image to be evaluated is obtained.
[0095] Specifically, when the average luminance of the initial sub-region of the image to be evaluated is greater than the global average luminance of the image to be evaluated, the average luminance of the adjacent initial sub-region of the initial sub-region of the image to be evaluated is calculated. If the average luminance of the adjacent initial sub-region of the initial sub-region of the image to be evaluated is also greater than the global average luminance of the image to be evaluated, half of the adjacent initial sub-region of the initial sub-region of the image to be evaluated is merged into the initial sub-region of the image to be evaluated to generate a new sub-region of the image to be evaluated. At this time, the new sub-region of the image to be evaluated is a 32x48 region range, and the adjacent sub-region becomes a 32x16 region range. Then, the average luminance of the adjacent sub-region of the new sub-region of the image to be evaluated is calculated, and if the average luminance of the adjacent sub-region of the new sub-region of the image to be evaluated is still greater than the global average luminance of the image to be evaluated, the above operation is repeated until the average luminance of the adjacent sub-region of the sub-region after adjustment is less than or equal to the global average luminance.
[0096] The steps S2222 to S2226 above adjust the range of all initial sub-regions of the image to be evaluated to obtain the finally divided sub-region of the image to be evaluated. By merging the adjacent sub-regions of the image to be evaluated whose average luminance is greater than the global average luminance, it is convenient for subsequent division of the sub-region of the image to be evaluated into over-bright sub-regions, over-dark sub-regions and normal luminance sub-regions.
[0097] Additionally, in one embodiment, the light analysis of each sub-region of the image to be evaluated is performed to obtain the light analysis result of the sub-region of the image to be evaluated, which can specifically include the following steps:
[0098] In a case that the average brightness of the sub-region of the image to be evaluated is greater than a preset first brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated is set to 1; in a case that the average brightness of the sub-region of the image to be evaluated is less than a preset second brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated is set to -1; wherein the preset second brightness threshold is less than the preset first brightness threshold; in a case that the average brightness of the sub-region of the image to be evaluated is greater than or equal to the preset second brightness threshold and less than or equal to the preset first brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated is set to 0.
[0099] In this step, the first brightness threshold and the second brightness threshold can be set, and the first brightness threshold is greater than the second brightness threshold. According to the size between the average brightness of the sub-region of the image to be evaluated and the first brightness threshold and the second brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated is divided into an over-bright sub-region, an over-dark sub-region and a normal brightness sub-region. Specifically, when the average brightness of the sub-region of the image to be evaluated is greater than the first brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated can be set to 1, and the sub-region of the image to be evaluated at this time is an over-bright sub-region. When the average brightness of the sub-region of the image to be evaluated is less than the second brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated can be set to -1, and the sub-region of the image to be evaluated at this time is an over-dark sub-region. When the average brightness of the sub-region of the image to be evaluated is greater than or equal to the second brightness threshold and less than or equal to the first brightness threshold, the illumination analysis result of the sub-region of the image to be evaluated can be set to 0, and the sub-region of the image to be evaluated at this time is a normal brightness sub-region. For example, the first brightness threshold is set to 200, and the second brightness threshold is set to 20, and the distribution formula of the illumination analysis result of the sub-region of the image to be evaluated is: wherein L a,b is the illumination analysis result of the sub-region of the image to be evaluated.
[0100] According to the illumination analysis result of the sub-region of the image to be evaluated, the brightness evaluation result of the image to be evaluated is obtained, which can specifically include the following steps:
[0101] Based on the proportion of the sub-region of the image to be evaluated with the illumination analysis result of 1 in all sub-regions, an over-bright score of the image to be evaluated is generated; based on the proportion of the sub-region of the image to be evaluated with the illumination analysis result of -1 in all sub-regions, an over-dark score of the image to be evaluated is generated.
[0102] In this step, the over-bright score and the over-dark score of the to-be-evaluated image can be generated according to the proportion of the number of over-bright sub-regions in the illumination analysis result in the to-be-evaluated image to the total number of sub-regions, and the proportion of the number of over-dark sub-regions in the illumination analysis result in the to-be-evaluated image to the total number of sub-regions. For example, the proportion of the number of over-bright sub-regions in the to-be-evaluated image to the total number of sub-regions is: wherein, L hig is the percentage of the number of over-bright sub-regions in the to-be-evaluated image to the total number of sub-regions, and N1 is the number of sub-regions in the to-be-evaluated image with the illumination analysis result of 1. Further, L hig is converted into the over-bright score. For example, L hig = 40%, and the over-bright score of the to-be-evaluated image is 40 points. The proportion of the number of over-dark sub-regions in the to-be-evaluated image to the total number of sub-regions is: wherein, L low is the percentage of the number of over-bright sub-regions in the to-be-evaluated image to the total number of sub-regions, and N2 is the number of sub-regions in the to-be-evaluated image with the illumination analysis result of -1. Further, L low is converted into the over-dark score. For example, L low = 30%, and the over-dark score of the to-be-evaluated image is 30 points.
[0103] In another embodiment, the quality of the to-be-evaluated image is evaluated based on the definition evaluation result and the brightness evaluation result, which can specifically include the following steps:
[0104] The definition evaluation result of the to-be-evaluated image, and the average of the over-bright score of the to-be-evaluated image and the over-dark score of the to-be-evaluated image are calculated to generate the quality evaluation score of the to-be-evaluated image.
[0105] In this step, the definition evaluation result of the to-be-evaluated image, and the average of the over-bright score of the to-be-evaluated image and the over-dark score of the to-be-evaluated image are calculated, and the calculation result is taken as the quality evaluation score of the to-be-evaluated image. For example, the definition evaluation result of the to-be-evaluated image is 60 points, the over-bright score of the to-be-evaluated image is 40 points, and the over-dark score of the to-be-evaluated image is 20 points, and the quality evaluation score of the to-be-evaluated image is 40 points. The higher the quality evaluation score of the to-be-evaluated image, the better the quality of the to-be-evaluated image, and the lower the quality evaluation score of the to-be-evaluated image, the worse the quality of the to-be-evaluated image.
[0106] Figure 3 A flowchart of an image evaluation method provided by a preferred embodiment of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the image evaluation method includes the following steps:
[0107] Step S301, receiving a to-be-evaluated image;
[0108] Step S302, performing convolution operation on each sub-region in the received image to be evaluated to calculate the local texture feature of each sub-region in the image to be evaluated;
[0109] Step S303, screening out the sub-region with the local texture feature value greater than the preset texture feature threshold from the calculation result of the local texture feature as the high-quality sub-region;
[0110] Step S304, generating the definition evaluation result of the image to be evaluated based on the proportion of the number of high-quality sub-regions in the image to be evaluated in the number of all sub-regions in the image to be evaluated;
[0111] Step S305, dividing the initial sub-region of the image to be evaluated;
[0112] Step S306, calculating the average brightness of the initial sub-region of the image to be evaluated and the global average brightness of the image to be evaluated;
[0113] Step S307, adjusting the range of the initial sub-region of the image to be evaluated according to the difference between the average brightness of the initial sub-region of the image to be evaluated and the global average brightness of the image to be evaluated, until the average brightness of each sub-region after adjustment is less than or equal to the global average brightness, to obtain the final divided sub-region of the image to be evaluated;
[0114] Step S308, performing light analysis on each sub-region of the image to be evaluated to obtain the light analysis result of the sub-region of the image to be evaluated;
[0115] Step S309, obtaining the brightness evaluation result of the image to be evaluated according to the light analysis result of the sub-region of the image to be evaluated;
[0116] Step S310, evaluating the quality of the image to be evaluated based on the definition evaluation result and the brightness evaluation result.
[0117] In this embodiment, the calculation result of the local texture feature of the image to be evaluated is obtained by performing convolution operation on the sub-region of the image to be evaluated, and the definition evaluation result of the image to be evaluated is obtained according to the calculation result of the local texture feature of the image to be evaluated. The brightness evaluation result of the image to be evaluated is obtained through the light analysis of the sub-region of the image to be evaluated, and then the brightness evaluation result of the image to be evaluated is obtained through the light analysis result of the sub-region of the image to be evaluated. Finally, the score of the quality of the image to be evaluated is obtained by calculating the average value of the score of the definition evaluation result of the image to be evaluated and the score of the brightness evaluation result. The overall quality of the image is evaluated by comprehensively analyzing the definition evaluation result and the brightness evaluation result of the image to be evaluated.
[0118] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time but can be executed at different times, and the execution of the steps or stages is not necessarily sequential but can be executed alternately or in rotation with at least some of the other steps or the steps or stages in the other steps.
[0119] Based on the same inventive concept, the embodiments of the present application also provide an image evaluation device for implementing the image evaluation method described above. The device is used to implement the embodiments and preferred embodiments described above, and will not be described again. The terms "module", "unit", "sub-unit" and the like used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and contemplated.
[0120] In one embodiment, as shown in Figure 4 An image evaluation device 40 is provided, comprising:
[0121] a texture analysis module 42 configured to perform local texture analysis on the image to be evaluated to obtain a definition evaluation result of the image to be evaluated;
[0122] a lighting analysis module 44 configured to perform local lighting analysis on the image to be evaluated to obtain a brightness evaluation result of the image to be evaluated;
[0123] and a quality evaluation module 46 configured to evaluate the quality of the image to be evaluated based on the definition evaluation result and the brightness evaluation result.
[0124] The image evaluation device 40 described above, by calculating the definition evaluation result of the image to be evaluated and the brightness evaluation result of the image to be evaluated, and by comprehensively analyzing the definition evaluation result of the image to be evaluated and the brightness evaluation result of the image to be evaluated, achieves overall quality evaluation of the image.
[0125] It should be noted that each of the above modules can be a functional module or a program module, which can be implemented by software or hardware. For modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combination.
[0126] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0128] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., but is not limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0129] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, as long as the combinations of technical features do not have contradictions, they shall be considered within the scope of the present disclosure.
[0130] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it shall not be understood as a limitation on the patent scope of the present application. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these shall be within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. An image evaluation method, characterized in that, The method comprises: receiving an image to be evaluated; performing convolution operation on each sub-region in the received image to be evaluated to obtain convolution calculation result of each sub-region in the image to be evaluated; performing point multiplication operation on the convolution calculation result of each sub-region in the image to be evaluated to obtain convolution point multiplication result of each sub-region in the image to be evaluated; performing point multiplication operation on each sub-region in the received image to be evaluated to obtain point multiplication calculation result of each sub-region in the image to be evaluated; performing convolution operation on the point multiplication calculation result of each sub-region in the image to be evaluated to obtain point multiplication convolution result of each sub-region in the image to be evaluated; calculating the difference between the point multiplication convolution result and the convolution point multiplication result of each sub-region, and taking the difference as the calculation result of the local texture feature of each sub-region in the corresponding image to be evaluated; determining the definition evaluation result of the image to be evaluated based on the calculation result of the local texture feature; performing local light analysis on the image to be evaluated to obtain the brightness evaluation result of the image to be evaluated; evaluating the quality of the image to be evaluated based on the definition evaluation result and the brightness evaluation result.
2. The image evaluation method according to claim 1, characterized in that Based on the calculation result of the local texture feature, the definition evaluation result of the image to be evaluated is determined, comprising: From the calculation result of the local texture feature, the sub-region with a local texture feature value greater than a preset texture feature threshold is selected as a high-quality sub-region. Based on the proportion of the number of high-quality sub-regions in the image to be evaluated in the number of all sub-regions in the image to be evaluated, the definition evaluation result of the image to be evaluated is generated.
3. The image evaluation method according to claim 1, characterized in that The local light analysis on the image to be evaluated to obtain the brightness evaluation result of the image to be evaluated comprises: dividing the image to be evaluated into multiple sub-regions; performing light analysis on each sub-region of the image to be evaluated to obtain the light analysis result of the sub-region of the image to be evaluated; According to the light analysis result of the sub-region of the image to be evaluated, the brightness evaluation result of the image to be evaluated is obtained.
4. The image evaluation method according to claim 3, characterized in that The division of the image to be evaluated into multiple sub-regions comprises: dividing the initial sub-region of the image to be evaluated; calculating the average brightness of the initial sub-region of the image to be evaluated and the global average brightness of the image to be evaluated; According to the difference between the average brightness of the initial sub-region of the image to be evaluated and the global average brightness of the image to be evaluated, the range of the initial sub-region of the image to be evaluated is adjusted until the average brightness of each sub-region after adjustment is less than or equal to the global average brightness, and the finally divided sub-region of the image to be evaluated is obtained.
5. The image evaluation method of claim 4, wherein: performing light analysis on each sub-region of the image to be evaluated to obtain the light analysis result of the sub-region of the image to be evaluated comprises: in the case that the average brightness of the sub-region of the image to be evaluated is greater than a preset first brightness threshold, the light analysis result of the sub-region of the image to be evaluated is set to 1; in a case where the average brightness of the sub-region of the image to be evaluated is less than a preset second brightness threshold, setting the illumination analysis result of the sub-region of the image to be evaluated as -1; wherein the preset second brightness threshold is less than the preset first brightness threshold; in a case where the average brightness of the sub-region of the image to be evaluated is greater than or equal to the preset second brightness threshold and less than or equal to the preset first brightness threshold, setting the illumination analysis result of the sub-region of the image to be evaluated as 0; obtaining a brightness evaluation result of the image to be evaluated according to the illumination analysis result of the sub-region of the image to be evaluated, comprising: generating an over-brightness score of the image to be evaluated based on a proportion of the sub-region of the image to be evaluated with the illumination analysis result of 1 in all sub-regions; generating an over-darkness score of the image to be evaluated based on a proportion of the sub-region of the image to be evaluated with the illumination analysis result of -1 in all sub-regions.
6. The image evaluation method according to any one of claim 5, characterized in that, evaluating the quality of the image to be evaluated based on the clarity evaluation result and the brightness evaluation result, comprising: calculating the clarity evaluation result of the image to be evaluated, and an average of the over-brightness score of the image to be evaluated and the over-darkness score of the image to be evaluated, to generate a quality evaluation score of the image to be evaluated.
7. An image evaluation apparatus, characterized by The device comprises: a texture analysis module configured to receive an image to be evaluated, perform convolution operation on each sub-region of the received image to be evaluated to obtain convolution calculation results of each sub-region of the image to be evaluated, perform point multiplication operation on the convolution calculation results of each sub-region of the image to be evaluated to obtain convolution point multiplication results of each sub-region of the image to be evaluated, perform point multiplication operation on each sub-region of the received image to be evaluated to obtain point multiplication calculation results of each sub-region of the image to be evaluated, perform convolution operation on the point multiplication calculation results of each sub-region of the image to be evaluated to obtain point multiplication convolution results of each sub-region of the image to be evaluated, calculate a difference value between the point multiplication convolution results and the convolution point multiplication results of each sub-region, and take the difference value as a calculation result of a local texture feature of each sub-region of the image to be evaluated, and determine a clarity evaluation result of the image to be evaluated based on the calculation result of the local texture feature; an illumination analysis module configured to perform local illumination analysis on the image to be evaluated to obtain a brightness evaluation result of the image to be evaluated; and a quality evaluation module configured to evaluate the quality of the image to be evaluated based on the clarity evaluation result and the brightness evaluation result.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program. The processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Method, device and equipment for determining image quality evaluation result
CN112102309A