Image quality evaluation method, device, equipment and medium based on peak signal-to-noise ratio

By filtering out abnormal pixel points in the target image and updating the peak signal-to-noise ratio, the problem of difficult to identify image visual distortion in the prior art is solved, and the accuracy and consistency of image quality evaluation are improved.

CN119205793BActive Publication Date: 2025-02-14GUANGDONG HENGQIN DIGITAL OPTICAL SEMICONDUCTOR TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411732903.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-02-14
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

When using peak signal-to-noise ratio (PSNR) for image quality evaluation in the prior art, it is difficult to recognize that the image has visual distortion, resulting in too large differences between the evaluation results and the user's subjective evaluation results.

Method used

By obtaining the peak signal-to-noise ratio between the target image and the standard image, the abnormal pixel points in the set area around each pixel point in the target image are filtered out, and the peak signal-to-noise ratio is updated based on the total number of abnormal pixel points and the position relationship. Then evaluate the image quality.

Benefits of technology

The accuracy of evaluating visual distortion images is improved, ensuring the consistency between image quality evaluation results and subjective judgment results, and can more accurately reflect the visual distortion situation in the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205793B_ABST
    Figure CN119205793B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and discloses an image quality evaluation method, device, equipment and medium based on peak signal-to-noise ratio, the method comprising: obtaining the peak signal-to-noise ratio between a target image and a standard image; screening out abnormal pixels from the target image based on the pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image; updating the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels; and determining the image quality evaluation result of the target image based on the updated peak signal-to-noise ratio. The present invention characterizes the visually visible noise by identifying and utilizing abnormal pixels, so that the updated peak signal-to-noise ratio can intuitively reflect the abnormality of visual distortion on the image, thereby improving the evaluation accuracy of the visually distorted image and ensuring the consistency between the image quality evaluation result and the subjective judgment result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and medium for evaluating image quality based on peak signal-to-noise ratio. Background Art

[0002] Peak Signal Noise Rate (PSNR) is often used to measure the difference between two images. The source image is processed to obtain the output image. PSNR measures the quality of the output image by calculating the difference between the output image and the source image.

[0003] When using PSNR to evaluate image quality, the following situations may occur: Case 1: There is obvious visually visible noise in a certain area of ​​the target image, but other areas are close to lossless; Case 2: When there is visually invisible high-frequency noise in the target image, the user will subjectively believe that the target image in Case 1 has very obvious visual distortion, and the target image in Case 2 has better quality. However, the PSNR values ​​calculated in these two cases may be very close, which makes it difficult to distinguish the image pixel abnormalities in Case 1 through the PSNR value.

[0004] In summary, since PSNR can only judge the quality of the target image through the overall pixel error of the image, but cannot reflect the visual distortion of the image, this may cause the judgment result to be too different from the subjective judgment result of humans. Summary of the invention

[0005] In view of this, the present invention provides an image quality evaluation method, device, equipment and medium based on peak signal-to-noise ratio to solve the problem in the related art that when using peak signal-to-noise ratio to evaluate image quality, it is difficult to identify that the image is visually distorted, resulting in a large difference between the evaluation result and the user's subjective evaluation result.

[0006] In a first aspect, the present invention provides an image quality evaluation method based on peak signal-to-noise ratio, the method comprising:

[0007] Obtain the peak signal-to-noise ratio between the target image and the standard image;

[0008] Screening out abnormal pixels from the target image based on a pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image;

[0009] Based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels, the peak signal-to-noise ratio is updated;

[0010] An image quality evaluation result of the target image is determined based on the updated peak signal-to-noise ratio.

[0011] The present invention screens abnormal pixels by utilizing the pixel differences between each pixel in a set area around each pixel in a target image and the corresponding pixel in a corresponding standard image, and characterizes the visually visible noise by the total number of abnormal pixels and the positional relationship of the abnormal pixels, and thereby updates the traditional peak signal-to-noise ratio, so that the updated peak signal-to-noise ratio can intuitively reflect the abnormal situation of visual distortion on the image, thereby utilizing the updated peak signal-to-noise ratio to evaluate the image quality, thereby improving the evaluation accuracy of the visually distorted image and ensuring the consistency between the image quality evaluation result and the subjective judgment result.

[0012] In an optional implementation, the step of screening out abnormal pixels from the target image based on a pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image includes:

[0013] For each pixel point in the target image, respectively calculating the pixel error between each first pixel point and the corresponding second pixel point in a set area around the current pixel point;

