Image quality detection method, device, equipment and storage medium
By screening feature point matching and dividing evaluation sub-intervals in image quality detection, and combining interference information, the accuracy problem of image quality detection under interference such as noise and illumination changes is solved, thereby improving the accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202510619060.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies cannot accurately calculate image differences under interference such as noise, lighting changes, or image compression when detecting the quality of target images, resulting in a decrease in the accuracy of quality detection.
By acquiring feature points from the reference and target images, matching feature points are selected, evaluation sub-intervals are divided, and interference information is combined to determine the image quality detection results, thus avoiding direct difference calculation.
It improves the accuracy and efficiency of image quality detection, especially in complex environments, and can more accurately measure the impact of interference information on image quality.
Smart Images

Figure CN123160407A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image technology, and in particular to an image quality detection method and apparatus, an electronic device, and a storage medium. Background Technology
[0002] Currently, when a generative network outputs a target image based on a reference image, it is necessary to detect the quality of the target image by calculating the difference between the target image and the reference image. However, when the target image or reference image is affected by noise, changes in lighting conditions, or image compression, directly calculating the difference based on these disturbances will lead to a decrease in the accuracy of the calculated difference, making it impossible to accurately detect the quality of the target image. Summary of the Invention
[0003] This application provides an image quality detection method to address the problem that current methods for detecting the quality of a target image by calculating the difference between the target image and a reference image cannot accurately detect the quality of the target image.
[0004] Accordingly, embodiments of this application also provide an image quality detection device, an electronic device, and a storage medium to ensure the implementation and application of the above method.
[0005] To address the aforementioned problems, this application discloses an image quality detection method, the method comprising:
[0006] Acquire a reference image containing a first feature point, a target image containing a second feature point, and interference information affecting the reference image or the target image; the target image is generated based on the reference image;
[0007] Target feature points that match the first feature point are selected from the second feature points, and the first feature point and the target feature point are determined as a feature matching pair.
[0008] Based on the interference information of the reference image or the target image, determine multiple evaluation sub-intervals of the feature matching pair;
[0009] The quality detection result of the target image is determined based on the evaluation sub-interval, the feature matching pair, and the first feature point.
[0010] Optionally, the first feature point corresponds to a positional fluctuation range, the reference image and the target image have the same image coordinate system, and the step of filtering out target feature points that match the first feature point from the second feature points, and determining the first feature point and the target feature point as a feature matching pair, includes:
[0011] Based on the first feature point, the positional fluctuation range, and the image coordinate system, a matching region is determined in the target image;
[0012] Determine whether the second feature point exists within the matching region;
[0013] If the second feature point does not exist within the matching region, it is determined that there is no feature point among the second feature points that matches the first feature point, and the first feature point is discarded.
[0014] If the second feature point exists within the matching region, it is determined that there is a feature point among the second feature points that matches the first feature point. The first feature point is retained, the Euclidean distance between the retained first feature point and each second feature point within the matching region is calculated, and the target feature point is determined among the second feature points based on the Euclidean distance. The retained first feature point and the target feature point are determined as the feature matching pair.
[0015] Optionally, determining the matching region in the target image based on the first feature point, the positional fluctuation range, and the image coordinate system includes:
[0016] Determine the first position of the first feature point in the reference image;
[0017] Determine the target point located at the first position in the image coordinate system;
[0018] Based on the range of positional fluctuations, a matching region centered on the target point is determined in the target image.
[0019] Optionally, determining multiple evaluation sub-intervals of the feature matching pair based on the interference information received by the reference image or the target image includes:
[0020] Based on the interference information received by the reference image or the target image, a logarithmic threshold is determined;
[0021] Determine the total number of feature matching pairs;
[0022] Multiple distance thresholds are obtained, and the Euclidean distance between the retained first feature point and the target feature point is determined as the target distance.
[0023] The evaluation interval is determined based on the target distance and the distance threshold;
[0024] The evaluation interval is divided into multiple evaluation sub-intervals on an average basis.
[0025] Optionally, determining the evaluation interval based on the target distance and the distance threshold includes:
[0026] Determine whether the target distance is greater than the distance threshold;
[0027] If the target distance is greater than the distance threshold, then the feature matching pair corresponding to the target distance greater than the distance threshold is determined as the target feature matching pair;
[0028] Determine the number of target feature matching pairs corresponding to different distance thresholds;
[0029] When the target logarithm is equal to the logarithm threshold, the distance threshold corresponding to the target logarithm is determined as the first distance threshold; and when the target logarithm is equal to the total logarithm, the distance threshold corresponding to the target logarithm is determined as the second distance threshold.
[0030] The evaluation interval is determined based on the first distance threshold and the second distance threshold.
[0031] Optionally, determining the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point includes:
[0032] Obtain the evaluation weights corresponding to the evaluation sub-intervals;
[0033] Determine the number of evaluation pairs of feature matching pairs within each evaluation sub-interval, the total number of feature matching pairs, and the number of features of the first feature point;
[0034] The quality detection result of the target image is determined based on the evaluation weight corresponding to the evaluation sub-interval, the number of evaluation pairs of feature matching pairs in each evaluation sub-interval, the total number of feature matching pairs, and the feature quantity of the first feature point.
[0035] Optionally, after determining the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point, the method further includes:
[0036] Based on the first feature point and the target feature point in the feature matching pair, generate the matching line of the feature matching pair and the feature point matching map containing the matching line;
[0037] The generative network used to generate the target image is adjusted based on the feature point matching map.
[0038] This application also discloses an image quality detection device, the device comprising:
[0039] The acquisition module is used to acquire a reference image containing a first feature point, a target image containing a second feature point, and interference information of the reference image or the target image; the target image is generated based on the reference image.
[0040] The filtering module is used to filter out target feature points that match the first feature point from the second feature points, and to determine the first feature point and the target feature point as a feature matching pair;
[0041] The determination module is used to determine multiple evaluation sub-intervals of the feature matching pair based on the interference information received by the reference image or the target image;
[0042] The quality detection result module is used to determine the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point.
[0043] This application also discloses an electronic device, including: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to perform an image quality detection method as described in any of the embodiments of this application.
[0044] This application also discloses one or more machine-readable media storing executable code thereon, which, when executed, causes a processor to perform an image quality detection method as described in any of the embodiments of this application.
[0045] The embodiments of this application have the following advantages:
[0046] In this embodiment, a reference image containing a first feature point, a target image containing a second feature point, and interference information received by the reference image or the target image are obtained; the target image is generated based on the reference image; target feature points matching the first feature point are selected from the second feature points, and the first feature point and the target feature point are determined as a feature matching pair; multiple evaluation sub-intervals of the feature matching pair are determined according to the interference information received by the reference image or the target image; and the quality detection result of the target image is determined according to the evaluation sub-intervals, the feature matching pair, and the first feature point. This application provides data support for target image quality detection by acquiring a reference image, a target image, and their interference information. By filtering target feature points that match the first feature point from the second feature point and determining them as feature matching pairs, the efficiency of feature point matching can be improved, thereby enhancing the efficiency of target image quality detection. Furthermore, considering that interference information can affect the quality of feature matching pairs, multiple evaluation sub-intervals are determined based on the interference information. This allows for precise measurement of the feature correspondence between the target image and the reference image in terms of quality differences between feature matching pairs. Based on the evaluation sub-intervals, feature matching pairs, and reference image feature points, the quality detection result of the target image is determined, thereby more meticulously quantifying the impact of interference information on image quality and effectively improving the accuracy of quality detection results. This solves the problem that current methods for detecting target image quality by calculating the difference between the target image and the reference image cannot accurately detect the quality of the target image, thus improving the accuracy of target image quality detection. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the steps of an embodiment of an image quality detection method according to this application;
[0048] Figure 2 This is a flowchart illustrating a feature point filtering process according to this application;
[0049] Figure 3 This is a flowchart illustrating one method for calculating the target score according to this application;
[0050] Figure 4 This is a structural block diagram of an embodiment of an image quality detection device according to this application;
[0051] Figure 5 This is a schematic diagram of the structure of a device provided in an embodiment of this application. Detailed Implementation
[0052] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] With the continuous development of autonomous driving technology, relevant regulations and standards for regulating the development and testing of autonomous vehicles have been introduced. These regulations and standards usually require autonomous vehicles to undergo rigorous testing and verification to ensure their safety and reliability, and robustness is one of the key performance indicators of autonomous driving perception models.
[0054] In robustness testing of perceptual models, GANs (Generative Adversarial Networks) are typically used to quickly generate target images under various weather conditions (such as sunny, rainy, and snowy days) and lighting conditions (such as daytime, nighttime, and tunnels) to simulate the complexity of natural noise in the real world. Therefore, objective and quantitative image quality detection plays a positive role in promoting the robustness testing of perceptual models.
[0055] The current objective methods for detecting target image quality mainly include the following:
[0056] (1) PSNR (Peak Signal-to-Noise Ratio): Measures the ratio of the maximum possible error in an image to the actual error. It is often used to compare the quality difference between a reference image and a compressed target image.
[0057] (2) SSIM (Structural Similarity Index): Detects image quality by comparing the similarity of brightness, contrast and structural information between a reference image and a target image;
[0058] (3) IS (Inception Score): Image quality is detected by using a pre-trained Inception network to extract image features and calculate the KL divergence between the feature distribution of the target image and the feature distribution of the reference image.
[0059] (4) FID (Fréchet Inception Distance): Uses a pre-trained Inception network to extract image features and calculates the Fréchet distance between the feature distribution of the target image and the feature distribution of the reference image to detect image quality.
[0060] The above detection methods all detect the quality of the target image by calculating the statistical difference, feature distance, or semantic relevance between the target image and the reference image.
[0061] However, while the aforementioned detection methods compare the reference image with the target image, when either the reference or target image is affected by noise, changes in lighting conditions, or image compression, directly calculating the difference based on these disturbances leads to a decrease in the accuracy of the calculated difference, affecting the robustness of the detection method and consequently failing to accurately detect the quality of the target image. Furthermore, methods such as IS and FID, which rely on pre-trained Inception networks to extract image features, require the Inception network to be pre-trained before performing target image quality detection, resulting in low efficiency in image quality detection.
[0062] Another current image quality detection method combines an iterative approach with the IS (Image Quality Assurance) method. It uses a DCGAN (Deep Convolutional GAN) to take data from the previous iteration as input for the next iteration, ultimately generating a dataset of images to form an evaluation dataset. Category labels are then constructed using reference images and target images from different iterations. A trainer obtains the probability of each image category, and the KL divergence is calculated using the IS approach to determine the quality of the target image. However, this method still has significant shortcomings in practical applications. The iterative process of DCGAN and the processing of a large number of images significantly increase computational complexity, especially when dealing with high-resolution or massive images, resulting in a sharp decrease in image quality detection efficiency. Furthermore, the subjectivity in selecting high-quality images can easily lead to inconsistencies or biases in the detection results, affecting the robustness of the detection method and failing to accurately detect the quality of the target image.
[0063] The image quality detection method provided in this application is applicable to a wide range of scenarios, including but not limited to autonomous driving, security monitoring, medical image analysis, remote sensing image processing, intelligent robots, industrial inspection, and image retrieval. This method can be applied wherever there is a need to match and compare two images, such as quality detection between the original image and the processed image, or between a reference image and the image to be detected. In this application embodiment, taking the robustness testing of a perceptual model as an example, image quality detection is performed on the target image output by the generating network.
[0064] Reference Figure 1 This is a flowchart illustrating the steps of an embodiment of an image quality detection method according to this application, including the following steps:
[0065] Step 101: Obtain a reference image containing a first feature point, a target image containing a second feature point, and interference information of the reference image or the target image; the target image is generated based on the reference image.
[0066] In this embodiment, the reference image refers to a road image acquired through data collection. This reference image is input into a trained generative network (such as GAN or CycleGAN) to output the target image, i.e., the object to be detected. For example, a reference image of a daytime road scene is input into a CycleGAN network to output the target image of a nighttime scene.
[0067] A feature extractor is constructed using the SIFT (Scale-invariant feature transform) algorithm, including building a scale space, constructing a Gaussian difference pyramid, feature point localization, feature point orientation assignment, and generation of feature point descriptors (feature vectors of all feature points). The output includes the number of first feature points K1 in the reference image, the number of second feature points K2 in the target image, the first feature point set A, the second feature point set B, the first feature vector set yA, and the second feature vector set yB. It should be noted that the feature vectors are used to represent feature points. It should also be noted that K1 and K2 in this embodiment are not directly related.
[0068] Assume the number of feature points in the current reference image and target image are 125 and 130 respectively. The first feature point set of the reference image is A = {A1, A2, ..., A125}, the second feature point set of the target image is B = {B1, B2, ..., B130}, the first feature vector set of the reference image is yA = {yA1, yA2, ..., yA125}, and the second feature vector set of the target image is yB = {yB1, yB2, ..., yB130}.
[0069] In yA, yAi is the feature vector corresponding to the first feature point Ai in the reference image, and in yB, yBi is the feature vector corresponding to the second feature point Bi in the target image.
[0070] Constructing the Scale Space: Taking the original image I(x, y) as input, a Gaussian pyramid is generated by applying Gaussian blurs with different parameters σ layer by layer and downsampling. The Gaussian pyramid contains multiple octaves, each with multiple layers, and the scale varies according to σ = ksσ0 (k = 2^(1 / s), where s is the number of layers). The final output is a set of Gaussian images L(x, y, σ).
[0071] Constructing the Difference of Gaussian Pyramid (DoG): Perform the difference operation on Gaussian images of adjacent scales within the same group, with the formula D(x, y, σ) = L(x, y, kσ) - L(x, y, σ), to obtain the DoG pyramid D(x, y, σ).
[0072] Keypoint Detection: First, in the DoG pyramid, each pixel is compared with its 26 neighbors (adjacent scales + 8 neighbors in the same layer) for extreme values. Then, the position and scale of the extreme points are precisely adjusted by Taylor expansion. Finally, low contrast (|D(x^)|<0.03) and edge response points (determined by the Hessian matrix) are removed, and the candidate keypoint positions (x, y, σ) are output.
[0073] Orientation Assignment: Calculate the gradient magnitude m(x,y) and orientation θ(x,y) of the pixels in the neighborhood of the feature point, generate a 36-bar orientation histogram, take the peak value as the main orientation, retain the orientation greater than 80% of the peak values as the secondary orientation, and output the feature point (x,y,σ,θ).
[0074] Descriptor generation: First, rotate the neighborhood of the feature point to the main direction. Then, divide the 16×16 window into 4×4 sub-blocks, calculate the gradient histogram of each sub-block in 8 directions, combine the results into a 128-dimensional vector, normalize and truncate values greater than 0.2, and output a 128-dimensional feature vector y.
[0075] In this embodiment of the application, after the feature extractor extracts SIFT features from the two images (reference image I1 and target image I2) respectively, it will output the following information:
[0076] K1: The number of first feature points in the reference image I1, data type is integer.
[0077] K2: The number of second feature points in the target image I2, data type is integer.
[0078] A: The first feature point set of reference image I1, a matrix of dimension K1×2.
[0079] B: The set of second feature points of the target image I2, a matrix of dimension K2×2.
[0080] yA: The first set of feature vectors of the reference image I1, a matrix of dimension K1×128.
[0081] yB: The set of second feature vectors of the target image I2, a matrix of dimension K2×128.
[0082] In this embodiment of the application, it is also necessary to obtain the interference information of the reference image or the target image so that more reasonable processing can be made on this interference information in subsequent detection, and more accurate image quality detection results can be obtained.
[0083] Interference information refers to various types of information that negatively impact image quality during image generation, acquisition, transmission, and storage. Common interference information includes noise, such as Gaussian noise and salt-and-pepper noise generated by electronic components, which can cause messy spots or pixel abnormalities in the image; changes in lighting, due to different shooting environments, can lead to images that are too bright, too dark, or uneven in brightness, altering the image's color and contrast; image compression, the compression operation performed to reduce data volume, can cause loss of image details, blurred edges, and blocky effects; in addition, there is motion blur, when shooting moving objects, the image becomes blurry due to the movement of the camera or object; and lens distortion, due to imperfections in the optical characteristics of the lens, causing geometric distortion in the image.
[0084] These interference messages alter the original features and structure of an image. If quality detection is performed directly based on the interfered image, the detection results will be inaccurate.
[0085] In this embodiment, noise interference can be determined by the parameter information of the sensor device. For example, when an electronic device acquires an image, the thermal noise of the sensor can be estimated according to the technical document corresponding to the device model. For changes in illumination, data such as illumination intensity and color temperature at the time of shooting can be recorded by an environmental sensor (such as a light intensity sensor), or the brightness and color distribution characteristics of the image itself can be analyzed. For image compression, information such as compression format (such as JPEG, PNG, etc.) and compression ratio can be obtained from the metadata of the image file. If the image does not have relevant metadata, the degree of compression can be inferred by a specific image analysis algorithm.
[0086] This application's embodiments extract image features using a feature extractor constructed based on the SIFT algorithm. This eliminates the need for a pre-trained Inception network, improving feature extraction efficiency and consequently, image quality detection efficiency. Furthermore, the SIFT-based feature extractor exhibits greater robustness to changes in image scale, rotation, and illumination. Even under various interference conditions such as noise and complex scene transformations, it can accurately capture key image features, reducing the impact of interference on feature extraction results and significantly enhancing the applicability and accuracy of image quality detection methods in complex environments.
[0087] Step 102: Select target feature points that match the first feature point from the second feature points, and determine the first feature point and the target feature point as a feature matching pair;
[0088] In this embodiment of the application, it is necessary to match the first feature point in the reference image and the second feature point in the target image to find the target feature point that matches each of the first feature points in the second feature point, and determine the two matching feature points as a feature matching pair.
[0089] It should be noted that if the number of feature matching pairs obtained based on feature points in the reference image and the target image is large, that is, the semantic consistency between the reference image and the target image is high, then the target image output by the generator network can be considered to be of good quality, and vice versa.
[0090] Step 103: Determine multiple evaluation sub-intervals of the feature matching pair based on the interference information received by the reference image or the target image;
[0091] In practical applications, noise, illumination changes, image compression, and other interference information affecting the reference or target image can significantly impact the quality of feature matching pairs. A single detection standard is insufficient to accurately measure image quality under complex interference.
[0092] Therefore, this application embodiment needs to divide the image quality into multiple evaluation sub-intervals based on the interference information, and quantify the impact of the interference information on the image quality by interval, effectively reducing the impact of the interference information on the detection results, thereby improving the robustness of image quality detection and ensuring that accurate image quality detection results can still be obtained in complex and ever-changing real-world scenarios.
[0093] Step 104: Determine the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point.
[0094] In this embodiment, a target score is calculated by comprehensively considering multiple information such as the evaluation sub-interval, feature matching pairs, and the first feature point, which can intuitively reflect the quality performance of the target image relative to the reference image.
[0095] It should be noted that relying on a single factor alone is insufficient for a comprehensive and accurate detection of target image quality. This application considers the impact of interference information on image quality by evaluating sub-intervals, using feature matching pairs to reflect the similarity between the target image and the reference image at the feature level, and employing the first feature point as a key feature identifier of the reference image. By combining these three elements, target image quality can be detected from multiple perspectives, resulting in more accurate detection results.
[0096] In practical perceptual model robustness testing scenarios, it is necessary to focus on the semantic consistency of detected objects (such as traffic lights, pedestrians, lane lines, etc.) between the reference image and the target image. However, current image quality detection methods mainly measure semantic consistency through quantitative indicators, such as using mean precision (mAP) and intersection-over-union (IoU) to evaluate the overall target detection results, or indirectly reflecting semantic consistency by calculating the distance between image feature distributions (such as FID, IS). Although these indicators can provide quantitative results of image semantic consistency at a macro level, they are not intuitive and cannot directly reveal through specific values which regions or elements (detected objects) in the target image maintain semantic consistency with the reference image, and which regions or elements deviate.
[0097] This application presents the quality detection results of the target image in the form of specific numerical values (target scores). Compared with traditional quantitative indicators, it can more accurately locate the specific regions and elements where semantic differences occur, providing a more reliable detection basis for the robustness testing of the perception model, thereby improving the reliability of the robustness testing of the perception model.
[0098] In one embodiment of this application, a quality detection standard is designed based on the needs and accuracy requirements of the current scenario. Furthermore, the final result of the target image quality can be output based on the target score. The higher the target score, the better the quality of the target image. The quality detection standard is shown in Table 1 below:
[0099] Table 1 Quality Inspection Standards
[0100] Serial Number Target score S Target image quality 1 S<60 Poor 2 60≤S<70 generally 3 70≤S<80 better 4 80≤S<90 good 5 90≤S excellent
[0101] As an example, if the target score (quality detection result) of the target image is 60, the final result of the target image quality output based on the quality detection standard is "general".
[0102] In one embodiment of this application, the first feature point corresponds to a positional fluctuation range, the reference image and the target image have the same image coordinate system, and the step of filtering out target feature points that match the first feature point from the second feature points, and determining the first feature point and the target feature point as a feature matching pair, includes:
[0103] Based on the first feature point, the positional fluctuation range, and the image coordinate system, a matching region is determined in the target image;
[0104] Determine whether the second feature point exists within the matching region;
[0105] If the second feature point does not exist within the matching region, it is determined that there is no feature point among the second feature points that matches the first feature point, and the first feature point is discarded.
[0106] If the second feature point exists within the matching region, it is determined that there is a feature point among the second feature points that matches the first feature point. The first feature point is retained, the Euclidean distance between the retained first feature point and each second feature point within the matching region is calculated, and the target feature point is determined among the second feature points based on the Euclidean distance. The retained first feature point and the target feature point are determined as the feature matching pair.
[0107] In the current feature point matching process, feature points are usually selected by measuring the Euclidean distance between the first feature point in the reference image and all the second feature points in the target image.
[0108] In the robustness test of the perceptual model, the scene is usually transformed from a daytime scene to a nighttime scene, or from a sunny scene to a rainy scene. At this time, the position of the target object in the target image output by the generating network is basically the same as that in the reference image. That is, the pixel points corresponding to the target object will fluctuate within a reasonable range.
[0109] It should be noted that the target image in this application embodiment is an image obtained based on the reference image. Therefore, the reference image and the target image have the same size, resolution and other parameters, and the reference image and the target image use the same image coordinate system.
[0110] Therefore, by using the positional fluctuation range of corresponding feature points in the reference image and the image coordinate system, the feature point matching area can be narrowed down to the matching area to complete the initial screening of feature points, and feature point matching can be performed more specifically, avoiding interference from irrelevant feature points. At the same time, for the first feature point in the reference image, only the Euclidean distance between it and the second feature point in the matching area needs to be calculated, reducing the amount of calculation and improving the efficiency of feature point matching, thereby improving the efficiency of target image quality detection.
[0111] It should be noted that each first feature point has a corresponding position fluctuation range of n×m. Feature point matching needs to be completed for each first feature point, that is, to find a target feature point that matches it among the second feature points. The position fluctuation range in this embodiment is specifically divided based on the fineness of the detection task, or it can be set according to the requirements. For example, 1×1, 5×4, and 5×5 are all possible.
[0112] Specifically, during the matching process for a first feature point Ax, a matching region can be defined in the target image based on the positional fluctuation range corresponding to this first feature point. If a second feature point exists in this matching region, the Euclidean distance Ex between the first feature point and all second feature points in the matching region is calculated. The feature point By corresponding to the smallest Euclidean distance ex in the matching region is retained, i.e., the second feature point that matches the first feature point is retained. The retained first feature point is defined as the remaining feature point ai, and the second feature point that matches the first feature point is defined as the target feature point bi. The remaining feature point ai and the target feature point bi are considered as a feature matching pair. If no second feature point exists in this matching region, it is considered that the first feature point Ax has no matching feature point in the target image. In this case, the first feature point Ax can be directly discarded without calculation.
[0113] By traversing all the first feature points in the reference image in the above manner, the Euclidean distance is calculated, and the feature point matching is filtered. After filtering, the number of remaining feature points in the reference image and the number of target feature points in the target image are both d. At this time, the set of remaining feature points in the reference image is a = {a1, a2, ..., ad}, and the set of target feature points in the target image is b = {b1, b2, ..., bd}. The set of Euclidean distances between the corresponding feature points of a and b is e = {e1, e2, ..., ed}.
[0114] This application embodiment limits the region for feature point matching by limiting the range of positional fluctuations, thereby reducing the computational load, improving the efficiency of feature point matching, and thus improving the quality detection efficiency of the target image.
[0115] In one embodiment of this application, determining the matching region in the target image based on the first feature point, the positional fluctuation range, and the image coordinate system includes:
[0116] Determine the first position of the first feature point in the reference image;
[0117] Determine the target point located at the first position in the image coordinate system;
[0118] Based on the range of positional fluctuations, a matching region centered on the target point is determined in the target image.
[0119] In this embodiment of the application, since the pixels corresponding to the target object will fluctuate within a reasonable range, a matching region for matching the first feature point can be determined in the target image based on the range of position fluctuation.
[0120] Specifically, for a given first feature point Ax in the first feature point set A = {A1, A2, ..., Ax}, and setting the position fluctuation range corresponding to the first feature point Ax to be n×m, it is necessary to determine the first position (Gx, Hx) corresponding to the first feature point Ax. Based on this first position, the target point located at the first position (Gx, Hx) can be determined in the target image. Then, according to the position fluctuation range n×m corresponding to the first feature point Ax, the region centered on the target point can be determined in the target image. This matching region is the matching region corresponding to the first feature point Ax. The size of the matching region is the same as the position fluctuation range corresponding to the first feature point Ax, that is, the size of the matching region is n×m.
[0121] It should be noted that since the reference image and the target image use the same image coordinate system, for example, both use the lower left corner of the image as the origin of the coordinate system, under this unified image coordinate system, the horizontal coordinate Gx of the first feature point in the first position (Gx, Hx) in the reference image represents the horizontal offset from the origin of the image coordinate system, and the vertical coordinate Hx represents the vertical offset. Based on the offsets in different directions, starting from the origin, a unique target point located at the first position can be determined in the image coordinate system. After mapping the target point to the target image, the matching region centered on the target point can be determined in the target image according to the position fluctuation range.
[0122] Reference Figure 2 This is a flowchart illustrating a feature point selection process according to this application.
[0123] Specifically, the positional fluctuation range is predefined as n×m, and sets A = {A1, A2, ..., AK1} and B = {B1, B2, ..., BK2} are defined, with variables x = 1 and i = 1. Next, it checks if x is greater than K1. If x > K1, sets a, b, and e are output and the process ends; otherwise, the position (Gx, Hx) of the x-th element Ax in set A is obtained, and the matching region is determined in the target image accordingly. Then, it checks if there are any points in set B located within the matching region. If not, x is incremented by 1, and the process returns to check if x > K1; if so, the Euclidean distance Ex between the point in set B within the matching region and Ax is calculated, the minimum value and its corresponding Ax and By are retained, and the relevant values are added to sets a, b, and e respectively. i is incremented by 1, and x is also incremented by 1, then the process returns to check if x > K1. This loop continues until x > K1, at which point sets a, b, and e are output and the process ends, thus completing the feature point selection.
[0124] The entire feature point selection process involves traversing set A, set B, and the range of positional fluctuations, determining the matching region, finding points in set B within the matching region, calculating the Euclidean distance, recording the relevant minimum value information, and finally outputting the results.
[0125] As an example, the coordinate systems of the reference image and the target image are both based on the lower left corner of the image as the origin. In the reference image, the first position of the first feature point A1 is (189, 22). Assuming that the position of the first feature point A1 fluctuates within a range of 5×5, the target point with the same position (189, 22) can be determined in the image coordinate system, and a 5×5 matching region centered on the target point (189, 22) can be determined in the target image.
[0126] In one scenario, assuming there are second feature points B1 and B2 in the matching region, the Euclidean distance E1 between the two feature points is calculated based on the feature vector yA1 corresponding to the first feature point A1 and the feature vector yB1 corresponding to the second feature point B1. Similarly, the Euclidean distance E2 between the first feature point A1 and the second feature point B2 is calculated. The Euclidean distances E1 and E2 are compared. If E1 is greater than E2, A1 is designated as the remaining feature point a1, B2 is designated as the target feature point b1, and E2 is stored as the Euclidean distance e1 between the remaining feature point and the target feature point in the corresponding set.
[0127] In another scenario, assuming there is no second feature point in the matching region, there is no need to calculate the Euclidean distance. The first feature point A1 can be discarded directly, and the process of filtering the first feature point A2 can begin.
[0128] It should be noted that in this embodiment of the application, feature points are screened by determining feature matching pairs so that irrelevant feature points can be removed from the detection object in the subsequent quality detection process, thereby eliminating their interference with the detection process and improving the quality detection efficiency of the target image.
[0129] Obviously, based on the characteristics of the robustness test task of the perception model, the embodiments of this application can pre-set a reasonable position fluctuation range for each first feature point in the reference image, and based on this position fluctuation range, narrow the matching area for filtering feature points in the target image. There is no need to calculate the Euclidean distance between the first feature point and each second feature point to complete the feature point filtering, which improves the efficiency of feature point filtering and thus improves the quality detection efficiency of the target image.
[0130] In one embodiment of this application, determining multiple evaluation sub-intervals of the feature matching pair based on interference information received by the reference image or the target image includes:
[0131] Based on the interference information received by the reference image or the target image, a logarithmic threshold is determined;
[0132] Determine the total number of feature matching pairs;
[0133] Multiple distance thresholds are obtained, and the Euclidean distance between the retained first feature point and the target feature point is determined as the target distance.
[0134] The evaluation interval is determined based on the target distance and the distance threshold;
[0135] The evaluation interval is divided into multiple evaluation sub-intervals on an average basis.
[0136] It should be noted that the first retained feature point is the remaining feature point. In this embodiment, after completing the feature point screening process, it is necessary to calculate the number of feature matching pairs under different evaluation sub-intervals to detect the quality of the feature matching pairs. It should be noted that if the number of feature matching pairs is large, that is, the semantic consistency is high, therefore, this embodiment determines the number of feature matching pairs under different evaluation sub-intervals based on the distance threshold D to detect the quality of the feature matching pairs, thereby completing the quality detection of the target image.
[0137] Specifically, considering the interference information received by the reference image or target image, a minimum matching coefficient α is preset based on this interference information, where α is less than 1. At this time, the logarithmic threshold Kmin can be calculated according to formula (1). The total number of feature matching pairs is the number of remaining feature points in the reference image or the number of target feature points d in the target image. The Euclidean distance between the remaining feature points and the target feature points is determined as the target distance, that is, each value in the Euclidean distance set e = {e1, e2, ..., ed} is defined as the target distance. Based on the target distance and the distance threshold D, an evaluation interval for detecting the quality of feature matching pairs can be determined. In order to make the quality detection of feature matching pairs more accurate and convenient, the evaluation interval needs to be divided into n evaluation sub-intervals on average. It should be noted that the value n is also determined based on the fineness of the task. The higher the fineness of the task, the larger n is, and the higher the accuracy of the quality detection of feature matching pairs. In addition, the operability of the quality detection of feature matching pairs is also relatively improved, and the efficiency of the quality detection of feature matching pairs is also higher.
[0138] Kmin=αK1 (1)
[0139] Where α is the minimum matching coefficient and K1 is the number of first feature points in the reference image.
[0140] It should be noted that the relationship between the multiple distance thresholds is that an initial distance threshold is adjusted from 0 and continuously increased. The step size of the increase is set based on the task requirements and is not limited in the embodiments of this application.
[0141] In one embodiment of this application, determining the evaluation interval based on the target distance and the distance threshold includes:
[0142] Determine whether the target distance is greater than the distance threshold;
[0143] If the target distance is greater than the distance threshold, then the feature matching pair corresponding to the target distance greater than the distance threshold is determined as the target feature matching pair;
[0144] Determine the number of target feature matching pairs corresponding to different distance thresholds;
[0145] When the target logarithm is equal to the logarithm threshold, the distance threshold corresponding to the target logarithm is determined as the first distance threshold; and when the target logarithm is equal to the total logarithm, the distance threshold corresponding to the target logarithm is determined as the second distance threshold.
[0146] The evaluation interval is determined based on the first distance threshold and the second distance threshold.
[0147] In this embodiment of the application, it is necessary to determine the evaluation interval for detecting the quality of feature matching pairs based on the target distance and the distance threshold, so as to improve the robustness of target image quality detection.
[0148] However, the value of the distance threshold D directly affects the robustness of target image quality detection. Furthermore, there is currently no defined reference or standard for the value of the distance threshold D. Considering the tolerance for different interference information, this application proposes a method for determining the evaluation interval to improve the robustness of target image quality detection.
[0149] In the early stage, the threshold D is continuously increased from 0 and increased in a specific step size. When the number of feature matching pairs reaches the logarithmic threshold Kmin, the corresponding distance threshold D is determined as the first distance threshold Ymin. When the number of feature matching pairs reaches the total number of feature matching pairs d, the corresponding distance threshold D is determined as the second distance threshold Ymax. Thus, the evaluation interval [Ymin, Ymax] can be determined based on the first distance threshold and the second distance threshold.
[0150] Specifically, after determining the set of remaining feature points a = {a1, a2, ..., ad}, the set of target feature points b = {b1, b2, ..., bd}, and the set of Euclidean distances e = {e1, e2, ..., ed}, the distance threshold D is adjusted by continuously increasing from 0 with a step size of p. If e1 > D, then the feature matching pair formed by the remaining feature point a1 and the target feature point b1 is determined as the target feature matching pair. The set e is traversed to obtain the target number of target feature matching pairs. At this time, when the distance threshold D is d1 and the target number of target feature matching pairs is the logarithmic threshold Kmin, then d1 is determined as the first distance threshold Ymin. When the distance threshold D is d2 and the target number of target feature matching pairs is the total number of logarithmic pairs d, then d2 is determined as the second distance threshold Ymax.
[0151] In the process of determining the relationship between target distance and distance threshold, this application embodiment accurately locks the first distance threshold and the second distance threshold based on the logarithmic threshold and the total logarithm. This avoids detection deviations in target image quality caused by arbitrary values of the distance threshold D, effectively accommodates the influence of different interference information, and enables the detection process to adaptively select stable and reliable target feature matching pairs. This significantly reduces the interference of abnormal features on the detection results and reduces detection fluctuations caused by interference information such as noise and illumination changes. As a result, it significantly improves the robustness of target image quality detection and ensures that the detection results still have high accuracy and stability in complex environments.
[0152] In one embodiment of this application, determining the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point includes:
[0153] Obtain the evaluation weights corresponding to the evaluation sub-intervals;
[0154] Determine the number of evaluation pairs of feature matching pairs within each evaluation sub-interval, the total number of feature matching pairs, and the number of features of the first feature point;
[0155] The quality detection result of the target image is determined based on the evaluation weight corresponding to the evaluation sub-interval, the number of evaluation pairs of feature matching pairs in each evaluation sub-interval, the total number of feature matching pairs, and the feature quantity of the first feature point.
[0156] In this embodiment of the application, after dividing the evaluation interval into n evaluation sub-intervals on an average basis, an evaluation weight ω = {ω1, ω2, ..., ωn} is assigned to each evaluation sub-interval.
[0157] It should be noted that in image quality detection, the low threshold range is often a more stringent screening criterion, that is, the confidence level of the judgment is high. Therefore, it will be given a higher weight value when calculating the target score. As the threshold range increases, the screening criterion is relaxed. At this time, the reliability of the judgment decreases and the confidence level decreases. When calculating the target score, its corresponding weight value will also gradually decrease.
[0158] In the embodiments of this application, the calculation of the target score depends on the evaluation weights corresponding to each evaluation sub-interval, the number of evaluation pairs of feature matching pairs in each evaluation sub-interval, the total number of feature matching pairs, and the number of features of the first feature point.
[0159] Specifically, the pre-assigned evaluation weights ω = {ω1, ω2, ..., ωn} for each evaluation sub-interval are obtained, the number of evaluation pairs M = {M1, M2, ..., Mn} for each evaluation sub-interval feature matching pair is counted, the total number of feature matching pairs d is determined based on the remaining feature points in the reference image or the target feature points in the target image, and the feature quantity K1 of the first feature point in the reference image is counted.
[0160] Subsequently, the target score S is calculated based on the following formula (2).
[0161]
[0162] Where ωi is the evaluation weight corresponding to the i-th evaluation sub-interval, Mi is the number of evaluation pairs of feature matching pairs in the i-th evaluation sub-interval, K1 is the number of features of the first feature point, and d is the total number of feature matching pairs.
[0163] In this embodiment, by using the evaluation weights corresponding to multiple evaluation sub-intervals, the reliability differences of feature matching pairs in different intervals can be fully considered, the influence of each interval on the target image quality can be accurately measured, the detection bias caused by uniform weights can be avoided, and the accuracy and reliability of image quality detection can be effectively improved. This provides a more objective and reasonable quantitative basis for target image quality detection, and enhances the accuracy and reliability of detection results.
[0164] Reference Figure 3 This is a flowchart illustrating the calculation of a target score according to this application, specifically including the following steps:
[0165] Step 301: Obtain the total number of feature matching pairs d for sets a, b, e.
[0166] This belongs to the data preparation stage. a, b, and e are the correlations obtained from the preliminary processing. The total number of feature matching pairs, d, is an important basic data. Subsequent calculations and judgments will be based on this data.
[0167] Step 302: Calculate the logarithmic threshold Kmin.
[0168] Based on the acquired data (a, b, e, d), the logarithmic threshold Kmin is calculated using the above formula (1) and used as a basis for judgment when determining the range of distance threshold values in the future.
[0169] Step 303: Adjust the distance threshold D from 0 and increase it continuously. When the number of feature matching pairs reaches Kmin, take the corresponding distance threshold D as Ymin; when the number of feature matching pairs reaches d, take the corresponding distance threshold D as Ymax. The evaluation interval is [Ymin, Ymax].
[0170] By gradually increasing the distance threshold D, the change in the number of feature matching pairs is observed. When the number of feature matching pairs reaches Kmin, the distance threshold at this time is recorded as Ymin; when the total number of feature matching pairs d is reached, the distance threshold at this time is recorded as Ymax. These two thresholds determine an evaluation interval [Ymin, Ymax].
[0171] Step 304: Divide the evaluation interval into n sub-intervals on average, [Ymin, Y1), [Y1, Y2), [Y2, Y3), ..., [Yn-1, Ymax].
[0172] To more accurately detect image quality, the previously obtained evaluation interval [Ymin, Ymax] is further subdivided into n smaller sub-intervals. This allows for statistical analysis of feature matching pairs within different sub-intervals, enabling precise calculation of target scores and obtaining accurate quality detection results.
[0173] Step 305: Count the number of evaluation pairs M = {M1, M2, M3, ..., Mn} corresponding to each evaluation sub-interval.
[0174] For each predefined evaluation sub-interval, the number of feature matching pairs is counted to obtain a set M, which reflects the distribution of feature matching pairs in different sub-intervals and is one of the data required to calculate the target score.
[0175] Step 306: Obtain the weights ω = {ω1, ω2, ω3, ..., ωn} for each evaluation sub-interval.
[0176] Based on the stringency of the screening criteria for different sub-intervals, each evaluation sub-interval is assigned an evaluation weight, forming a weight set ω. These evaluation weights are used to reflect the different importance of different sub-intervals to the detection of target image quality when calculating the target score in the subsequent process.
[0177] Step 307: Calculate the target score S.
[0178] Based on the number of feature matching pairs M and the evaluation weight ω obtained from the previous statistics for each evaluation sub-interval, the accurate quality detection result (target score S) is finally obtained through the above formula (2), which reflects the quality of the target image.
[0179] In one embodiment of this application, after determining the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point, the method further includes:
[0180] Based on the first feature point and the target feature point in the feature matching pair, generate the matching line of the feature matching pair and the feature point matching map containing the matching line;
[0181] The generative network used to generate the target image is adjusted based on the feature point matching map.
[0182] In this embodiment of the application, after obtaining the quality detection results, in order to more intuitively show the correspondence between feature points in the feature matching pair, a matching line is drawn between the remaining feature points in the reference image and the target feature points in the target image, and a feature point matching map containing the matching line is generated, so that the feature point matching results are visualized, and it is possible to more intuitively understand which regions or elements maintain semantic consistency and which regions or elements have deviated.
[0183] Current image quality detection methods cannot propose optimization directions for the generator network based on the image quality detection results. However, in this embodiment, after determining the feature point matching map, it is possible to identify which elements or regions have poor generation quality based on the feature point matching map. Developers can then optimize accordingly, for example, by adding data specifically for training the generator network.
[0184] The embodiments of this application can visualize the detection results by generating matching lines and feature point matching maps containing the matching lines, thereby increasing the interpretability and rationality of the detection method.
[0185] To enable those skilled in the art to better understand the technical solution of this application, an example is provided below:
[0186] Reference images of the daytime scene of the road (hereinafter referred to as...) Figure 1 The input is fed into the trained CycleGAN network, and the output is the target image of the night scene (hereinafter referred to as...). Figure 2 ).
[0187] The SIFT algorithm is used to construct a feature extractor, which includes building a scale space, building a Gaussian difference pyramid, locating feature points, assigning feature point orientations, and generating feature point descriptors (feature vectors of all feature points).
[0188] Will Figure 1 and Figure 2 The input is fed into the feature extractor, which outputs the number of feature points K1 and K2, the feature point sets A and B, and the feature vector sets yA and yB of the corresponding reference and target images.
[0189] Assuming the current output Figure 1 and Figure 2 The number of feature points is 110 and 136. Figure 1 The first feature point set is A = {A1, A2, ..., A110}. Figure 2 The set of the second feature points is B = {B1, B2, ..., B136}, and Figure 1 The first eigenvector set in the equation is yA = {yA1, yA2, ..., yA110}. Figure 2 The set of the second eigenvectors in yA is yB = {yB1, yB2, ..., yB136}. In yA, yAi is... Figure 1 The eigenvector of the first feature point Ai in yB, where yBi is... Figure 2 The eigenvector of the second feature point Bi.
[0190] Assume the reasonable fluctuation range of the prime point is 5×5. Obtain... Figure 1 The first feature point A1 is located at (156, 23), and the search... Figure 2 Within a 5×5 region centered at (156, 23), there exists a second feature point B1(190, 20). Calculate the Euclidean distance between the eigenvectors of these two points, denoted as e1. Obtain the first feature point A2(196, 11). Figure 2 The 5×5 region centered at (196, 11) contains no feature points, so A2 is discarded, and the process continues. Figure 1 All feature points have been calculated.
[0191] at this time, Figure 1 and Figure 2 The number of remaining feature points is 100. Figure 1 The set of remaining feature points is a = {a1, a2, ..., a100}. Figure 2 The target feature point set is b = {b1, b2, ..., b100}, and the Euclidean distance set between the corresponding feature points of a and b is e = {e1, e2, ..., e100}.
[0192] Assuming a minimum matching coefficient α = 0.6, the minimum number of matching pairs is calculated to be 60. The threshold D is adjusted by continuously increasing from 0 in increments of 0.05. If e1 > D, then... Figure 1 The remaining feature points a1 and Figure 2The target feature points b1 in the set e form matching pairs. Traverse the set e to obtain the number of target feature matching pairs. Assuming that the number of target pairs reaches 60 when the distance threshold D is 2.5, and the number of target pairs reaches 100 when the distance threshold D is 8.5, the evaluation interval is determined to be [2.5, 8.5]. Divide the threshold interval [2.5, 8.5] into three sub-intervals: [2.5, 4.5), [4.5, 6.5), and [6.5, 8.5].
[0193] Assume the number of evaluation logs in the evaluation subinterval [2.5, 4.5) is M1 = 65; the number of evaluation logs in the evaluation subinterval [4.5, 6.5) is M2 = 80; and the number of evaluation logs in the evaluation subinterval [6.5, 8.5] is M3 = 100. The evaluation weights in the evaluation subintervals [2.5, 4.5) are ω1 = 4; the evaluation weights in the evaluation subintervals [4.5, 6.5) are ω2 = 3; and the evaluation weights in the evaluation subintervals [6.5, 8.5] are ω3 = 1.
[0194] Using the above formula (2), the quality inspection result (target score S) can be calculated to be 68. Based on the quality inspection standards presented in Table 1, the final result of the output target image is general.
[0195] This application embodiment uses the SIFT algorithm to extract features from the reference image and the target image to reduce the workload of network pre-training, reduces the workload of feature matching by limiting the matching region, objectively detects the quality of feature matching pairs by evaluating the division of the interval, and improves the intuitiveness of the detection results by outputting the target score. This can improve the reliability, efficiency, and robustness of the target image quality detection method, obtain more accurate quality detection results, and thus improve the reliability of the robustness evaluation of the autonomous driving perception model.
[0196] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0197] Based on the above embodiments, this embodiment also provides an image quality detection device, which can be applied to electronic devices such as terminal devices and servers.
[0198] Reference Figure 4 The diagram shows a structural block diagram of an embodiment of an image quality detection device according to this application, which may specifically include the following modules:
[0199] The acquisition module 401 is used to acquire a reference image containing a first feature point, a target image containing a second feature point, and interference information of the reference image or the target image; the target image is generated based on the reference image.
[0200] The filtering module 402 is used to filter out target feature points that match the first feature point from the second feature points, and to determine the first feature point and the target feature point as a feature matching pair;
[0201] The determining module 403 is used to determine multiple evaluation sub-intervals of the feature matching pair based on the interference information received by the reference image or the target image;
[0202] The quality detection result module 404 is used to determine the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point.
[0203] In one embodiment of this application, the first feature point corresponds to a positional fluctuation range, and the acquisition module includes:
[0204] The matching region submodule is used to determine a matching region in the target image based on the first feature point, the position fluctuation range, and the image coordinate system.
[0205] The second feature point submodule is used to determine whether the second feature point exists within the matching region;
[0206] The discard submodule is used to determine that there is no feature point matching the first feature point among the second feature points if the second feature point does not exist in the matching area, and to discard the first feature point.
[0207] The retention submodule is used to determine, if the second feature point exists in the matching region, that there is a feature point among the second feature points that matches the first feature point, retain the first feature point, calculate the Euclidean distance between the retained first feature point and each second feature point in the matching region, and determine the target feature point among the second feature points based on the Euclidean distance, and determine the retained first feature point and the target feature point as the feature matching pair.
[0208] In one embodiment of this application, the matching region submodule includes:
[0209] A first position unit is used to determine the first position of the first feature point in the reference image;
[0210] A target point unit is used to determine a target point located at the first position in the image coordinate system;
[0211] The matching region determination unit is used to determine a matching region centered on the target point in the target image based on the position fluctuation range.
[0212] In one embodiment of this application, the determining module includes:
[0213] The logarithmic thresholding submodule is used to determine the logarithmic threshold based on the interference information received by the reference image or the target image;
[0214] The total logarithm submodule is used to determine the total number of feature matching pairs;
[0215] The target distance submodule is used to acquire multiple distance thresholds and determine the Euclidean distance between the retained first feature point and the target feature point as the target distance.
[0216] The evaluation interval submodule is used to determine the evaluation interval based on the target distance and the distance threshold;
[0217] The partitioning submodule is used to divide the evaluation interval into multiple evaluation sub-intervals on an average basis.
[0218] In one embodiment of this application, the evaluation interval submodule includes:
[0219] The judgment unit is used to determine whether the target distance is greater than the distance threshold;
[0220] The target feature matching pair unit is used to determine the feature matching pair corresponding to the target distance that is greater than the distance threshold as the target feature matching pair if the target distance is greater than the distance threshold.
[0221] The target logarithm unit is used to determine the number of target pairs corresponding to different distance thresholds for target feature matching pairs.
[0222] A distance threshold unit is configured to determine the distance threshold corresponding to the target logarithm as a first distance threshold when the target logarithm is the logarithm threshold, and to determine the distance threshold corresponding to the target logarithm as a second distance threshold when the target logarithm is the total logarithm.
[0223] The evaluation interval determination unit is used to determine the evaluation interval based on the first distance threshold and the second distance threshold.
[0224] In one embodiment of this application, the quality inspection result module includes:
[0225] The evaluation weight submodule is used to obtain the evaluation weights corresponding to the evaluation sub-intervals;
[0226] The determination submodule is used to determine the number of evaluation pairs of feature matching pairs in each evaluation sub-interval, the total number of feature matching pairs, and the number of features of the first feature point;
[0227] The calculation submodule is used to determine the quality detection result of the target image based on the evaluation weight corresponding to the evaluation sub-interval, the number of evaluation pairs of feature matching pairs in each evaluation sub-interval, the total number of feature matching pairs, and the feature quantity of the first feature point.
[0228] In one embodiment of this application, the apparatus further includes:
[0229] The generation module is used to generate a matching line for the feature matching pair and a feature point matching map containing the matching line based on the first feature point and the target feature point in the feature matching pair.
[0230] An adjustment module is used to adjust the generator network used to generate the target image based on the feature point matching map.
[0231] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0232] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In this application, the electronic device includes various types of devices such as terminal devices and servers (clusters).
[0233] The embodiments of this disclosure can be implemented as an apparatus configured as desired using any suitable hardware, firmware, software, or any combination thereof, including electronic devices such as terminal devices, servers (clusters), etc. Figure 5 An exemplary apparatus 500 is schematically shown that can be used to implement the various embodiments described in this application.
[0234] In one embodiment, Figure 5 An exemplary device 500 is shown, which includes one or more processors 502, a control module (chipset) 504 coupled to at least one of the processors 502, a memory 506 coupled to the control module 504, a non-volatile memory (NVM) / storage device 508 coupled to the control module 504, one or more input / output devices 510 coupled to the control module 504, and a network interface 512 coupled to the control module 504.
[0235] Processor 502 may include one or more single-core or multi-core processors, and processor 502 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 500 can serve as a terminal device, server (cluster), or other device as described in the embodiments of this application.
[0236] In some embodiments, the apparatus 500 may include one or more computer-readable media (e.g., memory 506 or NVM / storage device 508) having instructions 514 and one or more processors 502 that are combined with the one or more computer-readable media and configured to execute the instructions 514 to implement the module and thus perform the actions described in this disclosure.
[0237] In one embodiment, the control module 504 may include any suitable interface controller to provide any suitable interface to at least one of the processors 502 and / or any suitable device or component communicating with the control module 504.
[0238] The control module 504 may include a memory controller module to provide an interface to the memory 506. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0239] Memory 506 may be used, for example, to load and store data and / or instructions 514 for device 500. In one embodiment, memory 506 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 506 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0240] In one embodiment, the control module 504 may include one or more input / output controllers to provide an interface to the NVM / storage device 508 and (one or more) input / output devices 510.
[0241] For example, NVM / storage device 508 may be used to store data and / or instructions 514. NVM / storage device 508 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0242] NVM / storage device 508 may include storage resources that are physically part of a device on which device 500 is mounted, or that can be accessed by the device without needing to be part of the device. For example, NVM / storage device 508 may be accessed via a network through one or more input / output devices 510.
[0243] One or more input / output devices 510 may provide an interface for device 500 to communicate with any other suitable device. Input / output devices 510 may include communication components, audio components, sensor components, etc. A network interface 512 may provide an interface for device 500 to communicate via one or more networks. Device 500 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0244] In one embodiment, at least one of the processors 502 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 504. In one embodiment, at least one of the processors 502 may be logically packaged with one or more controllers of the control module 504 to form a system-in-package (SiP). In one embodiment, at least one of the processors 502 may be integrated with the logic of one or more controllers of the control module 504 on the same die. In one embodiment, at least one of the processors 502 may be integrated with the logic of one or more controllers of the control module 504 on the same die to form a system-on-a-chip (SoC).
[0245] In various embodiments, device 500 may be, but is not limited to, a terminal device such as a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, device 500 may have more or fewer components and / or different architectures. For example, in some embodiments, device 500 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0246] The detection device can use a main control chip as a processor or control module, and sensor data, position information, etc. can be stored in a memory or NVM / storage device. The sensor group can be used as an input / output device, and the communication interface can include a network interface.
[0247] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0248] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0249] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable image quality assessment terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable image quality assessment terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0250] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable image quality assessment terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0251] These computer program instructions can also be loaded onto a computer or other programmable image quality assessment terminal device, causing a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0252] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0253] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0254] The above provides a detailed description of an image quality detection method and apparatus, an electronic device, and a storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for detecting image quality, characterized in that, The method includes: Acquire a reference image containing a first feature point, a target image containing a second feature point, and interference information affecting the reference image or the target image; the target image is generated based on the reference image; Target feature points that match the first feature point are selected from the second feature points, and the first feature point and the target feature point are determined as a feature matching pair. Based on the interference information of the reference image or the target image, determine multiple evaluation sub-intervals of the feature matching pair; The quality detection result of the target image is determined based on the evaluation sub-interval, the feature matching pair, and the first feature point.
2. The method according to claim 1, characterized in that, The first feature point corresponds to a range of positional fluctuations. The reference image and the target image have the same image coordinate system. The step of filtering out target feature points that match the first feature point from the second feature points and determining the first feature point and the target feature point as a feature matching pair includes: Based on the first feature point, the positional fluctuation range, and the image coordinate system, a matching region is determined in the target image; Determine whether the second feature point exists within the matching region; If the second feature point does not exist within the matching region, it is determined that there is no feature point among the second feature points that matches the first feature point, and the first feature point is discarded. If the second feature point exists within the matching region, it is determined that there is a feature point among the second feature points that matches the first feature point. The first feature point is retained, the Euclidean distance between the retained first feature point and each second feature point within the matching region is calculated, and the target feature point is determined among the second feature points based on the Euclidean distance. The retained first feature point and the target feature point are determined as the feature matching pair.
3. The method according to claim 2, characterized in that, The step of determining the matching region in the target image based on the first feature point, the position fluctuation range, and the image coordinate system includes: Determine the first position of the first feature point in the reference image; Determine the target point located at the first position in the image coordinate system; Based on the range of positional fluctuations, a matching region centered on the target point is determined in the target image.
4. The method according to claim 2, characterized in that, The step of determining multiple evaluation sub-intervals of the feature matching pair based on the interference information received by the reference image or the target image includes: Based on the interference information received by the reference image or the target image, a logarithmic threshold is determined; Determine the total number of feature matching pairs; Multiple distance thresholds are obtained, and the Euclidean distance between the retained first feature point and the target feature point is determined as the target distance. The evaluation interval is determined based on the target distance and the distance threshold; The evaluation interval is divided into multiple evaluation sub-intervals on an average basis.
5. The method according to claim 4, characterized in that, The step of determining the evaluation interval based on the target distance and the distance threshold includes: Determine whether the target distance is greater than the distance threshold; If the target distance is greater than the distance threshold, then the feature matching pair corresponding to the target distance greater than the distance threshold is determined as the target feature matching pair; Determine the number of target feature matching pairs corresponding to different distance thresholds; When the target logarithm is equal to the logarithm threshold, the distance threshold corresponding to the target logarithm is determined as the first distance threshold; and when the target logarithm is equal to the total logarithm, the distance threshold corresponding to the target logarithm is determined as the second distance threshold. The evaluation interval is determined based on the first distance threshold and the second distance threshold.
6. The method according to claim 1, characterized in that, Determining the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point includes: Obtain the evaluation weights corresponding to the evaluation sub-intervals; Determine the number of evaluation pairs of feature matching pairs within each evaluation sub-interval, the total number of feature matching pairs, and the number of features of the first feature point; The quality detection result of the target image is determined based on the evaluation weight corresponding to the evaluation sub-interval, the number of evaluation pairs of feature matching pairs in each evaluation sub-interval, the total number of feature matching pairs, and the feature quantity of the first feature point.
7. The method according to claim 2, characterized in that, After determining the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point, the method further includes: Based on the first feature point and the target feature point in the feature matching pair, generate the matching line of the feature matching pair and the feature point matching map containing the matching line; The generative network used to generate the target image is adjusted based on the feature point matching map.
8. An image quality assessment device, characterized in that, The device includes: The acquisition module is used to acquire a reference image containing a first feature point, a target image containing a second feature point, and interference information of the reference image or the target image; the target image is generated based on the reference image. The filtering module is used to filter out target feature points that match the first feature point from the second feature points, and to determine the first feature point and the target feature point as a feature matching pair; The determination module is used to determine multiple evaluation sub-intervals of the feature matching pair based on the interference information received by the reference image or the target image; The quality detection result module is used to determine the quality detection result of the target image based on the evaluation sub-interval, the feature matching pair, and the first feature point.
9. An electronic device, characterized in that, include: processor; and A memory having executable code stored thereon, which, when executed, causes the processor to perform the image quality detection method as described in any one of claims 1-7.
10. One or more machine-readable media having executable code stored thereon, which, when executed, causes a processor to perform the image quality detection method as described in any one of claims 1-7.
