Terahertz-based image quality evaluation method and system and storage medium

Through the terahertz-based image quality evaluation method, a multi-dimensional scoring system is constructed, which solves the problem of one-sided understanding of image quality by traditional methods and achieves a comprehensive and objective evaluation of image quality.

CN119785189AInactive Publication Date: 2025-04-08NANCHANG HONGTONGTAI TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510007833.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional image quality evaluation methods focus too much on single or minority features, resulting in a one-sided understanding of image quality and cannot fully reflect the true quality level of the image.

Method used

The terahertz-based image quality evaluation method is used to scan objects through terahertz, obtain the images to be evaluated, build a pixel matrix, obtain abnormal pixel points, perform preliminary scoring, filtering, grayscale mean and variance calculation, and edge feature analysis, and finally comprehensively evaluate the image quality.

Benefits of technology

Through multi-dimensional scoring (noise, clarity and edge features), a comprehensive and comprehensive evaluation of image quality is achieved, and the evaluation criteria are objective and reproducible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785189A_ABST
    Figure CN119785189A_ABST
Patent Text Reader

Abstract

The invention discloses a terahertz-based image quality evaluation method and system and a storage medium, and relates to the technical field of image processing, and the method comprises the steps: scanning an object through terahertz, and obtaining a to-be-evaluated image; scanning the to-be-evaluated image, obtaining pixel point information in the to-be-evaluated image, and constructing a pixel matrix according to the pixel point information; abnormal pixel points with large pixel value deviation in a pixel matrix are obtained, the number and positions of the abnormal pixel points are obtained and marked, noise scoring can quantify random errors in an image, definition scoring can reflect the retention degree of image details, edge feature scoring can reveal the definition degree of object contours and boundaries in the image, and the image quality is improved. Through the scoring of the three dimensions, the image quality can be comprehensively evaluated, and the scoring of the noise, the definition and the edge features is based on quantitative indexes, so that the evaluation standard has objectivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a terahertz-based image quality evaluation method, system and storage medium. Background Art

[0002] Image quality refers to people's subjective evaluation of the visual experience of an image. It is generally believed that image quality refers to the degree of error in the human visual system between the measured image (i.e., the target image) and the standard image (i.e., the original image). Image quality can be divided into image fidelity and image intelligibility. Image fidelity describes the degree of deviation between the processed image and the original image; while image intelligibility indicates the degree to which people or machines can extract relevant feature information from the image.

[0003] Many traditional image quality evaluation methods have a significant limitation, that is, they tend to focus too much on a specific feature or a few significant attributes of the image. Although this evaluation method can reflect the performance of the image in some aspects to a certain extent, it ignores the complexity of the image as a multi-dimensional information carrier. Image quality does not only depend on these single or a few features, but also includes multiple other dimensions. This single-dimensional evaluation leads to a one-sided understanding of image quality and cannot fully reflect the true quality level of the image. Therefore, the present invention proposes a terahertz-based image quality evaluation method, system and storage medium. Summary of the invention

[0004] In order to solve the above technical problems, a terahertz-based image quality evaluation method, system and storage medium are provided to solve the problem that the above single-dimensional evaluation leads to a one-sided understanding of image quality.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is: A terahertz-based image quality evaluation method, comprising: Scan the object through terahertz to obtain the image to be evaluated; Scan the image to be evaluated, obtain pixel information in the image to be evaluated, and construct a pixel matrix based on the information of each pixel; Obtain abnormal pixels with large pixel value deviations in the pixel matrix, obtain their number and location, mark them, and perform a preliminary score on the image to be evaluated based on the size of the pixel matrix and the number of abnormal pixels; Filter the image to be evaluated according to the pixel matrix and fill in the locations of abnormal pixels; Obtain the grayscale value of each pixel in the filtered image and obtain the grayscale mean value in the pixel matrix; According to the grayscale mean and the grayscale value of the pixel, the grayscale standard deviation of each pixel is obtained, and the grayscale variance is obtained at the same time, and the image to be evaluated is scored twice according to the grayscale variance; The Sobel operator is used to obtain the image edge features and the image edge gradient value. The image to be evaluated is scored three times according to the image edge gradient value. The preliminary scoring, the secondary scoring and the tertiary scoring are processed to obtain the overall quality evaluation of the image to be evaluated.

[0006] Preferably, scanning the image to be evaluated, obtaining pixel information in the image to be evaluated, and constructing a pixel matrix according to the information of each pixel point includes the following steps: Scan and obtain each pixel point in the image to be evaluated to construct a pixel matrix; An xy coordinate system is constructed with the lower left corner of the pixel matrix as the origin, the length direction of the pixel matrix as the x-axis, and the width direction of the pixel matrix as the y-axis. The scale of two pixels close to each other is 1 on the coordinate axis. The pixel information of each pixel point is used to supplement the information of each point in the pixel matrix.

