Simulation test method for detecting fogging of vehicle lights

By detecting and analyzing the front-facing image of the car lights and calculating the degree of fogging, the problem of inaccurate evaluation of the fogging situation of the car lights in the prior art is solved, and accurate detection of the anti-fogging performance of the car lights is achieved.

CN119048498BActive Publication Date: 2025-02-28CONGHUA JUNHAO VEHICLE PARTS CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411523278.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-28
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

The prior art is difficult to accurately evaluate the fogging of the car lights in humid or rainy environments, which affects the detection results of the anti-fogging performance of the car lights.

Method used

By performing edge detection on the headlight image, the edge diagram is obtained and the edge density is calculated. Combined with the number of pixel points at each edge in the edge diagram, the aspect ratio and curvature information of the external rectangle, the fogging degree of the headlight is calculated to evaluate its anti-fog performance.

Benefits of technology

It improves the accuracy of fogging on the headlights, ensures the accuracy of the anti-fogging performance detection of the headlights, and can more effectively evaluate the anti-fogging performance of the headlights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure QLYQS_1
    Figure QLYQS_1
Patent Text Reader

Abstract

The present invention relates to the technical field of image data processing, and more specifically, to a method for simulating a test for detecting fogging of a headlight, the method comprising: obtaining a front view image of a headlight when performing an anti-fogging performance test on the headlight, performing edge detection on the front view image of the headlight, obtaining an edge map of the front view image of the headlight, calculating the edge density of the edge map, determining the possibility that each edge in the edge map is a headlight shape edge, the possibility of the headlight shape edge is positively correlated with the number of pixel points of the corresponding edge, and negatively correlated with the aspect ratio of the circumscribed rectangle of the corresponding edge, and the edge density, calculating the fogging degree of the headlight, and using the fogging degree to detect the anti-fogging performance of the headlight. The present invention can improve the accuracy of the determined fogging situation, thereby improving the accuracy of the anti-fogging performance detection of the headlight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and more specifically, to a vehicle lamp fogging detection simulation test method. Background Art

[0002] When driving a motor vehicle, headlights are often used to assist the driver in detecting road conditions. However, during the use of headlights, especially in humid or rainy environments, fog easily appears on the headlights, affecting the driver's vision. Therefore, it is particularly important to test the anti-fogging performance of headlights before they leave the factory.

[0003] In the related art, for example, a patent application document with publication number CN117309701A discloses a fog concentration detection method for highway video surveillance, which includes: estimating the atmospheric light and local illumination of the image, and extracting a rough estimated transmittance value in the input video frame in combination with the transmittance estimation prior; correcting the preliminary transmittance calculation result by estimating the image ambient illumination; removing the road plane area that interferes with the fog detection result by detecting the road edge and lane line; establishing the relationship between the depth of field and the image coordinates based on the prior information that the lane line length on the highway is fixed, and making an accurate estimate of the fog concentration based on the depth of field and transmittance information.

[0004] However, the above scheme uses the transmittance of light to calculate and derive the visibility range in the image, but there are too many factors that affect the transmittance of the image. Even through correction, it is difficult to accurately calculate the transmittance of light, making it impossible to accurately derive the visibility range of the image, thereby affecting the detection results of the fog concentration, and it may be impossible to accurately assess the fogging situation based on the captured image. Summary of the invention

[0005] In order to solve the problem that fogging conditions cannot be accurately assessed based on images, the present invention proposes a vehicle headlight fogging detection simulation test method.

[0006] According to one aspect of an embodiment of the present invention, a vehicle lamp fogging detection simulation test method is provided, comprising:

[0007] Obtaining a front view image of a vehicle lamp when conducting an anti-fogging performance test on the vehicle lamp;

[0008] Perform edge detection on the front view image of the headlight, obtain an edge map of the front view image of the headlight, and calculate the edge density of the edge map;

[0009] Determine the possibility that each edge in the edge map is a headlight-shaped edge. The possibility of a headlight-shaped edge is positively correlated with the number of pixels of the corresponding edge, and negatively correlated with the aspect ratio of the circumscribed rectangle of the corresponding edge and the edge density.

