Image picture quality evaluation method and system, storage medium and electronic equipment
By acquiring and analyzing the characteristic corner points and vectors of video images, combining Harris and SIFT algorithms, the problem of insufficient monitoring capabilities for fine picture abnormalities in the prior art is solved, and accurate evaluation and monitoring of image picture quality is achieved.
Patent Information
- Application Number
- CN202411325520.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art lacks sensitivity and analysis capabilities for subtle picture abnormalities in video picture quality monitoring, making it difficult to achieve accurate image picture monitoring and evaluation, especially when encountering abnormal scaling, displacement, distortion or blur of the picture.
By obtaining the feature corner points and feature vectors of the source image and the target image, determining the position relationship, performing random sampling and remapping of the mapped point matrix, calculating the minimum deviation value, using Harris corner points and SIFT algorithm, combining it with the stochastic gradient descent method to process complex Deform, generate evaluation values.
It significantly improves the accuracy and robustness of image quality evaluation, can accurately capture the displacement and stretch changes of the image during playback, and promptly detect abnormal deformation or quality degradation in the picture.
Smart Images

Figure CN119273645A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image quality assessment method, system, storage medium and electronic device. Background Art
[0002] In the field of modern television broadcasting, ensuring broadcast safety is one of the core tasks of TV station operations. High-quality video images are not only related to the audience's viewing experience, but also a direct reflection of the professionalism and reliability of the TV station.
[0003] The video picture quality monitoring methods in the related art mainly rely on detecting obvious broadcast failures such as black fields or static frames. This method is effective in identifying serious broadcast interruptions or signal loss. By analyzing whether there is a completely black screen or a picture that remains unchanged for a long time in the video stream, the system can quickly capture these obvious broadcast anomalies and issue an alarm in time. However, with the continuous advancement of television production technology and the continuous improvement of audience requirements for picture quality, when encountering problems such as abnormal scaling, displacement, distortion or blurring of the picture, the video picture quality monitoring methods in the related art lack the sensitivity and analysis capabilities to subtle picture anomalies, making it difficult to achieve accurate image monitoring and evaluation. Summary of the invention
[0004] The present application provides an image quality assessment method, system, storage medium and electronic device, which can achieve accurate assessment of image quality.
[0005] In a first aspect, the present application provides a method for evaluating image quality, the method comprising: Respectively obtain a first characteristic corner point of a source image and a second characteristic corner point of a target image, determine a first characteristic vector corresponding to the source image and a second characteristic vector corresponding to the target image, wherein the target image is an image of the source image after displacement and / or stretching; Determine, according to the first feature vector and the second feature vector, a positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image; Randomly sample the screen to be evaluated to obtain a sampling matrix corresponding to the screen to be evaluated; The sampling matrix is remapped according to the positional relationship to obtain a mapping point matrix corresponding to the picture to be evaluated; the minimum deviation value within a preset range around each mapping point in the mapping point matrix is calculated, and the second number of target mapping points whose minimum deviation value is greater than a preset threshold is used as the percentage of the total number of mapping points as the evaluation value of the picture to be evaluated.
[0006] By adopting the above technical solution, the first characteristic corner point of the source image and the second characteristic corner point of the target image are obtained, and the corresponding first characteristic vector and second characteristic vector are determined, and the precise positional relationship is determined. It is used to capture the displacement and / or stretching changes that may occur in the image during playback. Then, the random sampling points of the image to be evaluated can be accurately mapped back to its ideal state, that is, the corresponding source image position, by using the positional relationship, so as to generate a mapping point matrix, effectively mapping the points in the image to be evaluated to its corresponding source image position, thereby cleverly avoiding the difficulty of directly evaluating the possible deformed image, and instead evaluating the source image state that is theoretically not affected by these deformations, significantly improving the accuracy of the evaluation.
[0007] Optionally, respectively acquiring a first characteristic corner point of a source image and a second characteristic corner point of a target image, and determining a first characteristic vector corresponding to the source image and a second characteristic vector corresponding to the target image, comprises: Performing Harris corner point calculation on the source image and the target image respectively to determine the first characteristic corner point of the source image and the second characteristic corner point of the target image; The first feature corner point and the second feature corner point are respectively calculated using the SIFT algorithm to obtain a first feature vector corresponding to the source image and a second feature vector corresponding to the target image.
[0008] By adopting the above technical solutions, the Harris corner detection algorithm has the characteristics of rotation invariance and insensitivity to brightness changes, ensuring that key feature points can be accurately located after the image is displaced or stretched. The scale invariance and rotation invariance characteristics of the SIFT algorithm enable the generated feature vector to accurately describe the local image structure around the feature point, and remain stable even when the image is scaled, rotated or the perspective changes. This combination of feature extraction and description methods can improve the accuracy and robustness of feature matching.
[0009] Optionally, determining the positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image according to the first feature vector and the second feature vector includes: Performing cross calculation on the first eigenvector and the second eigenvector to obtain a distance matrix between the first feature corner point and the corresponding second feature corner point; Sort the elements in the distance matrix in ascending order according to the distance values, and determine the first number of elements in the distance matrix as target elements; The positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image is determined according to the target element.
[0010] By adopting the above technical solution, the distance matrix is generated by cross-calculating the first eigenvector and the second eigenvector, which effectively quantifies the similarity between the first feature corner point in the source image and the second feature corner point in the target image. Therefore, it is possible to accurately capture the transformation characteristics such as displacement and stretching between images, and effectively deal with complex situations such as local distortion and non-uniform deformation. Since only the most similar feature point pairs are used to determine the positional relationship, this solution significantly improves the accuracy and robustness of subsequent remapping and quality assessment, and is particularly suitable for scenarios that require accurate assessment of image quality changes, such as real-time picture monitoring in television broadcasting.
[0011] Optionally, determining, according to the target element, a positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image includes: Using the target element mapping, obtain a first matrix corresponding to the source image and a second matrix corresponding to the target image, wherein the vector dimension of the first matrix is the first number, and the vector dimension of the second matrix is the first number; A deviation matrix between the source image and the target image is set, wherein the vector dimension of the deviation matrix is the first number; and a positional relationship between each first feature corner point in the source image and each corresponding second feature corner point in the target image is determined based on the first matrix, the second matrix and the deviation matrix.
[0012] By adopting the above technical solution and introducing the deviation matrix, the method can accurately capture the local deformation and overall displacement between the source image and the target image. The positional relationship between each first characteristic corner point in the source image and each second characteristic corner point in the target image is determined according to the first matrix, the second matrix and the deviation matrix, so that the scheme can fully and accurately describe the characteristics of the image transformation.
[0013] Optionally, determining the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image according to the first matrix, the second matrix and the deviation matrix includes: using a stochastic gradient descent method to calculate a translation matrix and a transformation matrix corresponding to when the product of the deviation matrix is minimized; According to the first matrix, the second matrix, the translation matrix and the transformation matrix, an image transformation formula is used to calculate the positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image.
[0014] By adopting the above technical solutions, the application of stochastic gradient descent method enables the calculation process to effectively handle high-dimensional parameter space and achieve a good balance between calculation efficiency and optimization effect. By minimizing the product of the deviation matrix, this method can find the optimal translation matrix and transformation matrix, thereby accurately capturing complex deformations such as translation and scaling in image transformation. This optimization process can not only handle global displacement and stretching, but also adapt to local nonlinear deformation, improving the accuracy and robustness of positional relationship determination.
[0015] Optionally, the calculating, according to the first matrix, the second matrix, the translation matrix and the transformation matrix, the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image using an image transformation formula includes: Substituting the first matrix, the second matrix, the translation matrix and the transformation matrix into the image transformation formula, to obtain the positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image; The image change formula is: W×A T +D=B T ; Where W represents the transformation matrix, A T represents the transpose of the first matrix, corresponding to the coordinates of the first feature corner point, D represents the translation matrix, B T represents the transpose of the second matrix, corresponding to the coordinates of the second feature corner point.
[0016] By adopting the above technical solution, not only can the transformation process from source image to target image be accurately quantified, but also various complex image distortion situations can be effectively handled. Especially in application scenarios that require real-time evaluation of picture quality changes, such as TV broadcasting, this position relationship calculation method based on precise mathematical formulas can quickly provide a highly reliable evaluation basis. It significantly improves the accuracy and efficiency of picture quality monitoring.
[0017] Optionally, calculating the minimum deviation value within a preset range around each mapping point in the mapping point matrix, and taking the percentage of the second number of target mapping points whose minimum deviation value is greater than a preset threshold to the total number of mapping points as the evaluation value of the picture to be evaluated, includes: Calculating a minimum deviation value within a preset range around each mapping point in the mapping point matrix, wherein the preset range is a square range centered at the mapping point; Compare the minimum deviation value with the preset threshold, determine the mapping points whose minimum deviation value is greater than the preset threshold as target mapping points, and record the number of the target mapping points as a second number; The percentage of the second number to the total number of mapping points is calculated to obtain an evaluation value of the picture to be evaluated, where the second number is the total number of mapping points.
[0018] By adopting the above technical solution, by calculating the minimum deviation value within a preset range around each mapping point in the mapping point matrix, the local deformation and quality change in the picture to be evaluated are effectively captured. The setting of a square range centered on the mapping point ensures a comprehensive analysis of the area around each mapping point, improving the accuracy and representativeness of the evaluation. By comparing the minimum deviation value with a preset threshold and determining the mapping points exceeding the threshold as target mapping points, this method can accurately identify areas in the picture where quality has significantly degraded. The number of target mapping points is recorded as the second number, and its percentage of the total number of mapping points is calculated to obtain the evaluation value of the picture to be evaluated. This quantitative method can promptly detect abnormal deformation or quality degradation in the picture.
[0019] In a second aspect, the present application provides an image quality assessment system, the system comprising: A feature vector determination module, used to respectively obtain a first feature corner point of a source image and a second feature corner point of a target image, and determine a first feature vector corresponding to the source image and a second feature vector corresponding to the target image, wherein the target image is an image of the source image after displacement and / or stretching; a position relationship determination module, used to determine the position relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image according to the first feature vector and the second feature vector; A sampling module, used to randomly sample the screen to be evaluated to obtain a sampling matrix corresponding to the screen to be evaluated; A mapping point matrix determination module, used to remap the sampling matrix according to the position relationship to obtain a mapping point matrix corresponding to the picture to be evaluated; The evaluation module is used to calculate the minimum deviation value within a preset range around each mapping point in the mapping point matrix, and take the percentage of the second number of target mapping points whose minimum deviation value is greater than a preset threshold to the total number of mapping points as the evaluation value of the picture to be evaluated.
[0020] In a third aspect, the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing any one of the above methods.
[0021] In a fourth aspect, the present application provides an electronic device, comprising a processor, a memory and a transceiver, wherein the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs any one of the methods described above.
[0022] In summary, the beneficial effects brought about by the technical solution of this application include: By obtaining the first characteristic corner point of the source image and the second characteristic corner point of the target image, the corresponding first characteristic vector and the second characteristic vector are determined, and the precise positional relationship is determined. It is used to capture the displacement and / or stretching changes that may occur in the image during playback. Then, the positional relationship can be used to accurately map the random sampling points of the image to be evaluated back to its ideal state, that is, the corresponding source image position, thereby generating a mapping point matrix, effectively mapping the points in the image to be evaluated to its corresponding source image position, thereby cleverly avoiding the difficulty of directly evaluating the possible deformed image, and instead evaluating the source image state that is theoretically not affected by these deformations, significantly improving the accuracy of the evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flowchart of an image quality assessment method according to an embodiment of the present application; Figure 2 is a schematic diagram of generating a first feature vector provided in an embodiment of the present application; Figure 3 is a schematic diagram of generating a second eigenvector provided in an embodiment of the present application; Figure 4 is a structural schematic diagram of an image quality assessment system according to an embodiment of the present application; Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0024] Description of reference numerals: 500, electronic device; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0026] In the description of the embodiments of the present application, words such as "illustrative", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "illustrative", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "illustrative", "for example" or "for example" is intended to present related concepts in a specific way.
[0027] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0028] See also Figure 1 , is a flow chart of an image quality assessment method provided in an embodiment of the present application. The method can be implemented by a computer program, can be implemented by a single-chip microcomputer, or can be run on an image quality assessment system based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The specific steps of the image quality assessment method are described in detail below.
[0029] S101: respectively obtaining first characteristic corner points of a source image and second characteristic corner points of a target image, and determining a first characteristic vector corresponding to the source image and a second characteristic vector corresponding to the target image, wherein the target image is an image after the source image is displaced and / or stretched.
[0030] The first feature corner point refers to a point with significant features detected in the source image. In the embodiment of the present application, it can be understood as a pixel point with obvious local features identified in the source image. These feature corner points are used to characterize the local structural features of the source image, providing a basis for subsequent feature matching and image quality assessment.
[0031] The second feature corner point refers to a point with significant features detected in the target image. In the embodiment of the present application, it can be understood as a pixel point with obvious local features identified in the target image. The target image is an image of the source image after displacement and / or stretching, so the second feature corner point has a corresponding relationship with the first feature corner point, but the position has changed.
[0032] Among them, the first feature vector refers to a multidimensional vector set obtained after feature extraction of the feature corner points detected in the source image. In the embodiment of the present application, it can be understood as a multidimensional vector obtained after feature description of each detected feature corner point in the source image, and the number of these vectors is the same as the number of detected feature corner points. Each vector contains local image feature information of the area around the corresponding feature corner point. The first feature vector is used to accurately describe the structure and texture features of the area around each feature corner point, including but not limited to information such as gradient direction and gradient magnitude.
[0033] Among them, the second feature vector refers to a multidimensional vector set obtained after feature extraction of the feature corner points detected in the target image. In the embodiment of the present application, it can be understood as a multidimensional vector obtained after feature description of each second feature corner point detected in the target image, and the number of these vectors is the same as the number of second feature corner points detected. Each vector contains local image feature information of the area surrounding the corresponding second feature corner point. The second feature vector is used to accurately describe the structure and texture features of the area surrounding each feature corner point in the target image, including but not limited to information such as gradient direction and gradient magnitude.
[0034] The target image refers to an image that has been transformed, and is the result of a certain degree of transformation of the source image. In the embodiment of the present application, it can be understood as an image generated after the source image has been transformed by a displacement, scaling, or other transformation operations. The target image is used for comparative analysis with the source image to determine the change in the positional relationship between the two images.
[0035] In this embodiment, it is necessary to first obtain the first characteristic corner point of the source image and the second characteristic corner point of the target image, and determine the first characteristic vector corresponding to the source image and the second characteristic vector corresponding to the target image. The purpose of this step is to establish the correspondence between the source image and the target image, so as to accurately quantify the degree of image transformation. The target image is the image obtained after the source image is displaced and / or stretched. By analyzing the characteristic points and characteristic vectors of these two images, the parameters of the image transformation can be accurately calculated.
[0036] In the specific implementation, feature corner detection is first performed on the source image and the target image respectively. This can be done by using a corner detection algorithm to identify significant feature points in the image. These feature points are usually pixels with obvious local features such as corners and contour intersections in the image. For the source image, the detected feature points are called the first feature corner points; for the target image, the detected feature points are called the second feature corner points.
[0037] Next, for each detected feature corner point, the corresponding feature vector is calculated. This step usually uses a feature description algorithm to generate a multidimensional vector for each feature point. This vector describes the gradient information of the area around the feature point and is rotationally invariant and scale invariant. For the first feature corner point of the source image, the calculated vector set is called the first feature vector; for the second feature corner point of the target image, the calculated vector set is called the second feature vector.
[0038] Based on the above embodiment, as an optional implementation, step S101 also includes S1011-S1012.
[0039] S1011: Perform Harris corner point calculation on the source image and the target image respectively to determine the first characteristic corner point of the source image and the second characteristic corner point of the target image.
[0040] The core idea of the Harris corner detection algorithm is to calculate the grayscale changes in the local area of the image in all directions. For each pixel in the image, consider the small window around it and calculate the grayscale gradient of the window in the x and y directions. Then, construct a 2x2 matrix M whose elements consist of the product of the gradients. By analyzing the eigenvalues of the matrix M, it can be determined whether the point is a corner point. If both eigenvalues are large, it means that the point has significant grayscale changes in all directions, so it can be identified as a corner point. For the source image, calculate the R value of each pixel, and select the point with a larger R value as the first feature corner point. The same process is also applied to the target image, and the resulting corner point is called the second feature corner point.
[0041] In this way, a series of stable feature points can be identified in the source image and the target image respectively. They are usually distributed in the prominent feature areas of the image, such as the corners of objects or areas with rich textures, which makes them easier to track and match. After the calculation of the corner points, the values of these points can be made rotationally invariant / scale-invariant and insensitive to changes in brightness and contrast. Secondly, due to the high computational efficiency of the Harris corner detection algorithm, a large amount of image data can be processed quickly.
[0042] S1012: Perform SIFT calculations on the first feature corner points and the second feature corner points respectively to obtain a first feature vector corresponding to the source image and a second feature vector corresponding to the target image.
[0043] See also Figure 2 , which is a schematic diagram of generating a first eigenvector provided in an embodiment of the present application. Figure 2 The image on the left is the source image. Figure 2 The circle in the middle marks the first feature corner point detected. These corner points are usually significant features in the image, such as edges, corners, or areas with rich textures. The arrows indicate the mapping relationship from each feature corner point to the corresponding feature vector. This process represents the process by which the SIFT algorithm analyzes and describes the area around each feature corner point. The matrix on the right shows the feature vectors calculated by the SIFT algorithm. Each row represents the feature vector of a feature point, and there are n rows in total, corresponding to the n feature corner points detected in the image. Among them, x(1) = (x1(1), x2(1), ..., x256(1)) represents the feature vector of the first feature point; x(n) = (x1(n), x2(n), ..., x256(n)) represents the feature vector of the nth feature point.
[0044] See also Figure 3 , which is a schematic diagram of generating a second eigenvector provided in an embodiment of the present application. Figure 3 The image on the left in the middle is the target image, which is displaced and slightly deformed compared to the previous source image. Figure 3 The circles in the middle mark the detected second feature corner points. These corner points represent the locations of the salient features in the target image. The arrows indicate the mapping relationship from each second feature corner point to the corresponding second feature vector. This process represents the process by which the SIFT algorithm analyzes and describes the area around each second feature corner point. The matrix on the right shows the second feature vectors calculated by the SIFT algorithm. Each row represents the feature vector of a feature point, and there are m rows in total, corresponding to the m second feature corner points detected in the target image. Among them, y(1)=(y1(1), y2(1), ..., y256(1)) represents the feature vector of the first second feature point; y(m)=(y1(m), y2(m), ..., y256(m)) represents the feature vector of the mth second feature point. Each second feature vector is also 256-dimensional, consistent with the first feature vector of the source image. These 256 values also describe the gradient information of the area around the feature point, including the direction and magnitude of the gradient. These second feature vectors provide a unique description for each feature point in the target image. They will be used to compare and match with the first eigenvector of the source image to determine the correspondence between the two images.
[0045] In the specific implementation, the SIFT algorithm is first applied to each first feature corner point in the source image. The calculation process of the SIFT algorithm includes the following main steps: First, a local coordinate system is defined around the feature corner point, and then the direction and amplitude of the image gradient are calculated in this coordinate system. Next, these gradient information are summarized into a 256-dimensional vector. This vector is the SIFT descriptor of the feature corner point, which is also called the first eigenvector. Repeating this process for all the first feature corner points in the source image, a set of first eigenvectors are obtained, each vector corresponding to a feature corner point. The same process is also applied to the second feature corner points of the target image, and a set of second eigenvectors are calculated. In this way, a highly descriptive feature vector is generated for each feature corner point in the source image and the target image.
[0046] S102: Determine, based on the first eigenvector and the second eigenvector, a positional relationship between each first eigencorner point in the source image and each second eigencorner point in the corresponding target image.
[0047] In this embodiment, in order to establish an accurate correspondence between the feature points of the source image and the target image, the degree and nature of the image transformation can be accurately quantified. In the specific implementation, each first feature corner point in the source image is first connected to the most similar second feature corner point in the target image. This connection reflects the position change of the feature point before and after the image transformation. For each first feature vector in the source image, the most similar one is found among all the second feature vectors of the target image. The judgment of similarity is usually based on the distance measurement between the feature vectors. In this way, the most matching second feature corner point in the target image can be found for each first feature corner point in the source image, thereby establishing a correspondence between the feature points.
[0048] Based on the above embodiment, as an optional implementation, step S102 specifically also includes S201-S203.
[0049] S201: performing cross calculation on the first eigenvector and the second eigenvector to obtain a distance matrix between the first eigencorner point and the corresponding second eigencorner point.
[0050] Among them, the distance matrix is used to quantify the similarity between the first feature corner point in the source image and the second feature corner point in the target image. The distance matrix refers to a two-dimensional array in which each element represents the distance or similarity between a pair of feature points. Each element in the distance matrix represents the distance between the first eigenvector of a first feature corner point in the source image and the second eigenvector of a second feature corner point in the target image. This distance can be calculated using an appropriate distance metric. A smaller distance value indicates that the two feature points are more similar, while a larger distance value indicates that they are less similar.
[0051] Specifically, the mean square error (MSE) algorithm is used to calculate the median distance in the distance matrix, and the distance matrix is as follows: In this matrix, each element dx in matrix S (n) y (n) Represents the mean square error distance between the nth first eigenvector and the nth second eigenvector. The mean square error (MSE) algorithm can effectively reflect the overall difference between two eigenvectors. It is sensitive to the difference of each component in the eigenvector, and can also balance the influence of each component to provide a comprehensive similarity measure. By constructing such a distance matrix, the similarity relationship between all feature points in the source image and the target image can be comprehensively evaluated.
[0052] In the specific implementation, the mean square error (MSE) algorithm is used to calculate each element in the distance matrix. The structure of the distance matrix is a two-dimensional array, the number of rows corresponds to the number of first feature corner points in the source image, and the number of columns corresponds to the number of second feature corner points in the target image. Each element in the matrix represents the mean square error distance between a pair of eigenvectors. During the calculation process, each first eigenvector in the source image is compared with each second eigenvector in the target image. For each pair of eigenvectors, the square of the difference between their corresponding components is calculated, and then the average of these square differences is calculated. This calculation method can effectively reflect the overall degree of difference between the two eigenvectors. The distance matrix provides an intuitive similarity measure, and a smaller MSE value indicates that the two feature points are more similar. Secondly, by analyzing the value distribution in the distance matrix, the consistency of the image transformation and the degree of local deformation can be evaluated.
[0053] S202: Sort the elements in the distance matrix in ascending order of distance value, and determine the first element in the distance matrix as the target element.
[0054] Among them, the target element refers to the element of the first number of items with the shortest distance in the distance matrix. In the embodiment of the present application, it can be understood that these target elements represent the most similar or most likely matching correspondence between the first feature corner point in the source image and the second feature corner point in the target image. The first number of items with the shortest distance are selected as the target element.
[0055] In this embodiment, the elements in the distance matrix are sorted in order from small to large according to the distance value, and the first number of elements in the distance matrix are determined as target elements, so as to screen out the most similar matching pairs from all possible feature point pairs, and provide reliable basic data for subsequent image transformation analysis and quality assessment. By sorting and screening the elements in the distance matrix, the feature point pairs that are most likely to be correctly matched can be effectively identified. The smaller the distance value, the higher the similarity between the two feature points. Therefore, selecting a certain number of elements with the smallest distance as target elements can ensure that the focus is on the feature point pairs that are most likely to be correctly matched.
[0056] In the specific implementation, all elements in the distance matrix are first sorted. This can be achieved through common sorting algorithms such as quick sort or merge sort. The sorting process needs to record the original position information of each element at the same time so that the corresponding feature point pair can be traced back later. After the sorting is completed, the first number of elements in the sorting result are selected as the target elements. The first number here is a predefined parameter that can be adjusted according to specific application requirements and image characteristics.
[0057] S203: Determine, according to the target element, the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image.
[0058] By analyzing the feature point pairs represented by the target elements, we can intuitively understand the nature and degree of image transformation. Each target element corresponds to a first feature corner point in the source image and a second feature corner point in the target image. These paired feature points reflect the local and overall changes of the image during the transformation process.
[0059] In specific implementation, it is first necessary to parse the position information of each target element in the distance matrix. The row index of the distance matrix corresponds to the first feature corner point in the source image, and the column index corresponds to the second feature corner point in the target image. Through these indexes, the specific position of the feature point pair represented by each target element in the respective image can be traced back. Then, these position information can be used to calculate the spatial relationship between the feature point pairs. This usually includes calculating the displacement vector between the feature point pairs, that is, the direction and distance from the first feature corner point in the source image to the corresponding second feature corner point in the target image. These displacement vectors can be used to describe local deformations, such as translation, rotation, or scaling.
[0060] Based on the above embodiment, as an optional implementation, step S203 also includes S301-S303.
[0061] S301: Use target element mapping to obtain a first matrix corresponding to the source image and a second matrix corresponding to the target image, where the vector dimension of the first matrix is a first number and the vector dimension of the second matrix is the first number.
[0062] Among them, the first matrix is: Where m represents the first number, which is the same as the number of target elements. The first matrix refers to a two-dimensional array structure containing information about feature point pairs selected by the target elements. Each row of the first matrix corresponds to a target element, representing a pair of best matching feature points after screening, where represents the coordinates of the mth selected feature point in the source image, Represents the coordinates of the mth feature point corresponding to it in the target image. Using these high-quality matching point pairs, the image transformation parameters can be estimated more reliably. Based on these best matching points, a more representative matching error can be calculated, thereby more accurately evaluating the quality of the transformation.
[0063] Among them, the first matrix is: Where m also represents the first number, the same as the number of target elements. Each row of the matrix represents a pair of matching feature points, where represents the other coordinate (usually the y coordinate) of the mth selected feature point in the source image, Represents the corresponding coordinates of the mth feature point in the target image. The second matrix refers to a data set containing the position information of the first feature corner point in the source image and the corresponding second feature corner point in the target image on another coordinate axis.
[0064] In the specific implementation, the target element is first used as an index or mapping relationship. Each target element represents a pair of matching feature points in the source image and the target image. By traversing all target elements, the most relevant and important matching pairs can be extracted from the original set of feature points. For the first matrix, the x-coordinate of each selected feature point in the source image is filled into the first column of the matrix, and the x-coordinate of the corresponding target image feature point is filled into the second column. Similarly, for the second matrix, the y-coordinate information is filled in the same way. In this way, two m×2 matrices are constructed, where m is equal to the first number, that is, the number of target elements.
[0065] S302: Set the deviation matrix between the source image and the target image, the vector dimension of the deviation matrix is the first quantity; wherein the deviation matrix represents the actual deviation in the correspondence relationship between the feature points of the source image and the target image. In the embodiment of the present application, it can be understood that the deviation matrix is an m×2 matrix, where m represents the first quantity, which is the same as the number of target elements. Each element of the deviation matrix represents the actual position difference between the feature point in the source image and the corresponding feature point in the target image after transformation. Specifically, the first column element of the deviation matrix represents the actual deviation of the x-coordinate, and the second column element represents the actual deviation of the y-coordinate.
[0066] In specific implementation, the deviation matrix is defined to consist of two vectors, and the dimensions of these two vectors are equal to the first number, that is, the same as the number of target elements. One of the vectors represents the deviation in the horizontal direction (x coordinate), and the other vector represents the deviation in the vertical direction (y coordinate). The two vectors are filled by comparing the difference between the corresponding elements in the first matrix and the second matrix. Specifically, each element of the horizontal deviation vector is the result of subtracting the first column from the second column of the corresponding row of the first matrix, and each element of the vertical deviation vector is the result of subtracting the first column from the second column of the corresponding row of the second matrix. This calculation method ensures that the deviation matrix accurately reflects the actual difference in the spatial position of each pair of matching feature points.
[0067] S303: Determine the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image according to the first matrix, the second matrix and the deviation matrix.
[0068] In the specific implementation, the information in the first matrix and the second matrix is first used. The first matrix contains the coordinate information of the first feature corner point in the source image, and the second matrix contains the coordinate information of the second feature corner point in the target image. These two matrices provide the initial positions of the feature points in their respective image spaces. Then, the deviation matrix C = [C1, C2] is introduced to fine-tune these positional relationships. The C1 vector represents the deviation in the x-coordinate direction, and the C2 vector represents the deviation in the y-coordinate direction.
[0069] The specific process of determining the positional relationship is as follows: For the mth pair of feature points, first obtain its initial coordinates from the first matrix and the second matrix. Then, add the coordinates in the first matrix to the corresponding deviation values in the deviation matrix (i.e., C1[m] and C2[m]). In this way, the exact position of the mth first feature corner point in the source image in the target image coordinate system is obtained. By comparing this calculated position with the actual position of the corresponding second feature corner point in the second matrix, the positional relationship between the two feature points can be accurately described.
[0070] Based on the above embodiment, as an optional implementation, step S303 also includes S401-S402.
[0071] S401: Use the stochastic gradient descent method to calculate the translation matrix and the transformation matrix corresponding to the minimum product of the deviation matrix.
[0072] Among them, the translation matrix refers to a matrix used to represent the translation operation of a point or vector in space. In the embodiment of the present application, it can be understood as a 2×m matrix D, where m is the first number, that is, the same as the number of target elements. Each column represents a two-dimensional translation vector, which describes the distance that a feature point in the source image needs to be translated in the x and y directions to align with the corresponding feature point in the target image.
[0073] Among them, the transformation matrix refers to a matrix used to describe the linear transformation of a point or vector in space. In the embodiment of the present application, it can be understood as a 2×2 diagonal matrix. The transformation matrix W is mainly used to describe the scaling transformation from the source image to the target image, provides the basis for linear transformation, and allows the processing of anisotropic scaling.
[0074] In order to find the best transformation parameters, the difference between the source image A and the target image B after transformation is minimized. The specific implementation process is as follows: First, initialize the 2×2 diagonal matrix W and the 2×m matrix D, where m is the number of feature points. The diagonal elements of W can be set to random values close to 1, and D can be initialized to small random values. Then, define the loss function This function represents the transformed error. Next, the gradient of the loss function L with respect to W and D is calculated, which requires the use of knowledge of matrix differentiation, taking into account the complex relationship between C1 and C2 and W and D. In each iteration, the calculated gradient is used to update W and D and repeat this process until the predetermined number of iterations is reached or the value of the loss function is less than a certain threshold.
[0075] Considering that W is a diagonal matrix, only the two elements w1 and w2 on its diagonal need to be updated. This gradient descent-based method can effectively handle nonlinear relationships and adapt to complex image transformations. In this way, the optimal W and D can be found to minimize the difference between the transformed source image A and the target image B. In this way, the scaling and translation relationship between images can be accurately captured to adapt to various complex transformations, including non-uniform deformation and local distortion.
[0076] S402: Calculate the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image using an image transformation formula according to the first matrix, the second matrix, the translation matrix and the transformation matrix.
[0077] According to the first matrix A, the second matrix B, the translation matrix D and the transformation matrix W, the image transformation formula is used to calculate the positional relationship between each first feature corner point in the source image and each corresponding second feature corner point in the target image. The coordinates of each first feature corner point in the source image are converted to the coordinate system of the target image to obtain the precise positional relationship between them and the corresponding second feature corner point. The advantage of this method is that it comprehensively considers the two transformations of scaling (through W) and translation (through D), and can accurately describe complex spatial transformations, including non-uniform deformation and local distortion. Through this calculation, the transformation relationship between each pair of corresponding feature corner points can be obtained, and this information can be used to evaluate the accuracy of the transformation.
[0078] Based on the above embodiment, as an optional implementation, the first matrix, the second matrix, the translation matrix and the transformation matrix are substituted into the image transformation formula to obtain the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image. The image change formula is: W×A T +D=B T ; Where W represents the transformation matrix, A T represents the transpose of the first matrix, corresponding to the coordinates of the first characteristic corner point, D represents the translation matrix, B T Represents the transpose of the second matrix, corresponding to the coordinates of the second feature corner point.
[0079] In this formula, W is a 2×2 diagonal matrix representing the scaling transformation; AT is the transpose of the first matrix A, whose column vector corresponds to the coordinates of the first feature corner point in the source image; D is a 2×m matrix representing the translation transformation, where m is the number of feature points; B T is the transpose of the second matrix B, and its column vector corresponds to the coordinates of the second feature corner point in the target image. Through this formula, the coordinates of each feature point in the source image can be converted to the coordinate system of the target image, so as to obtain the precise positional relationship between them. The specific implementation process is as follows: First, substitute the optimized W and D matrices into the formula. Then, take each column of the A matrix (corresponding to a first feature corner point) and perform the matrix operation W×A T , this step completes the scaling transformation. Next, add the corresponding D matrix column to complete the translation transformation. Finally, compare the obtained result with the corresponding column in B^T. This comparison result reflects the positional relationship between the transformed first feature corner point and the corresponding second feature corner point.
[0080] S103: Randomly sample the picture to be evaluated to obtain a sampling matrix corresponding to the picture to be evaluated.
[0081] Among them, the picture to be evaluated refers to a specific image picture or video frame that needs to be evaluated or analyzed for quality. In the embodiment of the present application, it can be understood that there may be abnormal scaling and / or displacement of the picture, and the quality of the picture to be evaluated needs to be evaluated. The quality of the picture to be evaluated requires a reference object. Through the positional relationship between the source image and the target image determined in the previous step, the source picture corresponding to the picture to be evaluated can be found. By evaluating the degree of deviation of its source picture, its picture quality can be evaluated.
[0082] The sampling matrix corresponding to the image to be evaluated can be understood as a set of sampling points obtained by randomly sampling the target image. This sampling matrix represents a series of randomly selected points in the image to be evaluated (i.e., the target image), and the coordinate information of these points is recorded in the matrix.
[0083] In this embodiment, in order to perform quality assessment on the picture to be assessed, it is first necessary to randomly sample the picture to be assessed to obtain a sampling matrix corresponding to the picture to be assessed. The purpose of this step is to obtain a representative sample of the picture to be assessed so as to improve the computational efficiency and maintain the accuracy of the assessment in the subsequent assessment process. The specific implementation process is as follows: First, determine the number of samples, which can be determined based on the size of the picture to be assessed and the required accuracy. Then, use a random number generator to generate a series of random coordinate points within the coordinate range of the picture to be assessed. These random coordinate points are sampling points, and their coordinate information is recorded in a two-dimensional matrix to form a sampling matrix corresponding to the picture to be assessed.
[0084] S104: remap the sampling matrix according to the position relationship to obtain a mapping point matrix corresponding to the picture to be evaluated.
[0085] The mapping point matrix refers to a set of points obtained by remapping the sampling matrix of the image to be evaluated. The mapping point matrix can be understood as a set of points in the source image that correspond to the sampling points of the image to be evaluated. Specifically, it is a two-dimensional matrix with the same dimensions as the sampling matrix, in which each element represents the position of the corresponding point in the sampling matrix in the source image coordinate system. This mapping process is based on the previously determined positional relationship between the source image and the target image.
[0086] In this embodiment, the previously determined positional relationship between each first characteristic corner point in the source image and each second characteristic corner point in the target image is used. This positional relationship includes a translation matrix and a transformation matrix. Then, this positional relationship is applied to each sampling point in the sampling matrix, and the image transformation formula W×A is used. T +D=B T Calculate. Where W represents the transformation matrix, D represents the translation matrix, A T Represents the coordinates of the sampling point, and B^T represents the mapped coordinates. Through this calculation, the corresponding position of each point in the sampling matrix in the source image coordinate system can be obtained, and the set of these corresponding positions constitutes the mapping point matrix. The remapping method can accurately track the position of the sampling points in the image to be evaluated in the source image, even if the image to be evaluated has undergone transformations such as displacement or stretching.
[0087] S105: Calculate the minimum deviation value within a preset range around each mapping point in the mapping point matrix, and use the percentage of the second number of target mapping points whose minimum deviation value is greater than the preset threshold to the total number of mapping points as the evaluation value of the picture to be evaluated.
[0088] The minimum deviation value refers to the minimum difference between the pixel value within a preset range around each mapping point in the mapping point matrix and the corresponding source image pixel value. In the embodiment of the present application, the minimum deviation value can be understood as the local minimum color difference or brightness difference between the mapping point at the corresponding position and the source image point.
[0089] In this embodiment, in order to evaluate the quality of the image to be evaluated, the minimum deviation value within a preset range around each mapping point in the mapping point matrix is first calculated. The purpose of this step is to capture the change in image quality in a local area. Specifically, for each mapping point in the mapping point matrix, the pixel value in the mapping point matrix is compared with the pixel value at the corresponding position of the source image within a preset square range with the point as the center, and the minimum difference is found as the minimum deviation value of the point. This method can effectively detect subtle changes in the image in a local area, thereby more accurately reflecting the image quality.
[0090] Next, the minimum deviation value of each mapping point is compared with a preset threshold. When the minimum deviation value of a mapping point is greater than the preset threshold, it is marked as a target mapping point. The purpose of this step is to identify areas where quality problems may exist, because larger deviation values usually mean that the image has been significantly deformed or distorted at that location. The number of these target mapping points is counted and recorded as the second number. Finally, the percentage of the second number (i.e., the number of target mapping points) to the total number of mapping points is calculated, and this percentage is used as the final evaluation value of the image to be evaluated.
[0091] Based on the above embodiment, as an optional implementation, step S105 also includes S501-S503.
[0092] S501: Calculate the minimum deviation value within a preset range around each mapping point in the mapping point matrix, where the preset range is a square range centered on the mapping point.
[0093] In the specific implementation, we first select a mapping point in the mapping point matrix and determine a square area with this point as the center. The size of this square area can be preset according to specific needs, for example, a 5x5 or 7x7 pixel area can be selected. Then, we compare each pixel point in this square area with the pixel point at the corresponding position in the source image and calculate the deviation value between them. This deviation value can be color difference, brightness difference or other suitable metrics. After comparing all the pixels in the square area, we select the smallest deviation value as the minimum deviation value of the mapping point.
[0094] S502: Compare the minimum deviation value with a preset threshold, determine the mapping points whose minimum deviation value is greater than the preset threshold as target mapping points, and record the number of target mapping points as a second number.
[0095] For each mapping point in the mapping point matrix, we compare its minimum deviation value with the preset threshold. If the minimum deviation value of a mapping point is greater than the preset threshold, we mark this mapping point as a target mapping point. This comparison operation is actually distinguishing between "acceptable" and "unacceptable" image quality changes. Deviations greater than the threshold are considered to be significant quality degradation, while deviations less than the threshold are considered to be acceptable normal changes. After completing the comparison of all mapping points, we count the number of mapping points marked as target mapping points and record this number as the second number. The second number actually represents the number of areas in the image where quality degradation is obvious.
[0096] S503: Calculate the percentage of the second number to the total number of mapping points to obtain an evaluation value of the picture to be evaluated, where the second number is the total number of mapping points.
[0097] In the specific implementation, we first need to know the total number of mapping points, which is usually predetermined and depends on the size of the mapping point matrix. Then, we divide the second number obtained in the previous step (that is, the number of mapping points with a minimum deviation value greater than the preset threshold) by the total number of mapping points, and then multiply it by 100 to get a percentage. This percentage is our final evaluation value. The calculation formula can be expressed as: Evaluation value = (second number / total number of mapping points) * 100%.
[0098] The following is an embodiment of the system of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the system of the present application, please refer to the embodiment of the method of the application.
[0099] See also Figure 4 , which shows a schematic diagram of the structure of an image quality assessment system provided by an exemplary embodiment of the present application. The system can be implemented as all or part of the system through software, hardware or a combination of both. The image quality assessment system includes: A feature vector determination module is used to obtain a first feature corner point of a source image and a second feature corner point of a target image, respectively, and determine a first feature vector corresponding to the source image and a second feature vector corresponding to the target image, wherein the target image is an image of the source image after displacement and / or stretching; A position relationship determination module, used to determine the position relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image according to the first feature vector and the second feature vector; A sampling module, used to randomly sample the screen to be evaluated to obtain a sampling matrix corresponding to the screen to be evaluated; A mapping point matrix determination module is used to remap the sampling matrix according to the position relationship to obtain a mapping point matrix corresponding to the picture to be evaluated; The evaluation module is used to calculate the minimum deviation value within a preset range around each mapping point in the mapping point matrix, and take the percentage of the second number of target mapping points whose minimum deviation value is greater than the preset threshold to the total number of mapping points as the evaluation value of the picture to be evaluated.
[0100] Based on the above embodiments, as an optional embodiment, the feature vector determination module is also used to perform Harris corner point calculation on the source image and the target image respectively to determine the first feature corner point of the source image and the second feature corner point of the target image; perform SIFT algorithm calculation on the first feature corner point and the second feature corner point respectively to obtain the first feature vector corresponding to the source image and the second feature vector corresponding to the target image.
[0101] On the basis of the above embodiments, as an optional embodiment, the position relationship determination module is also used to perform cross calculations on the first eigenvector and the second eigenvector to obtain a distance matrix between the first feature corner point and the corresponding second feature corner point; sort the elements in the distance matrix in ascending order according to the distance value, and determine the first number of elements in the distance matrix as target elements; determine the position relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image according to the target element.
[0102] On the basis of the above embodiments, as an optional embodiment, the position relationship determination module is also used to use target element mapping to obtain a first matrix corresponding to the source image and a second matrix corresponding to the target image, the vector dimension of the first matrix is a first number, and the vector dimension of the second matrix is the first number; set the deviation matrix between the source image and the target image, the vector dimension of the deviation matrix is the first number; determine the position relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image according to the first matrix, the second matrix and the deviation matrix.
[0103] Based on the above embodiments, as an optional embodiment, the position relationship determination module is also used to use the stochastic gradient descent method to calculate the corresponding translation matrix and transformation matrix when the product of the deviation matrix is minimized; based on the first matrix, the second matrix, the translation matrix and the transformation matrix, the image transformation formula is used to calculate the position relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image.
[0104] Based on the above embodiment, as an optional embodiment, the position relationship determination module is further used to substitute the first matrix, the second matrix, the translation matrix and the transformation matrix into the image transformation formula to obtain the position relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image; the image change formula is: W×A T +D=B T ;W represents the transformation matrix, A T represents the transpose of the first matrix, corresponding to the coordinates of the first characteristic corner point, D represents the translation matrix, B T Represents the transpose of the second matrix, corresponding to the coordinates of the second feature corner point.
[0105] On the basis of the above embodiment, as an optional embodiment, the evaluation module is also used to calculate the minimum deviation value within a preset range around each mapping point in the mapping point matrix, and the preset range is a square range centered on the mapping point; the minimum deviation value is compared with a preset threshold, and the mapping point whose minimum deviation value is greater than the preset threshold is determined as the target mapping point, and the number of target mapping points is recorded as the second number; the percentage of the second number to the total number of mapping points is calculated to obtain the evaluation value of the picture to be evaluated, and the second number is the total number of mapping points.
[0106] The embodiment of the present application also provides a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing the image quality assessment method of the above embodiment. The specific execution process can be found in the specific description of the above embodiment, which will not be repeated here.
[0107] See also Figure 5 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0108] The communication bus 502 is used to realize the connection and communication between these components.
[0109] The user interface 503 may include a standard wired interface or a wireless interface.
[0110] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0111] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0112] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program of an image quality assessment method.
[0113] exist Figure 5 In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 501 can be used to call an application program for an image quality assessment method stored in the memory 505. When executed by one or more processors, the electronic device executes one or more methods in the above-mentioned embodiments.
[0114] An electronic device readable storage medium stores instructions, which, when executed by one or more processors, enable the electronic device to execute one or more methods in the above embodiments.
[0115] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0116] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0121] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, it will be easy for those skilled in the art to think of other embodiments of the present disclosure. This application is intended to cover any variation, use or adaptive change of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure.
Claims
1. A method for evaluating image quality, characterized in that: The method comprises: Respectively obtain a first characteristic corner point of a source image and a second characteristic corner point of a target image, determine a first characteristic vector corresponding to the source image and a second characteristic vector corresponding to the target image, wherein the target image is an image of the source image after displacement and / or stretching; Determine, according to the first feature vector and the second feature vector, a positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image; Randomly sample the screen to be evaluated to obtain a sampling matrix corresponding to the screen to be evaluated; Remapping the sampling matrix according to the positional relationship to obtain a mapping point matrix corresponding to the picture to be evaluated; The minimum deviation value within a preset range around each mapping point in the mapping point matrix is calculated, and the percentage of the second number of target mapping points whose minimum deviation value is greater than a preset threshold to the total number of mapping points is used as the evaluation value of the picture to be evaluated.
2. The method according to claim 1, characterized in that The step of respectively acquiring a first characteristic corner point of a source image and a second characteristic corner point of a target image, and determining a first characteristic vector corresponding to the source image and a second characteristic vector corresponding to the target image comprises: Performing Harris corner point calculation on the source image and the target image respectively to determine the first characteristic corner point of the source image and the second characteristic corner point of the target image; The first feature corner point and the second feature corner point are respectively calculated using the SIFT algorithm to obtain a first feature vector corresponding to the source image and a second feature vector corresponding to the target image.
3. The method according to claim 1, characterized in that: The determining, according to the first feature vector and the second feature vector, a positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image includes: Performing cross calculation on the first eigenvector and the second eigenvector to obtain a distance matrix between the first feature corner point and the corresponding second feature corner point; Sort the elements in the distance matrix in ascending order according to the distance values, and determine the first number of elements in the distance matrix as target elements; The positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image is determined according to the target element.
4. The method according to claim 3, characterized in that The determining, according to the target element, a positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image comprises: Using the target element mapping, obtain a first matrix corresponding to the source image and a second matrix corresponding to the target image, wherein the vector dimension of the first matrix is the first number, and the vector dimension of the second matrix is the first number; A deviation matrix between the source image and the target image is set, wherein the vector dimension of the deviation matrix is the first number; and a positional relationship between each first feature corner point in the source image and each corresponding second feature corner point in the target image is determined based on the first matrix, the second matrix and the deviation matrix.
5. The method according to claim 4, characterized in that The determining, according to the first matrix, the second matrix, and the deviation matrix, a positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image includes: Use the stochastic gradient descent method to calculate the translation matrix and the transformation matrix corresponding to the minimum product of the deviation matrix; According to the first matrix, the second matrix, the translation matrix and the transformation matrix, an image transformation formula is used to calculate the positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image.
6. The method according to claim 5, characterized in that The calculating, according to the first matrix, the second matrix, the translation matrix and the transformation matrix, the positional relationship between each first feature corner point in the source image and each second feature corner point in the corresponding target image using an image transformation formula includes: Substituting the first matrix, the second matrix, the translation matrix and the transformation matrix into the image transformation formula, to obtain the positional relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image; The image change formula is: W×A T +D=B T ; Where W represents the transformation matrix, A T represents the transpose of the first matrix, corresponding to the coordinates of the first feature corner point, D represents the translation matrix, B T represents the transpose of the second matrix, corresponding to the coordinates of the second feature corner point.
7. The method according to claim 1, characterized in that The step of calculating a minimum deviation value within a preset range around each mapping point in the mapping point matrix, and taking the percentage of the second number of target mapping points whose minimum deviation value is greater than a preset threshold to the total number of mapping points as the evaluation value of the picture to be evaluated, includes: Calculating a minimum deviation value within a preset range around each mapping point in the mapping point matrix, wherein the preset range is a square range centered at the mapping point; Compare the minimum deviation value with the preset threshold, determine the mapping points whose minimum deviation value is greater than the preset threshold as target mapping points, and record the number of the target mapping points as a second number; The percentage of the second number to the total number of mapping points is calculated to obtain an evaluation value of the picture to be evaluated, where the second number is the total number of mapping points.
8. An image quality assessment system, characterized in that: The system comprises: A feature vector determination module, used to respectively obtain a first feature corner point of a source image and a second feature corner point of a target image, and determine a first feature vector corresponding to the source image and a second feature vector corresponding to the target image, wherein the target image is an image of the source image after displacement and / or stretching; a position relationship determination module, used to determine the position relationship between each of the first feature corner points in the source image and each of the second feature corner points in the corresponding target image according to the first feature vector and the second feature vector; A sampling module, used to randomly sample the screen to be evaluated to obtain a sampling matrix corresponding to the screen to be evaluated; A mapping point matrix determination module, used to remap the sampling matrix according to the position relationship to obtain a mapping point matrix corresponding to the picture to be evaluated; The evaluation module is used to calculate the minimum deviation value within a preset range around each mapping point in the mapping point matrix, and take the percentage of the second number of target mapping points whose minimum deviation value is greater than a preset threshold to the total number of mapping points as the evaluation value of the picture to be evaluated.
9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The electronic device comprises a processor, a memory and a transceiver, wherein the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 7.
Citation Information
Cited By
Video quality detection method, device, storage medium and system
CN120075489A