[0014] Sum and average the pixel errors between each of the first pixel points and the corresponding second pixel points in a set area around the current pixel point to obtain a pixel error mean;

[0015] Determine whether the pixel error mean is greater than a preset pixel error threshold;

[0016] When the pixel error mean is greater than the preset pixel error threshold, the current pixel is determined as an abnormal pixel.

[0017] The present invention screens abnormal pixels by utilizing the relationship between the mean pixel error of each pixel in a set area around the pixel and a preset pixel error threshold, and can accurately identify pixels with visually visible noise, thus providing an accurate data basis for subsequent updating of the peak signal-to-noise ratio.

[0018] In an optional implementation, the updating of the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels includes:

[0019] Calculate the distances between adjacent abnormal pixel points in the order of image scanning, and count the number of distances less than a preset distance threshold;

[0020] Calculating an offset amount after accumulating the counted amount and the total amount;

[0021] The peak signal-to-noise ratio is updated based on the offset.

[0022] The present invention calculates the distances between adjacent abnormal pixels in the order of image scanning, increases the weights of abnormal pixels with similar distances, and updates the peak signal-to-noise ratio after calculating the offset based on the total number of abnormal pixels. The present invention fully considers the characteristics of visually distorted images, further ensures the influence of visual distortion caused by visually visible noise, so that the updated peak signal-to-noise ratio can accurately reflect the visual distortion problem, further improving the accuracy of image quality evaluation results.

[0023] In an optional implementation, the peak signal-to-noise ratio is updated by the following formula:

[0024] ,

[0025] Among them, MPSNR represents the updated peak signal-to-noise ratio, bias represents the bias, MAX represents the theoretical maximum value of the pixel component, and MSE represents the mean square error between the target image and the standard image;

[0026] The offset is calculated using the following formula:

[0027] ,

[0028] Wherein, bias represents the bias, ave_cnt represents the accumulated value of the counted amount and the total amount, m and n represent the pixel size of the target image, and aqrt is a positive square root calculation function.

[0029] The present invention standardizes the updating of the peak signal-to-noise ratio by determining the updating formula of the peak signal-to-noise ratio and the calculation formula of the offset, thereby ensuring the consistency of the updated peak signal-to-noise ratio when evaluating image quality.

[0030] In an optional implementation, determining the image quality evaluation result of the target image based on the updated peak signal-to-noise ratio includes:

[0031] Determining whether the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold;

[0032] When the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold, determining that the image quality evaluation result of the target image is unqualified in image quality;

[0033] When the updated peak signal-to-noise ratio is not less than a preset peak signal-to-noise ratio threshold, it is determined that the image quality evaluation result of the target image is qualified.

[0034] The present invention compares the updated peak signal-to-noise ratio with a preset peak signal-to-noise ratio threshold to evaluate whether the image quality is qualified, provides users with accurate evaluation results for understanding the quality of the image, and improves the user experience.

[0035] In an optional implementation manner, the surrounding set area of ​​each pixel is determined by:

[0036] Starting from the current pixel point, pixel points are sequentially extracted in a first direction of the pixel row where the current pixel point is located until the number of extracted pixel points reaches a first preset number or the extracted current pixel point is a boundary pixel point of the target image;

[0037] An area formed by all extracted pixel points is determined as a surrounding set area of ​​the current pixel point.

[0038] The present invention determines the surrounding set area of ​​the pixel point in the image by using the pixel line as the search direction, so as to fully identify the visually visible noise appearing in each pixel line, and can accurately reflect the visual distortion existing in the pixel line direction.

[0039] In an optional implementation manner, the surrounding set area of ​​each pixel is determined by:

[0040] Starting from the current pixel point, pixel points are sequentially extracted in the first direction of the pixel row where the current pixel point is located until the number of extracted pixel points reaches a second preset number or the extracted current pixel point is a boundary pixel point of the target image;

[0041] Starting from the current pixel point, pixel points are sequentially extracted in the second direction of the pixel column where the current pixel point is located until the number of extracted pixel points reaches a third preset number or the extracted current pixel point is a boundary pixel point of the target image;

[0042] An area formed by all extracted pixel points is determined as a surrounding set area of ​​the current pixel point.

[0043] The present invention determines a set area around a pixel point in an image with pixel rows and pixel columns as search directions, so as to fully identify visually visible noise appearing in each pixel row and pixel column, and can accurately reflect the visual distortion existing in the direction of pixel rows and pixel columns, thereby further improving the accuracy of subsequent visual distortion assessment of the image.