[0010] Calculate the fogging degree of the headlights to detect the anti-fog performance of the headlights using the fogging degree;

[0011] Among them, the degree of fogging , is the edge graph The number of pixels on the edge, and are the length and width of the edge graph, respectively. is the number of edges in the edge graph, is the edge graph The probability that the edge is a headlight-shaped edge, is the edge graph The mean of the absolute values ​​of the curvatures of the edge pixels, is the maximum value of the curvature of all edge pixels in the edge map, For the summation symbol, The natural constant An exponential function with base .

[0012] The present invention performs edge detection on a front-view image of a headlight, integrates multiple objective feature information of the edge in the edge map, and calculates the fogging degree of the headlight, thereby ensuring the accuracy of the determined fogging degree, thereby improving the accuracy of the determined fogging situation, and detecting the anti-fog performance of the headlight based on the fogging degree with higher accuracy, thereby improving the accuracy of detecting the anti-fog performance of the headlight.

[0013] In an exemplary embodiment of the present invention, the anti-fog performance of a vehicle lamp is detected by utilizing the fogging degree, including:

[0014] When the fogging degree of the headlight is greater than or equal to a first preset threshold, the headlight is determined to be in a fogging state; when the fogging degree of the headlight is less than a second preset threshold, the headlight is determined to be in a non-fogging state, and the second preset threshold is less than the first preset threshold;

[0015] When it is determined that the vehicle lamp is in a fogging state, the duration of the vehicle lamp changing from the fogging state to the non-fogging state is recorded to detect the anti-fogging performance of the vehicle lamp according to the duration.

[0016] The present invention detects the anti-fog performance of the vehicle lamp based on the fogging degree with high accuracy and by recording the dissipation time of the fog, thereby ensuring the accuracy of the anti-fog performance detection of the vehicle lamp.

[0017] In an exemplary embodiment of the present invention, the possibility of each edge in the edge graph being a headlight-shaped edge is determined to satisfy the following relationship:

[0018] , ;

[0019] In the formula, is the edge graph The probability that the edge is a headlight-shaped edge; is the edge graph The minimum aspect ratio of the bounding rectangle of the edges; is the edge density of the edge graph; is the edge graph The number of pixels on the edge; is the number of edges in the edge graph; It is a function that returns the maximum value; The natural constant An exponential function with base .

[0020] The present invention calculates the possibility of each edge being a headlight-shaped edge by integrating a variety of data, thereby ensuring the accuracy of the possibility of each edge being a headlight-shaped edge.

[0021] In an exemplary embodiment of the present invention, a method for obtaining a minimum value of an aspect ratio of a circumscribed rectangle includes:

[0022] Calculate the ratio of the length to the width of the circumscribed rectangle of any edge to obtain a first aspect ratio, and calculate the ratio of the width to the length of the circumscribed rectangle of any edge to obtain a second aspect ratio;

[0023] The minimum value between the first aspect ratio and the second aspect ratio is obtained to obtain the minimum value of the aspect ratio of the bounding rectangle of any edge.

[0024] The present invention uses the aspect ratio to measure the shape of the circumscribed rectangle of each edge, and the smaller the aspect ratio, the flatter the corresponding circumscribed rectangle, and the edge of a car light is generally a straight line or a circular arc with a large arc length, so the possibility of each edge being a car light shaped edge can be accurately evaluated based on the minimum value of the aspect ratio of the circumscribed rectangle of each edge.

[0025] In an exemplary embodiment of the present invention, a method for obtaining edge density of an edge graph includes:

[0026] Calculate the cumulative sum of the areas of the circumscribed rectangles of each edge in the edge map, obtain the abscissa and ordinate of the center point of the circumscribed rectangle in the pixel coordinate system, use the variance of the abscissa as the first variance, and use the variance of the ordinate as the second variance;

[0027] The ratio of the length of the edge map to half the perimeter of the edge map is used as the first weight, the first variance is weighted to obtain a first weighted value, the ratio of the width of the edge map to half the perimeter of the edge map is used as the second weight, the second variance is weighted to obtain a second weighted value, and the edge density is calculated. The edge density is negatively correlated with the cumulative sum, the first weighted value, and the second weighted value.