[0007] Preferably, the process of obtaining abnormal pixels with large pixel value deviations in the pixel matrix, obtaining their number and positions, marking them, and performing preliminary scoring on the image to be evaluated based on the size of the pixel matrix combined with the number of abnormal pixels includes the following steps: Get pixel information of each pixel in the pixel matrix; Locate the number and position of abnormal pixels in the pixel matrix based on pixel information and mark them; Dividing the pixel matrix into multiple matrices A; Get the number of pixels in matrix A; According to the number of abnormal pixels, they are evenly distributed to multiple matrices A, the number of abnormal pixels after distribution in matrix A is obtained, and a preliminary score is given to the image to be evaluated; When the number of abnormal pixels in matrix A is less than 10, it is scored as 90-100; When the number of abnormal pixels in matrix A is between 10 and 30, the score is 60 to 90; When the number of abnormal pixels in matrix A is between 30 and 60, the score is 30-60; When the number of abnormal pixels in matrix A is between 60 and 90, it is scored between 0 and 30; When the number of abnormal pixels in matrix A is greater than 90, it is scored as 0.

[0008] Preferably, filtering the image to be evaluated according to the pixel matrix and filling the positions of abnormal pixels comprises the following steps: Construct a 3x3 matrix B with the abnormal pixel coordinates as the center; Perform mean calculation on matrix B to obtain pixel mean; Use the pixel mean to replace the pixels with large pixel value deviation in matrix B; The mean calculation formula is: ; In the formula, is the mean value of the point after calculation; is the target pixel coordinate.

[0009] Preferably, the step of obtaining the grayscale value of each pixel in the filtered image and obtaining the grayscale mean value in the pixel matrix comprises the following steps: Convert the filtered image into a grayscale image; Get the gray value of each point in the gray image; Obtain the grayscale mean of the grayscale image according to the grayscale value of each point; Among them, the calculation formula of grayscale mean is: ; In the formula, is the grayscale mean, The grayscale image Row, No. The coordinates of the columns of pixels, The grayscale image Row, No. The gray value of the pixel. is the number of pixels in the grayscale image.

[0010] Preferably, the grayscale standard deviation of each pixel is obtained based on the grayscale mean and the grayscale value of the pixel, and the grayscale variance is obtained at the same time, and the secondary scoring of the image to be evaluated based on the grayscale variance includes the following steps: According to the grayscale mean and the grayscale value of the pixel, the grayscale standard deviation of each pixel is obtained; According to the grayscale standard deviation of each pixel, the mean of the standard deviation is obtained; According to the mean of standard deviation, the grayscale variance in the grayscale image is obtained; Obtain the grayscale value variances of a large number of grayscale images, and construct the variance range based on the large number of grayscale value variances; Constructing a first threshold and a second threshold according to the variance range, and performing a secondary scoring on the image to be evaluated according to the first threshold and the second threshold; If the grayscale variance is less than the first threshold, it is scored as 90-100; If the grayscale variance is between the first threshold and the second threshold, it is scored as 40-89; If the grayscale variance is greater than the second threshold, it is scored as 0-39; Among them, the calculation formula of grayscale standard deviation is: ; The calculation formula for the standard deviation mean is: ; Among them, the calculation formula of grayscale variance is: ; In the formula, The grayscale image Row, No. The grayscale standard deviation of the column pixels, is the mean grayscale standard deviation in the grayscale image, is the grayscale variance of the grayscale image.

[0011] Preferably, the method of obtaining the image edge features by using the Sobel operator and obtaining the image edge gradient value at the same time, and scoring the image to be evaluated three times according to the image edge gradient value comprises the following steps: Combine the grayscale values ​​of each pixel point, and perform convolution calculations on each point in the image along the x-axis and y-axis directions with the origin as the starting point to obtain the gradients of multiple pixel points on the x-axis and y-axis; Combine the gradients of the pixels on the x-axis and y-axis to calculate the gradient values ​​of multiple pixels; Calculate the gradient mean based on the gradient values ​​of multiple pixels; Get the gradient range, construct the high threshold, middle threshold and low threshold according to the gradient range, and score the image to be evaluated three times based on the gradient mean; If the mean gradient is higher than the high threshold, it is scored as 90-100; If the gradient mean is between the high threshold and the medium threshold, it is scored as 70-89; If the gradient mean is between the medium threshold and the low threshold, it is scored 30-69; If the mean gradient is lower than the low threshold, it is scored 0-29; Among them, the convolution formula of the x-axis is: ; Among them, the convolution formula of the y-axis is: ; The gradient calculation formula is: ; The gradient mean calculation formula is: ; In the formula, Represents the gray value of the pixel; and is the x-axis and the approximate value of the axis gradient at this point; is the gradient at that point, represents the mean gradient.