[0044] In a second aspect, the present invention provides an image quality assessment device based on peak signal-to-noise ratio, the device comprising:

[0045] An acquisition module, used for acquiring a peak signal-to-noise ratio between a target image and a standard image;

[0046] A first processing module, configured to screen out abnormal pixels from the target image based on a pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image;

[0047] A second processing module, configured to update the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels;

[0048] The third processing module is used to determine the image quality evaluation result of the target image based on the updated peak signal-to-noise ratio.

[0049] In a third aspect, the present invention provides a computer device, the computer device comprising:

[0050] The memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method provided by the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0051] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method provided in the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 is a flow chart of an image quality evaluation method based on peak signal-to-noise ratio according to an embodiment of the present invention;

[0054] Figure 2 is a flow chart of another image quality evaluation method based on peak signal-to-noise ratio according to an embodiment of the present invention;

[0055] FIG. 3A to FIG. 3D is an example diagram of a surrounding set area of ​​a pixel according to an embodiment of the present invention;

[0056] Figure 4 is a schematic diagram of a calculation flow of an abnormality counter according to an embodiment of the present invention;

[0057] Figure 5 A schematic diagram of pseudo code implementation of an abnormal counter ave_cnt according to an embodiment of the present invention;

[0058] Figure 6 is a schematic structural diagram of an image quality assessment device based on peak signal-to-noise ratio according to an embodiment of the present invention;

[0059] Figure 7 is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0061] Peak Signal Noise Rate (PSNR) is often used to measure the difference between two images. The source image is processed to obtain the output image. PSNR measures the quality of the output image by calculating the difference between the output image and the source image. Assume that the source image is A and the target image is B, where B is the image obtained after some processing of A. Generally speaking, B is the image output obtained after A has undergone some compression and coding process or channel transmission. Usually, the smaller the difference between the images A and B, the larger the PSNR value, which means that the processed image is closer to the source image as a whole, and the compression and coding processing effect and the fidelity of the channel are also better.

[0062] Although PSNR is an objective image quality evaluation indicator, it also has limitations. For example, consider the following two situations:

[0063] Case 1: There is obvious visual noise in a certain area of ​​the target image, but other areas are almost lossless;

[0064] Case 2: The target image has high-frequency noise that is not visually obvious;

[0065] In subjective perception, the target image has very obvious visual distortion in case 1, but it is difficult to perceive obvious visual distortion in case 2. Therefore, in subjective evaluation, the quality of the target image in case 2 is better, but in fact, the PSNR values ​​calculated in the two cases may be very close. This makes it difficult to distinguish the image pixel abnormalities in case 1 through the PSNR value.

[0066] Therefore, the defect of the existing method of using PSNR to evaluate image quality is that it cannot reflect the observer's subjective evaluation of the target image quality. The quality of the target image can only be judged by the overall pixel error of the image, which may cause the judgment result to differ too much from the subjective judgment result of the person.

[0067] According to an embodiment of the present invention, an embodiment of an image quality assessment method based on peak signal-to-noise ratio is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0068] Based on the above problems, in this embodiment, a method for evaluating image quality based on peak signal-to-noise ratio is provided, which is applied to computer equipment. Figure 1 is a flow chart of an image quality evaluation method based on peak signal-to-noise ratio according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0069] Step S101, obtaining the peak signal-to-noise ratio between the target image and the standard image.

[0070] Specifically, the calculation process of the peak signal-to-noise ratio between two images is an existing technology and can be calculated according to the peak signal-to-noise ratio algorithm calculation formula. The specific algorithm formula and calculation process will not be repeated here.

[0071] Step S102 , based on the pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image, abnormal pixels are screened out from the target image.

[0072] Among them, the surrounding set area is the neighborhood around the pixel point, and its size can be flexibly set according to the image characteristics and the requirements of evaluation accuracy, such as: determining the area within the pixel row where the pixel point is located and a certain distance away from the pixel point as the surrounding set area, or determining the area within the pixel column where the pixel point is located and a certain distance away from the pixel point as the surrounding set area, or determining the area formed by all pixels within a certain distance from the pixel point as the surrounding set area, etc. The present invention is not limited to this.

[0073] Specifically, the greater the pixel difference between the pixels in the set area around each pixel in the target image and the pixels at the corresponding position in the standard image, the greater the pixel difference, which indicates that the pixel may have visually visible noise and is prone to visual distortion. Therefore, these pixels that may have visual distortion can be screened out as abnormal pixels by comparing the pixel differences.