[0028] The present invention weights the first variance using the first weight and weights the second variance using the second weight, which can reduce the influence of the relative size relationship between the length and width of the edge graph on the edge density of the edge graph, thereby ensuring the accuracy of the determined edge density.

[0029] In an exemplary embodiment of the present invention, the edge density satisfies the following relationship:

[0030] ;

[0031] In the formula, is the edge density of the edge graph; is the edge graph The length of the circumscribed rectangle of each edge; is the edge graph The width of the circumscribed rectangle of each edge; is the number of edges in the edge graph; is the length of the circumscribed rectangle of all edges in the edge graph; is the width of the bounding rectangle of all edges in the edge graph; is the first weight; is the second weight; is the first variance; is the second variance; is the length of the edge graph; is the width of the edge map; for the summation symbol; The natural constant An exponential function with base .

[0032] In an exemplary embodiment of the present invention, the method further comprises:

[0033] Count the number of pixels on any horizontal edge and any vertical edge of a circumscribed rectangle of any edge in the edge map to obtain the length and width of the corresponding circumscribed rectangle; or

[0034] Count the number of pixels on any horizontal edge and any vertical edge of the circumscribed rectangle of all edges in the edge map to obtain the length and width of the corresponding circumscribed rectangle; or

[0035] The number of pixels in any row and any column of the edge map is counted to obtain the length and width of the edge map.

[0036] In an exemplary embodiment of the present invention, edge detection is performed on a front view image of a vehicle headlight to obtain an edge map of the front view image of the vehicle headlight, including:

[0037] The Canny edge detection algorithm is used to perform edge detection on the headlight front view image, so as to determine the edge map of the headlight front view image according to the edges in the headlight front view image detected by the Canny operator.

[0038] The present invention has the following effects:

[0039] When calculating the possibility that each edge in the edge map is a headlight-shaped edge, the present invention utilizes the characteristics that the water droplet edge has fewer pixels and the headlight edge has a larger span, so as to ensure the accuracy of the possibility that each edge is a headlight-shaped edge. Moreover, by calculating the curvature of the pixel points of each edge in the edge map, the influence of the edge formed after the fusion of the water droplet edge and the headlight edge on the fogging degree of the headlight can be reduced, so as to accurately calculate the fogging degree of the headlight, so as to accurately evaluate the fogging situation, and then based on the fogging degree with higher accuracy, the anti-fog performance of the headlight can be detected, thereby improving the accuracy of the detection of the anti-fog performance of the headlight to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0041] Figure 1 1 is a schematic diagram of the steps of a vehicle lamp fogging detection simulation test method according to an embodiment of the present invention;

[0042] Figure 2 It is a schematic flow chart of the steps of determining the edge density of an edge graph in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0044] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0045] Reference Figure 1 The vehicle lamp fogging detection simulation test method includes steps S1 to S4, which are as follows:

[0046] S1: Obtain a front view image of a vehicle lamp when conducting an anti-fogging performance test on the vehicle lamp.

[0047] Optionally, the headlight can be placed in a headlight anti-fogging performance test box, and a camera can be arranged directly in front of the headlight. Then, a front view of the headlight when it emits light is captured, and semantic segmentation is used to extract the light area in the front view to obtain a front view image of the headlight.

[0048] Among them, the specific steps of using semantic segmentation to extract the light area in the front view are: first, the front view images of various types of headlights emitted by the collected lights are used as semantic segmentation training sets, and then the pixels of the light area in the front view image are marked as 1, and the pixels of the background part are marked as 0; secondly, the semantic segmentation training set is divided into a training set and a test set according to a certain ratio, and the neural network of the U-Net structure is trained using the training set and the corresponding labels, and the cross entropy loss function is used as the minimization loss function. During the training process, the test set is used to evaluate the neural network and the minimization loss function is adjusted. When the minimization loss function tends to converge, a trained neural network is obtained, so that the front view of the collected headlights emitted by the headlights can be input into the trained neural network to extract the light area in the front view and obtain the headlight front view image. Of course, a suitable neural network and minimization loss function can also be selected according to the specific situation, and this embodiment is not particularly limited.