[0012] Preferably, the processing of the preliminary scoring, the secondary scoring and the tertiary scoring to obtain the overall quality evaluation of the image to be evaluated comprises the following steps: Extract the results of the initial scoring, secondary scoring, and tertiary scoring of the image to be evaluated, and sum them up to obtain the overall scoring score; The scoring ranges of the preliminary scoring, the secondary scoring and the tertiary scoring are obtained respectively, and the sum of the scores is calculated to obtain the overall scoring range; Get the proportion of the overall score in the overall scoring range; The quality of the image to be evaluated is evaluated based on the range ratio.

[0013] Furthermore, a terahertz-based image quality evaluation system is proposed, which is used to implement the above-mentioned terahertz-based image quality evaluation method, including: Control module: The control module is used for data transmission within the system; Terahertz scanning module: The terahertz scanning module is used to scan an object and form an image; Image processing module: The image processing module is used to perform grayscale processing on the image; Image analysis module: The image analysis module is used to analyze the image and obtain image information; Data analysis module: The data analysis module is used to analyze image information and various data in the system; Power supply module: The power supply module is used to supply power to the system.

[0014] Furthermore, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned terahertz-based image quality assessment method.

[0015] Compared with the prior art, the advantages of the present invention are: the present invention sets three levels of evaluation results, namely, preliminary scoring, secondary scoring and tertiary scoring. The preliminary scoring corresponds to image noise, the secondary scoring corresponds to image clarity, and the tertiary scoring corresponds to image edge features. The noise scoring can quantify random errors in the image, the clarity scoring can reflect the degree of retention of image details, and the edge feature scoring can reveal the clarity of the contours and boundaries of objects in the image. Through the scoring of these three dimensions, a comprehensive and integrated evaluation of image quality can be performed. The scoring of noise, clarity and edge features are all based on quantitative indicators, which makes the evaluation criteria objective and can reproduce images in the air for immersive teaching. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic flow chart of steps S100-S800 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 2 A schematic flow chart of steps S201-S203 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 3 A schematic flow chart of steps S301-S310 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 4 A schematic flow chart of steps S401-S403 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 5 A schematic flow chart of steps S501-S503 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 6 A schematic flow chart of steps S601-S608 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 7 A schematic flow chart of steps S701-S708 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Figure 8 A schematic flow chart of steps S801-S804 in a terahertz-based image quality evaluation method, system, and storage medium proposed in the present invention; Fig. 9 This is a structural block diagram of a terahertz-based image quality evaluation method, system and storage medium proposed by the present invention. DETAILED DESCRIPTION

[0017] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.

[0018] Reference Figure 1-9 As shown, a terahertz-based image quality evaluation method comprises: S100, scanning the object by terahertz to obtain an image to be evaluated; S200, scanning the image to be evaluated, obtaining pixel information in the image to be evaluated, and constructing a pixel matrix according to the information of each pixel; S300, obtaining abnormal pixel points with large pixel value deviations in the pixel matrix, obtaining the number and location of the abnormal pixel points, marking them, and performing a preliminary score on the image to be evaluated based on the size of the pixel matrix and the number of abnormal pixel points; S400, filtering the image to be evaluated according to the pixel matrix, and filling the positions of abnormal pixels; S500, obtaining the grayscale value of each pixel in the filtered image, and obtaining the grayscale mean value in the pixel matrix; S600, obtaining the grayscale standard deviation of each pixel according to the grayscale mean and the grayscale value of the pixel, and obtaining the grayscale variance at the same time, and performing a secondary score on the image to be evaluated according to the grayscale variance; S700, using the Sobel operator to obtain image edge features, and simultaneously obtaining image edge gradient values, and scoring the image to be evaluated three times according to the image edge gradient values; S800, processing the preliminary scoring, the secondary scoring and the tertiary scoring to obtain an overall quality evaluation of the image to be evaluated; Those skilled in the art can understand that holographic imaging based on terahertz technology, Fourier optics, and three-dimensional holographic imaging reproduction; the existence of abnormal pixels will destroy the integrity and consistency of the image, resulting in spots, lines or other forms of noise in the image. The noise may cover or interfere with important detail information, so that when using terahertz images for material detection, defect identification or feature extraction, abnormal pixels will cause the algorithm to misjudge or miss the judgment. The image to be evaluated is preliminarily scored by combining the size of the pixel matrix with the number of abnormal pixels. The degree of influence of abnormal pixels on the image can be directly determined by scoring; grayscale variance is a statistic used to describe the uniformity of image grayscale distribution in digital image processing. The larger the grayscale variance, the larger the grayscale variation in the image, that is, the more dispersed the grayscale distribution of the image, the more uneven the grayscale variation, and vice versa. In general, the smaller the grayscale variance, the smaller the grayscale variation in the image, the more concentrated the grayscale distribution, and the more uniform the grayscale variation. The image to be evaluated is scored twice based on this. The image grayscale value distribution is wider, the details are richer, and the score is higher. The Sobel operator has a good detection effect on the edge of the image and can accurately identify the edge features in the image. The size of the gradient value is a specific manifestation of the edge and texture information of the image. The larger the gradient value, the higher the clarity of the image. Conversely, the lower the gradient value, the blurrier the clarity of the image. The three-step scoring can more comprehensively reflect the quality of the image by combining multiple features of the image for comprehensive evaluation. Each step of scoring is based on different features and complements each other, avoiding the one-sidedness of single feature evaluation and making full use of the advantages of each scoring standard to comprehensively and accurately reflect the quality of the image.