[0074] Step S103: updating the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels.

[0075] Specifically, the more abnormal pixels there are in the image, the greater the probability of visual distortion in the image; and if multiple adjacent abnormal pixels appear in a similar area, the greater the probability of visual distortion in the area. Therefore, the visual distortion of the image can be reflected by the total number of abnormal pixels in the image and the positional relationship between adjacent abnormal pixels. The peak signal-to-noise ratio is then updated using this as a data reference. The updated peak signal-to-noise ratio can also intuitively reflect the visual distortion in the image, thereby improving the accuracy of subsequent image quality evaluation.

[0076] Step S104: determining an image quality evaluation result of the target image based on the updated peak signal-to-noise ratio.

[0077] Specifically, since the updated peak signal-to-noise ratio can intuitively reflect the visual distortion of the image, the updated peak signal-to-noise ratio can be used to distinguish the abnormal pixel parts to accurately evaluate the images with obvious visual distortion, so that the image quality can be judged more accurately and the consistency of the image quality evaluation results with the user's subjective visual evaluation can be ensured.

[0078] The embodiment of the present invention screens abnormal pixels by utilizing the pixel differences between each pixel in a set area around each pixel in the target image and the corresponding pixel in the corresponding standard image, and characterizes the visually visible noise by the total number of abnormal pixels and the positional relationship of the abnormal pixels, and thereby updates the traditional peak signal-to-noise ratio, so that the updated peak signal-to-noise ratio can intuitively reflect the abnormal situation of visual distortion on the image, thereby evaluating the image quality using the updated peak signal-to-noise ratio, improving the evaluation accuracy of the visually distorted image, and ensuring the consistency of the image quality evaluation result with the subjective judgment result.

[0079] In this embodiment, a method for evaluating image quality based on peak signal-to-noise ratio is also provided, which is applied to computer equipment. Figure 2 is a flow chart of an image quality evaluation method based on peak signal-to-noise ratio according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0080] Step S201, obtain the peak signal-to-noise ratio between the target image and the standard image. Figure 1 The relevant description of step S101 is not repeated here.

[0081] Step S202 , based on the pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image, abnormal pixels are screened out from the target image.

[0082] The surrounding area of ​​each pixel can be determined as follows:

[0083] Step a1, starting from the current pixel point, pixel points are extracted in sequence in the first direction of the pixel row where the current pixel point is located, until the number of extracted pixels reaches a first preset number or the extracted current pixel point is a boundary pixel point of the target image.

[0084] The first direction may be leftward or rightward or may be leftward and rightward at the same time with the current pixel as the center, and the present invention is not limited thereto. The first preset number may be flexibly set according to the actual detection accuracy and image size, for example, the first preset number is 3, 4, etc., and the present invention is not limited thereto.

[0085] Step a2: determine the area formed by all the extracted pixels as the surrounding set area of ​​the current pixel.

[0086] For example, it is assumed that each pixel row of the target image contains 8 pixels, the position corresponding to each pixel is marked as 0-7, and the position of the abnormal point is reset to zero at the beginning of each row. For example, the first direction is leftward and the first preset number is 3. Figure 3A As shown in , when the current pixel position is 0, since it is already a pixel boundary point, the surrounding set area only includes the current pixel position 0; Figure 3B As shown in , when the current pixel position is 1, the surrounding set area only includes the current pixel position 1 and the pixel position 0 on its left; similarly, Figure 3C As shown, when the current pixel position is 4, the surrounding set area includes the current pixel position 4 and the pixel positions 2 and 3 on its left side; Figure 3D As shown, when the current pixel position is 7, the surrounding set area includes the current pixel position 7 and the pixel positions 5 and 6 on its left.

[0087] The embodiment of the present invention determines the surrounding set area of ​​the pixel point in the image by using the pixel line as the search direction, so as to fully identify the visually visible noise appearing in each pixel line, and can accurately reflect the visual distortion existing in the pixel line direction.

[0088] In practical applications, the surrounding set area of ​​each pixel can also be determined in the following way:

[0089] Step b1, starting from the current pixel point, pixel points are extracted in sequence in the first direction of the pixel row where the current pixel point is located, until the number of extracted pixels reaches a second preset number or the extracted current pixel point is a boundary pixel point of the target image.

