Image quality evaluation method and device, electronic equipment and storage medium
By determining the semantic weight ratio between regions of interest and non-regions of interest in image quality assessment, and calculating the mean square error and peak signal-to-noise ratio, the problem of inconsistency between objective image quality assessment and human subjective perception is solved, and a more accurate and comprehensive image quality assessment is achieved.
Patent Information
- Application Number
- CN202110858531.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-28
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2041-07-28
AI Technical Summary
Existing objective image quality assessment methods cannot keep in line with human subjective perception, making it difficult to obtain image quality assessment indicators that fit human subjective perception.
Image quality is evaluated by determining the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed image and the original image, and by calculating the mean square error and peak signal-to-noise ratio based on the semantic weight ratio, the area of the ROI and the non-ROI, and combining structural similarity.
It achieves a match between objective evaluation results and subjective human perception, resulting in more accurate and comprehensive evaluation results that can reflect the quality of compressed images.
Smart Images

Figure CN115689972B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to a method, apparatus, electronic device and storage medium for evaluating image quality. Background Technology
[0002] Image quality assessment is a significant research topic in the field of image processing. Image quality assessment methods are divided into subjective and objective methods. Compared to subjective methods, objective methods are more accurate and widely applicable. However, objective methods cannot perfectly align with human subjective perception. Therefore, obtaining image quality assessment indicators that more closely reflect human subjective perception is a pressing issue that needs to be addressed. Summary of the Invention
[0003] This disclosure aims to at least partially address one of the technical problems in the related art.
[0004] The first aspect of this disclosure proposes a method for evaluating image quality, comprising:
[0005] Obtain the compressed image to be evaluated and its corresponding original image;
[0006] Determine the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, wherein the semantic weight ratio is a number greater than 1;
[0007] The mean square error between the compressed image and the original image is determined based on the semantic weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0008] The peak signal-to-noise ratio between the compressed image and the original image is determined based on the mean square error.
[0009] Optionally, determining the semantic weight ratio between the region of interest and the non-region of interest in the compressed image and the original image includes:
[0010] Determine the first texture complexity corresponding to the original image, and the second texture complexity corresponding to the region of interest in the original image;
[0011] Based on the first texture complexity and the second texture complexity, the semantic weight ratio between the region of interest and the region of non-interest is determined.
[0012] Optionally, determining the semantic weight ratio between the region of interest and the non-region of interest in the compressed image and the original image includes:
[0013] Based on the content contained in the original image, determine the target type to which the original image belongs;
[0014] Based on the preset mapping relationship between each type of image and the semantic weight ratio, the semantic weight ratio corresponding to the target type is determined.
[0015] Optionally, determining the mean square error between the compressed image and the original image based on the semantic weight ratio, the area of the region of interest, and the area of the region of non-interest includes:
[0016] Determine the mean square error corresponding to the region of interest and non-region of interest in the compressed image and the original image, respectively;
[0017] Based on the mean squared errors corresponding to the regions of interest and non-interest, the semantic weight ratio is corrected to obtain the corrected weight ratio.
[0018] The mean square error between the compressed image and the original image is determined based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0019] Optionally, after determining the semantic weight ratio between the region of interest and the non-region of interest in the compressed image and the original image, the method further includes:
[0020] Determine the first structural similarity corresponding to the region of interest and the second structural similarity corresponding to the region of non-interest;
[0021] The structural similarity between the compressed image and the original image is determined based on the semantic weight ratio between the region of interest and the region of non-interest, the first structural similarity, and the second structural similarity.
[0022] Optionally, before determining the semantic weight ratio between the region of interest and the non-region of interest in the compressed image and the original image, the method further includes:
[0023] The original image is identified to determine the location information corresponding to the regions of interest and non-interest regions in the original image.
[0024] Based on the location information corresponding to the regions of interest and non-regions of interest in the original image, the regions of interest and non-regions of interest in the compressed image are determined.
[0025] A second aspect of this disclosure provides an image quality evaluation apparatus, comprising:
[0026] The first acquisition module is used to acquire the compressed image to be evaluated and the corresponding original image;
[0027] The first determining module is used to determine the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, wherein the semantic weight ratio is a number greater than 1;
[0028] The second determining module is used to determine the mean square error between the compressed image and the original image based on the semantic weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0029] The third determining module is used to determine the peak signal-to-noise ratio between the compressed image and the original image based on the mean square error.
[0030] Optionally, the first determining module is specifically used for:
[0031] Determine the first texture complexity corresponding to the original image, and the second texture complexity corresponding to the region of interest in the original image;
[0032] Based on the first texture complexity and the second texture complexity, the semantic weight ratio between the region of interest and the region of non-interest is determined.
[0033] Optionally, the first determining module is specifically used for:
[0034] Based on the content contained in the original image, determine the target type to which the original image belongs;
[0035] Based on the preset mapping relationship between each type of image and the semantic weight ratio, the semantic weight ratio corresponding to the target type is determined.
[0036] Optionally, the second determining module is specifically used for:
[0037] Determine the mean square error corresponding to the region of interest and non-region of interest in the compressed image and the original image, respectively;
[0038] Based on the mean squared errors corresponding to the regions of interest and non-interest, the semantic weight ratio is corrected to obtain the corrected weight ratio.
[0039] The mean square error between the compressed image and the original image is determined based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0040] Optionally, a fourth determining module is also included, specifically used for:
[0041] Determine the first structural similarity corresponding to the region of interest and the second structural similarity corresponding to the region of non-interest;
[0042] The structural similarity between the compressed image and the original image is determined based on the semantic weight ratio between the region of interest and the region of non-interest, the first structural similarity, and the second structural similarity.
[0043] Optionally, the first determining module is further configured to:
[0044] The original image is identified to determine the location information corresponding to the regions of interest and non-interest regions in the original image.
[0045] Based on the location information corresponding to the regions of interest and non-regions of interest in the original image, the regions of interest and non-regions of interest in the compressed image are determined.
[0046] A third aspect of this disclosure provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements an image quality evaluation method as proposed in a first aspect of this disclosure.
[0047] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements an image quality evaluation method as proposed in a first aspect of this disclosure.
[0048] A fifth aspect of this disclosure provides a computer program product that, when executed by an instruction processor, performs an image quality evaluation method proposed in a first aspect of this disclosure.
[0049] The image quality evaluation method, apparatus, electronic device, and storage medium disclosed herein have the following beneficial effects:
[0050] In this embodiment, the compressed image to be evaluated and its corresponding original image are first acquired. Then, the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed and original images is determined. Next, the mean square error (MSE) between the compressed and original images is determined based on the semantic weight ratio, the area of the ROI, and the area of the non-ROI. Finally, the peak signal-to-noise ratio (PSNR) between the compressed and original images is determined based on the MSSE. Thus, by assigning different semantic weight ratios to the ROI and non-ROI in the image, and determining the PSNR based on the area of the ROI, the area of the non-ROI, and the semantic weight ratio, the obtained PSNR not only objectively reflects the quality of the compressed image but also aligns with the subjective perception of compressed image quality by the human eye, resulting in a more accurate and comprehensive evaluation.
[0051] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0052] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0053] Figure 1 This is a schematic flowchart of an image quality evaluation method provided in an embodiment of the present disclosure;
[0054] Figure 2 A schematic flowchart illustrating an image quality evaluation method provided in another embodiment of this disclosure;
[0055] Figure 3 This is a schematic diagram of the structure of an image quality evaluation device provided in an embodiment of the present disclosure;
[0056] Figure 4 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0057] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0058] The following description, with reference to the accompanying drawings, describes an image quality evaluation method, apparatus, electronic device, and storage medium according to embodiments of the present disclosure.
[0059] Figure 1 This is a schematic flowchart illustrating the image quality evaluation method provided in an embodiment of the present disclosure.
[0060] This disclosure illustrates by exemplifying that the image quality evaluation method is configured in an image quality evaluation device, which can be applied to any electronic device to enable the electronic device to perform the image quality evaluation function.
[0061] Among them, electronic devices can be personal computers (PCs), cloud devices, etc.
[0062] like Figure 1 As shown, the image quality evaluation method may include the following steps:
[0063] Step 101: Obtain the compressed image to be evaluated and the corresponding original image.
[0064] Compressed images are images obtained by encoding the original image, which may result in data loss.
[0065] Step 102: Determine the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, wherein the semantic weight ratio is a number greater than 1.
[0066] The region of interest (ROI) is the area in the original and compressed images that is of greater interest to the human eye. For example, for an image containing a face, the ROI might be the face area in both the original and compressed images, while the non-ROI might be other areas in both images.
[0067] Optionally, the region of interest can be a rectangular region containing the detection box corresponding to the target of interest to the user in the image, or it can be a non-rectangular region segmented according to the target edge. This disclosure does not limit it in this way.
[0068] It should be noted that since the region of interest in the original image and the compressed image are actually the same, but the quality of the compressed image is unpredictable and may be very blurry, the region of interest can be detected first on the original image to make the determined region of interest more accurate.
[0069] Optionally, the original image can be identified to determine the location information corresponding to the region of interest and the region of non-interest in the original image. Then, based on the location information corresponding to the region of interest and the region of non-interest in the original image, the region of interest and the region of non-interest in the compressed image can be determined.
[0070] Alternatively, an image recognition neural network can be used to perform target recognition on the original image and the compressed image respectively, so as to obtain the regions of interest and non-regions of interest in the compressed image and the original image.
[0071] In this disclosure, semantic weight ratios are used to characterize the degree of influence of regions of interest (ROI) and non-ROI on image quality. It should be noted that the semantic weight of ROI is greater, thus allowing the quality of ROI in a compressed image to have a greater impact on image quality evaluation metrics. This means that the final determined image quality can, to some extent, reflect the user's subjective experience.
[0072] Optionally, in this disclosure, the semantic weight ratio between regions of interest and non-regions of interest can be determined through statistical analysis of a large number of images. Then, when evaluating image quality, the semantic weight ratio between regions of interest and non-regions of interest can be determined directly based on the determined semantic weight ratio.
[0073] Optionally, the semantic weight ratio between regions of interest and non-regions of interest can be determined based on the complexity between them. For example, the first texture complexity of the original image and the second texture complexity of the region of interest can be determined first; then, the semantic weight ratio between the region of interest and non-regions of interest can be determined based on the first and second texture complexities.
[0074] In this disclosure, the overall variance of the original image can be used as the first texture complexity, and the variance of the region of interest in the original image can be used as the second texture complexity. Then, based on the ratio of the second texture complexity to the first texture complexity, the semantic weight ratio between the region of interest and the non-region of interest can be determined. Alternatively, the gradient in the original image can be used as the first texture complexity, and the gradient of the region of interest in the original image can be used as the second texture complexity, etc. This disclosure does not limit this to any particular method.
[0075] It should be noted that if the ratio of the second texture complexity to the first texture complexity is larger, the difference in texture complexity between the region of interest and the region of non-interest is greater. In this case, the human eye pays more attention to the region of interest. At this time, the semantic weight between the region of interest and the region of non-interest should be greater. That is, the region of interest should occupy a greater weight when determining the image quality. The reverse is also true.
[0076] Optionally, one can first determine the target type of the original image based on the content contained in the original image, and then determine the semantic weight ratio corresponding to the target type based on the preset mapping relationship between each type of image and the semantic weight ratio.
[0077] The target type may include images of people, landscapes, objects, etc., and this disclosure does not limit it.
[0078] In this disclosure, an image dataset containing various target types can be obtained first, and then the images in the image dataset can be classified and statistically analyzed to determine the semantic weight ratio of the region of interest to the region of non-interest in each target type of image, and establish a mapping relationship between each type of image and the semantic weight ratio.
[0079] Step 103: Determine the mean square error between the compressed image and the original image based on the semantic weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0080] Mean square error (MSE) is a measure of the difference between a compressed image and the original image. A larger MSE indicates a greater difference between the compressed and original images.
[0081] The formula for calculating the mean squared error is as follows:
[0082]
[0083]
[0084]
[0085] In formula (1), MSE1 is the mean square error of the region of interest, H1 is the length of the region of interest, W1 is the width of the region of interest, X1(i,j) is the pixel in the i-th row and j-th column of the region of interest in the original image, and Y1(i,j) is the pixel in the i-th row and j-th column of the region of interest in the compressed image; in formula (2), MSE2 is the mean square error of the region of non-interest, H2 is the length of the region of non-interest, W2 is the width of the region of non-interest, X2(i,j) is the pixel in the i-th row and j-th column of the region of non-interest in the original image, and Y2(i,j) is the pixel in the i-th row and j-th column of the region of non-interest in the compressed image; in formula (3), MSE is the mean square error between the compressed image and the original image, m is the semantic weight corresponding to the region of interest, n is the semantic weight corresponding to the region of non-interest, S1 is the area of the region of interest, and S2 is the area of the region of non-interest.
[0086] Step 104: Determine the peak signal-to-noise ratio between the compressed image and the original image based on the mean square error.
[0087] Peak signal-to-noise ratio (PSNR) can objectively evaluate the quality of compressed images. A higher PSNR indicates better compressed image quality, while a lower PSNR indicates worse compressed image quality.
[0088] The formula for calculating peak signal-to-noise ratio is as follows:
[0089]
[0090] Where PSNR is the peak signal-to-noise ratio, MSE is the mean square error, and 2 bits -1 represents the maximum color value in the compressed image. For example, if each sample point in the compressed image is represented by 8 bits, then bits = 8, 2 bits -1 equals 255.
[0091] Optionally, this disclosure may also determine the quality of a compressed image based on the structural similarity (SSIM) of the compressed image.
[0092] The specific steps for determining the SSIM corresponding to the compressed image may include:
[0093] (1) Determine the first structural similarity corresponding to the region of interest and the second structural similarity corresponding to the region of non-interest.
[0094] The first structural similarity characterizes the similarity between the regions of interest (ROIs) of the original image and the compressed image. The second structural similarity characterizes the similarity between the regions of non-ROIs of the original image and the compressed image.
[0095] The formula for calculating the first structural similarity is as follows:
[0096]
[0097] Where SSIM1 is the first structural similarity, x1 is the region of interest in the original image, y1 is the region of interest in the compressed image, and μ x1 μ is the average value of x1. y1 σ is the average value of y1. x1 Let σ be the variance of x1. y1 Let σ be the variance of y1. x1y1 Let x1 and y1 be the covariances, and c1 and c2 be the reference coefficients.
[0098] The formula for calculating the second structural similarity is as follows:
[0099]
[0100] Where SSIM2 is the second structural similarity, x2 is the region of interest in the original image, y2 is the region of interest in the compressed image, and μ x2 μ is the average value of x². y2 σ is the average value of y2. x2 Let σ be the variance of x². y2 Let σ be the variance of y². x2y2 Let c1 be the covariance of x2 and y2, and c3 and c4 be reference coefficients. c1 and c3 can be the same or different, and c2 and c4 can be the same or different. This disclosure does not impose any restrictions on this.
[0101] (2) Determine the structural similarity between the compressed image and the original image based on the semantic weight ratio, the first structural similarity and the second structural similarity.
[0102] Structural similarity characterizes the degree of similarity between the original image and the compressed image. A higher structural similarity results in a better quality compressed image; conversely, a lower structural similarity results in a worse quality compressed image.
[0103] The formula for calculating structural similarity is as follows:
[0104]
[0105] Where SSIM represents structural similarity, m represents the semantic weight corresponding to the region of interest, n represents the semantic weight corresponding to the region of non-interest, SSIM1 represents the first structural similarity of the region of interest, SSIM2 represents the second structural similarity of the region of non-interest, S1 represents the area of the region of interest, and S2 represents the area of the region of non-interest.
[0106] In this embodiment of the disclosure, after determining the peak signal-to-noise ratio (PSNR) between the compressed image and the original image, the structural similarity between the compressed image and the original image can also be determined based on the semantic weight ratio, the first structural similarity, and the second structural similarity. Therefore, the quality of the compressed image can be comprehensively evaluated through the PSNR and structural similarity between the compressed image and the original image, making the evaluation results more accurate and comprehensive, and consistent with the subjective perception of compressed image quality by the human eye.
[0107] In this embodiment, the compressed image to be evaluated and its corresponding original image are first acquired. Then, the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed and original images is determined. Next, the mean square error (MSE) between the compressed and original images is determined based on the semantic weight ratio, the area of the ROI, and the area of the non-ROI. Finally, the peak signal-to-noise ratio (PSNR) between the compressed and original images is determined based on the MSSE. Thus, by assigning different semantic weight ratios to the ROI and non-ROI in the image, and determining the PSNR based on the area of the ROI, the area of the non-ROI, and the semantic weight ratio, the obtained PSNR not only objectively reflects the quality of the compressed image but also aligns with the subjective perception of compressed image quality by the human eye, resulting in a more accurate and comprehensive evaluation.
[0108] In one possible implementation, the semantic weight ratio can be further corrected based on the mean squared errors corresponding to the regions of interest and non-interest, respectively. Then, the mean squared error between the compressed image and the original image is determined based on the corrected weight ratio. The following section combines... Figure 2 The above process will be further explained.
[0109] Figure 2 This is a schematic flowchart illustrating an image quality evaluation method provided in an embodiment of the present disclosure, as shown below. Figure 2 As shown, the image quality evaluation method may include the following steps:
[0110] Step 201: Obtain the compressed image to be evaluated and the corresponding original image.
[0111] Step 202: Determine the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, wherein the semantic weight ratio is a number greater than 1.
[0112] The specific implementation of steps 201 and 202 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0113] Step 203: Determine the mean square error corresponding to the region of interest and non-region of interest in the compressed image and the original image, respectively.
[0114] The calculation methods for the mean square error of the region of interest and the mean square error of the non-region of interest can be found in the detailed description of other embodiments of this disclosure, and will not be repeated here.
[0115] Step 204: Based on the mean squared errors corresponding to the regions of interest and non-interest, the semantic weight ratio is corrected to obtain the corrected weight ratio.
[0116] Optionally, the mean square error weight ratio between the region of interest and the region of non-interest can be determined based on the mean square error corresponding to the region of interest and the region of non-interest, respectively. Then, the semantic weight ratio can be corrected based on the mean square error weight ratio to obtain the corrected weight ratio.
[0117] The mean square error weight ratio can characterize the quality difference between the region of interest and the region of non-interest in an image. It can be the ratio of the mean square error of the region of interest to the mean square error of the region of non-interest in the compressed image and the original image.
[0118] Optionally, the semantic weight ratio can be multiplied by the mean squared error weight ratio to obtain the corrected weight ratio. Alternatively, the semantic weight of the region of interest can be added to the mean squared error weight, and the semantic weight of the non-region of interest can be added to the mean squared error weight to obtain the corrected weight ratio.
[0119] For example, if the semantic weight ratio between the region of interest and the region of non-interest is (m:n) and the mean squared error weight ratio is (a:b), then multiplying the semantic weight ratio by the mean squared error weight ratio yields a corrected weight ratio of (am:bn); or, adding the semantic weight of the region of interest to the mean squared error weight determined based on quality, and adding the semantic weight of the region of non-interest to the mean squared error weight determined based on quality, yields a corrected weight ratio of (a+m:b+n).
[0120] In this disclosure, the mean square error weight ratio is determined based on the quality difference between the region of interest and the region of non-interest. Then, the semantic weight is corrected based on the mean square error weight, so that the final determined weight can reflect both the objective quality of the image and the subjective visual perception of the image.
[0121] Step 205: Determine the mean square error between the compressed image and the original image based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0122]
[0123] Where MSE is the mean square error between the compressed image and the original image, u is the weight after correction of the region of interest, v is the weight after correction of the region of non-interest, MSE1 is the mean square error of the region of interest, MSE2 is the mean square error of the region of non-interest, S1 is the area of the region of interest, and S2 is the area of the region of non-interest.
[0124] Understandably, determining the mean square error between the compressed image and the original image based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest can make the mean square error between the compressed image and the original image more accurate. This can reflect not only the objective differences between the compressed image and the original image, but also the subjective visual differences between them.
[0125] Step 206: Determine the peak signal-to-noise ratio between the compressed image and the original image based on the mean square error.
[0126] The specific implementation of step 206 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0127] Step 207: Determine the structural similarity between the compressed image and the original image based on the corrected weight ratio, the first structural similarity, and the second structural similarity.
[0128] The calculation methods for the first structural similarity and the second structural similarity can be found in the detailed description of other embodiments of this disclosure, and will not be repeated here.
[0129] The formula for calculating the structural similarity between the compressed image and the original image is as follows:
[0130]
[0131] Where SSIM represents structural similarity, u represents the corrected weight corresponding to the region of interest, v represents the corrected weight corresponding to the region of non-interest, SSIM1 represents the first structural similarity of the region of interest, SSIM2 represents the second structural similarity of the region of non-interest, S1 represents the area of the region of interest, and S2 represents the area of the region of non-interest.
[0132] In this embodiment, the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed image and the original image is first determined. Then, the semantic weight ratio is corrected based on the mean square error (MSE) between the ROI and the non-ROI in the compressed image and the original image to obtain a corrected weight ratio. Further, the MSE between the compressed image and the original image is determined based on the corrected weight ratio, the area of the ROI, and the area of the non-ROI. Finally, the peak signal-to-noise ratio (PSNR) between the compressed image and the original image is determined based on the MSE. The structural similarity between the compressed image and the original image is determined based on the corrected weight ratio, a first structural similarity, and a second structural similarity. Therefore, by correcting the initial weight ratio of the ROI and the non-ROI based on the semantic weight ratio, and then determining the PSNR and structural similarity between the compressed image and the original image based on the corrected weight ratio, the obtained PSNR and structural similarity can more accurately evaluate the quality of the compressed image and can be consistent with the subjective perception of the quality of the compressed image by the human eye.
[0133] To achieve the above embodiments, this disclosure also proposes an image quality evaluation device.
[0134] Figure 3 This is a schematic diagram of the structure of the image quality evaluation device provided in the embodiments of this disclosure.
[0135] like Figure 3 As shown, the image quality evaluation device 300 may include: a first acquisition module 310, a first determination module 320, a second determination module 330, and a third determination module 340.
[0136] The first acquisition module 310 is used to acquire the compressed image to be evaluated and the corresponding original image;
[0137] The first determining module 320 is used to determine the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, wherein the semantic weight ratio is a number greater than 1;
[0138] The second determining module 330 is used to determine the mean square error between the compressed image and the original image based on the semantic weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0139] The third determining module 340 is used to determine the peak signal-to-noise ratio between the compressed image and the original image based on the mean square error.
[0140] In one possible implementation, the first determining module 320 is specifically used for:
[0141] Determine the first texture complexity corresponding to the original image and the second texture complexity corresponding to the region of interest in the original image;
[0142] Based on the first texture complexity and the second texture complexity, determine the semantic weight ratio between the regions of interest and the regions of non-interest.
[0143] In one possible implementation, the first determining module 320 is specifically used for:
[0144] Determine the target type of the original image based on the content contained in the original image;
[0145] Based on the pre-defined mapping relationship between image types and semantic weight ratios, the semantic weight ratio corresponding to the target type is determined.
[0146] In one possible implementation, the second determining module 330 is specifically used for:
[0147] Determine the mean square error corresponding to the region of interest and non-region of interest in the compressed image and the original image, respectively;
[0148] Based on the mean squared errors corresponding to the regions of interest and non-interest, the semantic weight ratio is corrected to obtain the corrected weight ratio.
[0149] The mean square error between the compressed image and the original image is determined based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest.
[0150] In one possible implementation, the above-mentioned device further includes a fourth determining module, specifically used for:
[0151] Determine the first structural similarity corresponding to the region of interest and the second structural similarity corresponding to the region of non-interest;
[0152] The structural similarity between the compressed image and the original image is determined based on the semantic weight ratio between the region of interest and the region of non-interest, the first structural similarity, and the second structural similarity.
[0153] In one possible implementation, the first determining module 320 is further configured to:
[0154] The original image is identified to determine the location information corresponding to the regions of interest and non-regions of interest in the original image.
[0155] Based on the location information corresponding to the regions of interest and non-regions of interest in the original image, the regions of interest and non-regions of interest in the compressed image are determined.
[0156] The functions and specific implementation principles of the modules described in this embodiment can be found in the above method embodiments, and will not be repeated here.
[0157] The image quality evaluation apparatus 300 of this disclosure first acquires a compressed image to be evaluated and its corresponding original image. Then, it determines the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed and original images. Next, based on the semantic weight ratio, the area of the ROI, and the area of the non-ROI, it determines the mean square error between the compressed and original images. Finally, based on the mean square error, it determines the peak signal-to-noise ratio (PSNR) between the compressed and original images. Thus, by assigning different semantic weight ratios to the ROI and non-ROI in the image, and determining the PSNR based on the area of the ROI, the area of the non-ROI, and the semantic weight ratio, the obtained PSNR not only objectively reflects the quality of the compressed image but also aligns with the subjective perception of compressed image quality by the human eye, resulting in a more accurate and comprehensive evaluation.
[0158] To implement the above embodiments, this disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the image quality evaluation method proposed in the foregoing embodiments of this disclosure.
[0159] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium storing a computer program, which, when executed by a processor, implements the image quality evaluation method proposed in the foregoing embodiments of this disclosure.
[0160] To implement the above embodiments, this disclosure also proposes a computer program product that, when executed by an instruction processor, performs an image quality evaluation method as proposed in the foregoing embodiments of this disclosure.
[0161] Figure 4 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 4 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0162] like Figure 4 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0163] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0164] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0165] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.
[0166] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.
[0167] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with computer device 12, and / or with any device that enables computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0168] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.
[0169] In this embodiment, the compressed image to be evaluated and its corresponding original image are first acquired. Then, the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed and original images is determined. Next, the mean square error (MSE) between the compressed and original images is determined based on the semantic weight ratio, the area of the ROI, and the area of the non-ROI. Finally, the peak signal-to-noise ratio (PSNR) between the compressed and original images is determined based on the MSSE. Thus, by assigning different semantic weight ratios to the ROI and non-ROI in the image, and determining the PSNR based on the area of the ROI, the area of the non-ROI, and the semantic weight ratio, the obtained PSNR not only objectively reflects the quality of the compressed image but also aligns with the subjective perception of compressed image quality by the human eye, resulting in a more accurate and comprehensive evaluation.
[0170] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0171] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0172] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0173] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0174] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0175] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0176] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0177] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
Claims
1. A method for evaluating image quality, characterized in that, include: Obtain the compressed image to be evaluated and its corresponding original image; The semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed image and the original image is determined, wherein the semantic weight ratio is a number greater than 1. The process of determining the semantic weight ratio specifically includes: determining the first texture complexity corresponding to the original image and the second texture complexity corresponding to the ROI in the original image; and determining the semantic weight ratio between the ROI and the non-ROI based on the first texture complexity and the second texture complexity, wherein the first texture complexity is the global variance of the original image and the second texture complexity is the local variance of the ROI in the original image. Determine the first mean square error corresponding to the region of interest in the compressed image and the second mean square error corresponding to the region of non-interest in the original image; Based on the semantic weight ratio, the area of the region of interest, the area of the region of non-interest, the first mean square error, and the second mean square error, the mean square error between the compressed image and the original image is determined according to the following formula: Where MSE is the mean square error between the compressed image and the original image, MSE1 is the first mean square error of the region of interest, MSE2 is the second mean square error of the region of non-interest, m is the semantic weight corresponding to the region of interest, n is the semantic weight corresponding to the region of non-interest, S1 is the area of the region of interest, and S2 is the area of the region of non-interest. The peak signal-to-noise ratio between the compressed image and the original image is determined based on the mean square error.
2. The method as described in claim 1, characterized in that, Determining the semantic weight ratio between the region of interest and the non-region of interest in the compressed image and the original image includes: Based on the content contained in the original image, determine the target type to which the original image belongs; Based on the preset mapping relationship between each type of image and the semantic weight ratio, the semantic weight ratio corresponding to the target type is determined.
3. The method as described in claim 1, characterized in that, The step of determining the mean square error between the compressed image and the original image based on the semantic weight ratio, the area of the region of interest, and the area of the region of non-interest includes: Based on the first mean square error and the second mean square error, the semantic weight ratio is corrected to obtain the corrected weight ratio; The mean square error between the compressed image and the original image is determined based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest.
4. The method according to any one of claims 1-3, characterized in that, After determining the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, the method further includes: Determine the first structural similarity corresponding to the region of interest and the second structural similarity corresponding to the region of non-interest; The structural similarity between the compressed image and the original image is determined based on the semantic weight ratio between the region of interest and the region of non-interest, the first structural similarity, and the second structural similarity.
5. The method as described in claim 4, characterized in that, Before determining the semantic weight ratio between the region of interest and the region of non-interest in the compressed image and the original image, the method further includes: The original image is identified to determine the location information corresponding to the regions of interest and non-interest regions in the original image. Based on the location information corresponding to the regions of interest and non-regions of interest in the original image, the regions of interest and non-regions of interest in the compressed image are determined.
6. An image quality evaluation device, characterized in that, include: The first acquisition module is used to acquire the compressed image to be evaluated and the corresponding original image; A first determining module is used to determine the semantic weight ratio between the region of interest (ROI) and the non-ROI in the compressed image and the original image, wherein the semantic weight ratio is a number greater than 1. The semantic weight ratio determination process specifically includes: determining a first texture complexity corresponding to the original image and a second texture complexity corresponding to the ROI in the original image; determining the semantic weight ratio between the ROI and the non-ROI based on the first texture complexity and the second texture complexity, wherein the first texture complexity is the global variance of the original image and the second texture complexity is the local variance of the ROI in the original image. The second determining module is used to determine the first mean square error corresponding to the region of interest in the compressed image and the second mean square error corresponding to the region of non-interest in the original image; Based on the semantic weight ratio, the area of the region of interest, the area of the region of non-interest, the first mean square error, and the second mean square error, the mean square error between the compressed image and the original image is determined according to the following formula: Where MSE is the mean square error between the compressed image and the original image, MSE1 is the first mean square error of the region of interest, MSE2 is the second mean square error of the region of non-interest, m is the semantic weight corresponding to the region of interest, n is the semantic weight corresponding to the region of non-interest, S1 is the area of the region of interest, and S2 is the area of the region of non-interest. The third determining module is used to determine the peak signal-to-noise ratio between the compressed image and the original image based on the mean square error.
7. The apparatus as claimed in claim 6, characterized in that, The first determining module is specifically used for: Based on the content contained in the original image, determine the target type to which the original image belongs; Based on the preset mapping relationship between each type of image and the semantic weight ratio, the semantic weight ratio corresponding to the target type is determined.
8. The apparatus as claimed in claim 6, characterized in that, The second determining module is specifically used for: Based on the first mean square error and the second mean square error, the semantic weight ratio is corrected to obtain the corrected weight ratio; The mean square error between the compressed image and the original image is determined based on the corrected weight ratio, the area of the region of interest, and the area of the region of non-interest.
9. The apparatus according to any one of claims 6-8, characterized in that, It also includes a fourth determining module, specifically used for: Determine the first structural similarity corresponding to the region of interest and the second structural similarity corresponding to the region of non-interest; The structural similarity between the compressed image and the original image is determined based on the semantic weight ratio between the region of interest and the region of non-interest, the first structural similarity, and the second structural similarity.
10. The apparatus as claimed in claim 9, characterized in that, The first determining module is further configured to: The original image is identified to determine the location information corresponding to the regions of interest and non-interest regions in the original image. Based on the location information corresponding to the regions of interest and non-regions of interest in the original image, the regions of interest and non-regions of interest in the compressed image are determined.
11. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the image quality evaluation method as described in any one of claims 1-5.
12. A non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the image quality evaluation method as described in any one of claims 1-5.
13. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the image quality evaluation method as described in any one of claims 1-5.
Citation Information
Patent Citations
Video perceived quality non-reference objective evaluation method based on areas of interest
CN104243973A
Code rate control method based on subjective region of interest and time-space domain combination
CN106937118A