[0019] like Figure 2 As shown, scanning the image to be evaluated, obtaining pixel information in the image to be evaluated, and constructing a pixel matrix according to each pixel information includes the following steps: S201, scanning and acquiring each pixel point in the image to be evaluated to construct a pixel matrix; S202, constructing an xy coordinate system with the lower left corner of the pixel matrix as the origin, the length direction of the pixel matrix as the x-axis direction, and the width direction of the pixel matrix as the y-axis direction, and two pixels close to each other have a scale of 1 on the coordinate axis; S203, using the pixel information of each pixel point to supplement the information of each point in the pixel matrix; It will be understood by those skilled in the art that scanning the image to be evaluated and obtaining information about each pixel in the image is the basis of image processing. By setting the scale of two pixels close to each other on the coordinate axis to 1, a unified metric is provided for the image, thereby reducing the steps of subsequent processing. Each pixel contains certain pixel information, and using this information to supplement the pixel matrix can ensure the integrity and accuracy of the pixel matrix. A complete pixel matrix provides more information for subsequent image processing, which helps to improve the processing effect.

[0020] like Figure 3 As shown, the method of obtaining abnormal pixels with large pixel value deviations in the pixel matrix, obtaining their number and position, and marking them, and performing preliminary scoring on the image to be evaluated based on the size of the pixel matrix and the number of abnormal pixels includes the following steps: S301, obtaining pixel information of each pixel in the pixel matrix; S302, locating the number and positions of abnormal pixels in the pixel matrix according to the pixel information, and marking them; S303, dividing the pixel matrix into multiple matrices A; S304, obtaining the number of pixels in matrix A; S305, evenly distribute the abnormal pixels to multiple matrices A according to the number of abnormal pixels, obtain the number of abnormal pixels in the matrix A after distribution, and perform preliminary scoring on the image to be evaluated; S306, when the number of abnormal pixels in matrix A is less than 10, score it as 90-100; S307, when the number of abnormal pixels in matrix A is between 10 and 30, score it between 60 and 89; S308, when the number of abnormal pixels in matrix A is between 30 and 60, score it as 30 to 59; S309, when the number of abnormal pixels in matrix A is between 60 and 90, score it between 0 and 29; S310, when the number of abnormal pixels in matrix A is greater than 90, score it as 0; Those skilled in the art can understand that marking abnormal pixels can clearly distinguish them from normal pixels, which facilitates subsequent processing and analysis. Dividing the pixel matrix into multiple small matrices A can more carefully analyze the distribution of abnormal pixels in different areas of the image. By evenly distributing abnormal pixels to multiple matrices A and calculating the number of abnormal points in each matrix A, it can ensure that the scoring of each area is based on the same standard, thereby achieving fair and objective evaluation. According to the number of abnormal pixels in matrix A, different scoring intervals are set to quantitatively evaluate the quality of the image. The scoring range is 90-100, which means that the image quality is very high and almost no abnormal pixels can be seen. The image is clear, with accurate colors and no significant defects or noise. The score range is 60-89, which means that the image quality is good, but some slight abnormal pixels or noise may be found upon careful observation, but these abnormal points usually do not have much impact on the overall visual effect. The score range is 30-59, which means that the image quality is average, there are obvious abnormal pixels or noise, and these abnormal points may affect the clarity and visual effect of the image. The score range is 0-29, which means that the image quality is poor, there are a large number of abnormal pixels or noise, and these abnormal points will significantly reduce the clarity and readability of the image, and may make the image content blurred or difficult to recognize. The score range is 0, which means that the image quality is extremely poor, almost the entire image is covered by abnormal pixels or noise, the image content is almost unrecognizable, and it loses its function as a carrier of visual information.