[0090] Among them, the second preset number can be flexibly set according to the actual detection accuracy and image size, such as: the second preset number is 3, 4, etc. The first direction is similar to the first direction in the above step a1, and the specific process of pixel extraction is also similar to the above step a1. For details, please refer to the relevant description of the above step a1, which will not be repeated here.

[0091] Step b2, starting from the current pixel point, sequentially extracting pixel points in the second direction of the pixel column where the current pixel point is located, until the number of extracted pixel points reaches a third preset number or the extracted current pixel point is a boundary pixel point of the target image.

[0092] The second direction may be upward or downward or may be upward and downward with the current pixel as the center, and the present invention is not limited thereto. The third preset number may be flexibly set according to the actual detection accuracy and image size, for example, the third preset number is 3, 4, etc., and the present invention is not limited thereto.

[0093] Specifically, the process of sequentially extracting pixel points in the second direction of the pixel column where the current pixel point is located is similar to the principle of the above step a1. For details, please refer to the relevant description of the above step a1, which will not be repeated here.

[0094] Step b3: determine the area formed by all the extracted pixels as the surrounding set area of ​​the current pixel.

[0095] The embodiments of the present invention determine a set area around a pixel point in an image using pixel rows and pixel columns as search directions, so as to fully identify visually visible noise appearing in each pixel row and pixel column, thereby accurately reflecting the visual distortion existing in the direction of pixel rows and pixel columns, and further improving the accuracy of subsequent visual distortion assessment of the image.

[0096] Specifically, the above step S202 includes:

[0097] Step S2021, for each pixel point in the target image, respectively calculate the pixel error between each first pixel point and the corresponding second pixel point in a set area around the current pixel point.

[0098] Specifically, the pixel error between two pixels is the difference between the pixel values ​​corresponding to the two pixel positions.

[0099] Step S2022, summing and averaging the pixel errors between each first pixel point and the corresponding second pixel point in a set area around the current pixel point to obtain a pixel error mean.

[0100] For example, Figure 3A For example, the current pixel position is 0, the mean calculation of pixel error only depends on the current pixel point, and the calculation result is the pixel error of the current pixel point; Figure 3B For example, the current pixel position is 1, and the mean calculation of the pixel error only depends on the current pixel and the first pixel on its left. The calculation result is the sum of the pixel errors of the two pixels divided by 2. Figure 3C For example, the current pixel position is 4, and the mean calculation of the pixel error only depends on the current pixel and its two adjacent pixels on the left. The calculation result is the sum of the pixel errors of the three pixels divided by 3.

[0101] Step S2023, determining whether the pixel error mean is greater than a preset pixel error threshold.

[0102] Among them, the preset pixel error threshold can be flexibly set according to the pixel distribution of the image and the requirements of evaluation accuracy. The smaller the threshold is set, the more sensitive the detection of visually visible noise is, but the higher the false recognition rate is. Conversely, the larger the threshold is set, the lower the detection sensitivity is, but the false recognition rate is also lower. The present invention is not limited to this.

[0103] Step S2024: when the pixel error mean is greater than a preset pixel error threshold, the current pixel is determined as an abnormal pixel.

[0104] Furthermore, when the pixel error mean is not greater than the preset pixel error threshold, the above steps S2021 to S2024 are re-executed on the next scanned pixel point.

[0105] The embodiment of the present invention screens abnormal pixels by utilizing the relationship between the average pixel error of each pixel in a set area around the pixel and a preset pixel error threshold, and can accurately identify pixels with visually visible noise, thereby providing an accurate data basis for subsequent updating of the peak signal-to-noise ratio.

[0106] Step S203: updating the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels.

[0107] Specifically, the above step S203 includes:

[0108] Step S2031, calculate the distances between adjacent abnormal pixel points in the order of image scanning, and count the number of distances less than a preset distance threshold.

[0109] Among them, the image scanning order is usually from left to right by pixel row. In practical applications, the image scanning order can also be changed, such as scanning by pixel column, etc., and the present invention is not limited to this. The preset distance threshold can be flexibly adjusted according to the evaluation accuracy and actual conditions. For example, the preset distance threshold is 3, which represents the distance between three pixel positions. When the distance between two such pixel points is less than 3 pixel positions, it means that the probability of visual distortion in the area where the two abnormal pixel points are located is greater, and the influence weight of visual distortion needs to be increased. The embodiment of the present invention uses the counted number of abnormal pixel points with such problems as the influence weight.

[0110] Step S2032, calculating the offset after accumulating the counted amount and the total amount.

[0111] Step S2033: Update the peak signal-to-noise ratio based on the offset.