[0049] S2: Perform edge detection on the front view image of the headlight, obtain an edge map of the front view image of the headlight, and calculate the edge density of the edge map.

[0050] In an exemplary embodiment of the present invention, the edge map may be an image that can characterize the outline or boundary of an object contained in the front-view image of the headlights, and the edge density may be data that can reflect the distribution of edges in the edge map. For example, when the edge density of the edge map is greater, the edge distribution in the edge map is denser, indicating that the possibility of the headlights being covered by fog is lower; on the contrary, when the edge density of the edge map is smaller, the distribution of edges in the edge map is more dispersed, indicating that the possibility of the headlights being covered by fog is greater.

[0051] In an exemplary embodiment of the present invention, the edge map of the front view image of the vehicle headlight can be determined by the following steps:

[0052] The Canny edge detection algorithm is used to perform edge detection on the headlight front view image, so as to determine the edge map of the headlight front view image according to the edges in the headlight front view image detected by the Canny operator.

[0053] Optionally, using the Canny edge detection algorithm to perform edge detection on the front view image of the headlights can effectively suppress noise and non-edge responses, thereby ensuring the accuracy of the extracted edge map. It should be noted that using the Canny edge detection algorithm to perform edge detection on images is a prior art and is not described in detail in this embodiment.

[0054] In another embodiment, other edge detection operators, such as Roberts operator, Sobel operator, etc., may also be used to perform edge detection on the front view image of the vehicle headlight.

[0055] In an exemplary embodiment of the present invention, reference Figure 2 As shown, the edge density of the edge graph can be determined by the following steps:

[0056] S101: Calculate the cumulative sum of the areas of the circumscribed rectangles of the edges in the edge map, obtain the abscissa and ordinate of the center point of the circumscribed rectangle in the pixel coordinate system, use the variance of the abscissa as the first variance, and use the variance of the ordinate as the second variance;

[0057] Specifically, the product of the length and width of the circumscribed rectangle of any edge in the edge map can be calculated to obtain the area of ​​the circumscribed rectangle of the edge, and then the area of ​​the circumscribed rectangle of each edge can be determined, and then the area of ​​the circumscribed rectangle of each edge can be summed to obtain the corresponding cumulative sum.

[0058] Optionally, the cumulative sum of the areas of the circumscribed rectangles of each edge in the edge map is calculated to determine the distribution area of ​​the circumscribed areas of each edge in the edge map. For example, when the calculated cumulative sum is large, it means that the circumscribed areas of each edge in the edge map are distributed more widely, and the corresponding distribution of each edge in the edge map is relatively discrete. On the contrary, the corresponding distribution of each edge in the edge map is relatively concentrated.

[0059] Among them, the pixel coordinate system refers to a coordinate system that can measure the position of each pixel in the edge map. The horizontal coordinate of the pixel coordinate system is the row number of each row of pixels in the edge map, and the vertical coordinate of the pixel coordinate system is the column number of each column of pixels in the edge map. The horizontal coordinate of the center point of the circumscribed rectangle of any edge is the row number of the pixel in the row where the center point is located, and the vertical coordinate of the center point of the circumscribed rectangle of any edge is the column number of the pixel in the column where the center point is located.

[0060] For example, when the center point of the bounding rectangle of any edge is in the first Line When the column is, the horizontal coordinate of the center point is , the vertical axis is , and then the horizontal coordinate and the vertical coordinate of the center point of the circumscribed rectangle of each edge in the pixel coordinate system can be determined, and then the first variance can be obtained by calculating the variance of the horizontal coordinates corresponding to the center points of all circumscribed rectangles, and the second variance can be obtained by calculating the variance of the vertical coordinates corresponding to the center points of all circumscribed rectangles.