[0021] like Figure 4 As shown, filtering the image to be evaluated based on the pixel matrix and filling the position of the abnormal pixel points includes the following steps: S401, constructing a 3x3 matrix B with the abnormal pixel coordinates as the center; S402, performing mean calculation on matrix B to obtain pixel mean; S403, using the pixel mean to replace the pixel points with large pixel value deviation in matrix B; The mean calculation formula is: ; In the formula, is the mean value of the point after calculation; is the target pixel coordinate; Those skilled in the art can understand that, for each identified pixel with a large deviation, we construct a 3x3 matrix B with its coordinates as the center. This matrix contains the pixel and its 8 neighboring pixels around it. The 3x3 matrix is ​​selected because it is a smaller local area that can reflect the relationship between the pixel and its neighboring points. At the same time, the amount of calculation is relatively small. Using mean filling can significantly reduce the noise and outliers in the image, making the image look smoother and continuous, thereby realizing filtering of the image, preventing abnormal pixels from affecting subsequent processing steps, and after correcting the abnormal pixels, the robustness of the image to subsequent processing can be enhanced.

[0022] like Figure 5 As shown, the grayscale value of each pixel in the filtered image and the grayscale mean value in the pixel matrix include the following steps: S501, converting the filtered image into a grayscale image; S502, obtaining the gray value of each point in the gray image; S503, obtaining the grayscale mean of the grayscale image according to the grayscale value of each point; Among them, the calculation formula of grayscale mean is: ; In the formula, is the grayscale mean, The grayscale image Row, No. The coordinates of the columns of pixels, The grayscale image Row, No. The gray value of the pixel. is the number of pixels in the grayscale image; Those skilled in the art will appreciate that by converting the filtered image into a grayscale image, the image originally containing color information can be simplified into a grayscale image containing only brightness information, thereby greatly reducing the complexity and computational complexity of image processing. A grayscale image represents pixels with a single brightness value, so that subsequent processing can be performed based on a unified standard, avoiding possible interference caused by color information. By calculating the grayscale mean based on the grayscale value of each point in the grayscale image, the overall brightness of the image can be quantitatively evaluated, and obtaining the grayscale mean provides a basis for subsequent steps.

[0023] like Figure 6 As shown, the grayscale standard deviation of each pixel is obtained based on the grayscale mean and the grayscale value of the pixel, and the grayscale variance is obtained at the same time, and the secondary scoring of the image to be evaluated based on the grayscale variance includes the following steps: S601, obtaining the grayscale standard deviation of each pixel according to the grayscale mean and the grayscale value of the pixel; S602, obtaining a standard deviation mean value according to the grayscale standard deviation of each pixel point; S603, obtaining the grayscale variance in the grayscale image according to the standard deviation mean; S604, obtaining grayscale value variances of a large number of grayscale images, and constructing a variance range based on the large number of grayscale value variances; S605, constructing a first threshold and a second threshold according to the variance range, and performing a secondary scoring on the image to be evaluated according to the first threshold and the second threshold; S606, if the grayscale variance is less than the first threshold, score it as 90-100; S607, if the grayscale variance is between the first threshold and the second threshold, score it as 40-89; S608, if the grayscale variance is greater than the second threshold, score it as 0-39; Among them, the calculation formula of grayscale standard deviation is: ; The calculation formula for the standard deviation mean is: ; Among them, the calculation formula of grayscale variance is: ; In the formula, The grayscale image Row, No. The grayscale standard deviation of the column pixels, is the mean grayscale standard deviation in the grayscale image, is the grayscale variance of the grayscale image; It can be understood by those skilled in the art that by calculating the grayscale standard deviation of each pixel and obtaining the mean of these standard deviations, the discrete degree of the grayscale value in the image, that is, the drastic degree of the grayscale change of the image, can be quantified. Further calculating the grayscale variance of the grayscale image based on the mean of the standard deviation can more comprehensively reflect the distribution characteristics and degree of change of the grayscale value of the image. By collecting and analyzing the grayscale value variance of a large number of grayscale images, a reasonable variance range can be constructed. This range represents the normal or expected degree of grayscale change. According to the set first threshold and second threshold, the grayscale variance of the image to be evaluated is scored twice. The quality of the image can be intuitively judged through the scoring results. The grayscale variance can sensitively reflect the quality change of the image before and after compression, transmission, enhancement and other processing. The scoring range is 90-100, which means that the grayscale distribution of the image is very uniform and the difference between the pixel values ​​is small. The scoring range is 40-89, which means that the grayscale distribution of the image has a certain degree of discreteness, but is still within an acceptable range. The scoring range is 0-39, which means that the grayscale distribution of the image is very uneven and the difference between the pixel values ​​is large.