[0112] The embodiment of the present invention calculates the distances between adjacent abnormal pixels in the order of image scanning, increases the weights of abnormal pixels with similar distances, calculates the offset based on the total number of abnormal pixels, and then updates the peak signal-to-noise ratio. This fully considers the characteristics of visually distorted images, further ensures the influence of visual distortion caused by visually visible noise, and enables the updated peak signal-to-noise ratio to accurately reflect the visual distortion problem, thereby further improving the accuracy of the image quality evaluation result.

[0113] Furthermore, the peak signal-to-noise ratio is updated by the following formula:

[0114] ,

[0115] Among them, MPSNR represents the updated peak signal-to-noise ratio, bias represents the bias, MAX represents the theoretical maximum value of the pixel component, and MSE represents the mean square error between the target image and the standard image; the calculation formula of MSE is as follows:

[0116] ,

[0117] Where MSE represents the mean square error between the target image and the standard image, I(x,y) and K(x,y) represent the points with x and y in the standard image and the target image respectively, and m and n represent the width and height of the image.

[0118] The offset is calculated using the following formula:

[0119] ,

[0120] Among them, bias represents the bias, ave_cnt represents the accumulated value of the count and the total number, m and n represent the pixel size of the target image, and aqrt is the positive square root calculation function.

[0121] The embodiment of the present invention determines the update formula of the peak signal-to-noise ratio and the calculation formula of the offset, so as to standardize the update of the peak signal-to-noise ratio and ensure the consistency of the updated peak signal-to-noise ratio when evaluating image quality.

[0122] For example, Figure 4 As shown, the above statistical counting and total number process can be summarized as follows:

[0123] 1) Calculate the mean pixel error of the three consecutive pixels to the left of the current pixel (inclusive);

[0124] 2) If the mean pixel error of consecutive pixels exceeds a certain threshold, the current pixel position is recorded as an abnormal point, otherwise the current pixel position is updated;

[0125] 3) If the distance between the abnormal point and the previous abnormal point is less than 3, the abnormal counter is increased by 2, otherwise it is increased by 1. After the abnormal counter is updated, the current pixel position is updated;

[0126] 4) After traversing all the pixels of the image, the offset is calculated based on the accumulated value of the anomaly counter and superimposed on the original PSNR result to obtain the updated PSNR output value. Figure 5 This is a pseudo code implementation diagram of the exception counter ave_cnt.

[0127] It should be noted that in the above example, only continuous pixels in the horizontal direction, i.e., pixel rows, are used as an example. In actual applications, error judgment of continuous pixels in the vertical direction, i.e., pixel columns, can be added to increase the accuracy of the assessment of image visual distortion.

[0128] Step S204: determining an image quality evaluation result of the target image based on the updated peak signal-to-noise ratio.

[0129] Specifically, the above step S204 includes:

[0130] Step S2041, determining whether the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold.

[0131] The preset peak signal-to-noise ratio threshold can be flexibly adjusted according to the image quality evaluation accuracy and actual conditions, and the specific value will not be described in detail here.

[0132] Step S2042: when the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold, determining that the image quality evaluation result of the target image is unqualified.

[0133] Step S2043: when the updated peak signal-to-noise ratio is not less than the preset peak signal-to-noise ratio threshold, determining that the image quality evaluation result of the target image is qualified.

[0134] The embodiment of the present invention uses the comparison between the updated peak signal-to-noise ratio and the preset peak signal-to-noise ratio threshold to evaluate whether the image quality is qualified, providing users with accurate evaluation results for understanding the quality of the image and improving the user experience. It overcomes the defect that the traditional peak signal-to-noise ratio cannot effectively reflect the visual distortion in the image, and does not significantly increase the computational complexity. The updated PSNR calculation result on the image with obvious visual distortion can be significantly lower than the PSNR result, and the updated PSNR calculation result on the image without obvious visual distortion is close to the PSNR result, so that the abnormal pixel part can be distinguished, so that the quality of the image compression codec algorithm can be judged more accurately.

[0135] In this embodiment, a device for evaluating image quality based on peak signal-to-noise ratio is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are omitted. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0136] This embodiment provides an image quality evaluation device based on peak signal-to-noise ratio. Figure 6 As shown, the device comprises:

[0137] An acquisition module 601 is used to acquire a peak signal-to-noise ratio between a target image and a standard image;

[0138] A first processing module 602, configured to screen out abnormal pixels from the target image based on a pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image;