[0061] Optionally, the density of the circumscribed rectangle of each edge can be further evaluated by the first variance and the second variance. For example, when the first variance and the second variance are small, it means that the center points of the circumscribed rectangles are close, and the distribution of the edges in the corresponding edge map is denser. On the contrary, when the first variance and the second variance are large, it means that the center points of the circumscribed rectangles are far, and the distribution of the edges in the corresponding edge map is dispersed.

[0062] S102: taking the ratio of the length of the edge graph to half the perimeter of the edge graph as the first weight, weighting the first variance to obtain a first weighted value, taking the ratio of the width of the edge graph to half the perimeter of the edge graph as the second weight, weighting the second variance to obtain a second weighted value, calculating the edge density, the edge density is negatively correlated with the cumulative sum, the first weighted value and the second weighted value.

[0063] For example, the first weight and the second weight can be respectively expressed as as well as , the length and width of the edge graph are respectively and H, then the first weight , the second weight It should be noted that, because the length and width of the edge map are usually different, that is, the relative size of the length and width of the edge map has a certain influence on measuring the distribution of each edge in the edge map. Therefore, the present invention uses the first weight and the second weight to weight the first variance and the second variance respectively, which can reduce the influence of the different sizes of the length and width of the edge map, thereby accurately calculating the edge density of the edge map.

[0064] Further, after the cumulative sum of the areas of the circumscribed rectangles of the edges in the edge map, the first weighted value, and the second weighted value are determined, the edge density of the edge map can be calculated. Specifically, the edge density of the edge map satisfies the following relationship:

[0065] ;

[0066] In the formula, is the edge density of the edge graph; is the edge graph The length of the circumscribed rectangle of each edge; is the edge graph The width of the circumscribed rectangle of each edge; is the number of edges in the edge graph; is the length of the circumscribed rectangle of all edges in the edge graph; is the width of the bounding rectangle of all edges in the edge graph; is the first weight, where ; is the second weight, where ; is the first variance; is the second variance; is the length of the edge graph; is the width of the edge map; for the summation symbol; The natural constant An exponential function with base .

[0067] Optional, by calculating as well as , the value range of the first variance and the second variance can be adjusted, thereby reducing the difficulty of calculating the edge density.

[0068] Specifically, during the calculation process, the first weight and the second weight can be substituted into the calculation formula of the edge density of the edge graph, and the formula can be sorted out to obtain the edge density of the edge graph: , and then the edge density of the edge graph can be calculated by sorting out the obtained formula.

[0069] In another embodiment, the edge density of each edge map may be determined by other formulas, such as by a difference calculation formula instead of a proportional calculation formula.

[0070] S3: Determine the possibility that each edge in the edge map is a headlight-shaped edge. The possibility of a headlight-shaped edge is positively correlated with the number of pixels of the corresponding edge, and negatively correlated with the aspect ratio of the circumscribed rectangle of the corresponding edge and the edge density.

[0071] In an exemplary implementation of the present invention, the possibility of a headlight-shaped edge may be data used to measure the possibility of each edge in the edge map being a headlight edge. For example, when the possibility that any edge in the edge map is a headlight-shaped edge is greater, the possibility that the edge is a headlight edge is relatively greater. On the contrary, when the possibility that any edge in the edge map is a headlight-shaped edge is less, the possibility that the edge is a headlight edge is relatively less.

[0072] The aspect ratio refers to the ratio of the length to the width, or the ratio of the width to the length, of the circumscribed rectangle of each edge. It is used to determine the shape of the circumscribed rectangle of each edge. For example, when the aspect ratio of the circumscribed rectangle of any edge is small, it means that the circumscribed rectangle of the corresponding edge is flat, that is, the length and width of the circumscribed rectangle of the corresponding edge have a large difference, and the shape of the corresponding edge is relatively slender, while the edge of the headlight is generally a straight line or a circular arc with a large arc length. Therefore, when the minimum value of the aspect ratio of the circumscribed rectangle of any edge is determined to be small, the edge is more likely to be the edge of the headlight, and the corresponding edge is more likely to be a headlight-shaped edge.