[0024] like Figure 7 As shown, the method of obtaining the image edge features by using the Sobel operator and obtaining the image edge gradient value at the same time, and scoring the image to be evaluated three times according to the image edge gradient value includes the following steps: S701, combining the grayscale values ​​of each pixel point, and taking the origin as the starting point, performing convolution calculations on each point in the image along the x-axis and y-axis directions, respectively, to obtain the gradients of multiple pixel points on the x-axis and y-axis; S702, combining the gradients of the pixel points on the x-axis and the y-axis to calculate the gradient values ​​of the multiple pixel points; S703, calculating a gradient mean value based on the gradient values ​​of multiple pixel points; S704, obtaining a gradient range, constructing a high threshold, a middle threshold and a low threshold according to the gradient range, and scoring the image to be evaluated three times in combination with the gradient mean; S705, if the gradient mean is higher than the high threshold, score it as 90-100; S706, if the gradient mean is between the high threshold and the middle threshold, score it as 70-89; S707, if the gradient mean is between the middle threshold and the low threshold, score it as 30-69; S708, if the gradient mean is lower than the low threshold, score it from 0 to 29; Among them, the convolution formula of the x-axis is: ; Among them, the convolution formula of the y-axis is: ; The gradient calculation formula is: ; The gradient mean calculation formula is: ; In the formula, Represents the gray value of the pixel; and is the x-axis and the approximate value of the axis gradient at this point; is the gradient at that point, represents the mean gradient; It can be understood by those skilled in the art that for each pixel in the image, based on its grayscale value, convolution calculation is performed along the x-axis and y-axis directions respectively using the convolution kernel. Through the convolution calculation, we can obtain the gradient value of each pixel in the x-axis and y-axis directions. These gradient values ​​reflect the drastic degree of grayscale change of the image at that point. The gradient value of the point is calculated by the Pythagorean theorem, and the gradients in the two directions are combined into a comprehensive gradient value for subsequent analysis. After obtaining the gradient values ​​of all pixels, we calculate the mean of these gradient values. The mean gradient reflects the average degree of grayscale change of the entire image. The scoring range is 90-100, indicating that the image grayscale changes very drastically and may contain rich edge or texture information. The scoring range is 70-89, indicating that the image grayscale changes more drastically, but still maintains a certain degree of smoothness. The scoring range is 30-69, indicating that the image grayscale changes moderately, may contain some edge or texture information, but is relatively smooth overall. The scoring range is 0-29, indicating that the image grayscale changes very gently and contains almost no obvious edge or texture information.

[0025] like Figure 8 As shown, the processing of the preliminary scoring, the secondary scoring and the tertiary scoring to obtain the overall quality evaluation of the image to be evaluated includes the following steps: S801, extracting the results of the initial scoring, secondary scoring and tertiary scoring of the image to be evaluated, and summing them to obtain an overall scoring score; S802, respectively obtain the scoring ranges of the preliminary scoring, the secondary scoring, and the tertiary scoring, and sum them to obtain the overall scoring range; S803, obtaining the proportion of the overall score in the overall scoring range; S804, evaluating the quality of the image to be evaluated according to the range proportion; Those skilled in the art will appreciate that a comprehensive overall scoring score can be obtained by extracting and summing the results of the preliminary scoring, the secondary scoring, and the tertiary scoring. This score is a comprehensive and quantitative evaluation of the image quality and can reflect the performance of the image in multiple aspects. The overall scoring range can be obtained by summing the scoring ranges of the preliminary scoring, the secondary scoring, and the tertiary scoring. This range defines the highest and lowest possible scores that the image quality may achieve, and provides a clear reference for evaluating image quality. The proportion of the overall scoring score in the overall scoring range, that is, the ratio of the overall scoring score to the maximum value of the overall scoring range, can more accurately reflect the position of the image quality in the overall evaluation. The use of a unified evaluation system and standards for calculation and comparison can improve the consistency between different evaluators and make the evaluation results more reliable and convincing.

[0026] like Fig. 9As shown, a terahertz-based image quality evaluation system is proposed, which is used to implement the above-mentioned terahertz-based image quality evaluation method, including: Control module: The control module is used for data transmission within the system; Terahertz scanning module: The terahertz scanning module is used to scan an object and form an image; Image processing module: The image processing module is used to perform grayscale processing on the image; Image analysis module: The image analysis module is used to analyze the image and obtain image information; Data analysis module: The data analysis module is used to analyze image information and various data in the system; Power supply module: The power supply module is used to supply power to the system.