[0139] The second processing module 603 is used to update the peak signal-to-noise ratio based on the total number of abnormal pixels and the position relationship between adjacent abnormal pixels;

[0140] The third processing module 604 is configured to determine an image quality evaluation result of the target image based on the updated peak signal-to-noise ratio.

[0141] In some optional implementations, the first processing module 602 includes:

[0142] A first processing unit is used to calculate, for each pixel point in the target image, a pixel error between each first pixel point and a corresponding second pixel point in a set area around the current pixel point;

[0143] A second processing unit is used to sum and average the pixel errors between each first pixel point and the corresponding second pixel point in a set area around the current pixel point to obtain a pixel error mean;

[0144] A first judging unit, used to judge whether the pixel error mean is greater than a preset pixel error threshold;

[0145] The third processing unit is used to determine the current pixel point as an abnormal pixel point when the pixel error mean value is greater than a preset pixel error threshold value.

[0146] In some optional implementations, the second processing module 603 includes:

[0147] The fourth processing unit is used to calculate the distances between adjacent abnormal pixel points in sequence according to the image scanning order, and count the number of distances less than a preset distance threshold;

[0148] A fifth processing unit, configured to calculate an offset amount after accumulating the counted amount and the total amount;

[0149] The sixth processing unit is configured to update the peak signal-to-noise ratio based on the offset.

[0150] In some optional implementations, the peak signal-to-noise ratio is updated by the following formula:

[0151] ,

[0152] Among them, MPSNR represents the updated peak signal-to-noise ratio, bias represents the bias, MAX represents the theoretical maximum value of the pixel component, and MSE represents the mean square error between the target image and the standard image;

[0153] The offset is calculated using the following formula:

[0154] ,

[0155] Among them, bias represents the bias, ave_cnt represents the accumulated value of the count and the total number, m and n represent the pixel size of the target image, and aqrt is the positive square root calculation function.

[0156] In some optional implementations, the third processing module 604 includes:

[0157] A second judgment unit, used to judge whether the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold;

[0158] A seventh processing unit, configured to determine that the image quality evaluation result of the target image is unqualified in image quality when the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold;

[0159] The eighth processing unit is used to determine that the image quality evaluation result of the target image is qualified when the updated peak signal-to-noise ratio is not less than a preset peak signal-to-noise ratio threshold.

[0160] In some optional implementations, the first processing module 602 further includes:

[0161] a ninth processing unit, configured to extract pixel points in sequence in a first direction of a pixel row where the current pixel point is located, starting from the current pixel point, until the number of extracted pixel points reaches a first preset number or the extracted current pixel point is a boundary pixel point of the target image;

[0162] The tenth processing unit is used to determine the area formed by all the extracted pixel points as the surrounding set area of ​​the current pixel point.

[0163] In some optional implementations, the first processing module 602 further includes:

[0164] an eleventh processing unit, configured to extract pixel points in sequence in a first direction of a pixel row where the current pixel point is located, starting from the current pixel point, until the number of extracted pixel points reaches a second preset number or the extracted current pixel point is a boundary pixel point of the target image;

[0165] A twelfth processing unit is used to extract pixel points in sequence in a second direction of the pixel column where the current pixel point is located, starting from the current pixel point, until the number of extracted pixel points reaches a third preset number or the extracted current pixel point is a boundary pixel point of the target image;

[0166] The thirteenth processing unit is used to determine the area formed by all the extracted pixel points as the surrounding set area of ​​the current pixel point.

[0167] The peak signal-to-noise ratio-based image quality assessment device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0168] The further functional description of each of the above modules and units is the same as that of the above corresponding method embodiments and will not be repeated here.

[0169] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0170] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0171] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0172] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0173] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0174] The computer device further comprises a communication interface 30 for the control unit to communicate with other devices or a communication network.