[0073] Optionally, when the aspect ratio of the circumscribed rectangle of any edge is relatively large, it means that the circumscribed rectangle of the corresponding edge is close to a square, that is, the difference between the length and width of the circumscribed rectangle of the corresponding edge is small, then the shape of the corresponding edge may be a shape with a smaller span, and the edge of the water droplets generated by fog is usually a closed arc with a smaller area and a corresponding smaller span. Therefore, when it is determined that the aspect ratio of the circumscribed rectangle of any edge is relatively large, then the edge is more likely to be a water drop edge, and the corresponding edge is relatively less likely to be a headlight shaped edge.

[0074] In an exemplary embodiment of the present invention, the minimum aspect ratio of the circumscribed rectangle of each edge can be achieved by the following steps:

[0075] The ratio of the length to the width of the circumscribed rectangle of any edge is calculated to obtain a first aspect ratio, and the ratio of the width to the length of the circumscribed rectangle of any edge is calculated to obtain a second aspect ratio; the minimum value between the first aspect ratio and the second aspect ratio is obtained to obtain the minimum value of the aspect ratio of the circumscribed rectangle of any edge.

[0076] Optionally, the number of pixels in the horizontal edges of the circumscribed rectangle of each edge can be used as the length of the corresponding circumscribed rectangle, and the number of pixels in the vertical edges of the circumscribed rectangle of each edge can be used as the width of the corresponding circumscribed rectangle, so that the first aspect ratio and the second aspect ratio can be calculated, and then the minimum value of the aspect ratio of the circumscribed rectangle of each edge can be obtained, so as to accurately evaluate the shape of the circumscribed rectangle of each edge.

[0077] Furthermore, after determining the edge density of the edge map and the minimum value of the aspect ratio of the circumscribed rectangle of each edge in the edge map, the possibility of each edge being a headlight-shaped edge can be calculated. Specifically, the possibility of each edge being a headlight-shaped edge satisfies the following relationship:

[0078] , ;

[0079] In the formula, is the edge graph The probability that the edge is a headlight-shaped edge; is the edge graph The minimum aspect ratio of the bounding rectangle of the edges; is the edge density of the edge graph; is the edge graph The number of pixels on the edge; is the number of edges in the edge graph; It is a function that returns the maximum value; The natural constant An exponential function with base .

[0080] in, Reflects the Normalizing the number of pixel points of an edge can reduce the difficulty of calculating the possibility that the edge is a headlight-shaped edge. The larger the value, the greater the possibility that the edge is a headlight edge, and the smaller the value, the smaller the possibility that the edge is a headlight edge.

[0081] It should be noted that since the size of the water droplet edge is relatively small, while the headlight edge is usually longer, when the length of any edge is shorter, that is, the number of pixels on the edge is smaller, it means that the edge is more likely to be a water droplet edge. On the contrary, when the length of any edge is longer, that is, the number of pixels on the edge is larger, it means that the edge is more likely to be a headlight edge. Therefore, the number of pixels on the edge can be used to evaluate the possibility that the corresponding edge is the headlight edge.

[0082] S4: Calculate the fogging degree of the vehicle lamp to detect the anti-fogging performance of the vehicle lamp using the fogging degree.

[0083] In an exemplary embodiment of the present invention, the fogging degree may be data for measuring the fogging condition of the headlights. For example, when the fogging degree of the headlights is large and greater than a certain value, the headlights may be determined to be in a fogging state, and when the fogging degree of the headlights is small and within a certain range, the headlights may be determined to be in a non-fogging state, thereby detecting whether the anti-fogging performance of the headlights meets the standard according to the fogging condition of the headlights.

[0084] Specifically, the fogging degree of the headlights satisfies the following relationship:

[0085] ;

[0086] In the formula, The fogging degree of the headlights; is the edge graph The number of pixels on the edge; and are the length and width of the edge graph, respectively; is the number of edges in the edge graph; is the edge graph The probability that the edge is a headlight-shaped edge; is the edge graph The mean of the absolute values ​​of the curvatures of the pixels at the edges, where When the value is larger, it means that there are more water droplet edge pixels on the edge, and the edge is more likely to be formed by the fusion of the water droplet edge and the headlight edge. The fogging degree of the corresponding headlight is relatively high. On the contrary, when The smaller the value, the smoother and more regular the edge is, and the edge is more likely to be the edge of a headlight, and the fogging degree of the corresponding headlight edge is relatively low; is the maximum value of the curvature of all edge pixels in the edge map; for the summation symbol; The natural constant An exponential function with base .