[0027] A non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned terahertz-based image quality assessment method.

[0028] In summary, the advantages of the present invention are: by setting three levels of evaluation results, namely, preliminary scoring, secondary scoring and tertiary scoring, the initial scoring corresponds to image noise, the secondary scoring corresponds to image clarity, and the tertiary scoring corresponds to image edge features. The noise score can quantify the random error in the image, the clarity score can reflect the degree of retention of image details, and the edge feature score can reveal the clarity of the contours and boundaries of objects in the image. Through the scoring of these three dimensions, a comprehensive and integrated evaluation of image quality can be carried out. The scoring of noise, clarity and edge features are all based on quantitative indicators, which makes the evaluation criteria objective and can reproduce imaging in the air for immersive teaching.

[0029] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.

Claims

1. A terahertz-based image quality evaluation method, characterized in that: include: Scan the object through terahertz to obtain the image to be evaluated; Scan the image to be evaluated, obtain pixel information in the image to be evaluated, and construct a pixel matrix based on the information of each pixel; Obtain abnormal pixels with large pixel value deviations in the pixel matrix, obtain their number and location, mark them, and perform a preliminary score on the image to be evaluated based on the size of the pixel matrix and the number of abnormal pixels; Filter the image to be evaluated according to the pixel matrix and fill in the locations of abnormal pixels; Obtain the grayscale value of each pixel in the filtered image and obtain the grayscale mean value in the pixel matrix; According to the grayscale mean and the grayscale value of the pixel, the grayscale standard deviation of each pixel is obtained, and the grayscale variance is obtained at the same time, and the image to be evaluated is scored twice according to the grayscale variance; The Sobel operator is used to obtain the image edge features and the image edge gradient value. The image to be evaluated is scored three times according to the image edge gradient value. The preliminary scoring, the secondary scoring and the tertiary scoring are processed to obtain the overall quality evaluation of the image to be evaluated.

2. The terahertz-based image quality evaluation method according to claim 1, characterized in that: The scanning of the image to be evaluated, obtaining pixel information in the image to be evaluated, and constructing a pixel matrix according to the information of each pixel point comprises the following steps: Scan and obtain each pixel point in the image to be evaluated to construct a pixel matrix; An xy coordinate system is constructed with the lower left corner of the pixel matrix as the origin, the length direction of the pixel matrix as the x-axis, and the width direction of the pixel matrix as the y-axis. The scale of two pixels close to each other is 1 on the coordinate axis. The pixel information of each pixel point is used to supplement the information of each point in the pixel matrix.

3. The terahertz-based image quality evaluation method according to claim 2, characterized in that: The method of obtaining abnormal pixels with large pixel value deviations in the pixel matrix, obtaining the number and position of the abnormal pixels, marking the abnormal pixels, and performing a preliminary scoring of the image to be evaluated based on the size of the pixel matrix and the number of abnormal pixels includes the following steps: Get pixel information of each pixel in the pixel matrix; Locate the number and position of abnormal pixels in the pixel matrix based on pixel information and mark them; Dividing the pixel matrix into multiple matrices A; Get the number of pixels in matrix A; According to the number of abnormal pixels, they are evenly distributed to multiple matrices A, the number of abnormal pixels after distribution in matrix A is obtained, and a preliminary score is given to the image to be evaluated; When the number of abnormal pixels in matrix A is less than 10, it is scored as 90-100; When the number of abnormal pixels in matrix A is between 10 and 30, the score is 60 to 90; When the number of abnormal pixels in matrix A is between 30 and 60, the score is 30-60; When the number of abnormal pixels in matrix A is between 60 and 90, it is scored between 0 and 30; When the number of abnormal pixels in matrix A is greater than 90, it is scored as 0.

4. The terahertz-based image quality evaluation method according to claim 3, characterized in that: The filtering process of the image to be evaluated according to the pixel matrix and filling the positions of abnormal pixels comprises the following steps: Construct a 3x3 matrix B with the abnormal pixel coordinates as the center; Perform mean calculation on matrix B to obtain pixel mean; Use the pixel mean to replace the pixels with large pixel value deviation in matrix B; The mean calculation formula is: ; In the formula, is the mean value of the point after calculation; is the target pixel coordinate.