[0175] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0176] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for evaluating image quality based on peak signal-to-noise ratio, characterized in that: The method comprises: Obtain the peak signal-to-noise ratio between the target image and the standard image; Screening out abnormal pixels from the target image based on a pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image; Based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels, the peak signal-to-noise ratio is updated; Determine an image quality evaluation result of the target image based on the updated peak signal-to-noise ratio; The step of screening out abnormal pixels from the target image based on the pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image comprises: For each pixel point in the target image, respectively calculating the pixel error between each first pixel point and the corresponding second pixel point in a set area around the current pixel point; Sum and average the pixel errors between each of the first pixel points and the corresponding second pixel points in a set area around the current pixel point to obtain a pixel error mean; Determine whether the pixel error mean is greater than a preset pixel error threshold; When the pixel error mean is greater than the preset pixel error threshold, determining the current pixel point as an abnormal pixel point; The updating of the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels includes: Calculate the distances between adjacent abnormal pixel points in the order of image scanning, and count the number of distances less than a preset distance threshold; Calculating an offset amount after accumulating the counted amount and the total amount; updating the peak signal-to-noise ratio based on the offset; The peak signal-to-noise ratio is updated by the following formula: , Among them, MPSNR represents the updated peak signal-to-noise ratio, bias represents the bias, MAX represents the theoretical maximum value of the pixel component, and MSE represents the mean square error between the target image and the standard image; The offset is calculated using the following formula: , Wherein, bias represents the bias, ave_cnt represents the accumulated value of the counted amount and the total amount, m and n represent the pixel size of the target image, and sqrt is a positive square root calculation function.

2. The method according to claim 1, characterized in that The determining the image quality evaluation result of the target image based on the updated peak signal-to-noise ratio includes: Determining whether the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold; When the updated peak signal-to-noise ratio is less than a preset peak signal-to-noise ratio threshold, determining that the image quality evaluation result of the target image is unqualified in image quality; When the updated peak signal-to-noise ratio is not less than a preset peak signal-to-noise ratio threshold, it is determined that the image quality evaluation result of the target image is qualified.

3. The method according to any one of claims 1 to 2, characterized in that: The surrounding set area of ​​each pixel is determined by: Starting from the current pixel point, pixel points are sequentially extracted in a first direction of the pixel row where the current pixel point is located until the number of extracted pixel points reaches a first preset number or the extracted current pixel point is a boundary pixel point of the target image; An area formed by all extracted pixel points is determined as a surrounding set area of ​​the current pixel point.

4. The method according to any one of claims 1 to 2, characterized in that: The surrounding set area of ​​each pixel is determined by: Starting from the current pixel point, pixel points are sequentially extracted in the first direction of the pixel row where the current pixel point is located until the number of extracted pixel points reaches a second preset number or the extracted current pixel point is a boundary pixel point of the target image; Starting from the current pixel point, pixel points are sequentially extracted in the second direction of the pixel column where the current pixel point is located until the number of extracted pixel points reaches a third preset number or the extracted current pixel point is a boundary pixel point of the target image; An area formed by all extracted pixel points is determined as a surrounding set area of ​​the current pixel point.

5. An image quality assessment device based on peak signal-to-noise ratio, characterized in that: The device comprises: An acquisition module, used for acquiring a peak signal-to-noise ratio between a target image and a standard image; A first processing module is used to screen out abnormal pixels from the target image based on the pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image; the method of screening out abnormal pixels from the target image based on the pixel difference between a first pixel in a set area around each pixel in the target image and a second pixel in a corresponding area in the standard image comprises: for each pixel in the target image, respectively calculating the pixel errors between each of the first pixels and the corresponding second pixels in the set area around the current pixel; summing and averaging the pixel errors between each of the first pixels and the corresponding second pixels in the set area around the current pixel to obtain a pixel error mean; judging whether the pixel error mean is greater than a preset pixel error threshold; and determining the current pixel as an abnormal pixel when the pixel error mean is greater than the preset pixel error threshold; The second processing module is used to update the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels; the updating of the peak signal-to-noise ratio based on the total number of abnormal pixels and the positional relationship between adjacent abnormal pixels includes: calculating the distance between adjacent abnormal pixels in sequence according to the image scanning order, and counting the number of counts of the distance being less than a preset distance threshold; calculating the offset after accumulating the count and the total number; updating the peak signal-to-noise ratio based on the offset; updating the peak signal-to-noise ratio by the following formula: , Among them, MPSNR represents the updated peak signal-to-noise ratio, bias represents the bias, MAX represents the theoretical maximum value of the pixel component, and MSE represents the mean square error between the target image and the standard image; The offset is calculated using the following formula: , Wherein, bias represents the bias, ave_cnt represents the accumulated value of the counted amount and the total amount, m and n represent the pixel size of the target image, and sqrt is a positive square root calculation function; The third processing module is used to determine the image quality evaluation result of the target image based on the updated peak signal-to-noise ratio.

6. A computer device, characterized in that: The computer device comprises: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 4 by executing the computer instructions.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image quality detection method and image quality detection device

    CN102378041A

  • Image processing method and device, electronic equipment, storage medium and program product

    CN113850828A