[0087] In the formula, It reflects the number of pixel points of all edges in the edge map. The larger the value, the more edges there are in the edge map, the higher the visibility of the headlights, the lower the possibility of the headlights being covered by fog, and the corresponding degree of fogging of the headlights is lower. On the contrary, the larger the value, the fewer edges there are in the edge map, the higher the possibility of the headlights being covered by fog, and the corresponding degree of fogging of the headlights is higher.

[0088] It reflects the operation of normalizing the number of pixels of all edges in the edge map. Reflects the normalized The average of the absolute values ​​of the curvatures of the pixel points at the edges can be normalized to reduce the difficulty of calculating the fogging degree of the headlights.

[0089] It reflects the possibility of using each edge as a headlight shape edge and the curvature of the pixel points of each edge. The larger the value, the greater the correction amplitude. The larger the correction amplitude is, the greater the fogging degree of the corresponding headlights is; the smaller the value is, the The smaller the correction range, the less fogging the corresponding headlights will have.

[0090] It should be noted that since water droplets may exist at the edge of the headlights, the edge of the water droplets may merge with the edge of the headlights into one edge, which will cause the number of determined edges to be too large, making the determined degree of fogging of the headlights too low. The present invention combines the curvature of the pixel points of each edge and the possibility that each edge is a headlight-shaped edge, and corrects the number of pixel points of all edges in the normalized edge map, so as to accurately calculate the degree of fogging of the headlights.

[0091] In an exemplary embodiment of the present invention, the present invention further comprises:

[0092] Count the number of pixels of any horizontal edge and any vertical edge of the circumscribed rectangle of any edge in the edge map to obtain the length and width of the corresponding circumscribed rectangle; or count the number of pixels of any horizontal edge and any vertical edge of the circumscribed rectangle of all edges in the edge map to obtain the length and width of the corresponding circumscribed rectangle; or count the number of pixels of any row and any column of the edge map to obtain the length and width of the edge map.

[0093] Among them, the horizontal edge refers to the edge of the circumscribed rectangle in the horizontal direction, and the longitudinal edge refers to the edge of the circumscribed rectangle in the vertical direction. The present invention determines the length of the corresponding edge by counting the number of pixel points of the corresponding edge, thereby reducing the difficulty of determining the length of the corresponding edge.

[0094] Optionally, when the number of pixels in any row of the edge map is , the number of pixels in any column is When , the length of the edge graph is , the width of the edge graph is .

[0095] In an exemplary embodiment of the present invention, the anti-fog performance of a vehicle lamp can be detected by the following steps:

[0096] When the degree of fogging of the headlights is greater than or equal to a first preset threshold, the headlights are determined to be in a foggy state; when the degree of fogging of the headlights is less than a second preset threshold, the headlights are determined to be in a non-fogging state, and the second preset threshold is less than the first preset threshold. When it is determined that the headlights are in a foggy state, the duration of the headlights changing from a foggy state to a non-fogging state is recorded to detect the anti-fog performance of the headlights based on the duration.

[0097] Optionally, the first preset threshold value can be set to 0.8 and the second preset threshold value can be set to 0.3 based on empirical values. When the fogging degree of the headlights is greater than or equal to 0.8, the headlights are judged to be in a foggy state; when the fogging degree of the headlights is less than 0.3, the headlights are judged to be in a non-fog state.

[0098] Furthermore, when it is determined that the headlights are in a foggy state, a timer can be used to record the time it takes for the headlights to transition from a foggy state to a misty state, thereby obtaining the time it takes for the fog on the headlights to dissipate, and then the anti-fog performance of the headlights can be detected based on the time it takes for the fog on the headlights to dissipate.