5. The terahertz-based image quality evaluation method according to claim 4, characterized in that: The step of obtaining the grayscale value of each pixel in the filtered image and obtaining the grayscale mean value in the pixel matrix comprises the following steps: Convert the filtered image into a grayscale image; Get the gray value of each point in the gray image; Obtain the grayscale mean of the grayscale image according to the grayscale value of each point; Among them, the calculation formula of grayscale mean is: ; In the formula, is the grayscale mean, The grayscale image Row, No. The coordinates of the columns of pixels, The grayscale image Row, No. The gray value of the pixel. is the number of pixels in the grayscale image.

6. The terahertz-based image quality evaluation method according to claim 5, characterized in that: The method of obtaining the grayscale standard deviation of each pixel point based on the grayscale mean and the grayscale value of the pixel point, and obtaining the grayscale variance at the same time, and performing secondary scoring on the image to be evaluated based on the grayscale variance includes the following steps: According to the grayscale mean and the grayscale value of the pixel, the grayscale standard deviation of each pixel is obtained; According to the grayscale standard deviation of each pixel, the mean of the standard deviation is obtained; According to the mean of standard deviation, the grayscale variance in the grayscale image is obtained; Obtain the grayscale value variances of a large number of grayscale images, and construct the variance range based on the large number of grayscale value variances; Constructing a first threshold and a second threshold according to the variance range, and performing a secondary scoring on the image to be evaluated according to the first threshold and the second threshold; If the grayscale variance is less than the first threshold, it is scored as 90-100; If the grayscale variance is between the first threshold and the second threshold, it is scored as 40-89; If the grayscale variance is greater than the second threshold, it is scored as 0-39; Among them, the calculation formula of grayscale standard deviation is: ; The calculation formula for the standard deviation mean is: ; Among them, the calculation formula of grayscale variance is: ; In the formula, The grayscale image Row, No. The grayscale standard deviation of the column pixels, is the mean value of grayscale standard deviation in grayscale image, is the grayscale variance of the grayscale image.

7. The terahertz-based image quality evaluation method according to claim 6, characterized in that: The method of obtaining the image edge features by using the Sobel operator and obtaining the image edge gradient value at the same time, and scoring the image to be evaluated three times according to the image edge gradient value comprises the following steps: Combine the grayscale values ​​of each pixel point, and perform convolution calculations on each point in the image along the x-axis and y-axis directions with the origin as the starting point to obtain the gradients of multiple pixel points on the x-axis and y-axis; Combine the gradients of the pixels on the x-axis and y-axis to calculate the gradient values ​​of multiple pixels; Calculate the gradient mean based on the gradient values ​​of multiple pixels; Get the gradient range, construct the high threshold, middle threshold and low threshold according to the gradient range, and score the image to be evaluated three times based on the gradient mean; If the mean gradient is higher than the high threshold, it is scored as 90-100; If the gradient mean is between the high threshold and the medium threshold, it is scored as 70-89; If the gradient mean is between the medium threshold and the low threshold, it is scored 30-69; If the mean gradient is lower than the low threshold, it is scored 0-29; Among them, the convolution formula of the x-axis is: ; Among them, the convolution formula of the y-axis is: ; The gradient calculation formula is: ; The gradient mean calculation formula is: ; In the formula, Represents the gray value of the pixel; and is the x-axis and the approximate value of the axis gradient at this point; is the gradient at that point, represents the mean gradient.

8. The terahertz-based image quality evaluation method according to claim 6, characterized in that: The processing of the preliminary scoring, the secondary scoring and the tertiary scoring to obtain the overall quality evaluation of the image to be evaluated includes the following steps: Extract the results of the initial scoring, secondary scoring, and tertiary scoring of the image to be evaluated, and sum them up to obtain the overall scoring score; The scoring ranges of the preliminary scoring, the secondary scoring and the tertiary scoring are obtained respectively, and the sum of the scores is calculated to obtain the overall scoring range; Get the proportion of the overall score in the overall scoring range; The quality of the image to be evaluated is evaluated based on the range ratio.

9. A terahertz-based image quality assessment system, used to implement the terahertz-based image quality assessment method as described in claims 1-8, characterized in that: include: Control module: The control module is used for data transmission within the system; Terahertz scanning module: The terahertz scanning module is used to scan an object and form an image; Image processing module: The image processing module is used to perform grayscale processing on the image; Image analysis module: The image analysis module is used to analyze the image and obtain image information; Data analysis module: The data analysis module is used to analyze image information and various data in the system; Power supply module: The power supply module is used to supply power to the system.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method and device for evaluating image quality

    CN106204524A

  • Certificate picture definition evaluation method

    CN110335246A

  • Image quality evaluation method and device, electronic equipment and readable storage medium

    CN117576049A

  • Infrared image quality evaluation method, device, and storage medium

    WO2022152107A1