Image quality detection method, device and electronic equipment
By extracting features and performing comprehensive scoring on driver images, the problem of abnormal driver images interfering with DMS judgment is solved, improving the accuracy of image quality detection and the reliability of driver status monitoring, and enhancing driver safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
- Filing Date
- 2026-02-14
- Publication Date
- 2026-05-29
AI Technical Summary
Abnormal driver images can interfere with the driver monitoring system's (DMS) accurate assessment of the driver's condition, leading to potential safety risks.
By acquiring driver images and environmental parameters, feature extraction is performed, and the image quality scores in dimensions such as overexposure, glare, and blur are evaluated. The weight coefficients are dynamically adjusted based on environmental parameters to calculate a comprehensive quality score and select valid images.
It improves the accuracy and comprehensiveness of image quality detection, ensures the stability and reliability of driver status monitoring, and enhances driver safety awareness.
Smart Images

Figure CN122115386A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image quality detection method, apparatus and electronic device. Background Technology
[0002] In recent years, with the rapid development of intelligent driving technology, in-cabin DMS (Driver Monitoring System) has played an increasingly crucial role in ensuring driving safety. This system primarily uses onboard cameras to collect and analyze images of the driver in real time to monitor their driving status. Therefore, high-quality image input is an important prerequisite for ensuring that the DMS accurately identifies the driver's state.
[0003] However, in practical applications, the images collected may be abnormal due to factors such as the driving environment and the performance of the camera hardware. These abnormalities may interfere with the DMS's accurate judgment of the driver's status, which may lead to false alarms or missed alarms, and thus pose a potential risk to driving safety. Summary of the Invention
[0004] This application provides an image quality detection method, apparatus, and electronic device to solve the technical problem that abnormalities in driver images can interfere with the accurate judgment of driver status by the DMS.
[0005] This application provides an image quality detection method, the method comprising: acquiring target data for image quality detection, the target data including environmental parameters and driver images in a monitoring queue, the monitoring queue being used to monitor driver status; extracting features from the driver images, determining quality scores of the driver images in multiple dimensions based on the extracted features, wherein the multiple dimensions include at least two of overexposure, glare, and blur dimensions; determining weight coefficients for each dimension based on the environmental parameters, and calculating a comprehensive quality score for the driver images by combining the weight coefficients and quality scores of each dimension, so as to filter the driver images in the monitoring queue according to the comprehensive quality score.
[0006] In one embodiment of this application, obtaining target data for image quality detection includes: acquiring an original driver image; cropping the face of the original driver image to obtain the driver image, which is used as the target data; wherein, cropping the face of the original driver image includes: performing face detection on the original driver image to obtain a face detection result; cropping the original driver image by a preset multiple of the face detection box if a face detection box exists in the face detection result to obtain the driver image; and cropping the original driver image by a preset size with a preset position as the center if a face detection box does not exist in the face detection result to obtain the driver image. By cropping the face of the original driver image to obtain the driver image, subsequent feature extraction of the facial region can be performed. Based on the features of the facial region, the quality score of the driver image in multiple dimensions can be determined. This avoids unnecessary calculations, reduces image processing workload, improves detection efficiency, saves system resources, and reduces the impact of noise in non-critical areas on the image quality score, thus reducing the possibility of misjudgment in image quality detection.
[0007] In one embodiment of this application, the multiple dimensions include the overexposure dimension, and the features include brightness values. Feature extraction is performed on the driver image, and a quality score for the driver image in multiple dimensions is determined based on the extracted features. This includes: extracting the brightness values of each pixel in the driver image and identifying pixels with brightness values greater than a preset brightness threshold as bright pixels; counting the number of bright pixels as the number of bright pixels and counting the total number of pixels in the driver image as the total number of image pixels; and calculating the quality score for the overexposure dimension based on the number of bright pixels and the total number of image pixels. By locating bright pixels in the driver image and quantifying the degree of overexposure by the proportion of bright pixels, the quality score for the overexposure dimension can be objectively evaluated, and abnormal image exposure in strong light, backlight, or reflective scenes can be identified.
[0008] In one embodiment of this application, the multiple dimensions include the glare dimension, and the features include brightness values. Feature extraction is performed on the driver image, and a quality score for the driver image in multiple dimensions is determined based on the extracted features. This includes: extracting the brightness values of each pixel in the driver image and identifying pixels with brightness values greater than or equal to a preset brightness threshold as high-brightness pixels; identifying the largest connected region formed by the high-brightness pixels in the driver image as the main bright spot region; counting the number of pixels in the main bright spot region as the main bright spot region pixel count, and counting the total number of pixels in the driver image as the total number of image pixels; and calculating the quality score for the glare dimension based on the number of pixels in the main bright spot region and the total number of image pixels. By locating the largest bright spot region in the driver image and quantifying the degree of glare by the proportion of the largest bright spot region, the quality score for the glare dimension can be objectively evaluated, and image glare anomalies in direct sunlight scenes can be identified.
[0009] In one embodiment of this application, the multiple dimensions include the fuzzy dimension, and the features include a response map. Feature extraction is performed on the driver image, and a quality score for the driver image in multiple dimensions is determined based on the extracted features. This includes: convolving the driver image to obtain a response map corresponding to the driver image, which serves as the image response map; calculating the variance of the image response map based on the pixel values of each pixel in the image response map; and obtaining the quality score of the fuzzy dimension based on the calculated variance of the image response map. By calculating the variance of the response map, the dispersion of the feature distribution is quantified, thereby objectively evaluating the quality score of the fuzzy dimension and identifying image blur anomalies in low-light, rainy, snowy, or foggy scenes.
[0010] In one embodiment of this application, the plurality of dimensions includes the overexposure dimension, the glare dimension, and the blur dimension. The environmental parameters include light intensity, and the target data also includes wiper status information. Determining the weight coefficients of each dimension based on the environmental parameters includes: determining the weight coefficients of each dimension based on a first preset rule when the light intensity is greater than the maximum value of a preset light intensity range; in the first preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the overexposure dimension and the weight coefficients of the blur dimension are both less than the weight coefficient of the glare dimension, and the weight coefficients of the overexposure dimension and the blur dimension are less than the weight coefficient of the glare dimension. The sum of the weight coefficients of each dimension is less than the weight coefficient of the glare dimension. Under the condition that the light intensity is less than the minimum value of the preset light intensity range, the weight coefficients of each dimension are determined based on a second preset rule. In the second preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the overexposure dimension and the glare dimension are both less than the weight coefficient of the blur dimension, and the sum of the weight coefficients of the overexposure dimension and the glare dimension is less than the weight coefficient of the blur dimension. Under the condition that the light intensity meets the preset light intensity range, the weight coefficients of each dimension are determined based on the wiper status information. By using multi-dimensional environmental perception based on light intensity and wiper status to identify the characteristics of the current driving environment, the weights of each dimension are dynamically allocated according to the characteristics of the current driving environment, making the image quality assessment more consistent with actual driving conditions.
[0011] In one embodiment of this application, determining the weight coefficients of each dimension based on the wiper status information includes: determining the duration for which the wipers are in the on state based on the wiper status information; determining the weight coefficients of each dimension based on a third preset rule when the duration is greater than or equal to a preset duration threshold; in the third preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the glare dimension and the weight coefficients of the blur dimension are both greater than the weight coefficient of the overexposure dimension, the weight coefficient of the blur dimension is greater than or equal to the weight coefficient of the glare dimension, and the sum of the weight coefficients of the overexposure dimension and the weight coefficients of the glare dimension is greater than the weight coefficient of the blur dimension; and determining the weight coefficients of each dimension according to an equal distribution principle when the duration is less than the preset duration threshold.
[0012] In one embodiment of this application, after calculating the comprehensive quality score of the driver image, the method includes: comparing the comprehensive quality score with a preset scoring threshold; if the comprehensive quality score is less than the preset scoring threshold, removing the driver image from the monitoring queue and generating an image acquisition anomaly alert message; if the comprehensive quality score is greater than or equal to the preset scoring threshold, retaining the driver image in the monitoring queue for driver status monitoring. By comparing the comprehensive quality score with the preset scoring threshold, it is possible to determine whether there are quality anomalies in the driver image, thereby accurately filtering valid images, improving the accuracy and reliability of subsequent DMS driver status monitoring, and generating an image acquisition anomaly alert message when the comprehensive quality score is less than the preset scoring threshold, thereby enhancing the driver's safety awareness and ensuring driving safety.
[0013] This application also provides an image quality detection device, the device comprising: a data acquisition module for acquiring target data for image quality detection, the target data including environmental parameters and driver images in a monitoring queue, the monitoring queue being used to monitor driver status; an information processing module for extracting features from the driver images, determining quality scores of the driver images in multiple dimensions based on the extracted features, determining weight coefficients for each dimension based on the environmental parameters, and calculating a comprehensive quality score for the driver images by combining the weight coefficients and quality scores of each dimension, wherein the multiple dimensions include at least two of overexposure, glare, and blur; and an image management module for filtering the driver images in the monitoring queue according to the comprehensive quality score.
[0014] This application also provides an electronic device, the electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the image quality detection method as described above.
[0015] This application offers at least the following advantages: By extracting features from driver images in the monitoring queue, and determining quality scores for driver images in at least two of the overexposure, glare, and blur dimensions based on the extracted features, it can identify and filter low-quality driver images caused by problems such as blur, overexposure, and glare. Furthermore, by comprehensively evaluating the quality scores across all dimensions, it overcomes the interference of extreme quality scores in a single dimension, reduces the bias of single-dimensional quality assessment, and ensures the comprehensiveness and reliability of image quality detection, thereby improving the accuracy of image quality detection and providing a stable and reliable image input foundation for subsequent driver status monitoring. Moreover, by dynamically determining the weight coefficients of each dimension based on environmental parameters, it enhances the adaptability of image quality detection to the driving environment, further improving the accuracy of image quality detection. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0017] In the attached diagram:
[0018] Figure 1 A schematic diagram illustrating the implementation environment of an image quality detection method according to an embodiment of this application; Figure 2 A schematic flowchart of an image quality detection method provided in an embodiment of this application; Figure 3a A schematic diagram of a driver's image with a cropped face provided as an exemplary embodiment of this application; Figure 3b A schematic diagram of a driver's image with a cropped face provided as another exemplary embodiment of this application; Figure 4a A schematic diagram of an overexposed image provided for an exemplary embodiment of this application; Figure 4b A schematic diagram of a glare image provided for an exemplary embodiment of this application; Figure 4c A schematic diagram of a blurred image provided for an exemplary embodiment of this application; Figure 5 A schematic diagram of a binarized image provided for an exemplary embodiment of this application; Figure 6 A schematic diagram of a connected region image provided for an exemplary embodiment of this application; Figure 7A schematic diagram illustrating the scene determination process provided for an exemplary embodiment of this application; Figure 8 This is a block diagram of an image quality detection device provided in one embodiment of this application; Figure 9 A schematic diagram of the workflow of an image quality detection system provided in an exemplary embodiment of this application; Figure 10 This is a schematic diagram of the structure of a computer system for an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0020] The illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0021] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.
[0022] The embodiments of this application respectively propose an image quality detection method, an image quality detection device, an electronic device, a computer-readable storage medium, and a computer program product, which will be described in detail below.
[0023] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the implementation environment of an image quality detection method according to an embodiment of this application, as shown below. Figure 1As shown, the implementation environment may include an intelligent vehicle 110 and a computer device 120. The intelligent vehicle 110 can be an intelligent gasoline vehicle, an intelligent electric vehicle, an intelligent hybrid vehicle, or other types of intelligent vehicles. The computer device 120 can be at least one of a GPU (Graphics Processing Unit) computer, a GPU computing cluster, a microcomputer, an embedded computer, a neural network computer, etc., without limitation. The computer device 120 can be configured within the intelligent vehicle 110, for example, in the DMS (Distributed Management System) of the intelligent vehicle 110. Alternatively, the computer device 120 can be a computer device independent of the intelligent vehicle 110, without limitation. The intelligent vehicle 110 is equipped with various types of sensors, which can collect environmental parameters and driver images as target data and provide them to the computer device 120 for image quality detection.
[0024] Schematic, computer device 120 acquires target data for image quality detection, including environmental parameters and driver images in a monitoring queue used to monitor driver status; performs feature extraction on the driver images, determines quality scores for the driver images in multiple dimensions based on the extracted features, wherein the multiple dimensions include at least two of overexposure, glare, and blur dimensions; determines weight coefficients for each dimension based on the environmental parameters, and calculates a comprehensive quality score for the driver images by combining the weight coefficients and quality scores of each dimension, so as to filter driver images in the monitoring queue according to the comprehensive quality score. As can be seen, the technical solution of this application extracts features from driver images in the monitoring queue and determines the quality score of the driver image in at least two of the overexposure, glare, and blur dimensions based on the extracted features. This can identify and filter low-quality driver images caused by problems such as blur, overexposure, and glare. Furthermore, by comprehensively evaluating the quality scores of each dimension, the solution overcomes the interference of extreme quality scores in a single dimension, reduces the bias of single-dimensional quality assessment, and ensures the comprehensiveness and reliability of image quality detection, thereby improving the accuracy of image quality detection and providing a stable and reliable image input foundation for subsequent driver status monitoring. Moreover, by dynamically determining the weight coefficients of each dimension based on environmental parameters, the adaptability of image quality detection to the driving environment can be enhanced, further improving the accuracy of image quality detection.
[0025] The image quality detection method provided in this application embodiment can be specifically executed by computer device 120, and correspondingly, the image quality detection device can be set in computer device 120.
[0026] Please see Figure 2 , Figure 2 This is a schematic flowchart of an image quality detection method provided in an embodiment of this application. This image quality detection method can be applied to... Figure 1 The implementation environment shown is specifically executed by computer device 120 within that implementation environment. This image quality detection method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the image quality detection method is applicable. Figure 2 As shown, in an exemplary embodiment, the image quality detection method includes at least steps S210 to S230, which are described in detail below: Step S210: Obtain target data for image quality detection.
[0027] Step S220: Extract features from the driver images of the monitoring queue in the target data, and determine the quality scores of the driver images in multiple dimensions based on the extracted features.
[0028] Step S230: Determine the weight coefficients of each dimension based on the environmental parameters in the target data, combine the weight coefficients and quality scores of each dimension, calculate the comprehensive quality score of the driver images, and filter the driver images in the monitoring queue according to the comprehensive quality score.
[0029] In step S210, the target data includes environmental parameters and driver images in the monitoring queue. Environmental parameters include at least one of light intensity and weather type. The monitoring queue is used to monitor the driver's state, and the DMS monitors the driver's state through driver images in the monitoring queue. Light intensity can be collected by sensors in the vehicle as an environmental parameter, or weather type can be obtained through vehicle-to-everything (V2X) networks or sensors in the vehicle as an environmental parameter. Driver images can be collected by cameras installed on the A-pillar or other locations in the cockpit and stored in the monitoring queue. The environmental parameters and driver images are collected at the same time or during the same period.
[0030] In step S220, the extracted features include the brightness or grayscale values of each pixel in the driver image, or the response map of the driver image. Multiple dimensions include at least two of the following: overexposure dimension, glare dimension, and blur dimension. The overexposure dimension represents the degree of overexposure in the driver image, i.e., the light intensity of the highlight areas in the driver image. The higher the quality score of the overexposure dimension, the lower the degree of overexposure in the driver image, and the better the driver image quality. The glare dimension represents the size of the light spots in the driver image. The higher the quality score of the glare dimension, the smaller the light spots in the driver image, and the better the driver image quality. The blur dimension characterizes the sharpness of the driver image. The higher the quality score of the blur dimension, the sharper the driver image, and the better the driver image quality.
[0031] In step S230, the weight coefficients of each dimension differ under different environmental parameters. Based on the weight coefficients of each dimension under the current environmental parameters and the quality scores of each dimension, a weighted sum is performed to obtain a comprehensive quality score. The driver's image is then retained in the monitoring queue or removed from the monitoring queue based on the comprehensive quality score.
[0032] In some embodiments, determining the weight coefficients of each dimension based on environmental parameters includes: comparing the light intensity with a preset light intensity range, determining the corresponding preset rule based on the comparison result, and determining the weight coefficients of each dimension according to the preset rule, wherein the preset rule includes the specific values of the weight coefficients of each dimension and / or the constraint relationship between the weight coefficients of each dimension.
[0033] In some embodiments, filtering driver images in the monitoring queue based on a comprehensive quality score includes: removing driver images from the monitoring queue if the comprehensive quality score is less than a preset score threshold; and retaining driver images in the monitoring queue if the comprehensive quality score is greater than or equal to the preset score threshold.
[0034] In one embodiment of this application, step S210 includes: acquiring an original driver image, cropping the face of the original driver image to obtain a driver image as target data. The face cropping of the original driver image includes: performing face detection on the original driver image to obtain a face detection result; if a face detection box exists in the face detection result, cropping the original driver image by a preset multiple of the face detection box to obtain a driver image; if no face detection box exists in the face detection result, cropping the original driver image to a preset size with a preset center to obtain a driver image.
[0035] In this embodiment, the original driver image refers to the original image obtained by capturing images of the driver through image acquisition devices such as cameras and infrared cameras. The preset position refers to the image coordinate points pre-set for the original driver image. The DMS primarily detects the driver's facial region, so images outside the facial region do not significantly affect the DMS's judgment results. Even if the image has local overexposure or excessive glare, as long as the facial region's quality is acceptable, driver state analysis can still be performed. That is, only the image quality score of the facial region directly affects the DMS system's detection. Furthermore, in scenarios with limited vehicle resources, directly performing image quality detection on the original image captured by the camera would slow down the computation. Therefore, face detection can be performed on the original driver image captured by the image acquisition device, and the image can be cropped based on the detection results to obtain the facial region image, which serves as the driver image. This allows for subsequent feature extraction of the facial region, determining the driver image's quality score across multiple dimensions based on the facial region's features. This avoids unnecessary computation, reduces image processing workload, improves detection efficiency, saves system resources, and also reduces the impact of noise in non-critical areas on the image quality score, minimizing the possibility of misjudgments in image quality detection.
[0036] In some embodiments, a face detection model in the DMS system can be used to detect faces in the original driver image. If the face detection model detects a face in the original driver image, the original driver image is cropped according to the position of the face detection box in the face detection result output by the face detection model, and by a preset multiple of the size of the face detection box. For example, the preset multiple can be 1 to 2 times, such as... Figure 3a As shown, the original driver image can be cropped by 1.5 times the size of the face detection bounding box to obtain the driver image. If the face detection model cannot detect a face in the original driver image, a preset position in the original driver image is selected, and the cropping is performed outward from that preset position to a preset size, as shown. Figure 3b As shown, the driver's image can be obtained by cropping a rectangular frame of a preset size that expands outward from the preset position.
[0037] In some embodiments, before step S220, the method includes: identifying facial contours in a driver image; dividing the driver image based on the facial contours to obtain a face region and a background region; filling the background region with preset pixel values; obtaining a processed driver image based on the face region and the filled background region; extracting features from the filled driver image; and determining a quality score of the driver image in multiple dimensions based on the extracted features.
[0038] In one embodiment of this application, multiple dimensions include an overexposure dimension, and the features include brightness values. Step S220 includes: extracting the brightness values of each pixel in the driver image and taking pixels with brightness values greater than a preset brightness threshold as bright pixels; counting the number of bright pixels as the number of bright pixels and counting the total number of pixels in the driver image as the total number of image pixels; and calculating the quality score of the overexposure dimension based on the number of bright pixels and the total number of image pixels.
[0039] like Figure 4a As shown, in overexposed images, the brightness values of a large number of pixels are close to or reach their maximum values, resulting in the loss of image detail. Therefore, the driver image can be binarized, and the proportion of high-brightness pixels in the driver image can be statistically analyzed to determine the degree of overexposure. By locating the high-brightness pixels in the driver image and quantifying the degree of overexposure by the proportion of high-brightness pixels, the quality score of the overexposure dimension can be objectively evaluated, and abnormal image exposure in strong light, backlight, or reflective scenes can be identified.
[0040] For example, the preset brightness threshold can be 240, or other values less than or equal to 255.
[0041] In some embodiments, the driver image can be binarized, and the number of pixels with brightness values greater than a preset brightness threshold can be counted as the number of bright pixels, and the total number of pixels in the driver image can be counted as the total number of image pixels. The percentage of overexposed pixels is calculated based on the number of bright pixels and the total number of image pixels, as follows: P over = N over / N Equation (1) in, P over For the percentage of overexposed pixels, N over The number of bright pixels, N This represents the total number of pixels in the image.
[0042] The quality score for the overexposure dimension is calculated based on the proportion of overexposed pixels, as follows: Q 1 = 1 - P over Equation (2) in, Q 1 represents the quality score for overexposure. P over This refers to the percentage of overexposed pixels. For example... Figure 5As shown, the proportion of white pixels in the binarized image is the overexposed pixel proportion. The more white pixels there are in the binary image, the higher the overexposed pixel proportion, and the lower the quality score of the driver image in the overexposed dimension. The more severe the image overexposure, that is, the higher the degree of image overexposure, the worse the image quality.
[0043] In another embodiment of this application, multiple dimensions include an overexposure dimension, and features include brightness values. Step S220 includes: recognizing the facial contour in the driver image, extracting the brightness values of each pixel within the facial contour as the facial brightness value, and identifying pixels with facial brightness values greater than a preset brightness threshold as bright facial pixels; counting the number of bright facial pixels as the number of bright facial pixels, and counting the total number of pixels within the facial contour as the total number of facial pixels; and calculating the quality score for the overexposure dimension based on the number of bright facial pixels and the total number of facial pixels. By segmenting a more refined facial region through facial contour recognition and performing overexposure dimension quality scoring within this facial region, computational overhead is further reduced, and the real-time performance of image quality detection is improved.
[0044] In one embodiment of this application, multiple dimensions include a glare dimension, and the features include brightness values. Step S220 includes: extracting the brightness values of each pixel in the driver image, and identifying pixels with brightness values greater than or equal to a preset brightness threshold as high-brightness pixels; identifying the largest connected region formed by the high-brightness pixels in the driver image as the main bright spot region; counting the number of pixels in the main bright spot region as the number of pixels in the main bright spot region, and counting the total number of pixels in the driver image as the total number of pixels in the image; and calculating the quality score of the glare dimension based on the number of pixels in the main bright spot region and the total number of pixels in the image.
[0045] like Figure 4b As shown, glare refers to optical defects in an image, such as light spots, fogging, or decreased contrast. Under strong direct sunlight, cameras may produce glare, severely affecting image quality. Therefore, driver images with severe glare can seriously interfere with the DMS's monitoring of the driver's condition. By locating the area of maximum brightness in the driver image and quantifying the degree of glare by the proportion of the area of maximum brightness, the quality score of the glare dimension can be objectively evaluated, thus identifying image glare anomalies in strong direct sunlight scenarios.
[0046] In some embodiments, the global threshold of the driver's image can be automatically obtained using Otsu's method (or Otsu's method or Otsu's method, or Otsu's method or Otsu's method) as a preset brightness threshold, and a binary image can be generated. The calculation method is as follows: Equation (3) in, B ( x , y) represents the binary image corresponding to the driver's image. G ( x , y () represents the brightness value of each pixel in the driver's image. T otsu For the global threshold, ( x , y () represents pixel coordinates.
[0047] Since the obtained binary image may contain noise or broken regions, morphological opening and closing operations are needed to denoise it. Morphological opening is performed to remove isolated noise points, and closing is performed to connect adjacent bright regions. Connectivity analysis algorithms are used to extract all connected regions, and the pixel area (also known as the number of pixels) of each region is counted. The connected region with the largest pixel area is determined as the main bright spot region. The ratio of the area of this main bright spot region (also known as the number of pixels in the main bright spot region) to the total number of pixels in the image is calculated to obtain the maximum bright spot percentage. The calculation method is as follows: P glare = max_area / N Equation (4) in, P glare For the maximum percentage of bright spots, max_area The number of pixels in the main bright spot area. N This represents the total number of pixels in the image. The total number of pixels is calculated as follows: N = H × W Equation (5) in, N The total number of pixels in the image. H The height of the driver's image. W The width of the driver's image.
[0048] The quality score for the glare dimension is calculated based on the proportion of the largest bright spot, as follows: Q 2 = 1 - min( P glare ,1) Equation (6) in, Q 2 represents the quality score for the glare dimension. P glare This represents the percentage of the largest bright spot. For example... Figure 6 As shown, the largest connected region formed by white pixels in the connected region image is the main bright spot region. The larger the main bright spot region is, the higher the proportion of the largest bright spot, and the lower the quality score of the driver image in the glare dimension. The more severe the image glare, that is, the higher the degree of image glare, the worse the image quality.
[0049] In another embodiment of this application, multiple dimensions include a glare dimension, and features include brightness values. Step S220 includes: recognizing the facial contour in the driver image, extracting the brightness values of each pixel within the facial contour as the facial brightness value, and identifying pixels with facial brightness values greater than a preset brightness threshold as bright facial pixels; recognizing the largest connected region formed by the bright facial pixels as the main bright spot region of the face; counting the number of pixels in the main bright spot region of the face as the number of pixels in the main bright spot region of the face, and counting the total number of pixels within the facial contour as the total number of facial pixels; calculating the quality score of the glare dimension based on the number of pixels in the main bright spot region of the face and the total number of facial pixels. By segmenting a more refined facial region through facial contour recognition, and performing glare dimension quality scoring within this facial region, computational overhead is further reduced, and the real-time performance of image quality detection is improved.
[0050] In one embodiment of this application, multiple dimensions include a fuzzy dimension, and features include a response map. Step S220 includes: convolving the driver image to obtain a response map corresponding to the driver image, which is used as an image response map; calculating the variance of the image response map based on the pixel values of each pixel in the image response map, and obtaining a quality score for the fuzzy dimension based on the calculated variance of the image response map.
[0051] In low-light environments, increased image noise can affect image details and may cause blurring. Similarly, in rainy, snowy, or foggy conditions, image blurring can occur, making subsequent image processing difficult. Figure 4c As shown, blurred images have fewer edge and texture details and lower gradient magnitudes. Therefore, the Laplacian operator can be used to calculate the gradient magnitude variance (also known as the response map variance) to measure the degree of image blur. By calculating the response map variance, the dispersion of feature distribution is quantified, thereby objectively evaluating the quality score of the blur dimension and identifying image blur anomalies in low-light, rainy, snowy, or foggy scenes.
[0052] In some embodiments, the driver image is processed into grayscale, and the Laplacian operator is applied to the resulting grayscale image. That is, the grayscale image is convolved using the Laplacian operator's convolution kernel to obtain the corresponding response image, which is represented as follows: L = G × K Equation (7) in, L This is the response map corresponding to the driver's image. G This is the grayscale image corresponding to the driver's image. K Let be the convolution kernel of the Laplace operator. The convolution kernel of the Laplace operator is expressed as follows: Equation (8) Where K is the convolution kernel of the Laplace operator.
[0053] Based on the pixel values of each pixel in the response map corresponding to the driver's image, the variance of the response map is calculated as follows: Equation (9) in, For the variance of the response graph, L ( x , y () represents the pixel value of a pixel in the image. In response to the average pixel value of each pixel in the image, n To the total number of pixels in the response image, ( x , y () represents pixel coordinates. Following the above method, it is possible to... Figure 4c The Laplace response map variance of the driver image shown is calculated, and the variance is 0.42. A variance less than 1 indicates that the image is blurry, and a variance greater than 1 indicates that the image is clear.
[0054] The quality score of the fuzzy dimension is calculated based on the variance of the response map, as follows: Equation (10) in, Q 3 represents the quality score for the fuzzy dimension. For the variance of the response graph, C It is a constant. It can be seen that the larger the variance of the response map, the greater the fuzzy quality score and the clearer the image; conversely, the smaller the variance, the more blurred the image. C This is a constant set to ensure that the overall quality score meets the corresponding metric. Taking a 1-point scale for the overall quality score as an example, since the response variance of sharp images is mostly concentrated between 8 and 12, to ensure that the subsequent overall quality score remains between 0 and 1, we can... C Set it to 10, or any other value between 8 and 12. Alternatively, it can be set according to other metrics in the overall quality score. C Set to other values; there are no restrictions here.
[0055] In one embodiment of this application, multiple dimensions include an overexposure dimension, a glare dimension, and a blur dimension. Environmental parameters include light intensity, and target data also includes wiper status information. The weighting coefficients for each dimension are determined based on the environmental parameters, including: determining the weighting coefficients for each dimension based on a first preset rule when the light intensity is greater than the maximum value of a preset light intensity range; in the first preset rule, the constraint relationship between the weighting coefficients of each dimension includes that the weighting coefficients of the overexposure dimension and the blur dimension are both less than the weighting coefficient of the glare dimension, and the sum of the weighting coefficients of the overexposure dimension and the blur dimension is less than the weighting coefficient of the glare dimension; determining the weighting coefficients for each dimension based on a second preset rule when the light intensity is less than the minimum value of a preset light intensity range; in the second preset rule, the constraint relationship between the weighting coefficients of each dimension includes that the weighting coefficients of the overexposure dimension and the glare dimension are both less than the weighting coefficient of the blur dimension, and the sum of the weighting coefficients of the overexposure dimension and the glare dimension is less than the weighting coefficient of the blur dimension; and determining the weighting coefficients for each dimension based on the wiper status information when the light intensity meets the preset light intensity range. By using multi-dimensional environmental perception based on light intensity and wiper status, the current driving environment characteristics are identified, and the weights of each dimension are dynamically allocated according to the current driving environment characteristics, so that the image quality assessment is more in line with actual driving conditions.
[0056] In one embodiment of this application, determining the weight coefficients of each dimension based on wiper status information includes: determining the duration for which the wipers are in the on state based on the wiper status information; determining the weight coefficients of each dimension based on a third preset rule when the duration is greater than or equal to a preset duration threshold; in the third preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the glare dimension and the fuzziness dimension are both greater than the weight coefficient of the overexposure dimension, the weight coefficient of the fuzziness dimension is greater than or equal to the weight coefficient of the glare dimension, and the sum of the weight coefficients of the overexposure dimension and the glare dimension is greater than the weight coefficient of the fuzziness dimension; and determining the weight coefficients of each dimension according to an equal distribution principle when the duration is less than the preset duration threshold.
[0057] In some embodiments, the current driving scenario can be determined based on light intensity and the duration the windshield wipers are on, and the weighting coefficients for each dimension can be determined according to preset rules corresponding to the current driving scenario. Please refer to [link to relevant documentation]. Figure 7 , Figure 7 A flowchart illustrating the scene determination process provided in an exemplary embodiment of this application is shown below. Figure 7 As shown, the preset light intensity range can be 500 lux to 8000 lux, the preset duration threshold can be 3 minutes, and the scene judgment process is as follows: The system compares the light intensity with a preset light intensity range. When the light intensity is greater than the maximum value of the preset light intensity range (8000 lux), the current driving scenario is determined to be a strong light scenario. When the light intensity is less than the minimum value of the preset light intensity range (500 lux), the current driving scenario is determined to be a weak light scenario. When the light intensity meets the preset light intensity range, the system further determines whether the windshield wipers have been on for more than 3 minutes. If so, the current driving scenario is determined to be a rainy or snowy scenario. Otherwise, the current driving scenario is determined to be a normal driving scenario.
[0058] In addition, the built-in time system can be used to accurately determine the current time and the current driving scenario. For example, if the current time is later than 20:00, the current driving scenario is determined to be a low-light scenario.
[0059] Different driving scenarios can be pre-configured with corresponding rules as preset rules, including the first preset rule, the second preset rule, the third preset rule and the fourth preset rule. The preset rules include the specific values of the weight coefficients of each dimension and / or the constraint relationship between the weight coefficients of each dimension.
[0060] Please refer to Table 1, which is a preset rule table provided by an exemplary embodiment of this application. As shown in Table 1, the driving scenario corresponding to the first preset rule is a strong light scenario, and the scenario determination condition is that the light intensity is greater than 8000 lux. Cameras are prone to image glare under strong light. In the first preset rule, the weight coefficient for overexposure can be set to 0.1, the weight coefficient for glare can be set to 0.7, and the weight coefficient for blur can be set to 0.2. The driving scenario corresponding to the second preset rule is a low light scenario, such as at night or in a tunnel, and the scenario determination condition is that the light intensity is less than 500 lux. In low light scenarios, the blur of the camera is more easily affected. In the second preset rule, the weight coefficient for overexposure can be set to 0.1, the weight coefficient for glare can be set to 0.3, and the weight coefficient for blur can be set to 0.6. The third preset rule corresponds to driving scenarios in rainy or snowy weather. The scenario determination conditions are that the light intensity is between 500 lux and 8000 lux, and the windshield wipers are on for more than three minutes. In rainy or snowy weather scenarios, more attention should be paid to the quality score of the blur dimension. However, theoretically, the image quality in this scenario is better than that in low light scenarios. In the third preset rule, the weight coefficient of the overexposure dimension can be set to 0.2, the weight coefficient of the glare dimension can be set to 0.4, and the weight coefficient of the blur dimension can be set to 0.4. The fourth preset rule corresponds to a normal driving scenario. The scenario determination conditions are that the light intensity is between 500 lux and 8000 lux, and the duration of the windshield wipers being on is less than three minutes. In a normal driving scenario, overexposure, glare, and blur all need to be considered. Therefore, in the fourth preset rule, the weight coefficients of the three dimensions are determined according to the principle of equal distribution, that is, the ideal weight of each dimension is 1 / 3. Since 1 / 3 is an infinite repeating decimal, it cannot be accurately represented by a finite decimal. In order to ensure that the sum of the weight coefficients of each dimension is 1, the weight coefficient of the overexposure dimension can be set to 0.33, the weight coefficient of the glare dimension can be set to 0.33, and the weight coefficient of the blur dimension can be set to 0.34.
[0061] Table 1
[0062] The specific values of the weight coefficients for each dimension in each preset rule can also be set to other values, as long as the constraint relationship between the weight coefficients of each dimension in the preset rule is satisfied.
[0063] After determining the weight coefficients for each dimension, the quality scores of each dimension are weighted and fused according to their corresponding weight coefficients to obtain the comprehensive quality score of the driver image. The calculation method is as follows: Q total = w 1 Q 1+ w 2 Q 2+ w 3 Q Formula 3 (11) in, Q total For the overall quality score, w 1 represents the weighting coefficient for the overexposure dimension. Q 1 represents the quality score for overexposure. w 2 represents the weighting coefficient for the glare dimension. Q 2 represents the quality score for the glare dimension. w 3 represents the weighting coefficient for the fuzzy dimension. Q 3 represents the quality score for the fuzzy dimension.
[0064] In one embodiment of this application, after step S230, the method includes: comparing a comprehensive quality score with a preset scoring threshold; removing the driver image from the monitoring queue and generating an image acquisition anomaly alert message if the comprehensive quality score is less than the preset scoring threshold; and retaining the driver image in the monitoring queue for driver status monitoring if the comprehensive quality score is greater than or equal to the preset scoring threshold. By comparing the comprehensive quality score with the preset scoring threshold, it is possible to determine whether there are quality anomalies in the driver image, thereby accurately filtering valid images, improving the accuracy and reliability of subsequent DMS driver status monitoring, and generating an image acquisition anomaly alert message when the comprehensive quality score is less than the preset scoring threshold, thereby enhancing the driver's safety awareness and ensuring driving safety.
[0065] In this embodiment, the higher the quality score of each dimension, the higher the overall quality score will be. Similarly, the lower the quality score of each dimension, the lower the overall quality score will be. Therefore, the overall quality score of the driver image can be used to determine whether the driver image meets the input requirements of the DMS.
[0066] In some embodiments, a preset scoring threshold of 0.5 can be set. When the overall quality score is less than 0.5, the driver image quality is determined to be abnormal; otherwise, it is determined to be normal. If the driver image quality is determined to be abnormal, the driver image can be removed from the monitoring queue to reduce false detections and alarms caused by low-quality images, thereby improving the accuracy of DMS detection. Simultaneously, a corresponding image quality abnormality flag signal can be generated and transmitted to the application layer. Upon receiving this signal, the application layer can trigger an image quality alarm, i.e., an image acquisition abnormality warning message, on the in-vehicle HMI (Human-Machine Interface), reminding the driver to pay attention to the current imaging status and ensuring driving safety. If the driver image quality is determined to be normal, the driver image is retained in the monitoring queue for subsequent DMS monitoring of fatigue, distraction, dangerous behavior, and other conditions.
[0067] In some embodiments, when the overall quality score is lower than a preset score threshold, a target dimension affecting the overall quality score can be determined based on the quality scores of each dimension. A corresponding image acquisition anomaly alert message can then be generated based on the target dimension, indicating that the camera is in direct sunlight, reducing false alarms caused by image degradation, enhancing driver safety awareness, and ensuring driving safety. For example, if the target dimension is glare, it can indicate that the camera is in direct sunlight.
[0068] For example, quality scores for each dimension can be compared, and the dimension with the lowest quality score can be used as the target dimension.
[0069] Please see Figure 8 , Figure 8 This is a block diagram of an image quality detection device according to an embodiment of this application. This device can be applied to… Figure 1 The implementation environment shown is specifically configured in computer device 120. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.
[0070] like Figure 8As shown, the exemplary image quality detection device includes: a data acquisition module 810, used to acquire target data for image quality detection, the target data including environmental parameters and driver images in a monitoring queue, the monitoring queue being used to monitor driver status; an information processing module 820, used to extract features from the driver images, determine the quality scores of the driver images in multiple dimensions based on the extracted features, determine the weight coefficients of each dimension based on the environmental parameters, and calculate the comprehensive quality score of the driver images by combining the weight coefficients and quality scores of each dimension, wherein the multiple dimensions include at least two of overexposure, glare, and blur; and an image management module 830, used to filter driver images in the monitoring queue according to the comprehensive quality score.
[0071] In some embodiments, the data acquisition module 810 may be various types of sensors in the vehicle, or a hardware device for collecting signals from various sensors in the vehicle. It may also include various types of sensors in the vehicle and a hardware device for collecting signals from various sensors in the vehicle.
[0072] In some embodiments, the information processing module 820 may be a GPU computer, GPU computing cluster, microcomputer, embedded computer, neural network computer, processor, etc., or a microprocessor or chip such as MCU (Microcontroller Unit) or ECU (Electronic Control Unit), or a physical server, server cluster, cloud server, etc.
[0073] In some embodiments, the image management module 830 may be a microprocessor or chip such as an MCU or ECU.
[0074] In some embodiments, at least one of the data acquisition module 810, information processing module 820, and image management module 830 may be configured in the vehicle's DMS.
[0075] In some embodiments, the data acquisition module 810 and the image management module 830 can be configured on the vehicle side, and the information processing module 820 can be configured in the cloud.
[0076] In some embodiments, the data acquisition module 810 and the information processing module 820 can be configured in the cloud, and the image management module 830 can be configured on the vehicle.
[0077] Please see Figure 9 , Figure 9 This is a schematic diagram of the workflow of an image quality detection system provided as an exemplary embodiment of this application, such as... Figure 9As shown, the image quality inspection system includes an infrared camera, a face capture module, an image overexposure detection module, an image glare detection module, an image blur detection module, a comprehensive quality scoring module, and a DMS adaptive frame management module. The system's workflow is as follows: An infrared camera captures the original driver image; a face cropping module crops the driver's face from the original image to obtain the driver image; an image overexposure detection module determines the degree of overexposure by calculating the proportion of high-brightness pixels in the driver image and converts it into a quality score for the overexposure dimension; an image glare detection module uses Otsu to automatically obtain the global threshold of the driver image and generates a binary image. Morphological opening operations are performed on the binary image to remove isolated noise points, followed by closing operations to connect adjacent bright regions. A connected component analysis algorithm is used to extract all connected regions, and the pixel area of each region is calculated. The connected region with the largest pixel area is determined as the main bright spot region. The ratio of the area of this main bright spot region to the total number of pixels in the image is calculated to obtain the maximum bright spot area. The image blur detection module calculates the gradient magnitude variance using the Laplacian operator to measure the degree of image blur and converts it into a quality score for the blur dimension. The comprehensive quality scoring module determines the current driving scenario based on environmental parameters and assigns corresponding weight coefficients to each dimension according to the current driving scenario. It then performs a weighted fusion of the quality scores and corresponding weight coefficients output by the image overexposure detection module, image glare detection module, and image blur detection module to obtain a comprehensive quality score. The DMS adaptive frame management module determines whether to retain the current frame image (i.e., the current driver image) in the monitoring queue and whether to send a warning to the upper-level HMI based on the comprehensive quality score.
[0078] The infrared camera in this system is one example of the data acquisition module 810. The face capture module, image overexposure detection module, image glare detection module, image blur detection module, and comprehensive quality scoring module can be integrated into the information processing module 820. The DMS adaptive frame management module is one example of the image management module 830. For specific details of the system's workflow, please refer to the descriptions in the aforementioned embodiments; they will not be repeated here. This system detects image quality across three dimensions: overexposure, glare, and blur, covering typical scenarios of DMS image degradation. For example, the image glare detection module, combined with morphological operations and maximum bright spot area ratio analysis, can accurately identify strong light interference such as direct sunlight, reducing the false detection rate. Furthermore, each dimension's detection module outputs an independent quality score, facilitating fault attribution and system debugging. Driving scenarios are determined by light intensity and wiper status information, allowing for dynamic adjustment of the weight coefficients of each dimension based on different driving scenarios, improving the adaptability of image quality detection to different environments. A dynamic alarm mechanism is triggered through comprehensive scoring, reducing the false alarm rate caused by image degradation, ensuring user driving safety, and indirectly reducing the risk of traffic accidents. Furthermore, the system does not require GPU acceleration or complex model training, reducing hardware computing overhead and saving computing resources. It meets the requirements of low power consumption and high efficiency of in-vehicle systems, making it suitable for large-scale deployment of in-vehicle DMS terminals and reducing deployment costs.
[0079] The image quality detection apparatus and system provided in the above embodiments and the image quality detection method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs its operation have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the image quality detection apparatus and system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the apparatus and system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation.
[0080] In one embodiment of this application, an electronic device is also provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the image quality detection method provided in the above embodiments.
[0081] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer system for an electronic device provided in an embodiment of this application. Figure 10 The computer system 1000 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0082] like Figure 10As shown, the computer system 1000 includes a central processing unit 1001, which can perform various appropriate actions and processes according to a program stored in the read-only memory 1002 or a program loaded from the storage section 1008 into the random access memory 1003, such as performing the methods in the above embodiments. The random access memory 1003 also stores various programs and data required for system operation. The central processing unit 1001, the read-only memory 1002, and the random access memory 1003 are interconnected via a bus 1004. An input / output interface 1005 is also connected to the bus 1004.
[0083] The following components are connected to the input / output interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a CRT (Cathode Ray Tube), LCD (Liquid Crystal Display), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.
[0084] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit 1001, it performs the various functions defined in the apparatus of this application.
[0085] The computer-readable medium shown in the embodiments of this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory), flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. Each block in the flowchart or block diagram may represent a module, segment, or portion of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0087] Another aspect of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the image quality detection methods provided in the various embodiments described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0088] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the image quality detection method provided in the various embodiments described above.
[0089] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. An image quality detection method, characterized in that, The method includes: Acquire target data for image quality detection, the target data including environmental parameters and driver images in a monitoring queue, the monitoring queue being used to monitor driver status; Feature extraction is performed on the driver image, and a quality score of the driver image in multiple dimensions is determined based on the extracted features, wherein the multiple dimensions include at least two of the following: overexposure dimension, glare dimension, and blur dimension; Based on the environmental parameters, the weight coefficients of each dimension are determined. By combining the weight coefficients of each dimension and the quality score, the comprehensive quality score of the driver image is calculated, so as to filter the driver images in the monitoring queue according to the comprehensive quality score.
2. The image quality detection method according to claim 1, characterized in that, Acquire target data for image quality inspection, including: Obtain the original driver image, and perform face cropping on the original driver image to obtain the driver image, which is used as the target data; wherein, performing face cropping on the original driver image includes, Face detection is performed on the original driver image to obtain the face detection results; If a face detection box exists in the face detection result, the original driver image is cropped according to a preset multiple of the face detection box to obtain the driver image. If no face detection box is found in the face detection results, the original driver image is cropped at a preset position and according to a preset size to obtain the driver image.
3. The image quality detection method according to claim 1 or 2, characterized in that, The multiple dimensions include the overexposure dimension, and the features include brightness values. Feature extraction is performed on the driver image, and a quality score for the driver image in multiple dimensions is determined based on the extracted features, including: Extract the brightness value of each pixel in the driver image, and designate pixels with brightness values greater than a preset brightness threshold as highlighted pixels; The number of highlighted pixels is counted as the number of highlighted pixels, and the total number of pixels in the driver image is counted as the total number of image pixels; The quality score of the overexposure dimension is calculated based on the number of highlighted pixels and the total number of pixels in the image.
4. The image quality detection method according to claim 1 or 2, characterized in that, The multiple dimensions include the glare dimension, and the features include brightness values. Feature extraction is performed on the driver image, and a quality score for the driver image in multiple dimensions is determined based on the extracted features, including: Extract the brightness value of each pixel in the driver image, and take the pixels with brightness values greater than or equal to a preset brightness threshold as the bright pixels; Identify the largest connected region in the driver image formed by the bright pixels as the main bright spot region; The number of pixels in the main bright spot region is counted as the number of pixels in the main bright spot region, and the total number of pixels in the driver image is counted as the total number of pixels in the image. The quality score of the glare dimension is calculated based on the number of pixels in the main bright spot region and the total number of pixels in the image.
5. The image quality detection method according to claim 1 or 2, characterized in that, The multiple dimensions include the fuzzy dimensions, the features include a response map, feature extraction is performed on the driver image, and a quality score of the driver image in multiple dimensions is determined based on the extracted features, including: The driver image is convolved to obtain the response map corresponding to the driver image, which is used as the image response map; Based on the pixel values of each pixel in the image response map, the variance of the image response map is calculated, and the quality score of the fuzzy dimension is obtained based on the calculated variance of the image response map.
6. The image quality detection method according to claim 1, characterized in that, The multiple dimensions include the overexposure dimension, the glare dimension, and the blur dimension. The environmental parameters include light intensity. The target data also includes wiper status information. Weighting coefficients for each dimension are determined based on the environmental parameters, including: Under the condition that the light intensity is greater than the maximum value of the preset light intensity range, the weight coefficients of each dimension are determined based on the first preset rule; in the first preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the overexposure dimension and the weight coefficients of the blur dimension are both less than the weight coefficients of the glare dimension, and the sum of the weight coefficients of the overexposure dimension and the weight coefficients of the blur dimension is less than the weight coefficients of the glare dimension. Under the condition that the light intensity is less than the minimum value of the preset light intensity range, the weight coefficients of each dimension are determined based on the second preset rule; in the second preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the overexposure dimension and the weight coefficients of the glare dimension are both less than the weight coefficients of the blur dimension, and the sum of the weight coefficients of the overexposure dimension and the weight coefficients of the glare dimension is less than the weight coefficients of the blur dimension. Under the condition that the light intensity meets the preset light intensity range, the weight coefficients of each dimension are determined based on the wiper status information.
7. The image quality detection method according to claim 6, characterized in that, The weighting coefficients for each dimension are determined based on the wiper status information, including: The duration for which the wipers are in the on state is determined based on the wiper status information; Under the condition that the duration is greater than or equal to a preset duration threshold, the weight coefficients of each dimension are determined based on a third preset rule; in the third preset rule, the constraint relationship between the weight coefficients of each dimension includes that the weight coefficients of the glare dimension and the weight coefficients of the blur dimension are both greater than the weight coefficient of the overexposure dimension, the weight coefficient of the blur dimension is greater than or equal to the weight coefficient of the glare dimension, and the sum of the weight coefficients of the overexposure dimension and the weight coefficients of the glare dimension is greater than the weight coefficient of the blur dimension. Under the condition that the duration is less than the preset duration threshold, the weight coefficients of each dimension are determined according to the principle of equal distribution.
8. The image quality detection method according to claim 1, characterized in that, After calculating the overall quality score of the driver image, the method includes: The overall quality score is compared with a preset score threshold; If the overall quality score is less than the preset score threshold, the driver's image will be removed from the monitoring queue, and an image acquisition anomaly alert message will be generated. If the overall quality score is greater than or equal to the preset score threshold, the driver image is retained in the monitoring queue for driver status monitoring.
9. An image quality detection device, characterized in that, The image quality detection device includes: The data acquisition module is used to acquire target data for image quality detection. The target data includes environmental parameters and driver images in a monitoring queue, which is used to monitor the driver's status. The information processing module is used to extract features from the driver image, determine the quality score of the driver image in multiple dimensions based on the extracted features, determine the weight coefficient of each dimension based on the environmental parameters, and calculate the comprehensive quality score of the driver image by combining the weight coefficient of each dimension and the quality score. The multiple dimensions include at least two of the following: overexposure dimension, glare dimension, and blur dimension. The image management module is used to filter the driver images in the monitoring queue based on the comprehensive quality score.
10. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the image quality detection method as described in any one of claims 1-8.