[0099] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0100] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A vehicle lamp fogging detection simulation test method, characterized in that: include: Obtaining a front view image of a vehicle lamp when conducting an anti-fogging performance test on the vehicle lamp; Perform edge detection on the front view image of the headlight, obtain an edge map of the front view image of the headlight, and calculate the edge density of the edge map; including: calculating the cumulative sum of the areas of the circumscribed rectangles of each edge in the edge map, obtaining the abscissa and ordinate of the center point of the circumscribed rectangle in the pixel coordinate system, taking the variance of the abscissa as the first variance, and taking the variance of the ordinate as the second variance; taking the ratio of the length of the edge map to half the perimeter of the edge map as the first weight, weighting the first variance to obtain a first weighted value, taking the ratio of the width of the edge map to half the perimeter of the edge map as the second weight, weighting the second variance to obtain a second weighted value, and calculating the edge density: ; is the edge density of the edge graph; is the first The length of the circumscribed rectangle of the edges; is the edge graph The width of the circumscribed rectangle of each edge; is the number of edges in the edge graph; is the length of the circumscribed rectangle of all edges in the edge graph; is the width of the bounding rectangle of all edges in the edge graph; is the first weight; is the second weight; is the first variance; is the second variance; is the length of the edge graph; is the width of the edge map; for the summation symbol; The natural constant An exponential function with base ; Determine the possibility that each edge in the edge map is a headlight-shaped edge: , ; is the edge graph The probability that the edge is a headlight-shaped edge; is the edge graph The minimum aspect ratio of the bounding rectangle of the edges; is the edge graph The number of pixels on the edge; It is a function that returns the maximum value; Calculating the fogging degree of the vehicle lamp to detect the anti-fogging performance of the vehicle lamp using the fogging degree; Wherein, the degree of fogging , is the edge graph The mean of the absolute values ​​of the curvatures of the edge pixels, It is the maximum value of the curvature of all edge pixels in the edge map.

2. The vehicle lamp fogging detection simulation test method according to claim 1, characterized in that: The method of detecting the anti-fog performance of the vehicle lamp by using the fogging degree includes: When the fogging degree of the headlight is greater than or equal to a first preset threshold, the headlight is determined to be in a fogging state; when the fogging degree of the headlight is less than a second preset threshold, the headlight is determined to be in a non-fogging state, and the second preset threshold is less than the first preset threshold; When it is determined that the vehicle lamp is in a fogging state, the duration of the vehicle lamp changing from the fogging state to the non-fogging state is recorded, so as to detect the anti-fogging performance of the vehicle lamp according to the duration.

3. The vehicle lamp fogging detection simulation test method according to claim 1, characterized in that: The method for obtaining the minimum value of the aspect ratio of the circumscribed rectangle includes: Calculate the ratio of the length to the width of the circumscribed rectangle of any edge to obtain a first aspect ratio, and calculate the ratio of the width to the length of the circumscribed rectangle of any edge to obtain a second aspect ratio; The minimum value between the first aspect ratio and the second aspect ratio is obtained to obtain the minimum value of the aspect ratio of the circumscribed rectangle of any edge.

4. The vehicle lamp fogging detection simulation test method according to claim 1, characterized in that: The method further comprises: Counting the number of pixels of any horizontal edge and any vertical edge of a circumscribed rectangle of any edge in the edge map to obtain the length and width of the corresponding circumscribed rectangle; or Counting the number of pixels of any horizontal edge and any vertical edge of the circumscribed rectangle of all edges in the edge map to obtain the length and width of the corresponding circumscribed rectangle; or The number of pixels in any row and any column of the edge map is counted to obtain the length and width of the edge map.

5. The vehicle lamp fogging detection simulation test method according to claim 1, characterized in that: The performing edge detection on the front view image of the headlight to obtain an edge map of the front view image of the headlight includes: The Canny edge detection algorithm is used to perform edge detection on the headlight front view image, so as to determine an edge map of the headlight front view image according to the edges in the headlight front view image detected by the Canny operator.

Citation Information

Patent Citations

  • Mist concentration detection method for expressway video monitoring

    CN117309701A

  • Anti-fogging performance detection test method for automobile lamp

    CN111982465A

  • Automobile lamp atomization performance detection method

    CN113848038A