A Smart Detection System and Method for Car Headlight Intensity
By constructing a spatial mapping matrix and light spot contour, and combining brightness gradient field and hierarchical constraint fusion calculation, the problem of inaccurate light intensity measurement under different conditions in existing automotive headlight detection equipment is solved, realizing high-precision light spot extraction and automated judgment, and generating structured reports.
Patent Information
- Application Number
- CN202512020290.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-12-30
AI Technical Summary
Existing automotive headlight testing equipment struggles to perform high-precision light intensity measurements under different angles, distances, and brightness conditions, and lacks automated output capabilities. This results in noise bias, nonlinear response, and inaccurate spot region extraction in the illumination matrix, making it difficult to achieve multi-dimensional light pattern description and reliable judgment.
Illumination data is collected by intelligent sensors, a spatial mapping matrix is constructed for denoising and response linearization, candidate regions of light spots are extracted using an intensity-constrained region segmentation algorithm, light spot contours are constructed by combining the brightness gradient field, a light pattern description tensor is generated and matched with a benchmark light pattern feature library, hierarchical constraint fusion calculation is performed, and an automatic detection report is generated.
It achieves precise correction of illumination data, high-precision extraction of light spot structure, and multi-dimensional expression of light pattern description, thereby improving detection accuracy and reliability, reducing false judgment rate, and having automated output capability.
Smart Images

Figure CN121431028B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive lighting testing technology, and in particular to an intelligent system and method for detecting the intensity of automotive headlights. Background Technology
[0002] With the increasing demands for automotive intelligence and safety, the light pattern quality, light intensity distribution, and cut-off beam shape of automotive headlights have gradually become key indicators in vehicle inspection and road monitoring. Traditional automotive headlight inspection equipment is mostly based on photometer arrays or imaging photometric sensors, which detect light intensity, spot shape, and offset by collecting the light distribution of the headlight at a fixed position. These devices generally use a fixed detection screen, optical imaging plate, or two-dimensional light intensity sampling matrix to record the light distribution, and then combine it with simple light mean calculation, threshold segmentation, or geometric center analysis to evaluate whether the light pattern meets the standards. Although existing detection methods can complete basic light intensity measurement and spot coordinate positioning, they are still based on a detection paradigm of static thresholds or rule matching, which is difficult to support the high-precision and multi-dimensional intelligent detection requirements.
[0003] Existing technologies generally suffer from the following shortcomings. First, illumination data acquisition typically involves only simple filtering without systematic calibration to address response distortion under different angles, distances, and brightness conditions. This results in prevalent noise bias, nonlinear response, and spatial projection errors in the illumination matrix, making it difficult for subsequent algorithms to stably identify key light pattern features. Second, the extraction of light spot regions still relies on intensity thresholds or fixed templates, failing to incorporate the gradient characteristics of brightness changes within the light spot for structured segmentation. This easily leads to incomplete boundaries, shape distortion, or interference between multiple light spot regions, thus affecting the accuracy of cut-off ray recognition. Third, existing methods typically extract only partial statistical features, such as light spot area and maximum brightness value, failing to construct a stable light pattern description from multiple dimensions, including peak intensity, area distribution, centroid trajectory, boundary curvature, and cut-off ray direction. This makes it difficult to accurately distinguish between different headlight models and different light pattern modes. Fourth, existing judgment mechanisms are mostly based on single feature comparison or manual experience threshold judgment, lacking a structured judgment matrix and hierarchical constraint fusion mechanism. They cannot reliably judge multiple indicators such as light intensity deviation, spot position offset, and abnormal cutoff line, which easily leads to problems such as misjudgment and missed judgment. Fifth, existing detection systems generally lack automated output capabilities and cannot generate structured reports from the illumination matrix, spot contour, feature vector, or judgment results generated during the detection process, making it difficult for users to trace, analyze, and archive them.
[0004] Therefore, how to provide an intelligent detection system and method for automotive headlight intensity is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose an intelligent headlight intensity detection system and method for automobiles. This invention fully utilizes technologies such as intelligent illumination acquisition, spatial mapping calibration, intensity-constrained region segmentation, spot gradient field analysis, light pattern description tensor construction, and hierarchical constraint judgment fusion. By constructing a spatially calibrated illumination matrix, generating a set of spot contours, and extracting multi-dimensional light pattern features such as peak intensity vectors, area vectors, centroid vectors, boundary curvature vectors, and cutoff ray direction vectors, and performing structured matching with a benchmark light pattern library, it achieves automated judgment of headlight intensity distribution, spot offset, and cutoff ray anomalies. This invention can accurately correct illumination data, extract spot structures with high precision, express multi-dimensional light pattern descriptions, and intelligently fuse judgment results. It possesses advantages such as high detection accuracy, strong light pattern recognition capability, low false judgment rate, and automatic generation of detection reports, significantly improving the intelligence level and reliability of automobile headlight detection.
[0006] A method for intelligent detection of headlight intensity in automobiles according to an embodiment of the present invention includes the following steps:
[0007] S1. Collect headlight illumination data at specified angles and distances using intelligent sensors;
[0008] S2. Construct a spatial mapping matrix in the detection coordinate system, and perform noise reduction, response linearization and spatial back-projection calibration on the illumination data to generate a spatially calibrated illumination matrix.
[0009] S3. Perform an intensity-constrained region segmentation algorithm on the illumination matrix to obtain a set of candidate light spot regions, and calculate the brightness change gradient field in each candidate light spot region. Construct a set of light spot contours based on the continuity of the gradient field.
[0010] S4. Construct a light pattern description tensor using the illumination matrix and the light spot contour set. The light pattern description tensor consists of a peak intensity vector, an area vector, a centroid vector, a boundary curvature vector, and a cutoff ray direction vector, and generates a corresponding set of feature vectors.
[0011] S5. Match the feature vector set with the benchmark light pattern feature library item by item, generate a structured judgment matrix based on the matching results, perform a judgment fusion calculation based on hierarchical constraints, and output the final judgment results, including light intensity judgment results, spot offset judgment results, and cutoff line anomaly judgment results.
[0012] S6. Generate a detection report, which includes an illumination matrix, a set of light spot contours, a set of feature vectors, a structured judgment matrix, and a final judgment result. Write the detection report to a specified storage path and generate a detection summary file.
[0013] Optionally, the illumination data is a parameter matrix synchronously acquired by a smart sensor under specified angle, specified distance and specified exposure conditions. The parameter matrix consists of pixel intensity values arranged in row and column order, and includes sensor pose parameters, spatial coordinate parameters of the acquisition point, ambient light compensation parameters and temperature compensation parameters at the corresponding acquisition time.
[0014] Optionally, S2 specifically includes:
[0015] S21. Construct a spatial mapping matrix in the detection coordinate system, specifically including:
[0016] Read the intrinsic and extrinsic parameter calibration data of the intelligent sensor, and establish a rigid transformation relationship in the detection coordinate system based on the sensor pose parameters;
[0017] Calculate the projection mapping relationship from pixels to rays based on intrinsic parameter data, and generate a set of pixel ray vectors according to pixel index;
[0018] The rigid transformation relationship and the set of pixel ray vectors are concatenated column-wise to form a spatial mapping matrix. The spatial mapping matrix is then subjected to coordinate scale normalization, singular value stabilization, and matrix condition number restriction.
[0019] Write the processed spatial mapping matrix into the calibration cache and attach a version identifier and timestamp record;
[0020] S22. Perform noise reduction processing on the illumination data, specifically including:
[0021] Read the black level baseline and bad pixel map corresponding to the illumination data, perform baseline offset correction on each pixel and replace the bad pixel value with the median value in the local pane;
[0022] Median filtering based on a sliding window is performed sequentially across the pixel array to suppress impulse noise;
[0023] Bilateral filtering is performed on the median filtering result to smooth high-frequency noise while preserving edges;
[0024] Wavelet decomposition is performed on the output of the bilateral filter, and soft thresholding is applied to the high-frequency subbands according to the hierarchical threshold.
[0025] For time-series sampling scenarios, the median of adjacent frames is calculated based on pixel position and superimposed, and then weighted and fused with the current frame to reduce periodic interference;
[0026] Based on the spatiotemporal stability of the denoised pixels, the pixel confidence weight is calculated, and a pixel confidence weight map is generated. The denoised pixel array and the pixel confidence weight map are then saved to the processing cache.
[0027] S23. Perform response linearization and spatial back-projection calibration, specifically including:
[0028] The sensor response inverse mapping table is obtained by least squares fitting using response curve data collected from a standard light source, and the denoised pixel values are mapped to linearized illumination values according to pixel index.
[0029] Read the spatial mapping matrix from the calibration buffer and perform a pixel-by-pixel back-projection operation on the linearized illumination value of each pixel according to the pixel ray vector;
[0030] Based on the known detection distance or the defined projection surface equation, the coordinates of the intersection point between the pixel ray and the projection surface are solved, and the linearized illumination value is resampled and mapped to the detection coordinate system according to the intersection point coordinates;
[0031] For the mapping holes, perform nearest neighbor interpolation based on distance weights and constrained bicubic interpolation filling.
[0032] For the mapped boundaries, perform morphological closure operations and boundary consistency resmoothing.
[0033] Output a spatially calibrated illumination matrix and write a pixel confidence weight map, mapping sparsity statistics, and calibration version identifier into the output file.
[0034] Optionally, S3 specifically includes:
[0035] S31. An intensity-constrained region segmentation algorithm is used to perform intensity normalization and local statistical analysis on the illumination matrix, and the local mean and local variance are calculated by pixel window.
[0036] S32. Based on the local mean and local variance, and combined with a preset gain factor, a local adaptive threshold field is generated, and the illumination matrix is binary-valued according to the pixel and the corresponding threshold field.
[0037] S33. Perform morphological opening operation on the binary result to remove noise, and perform morphological closing operation to fill small holes to form a binary image.
[0038] S34. Perform connected component labeling on the binary image to extract candidate region boundaries, and filter all connected components according to pixel connectivity attribute and region area attribute to obtain a set of candidate spot regions.
[0039] S35. For each candidate region in the set of candidate light spot regions, calculate the brightness change gradient field on the illumination matrix according to the pixel index, and apply the discrete differential operator in the horizontal and vertical directions to obtain the gradient component map.
[0040] S36. Calculate the gradient magnitude map and gradient direction map based on the gradient component map, perform high-frequency suppression filtering on the gradient magnitude map within the candidate region mask, and perform directional continuity smoothing on the gradient direction map.
[0041] S37. The gradient magnitude is weighted according to the pixel confidence weight map to form a brightness change gradient field;
[0042] S38. Based on the directional consistency and amplitude continuity of the brightness variation gradient field, construct a set of light spot contours, specifically including:
[0043] Perform non-maximum suppression on the gradient magnitude map to accurately locate edge pixels;
[0044] Edge connection tracing is performed according to the gradient direction of edge pixels to form a contour chain;
[0045] Perform hysteresis threshold connection determination on the contour chain and complete contour closure according to pixel connectivity rules;
[0046] Calculate the boundary curvature for the closed profile, and remove short broken chains and fine branches according to the curvature smoothing constraint;
[0047] The final output is a set of light spot contours, and for each contour, the contour pixel sequence, contour length, contour bounding area and contour centroid coordinates are recorded.
[0048] Optionally, S4 specifically includes:
[0049] S41. Construct a light pattern description tensor, read the spatially calibrated illumination matrix and light spot contour set, and extract the corresponding pixel set for each contour in the light spot contour set according to the contour mask in the illumination matrix.
[0050] S42. Arrange the pixel set in the detection coordinate system according to the pixel position order and record the pixel intensity value;
[0051] S43. Generate the local illumination sub-matrix of the contour according to the pixel set, and stack all the local illumination sub-matrixes according to the contour index to form a three-dimensional data block of the light pattern description tensor;
[0052] S44. Calculate the component vectors from the light pattern description tensor, and perform the following operations based on the contour index:
[0053] Calculate the peak intensity vector by finding the maximum pixel intensity in the corresponding local illumination submatrix and recording the pixel value and pixel coordinates of the maximum pixel;
[0054] The area vector is calculated by counting the number of pixels corresponding to the contour and multiplying it by the pixel-to-actual-area mapping factor to obtain the physical area value.
[0055] The centroid vector is calculated by summing all pixels within the local illumination submatrix according to their pixel intensities and then dividing by the total pixel intensities to obtain the intensity-weighted centroid coordinates.
[0056] The boundary curvature vector is calculated by performing equidistant resampling and three-point difference method on the contour pixel sequence to obtain discrete curvature values, applying Gaussian smoothing to the curvature sequence, and averaging the smoothed curvature sequence according to a predefined sampling interval to obtain the boundary curvature vector.
[0057] The direction vector of the cutoff ray is calculated by sampling the intensity gradient along the vertical direction in the neighborhood of the contour and applying least squares straight line fitting on the brightness change gradient field to obtain the direction parameters of the cutoff ray. The direction cosine of the fitted line is recorded to form the direction vector.
[0058] S45. Generate a set of feature vectors and output structured tensor data. Concatenate the peak intensity vector, area vector, centroid vector, boundary curvature vector and intercept ray direction vector in a fixed field order to form the feature vector of each contour.
[0059] S46. Perform normalization on each feature vector and store it as a feature vector set according to the contour index. At the same time, record the pixel confidence weight, contour sampling density and construction timestamp in the feature vector set.
[0060] Optionally, S5 specifically includes:
[0061] S51. Read the feature vector set and the reference light pattern feature library, perform normalization processing on each feature vector according to the predefined field order, and map the field values to a uniform numerical range according to the field normalization parameters.
[0062] S52. Calculate the field confidence based on the pixel confidence weight and contour sampling density according to the predetermined fusion rules, and weight the normalized field values to form a weighted feature vector. At the same time, write the weighted feature vector and the corresponding field confidence into the matching cache.
[0063] S53. Match each weighted feature vector in the benchmark light pattern feature library one by one. For each benchmark entry, measure the field difference according to the field weight and generate a field score. The field difference measurement adopts a combination of amplitude difference degree and direction difference degree measurement, and is converted into a field score through nonlinear mapping.
[0064] S54. Execute a missing value imputation strategy for missing fields and perform robust correction on abnormal fields to reduce the impact of outliers. Summarize field scores and calculate the total matching score and matching confidence by combining field confidence. Sort the matching candidates according to the total matching score and write the matching candidate list to the candidate cache.
[0065] S55. Generate a decision unit for each contour based on the matching candidate list. The decision unit includes a field score vector, a total matching score, a matching confidence score, a matching benchmark identifier, and a deviation index.
[0066] S56. Merge all decision units according to the contour index to form a structured decision matrix, and perform column summary statistical operations on the structured decision matrix to calculate the weighted average score, weighted standard deviation and confidence distribution of each field.
[0067] S57. Decision fusion calculation based on hierarchical constraints performed using a structured decision matrix, specifically including:
[0068] The first layer applies a preset pass / fail threshold to the field scores at the field level and marks fields that exceed the threshold as having abnormal characteristics.
[0069] The second layer combines field-level tags in a regularized manner at the regional level and calculates the regional anomaly index.
[0070] The third layer performs confidence-weighted fusion of all regions at the global level based on the regional anomaly index and regional weight, and calculates the global judgment score;
[0071] Based on the global judgment score, the judgment threshold mapping is triggered to generate the light intensity judgment result, the light spot offset judgment result, and the cutoff line anomaly judgment result, forming the final judgment result;
[0072] S58. Record and save all information from the judgment process, and write it into the test report.
[0073] An intelligent headlight intensity detection system for automobiles according to an embodiment of the present invention includes:
[0074] The light acquisition module is used to collect light data of the headlights at specified angles and distances through intelligent sensors;
[0075] The spatial calibration module is used to construct a spatial mapping matrix in the detection coordinate system, perform noise reduction, response linearization, and spatial back-projection calibration on the illumination data, and generate a spatially calibrated illumination matrix.
[0076] The spot extraction module is used to perform an intensity-constrained region segmentation algorithm on the illumination matrix to obtain a set of candidate spot regions, and to calculate the brightness change gradient field in each candidate spot region, and to construct a set of spot contours based on the continuity of the gradient field.
[0077] The light pattern description module is used to construct a light pattern description tensor using the illumination matrix and the light spot contour set. The light pattern description tensor consists of a peak intensity vector, an area vector, a centroid vector, a boundary curvature vector, and a cutoff ray direction vector, and generates a corresponding feature vector set.
[0078] The feature matching module is used to match the feature vector set with the benchmark light pattern feature library item by item, generate a structured judgment matrix based on the matching results, perform judgment fusion calculation based on hierarchical constraints, and output the final judgment results, including light intensity judgment results, spot offset judgment results, and cutoff line anomaly judgment results.
[0079] The report generation module is used to generate a detection report, which includes an illumination matrix, a set of light spot contours, a set of feature vectors, a structured judgment matrix, and a final judgment result. The detection report is written to a specified storage path and a detection summary file is generated.
[0080] The beneficial effects of this invention are:
[0081] First, this invention uses intelligent sensors to collect illumination data at specified angles and distances, and constructs a spatial mapping matrix in the detection coordinate system. It then performs noise reduction, response linearization, and spatial back-projection calibration on the raw data, which significantly improves the spatial consistency and intensity accuracy of the illumination matrix. Compared with traditional methods that rely on simple acquisition and coarse calibration, this invention can effectively reduce detection errors and improve the presentation accuracy of key light source parameters.
[0082] Secondly, this invention extracts candidate regions of light spots through a region segmentation algorithm based on intensity constraints, and constructs a set of light spot contours by combining the gradient field of brightness variation. Furthermore, it uses the illumination matrix and the light spot contours to generate a light pattern description tensor, realizing the structured expression of multi-dimensional features such as peak intensity, area, centroid, boundary curvature, and cutoff ray direction. This results in higher stability and applicability in light pattern recognition, light spot structure analysis, and anomaly detection, effectively overcoming the shortcomings of existing technologies in terms of blurred light spot boundaries, incomplete features, and susceptibility to noise.
[0083] Finally, this invention performs item-by-item matching of the feature vector set with the benchmark light pattern feature library and constructs a structured judgment matrix to perform hierarchical constraint fusion calculation. It can simultaneously output three types of results: light intensity, spot offset, and cutoff line anomaly. It also automatically generates a detection report containing the illumination matrix, spot contour, and final judgment result, achieving a high degree of automation and intelligence in the detection process. Compared with the traditional method that relies on manual comparison, it significantly improves detection efficiency, reduces the probability of misjudgment, and enhances the traceability of results, and has significant practical application value. Attached Figure Description
[0084] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0085] Figure 1 This is a flowchart of an intelligent detection method for automotive headlight intensity proposed in this invention;
[0086] Figure 2 This is a flowchart of the light spot extraction and light pattern feature construction of an intelligent detection method for automotive headlight intensity proposed in this invention;
[0087] Figure 3 This is a module structure diagram of an intelligent headlight intensity detection system for automobiles proposed in this invention. Detailed Implementation
[0088] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0089] refer to Figure 1-2 A method for intelligent detection of headlight intensity in automobiles includes the following steps:
[0090] S1. Collect headlight illumination data at specified angles and distances using intelligent sensors;
[0091] S2. Construct a spatial mapping matrix in the detection coordinate system, and perform noise reduction, response linearization and spatial back-projection calibration on the illumination data to generate a spatially calibrated illumination matrix.
[0092] S3. Perform an intensity-constrained region segmentation algorithm on the illumination matrix to obtain a set of candidate light spot regions, and calculate the brightness change gradient field in each candidate light spot region. Construct a set of light spot contours based on the continuity of the gradient field.
[0093] S4. Construct a light pattern description tensor using the illumination matrix and the light spot contour set. The light pattern description tensor consists of a peak intensity vector, an area vector, a centroid vector, a boundary curvature vector, and a cutoff ray direction vector, and generates a corresponding set of feature vectors.
[0094] S5. Match the feature vector set with the benchmark light pattern feature library item by item, generate a structured judgment matrix based on the matching results, perform a judgment fusion calculation based on hierarchical constraints, and output the final judgment results, including light intensity judgment results, spot offset judgment results, and cutoff line anomaly judgment results.
[0095] S6. Generate a detection report, which includes an illumination matrix, a set of light spot contours, a set of feature vectors, a structured judgment matrix, and a final judgment result. Write the detection report to a specified storage path and generate a detection summary file.
[0096] In this embodiment, the illumination data is a parameter matrix synchronously acquired by a smart sensor under specified angle, specified distance and specified exposure conditions. The parameter matrix consists of pixel intensity values arranged in row and column order, and includes sensor pose parameters, spatial coordinate parameters of the acquisition point, ambient light compensation parameters and temperature compensation parameters corresponding to the acquisition time.
[0097] In this embodiment, S2 specifically includes:
[0098] S21. Construct a spatial mapping matrix in the detection coordinate system, specifically including:
[0099] Read the intrinsic and extrinsic parameter calibration data of the intelligent sensor, and establish a rigid transformation relationship in the detection coordinate system based on the sensor pose parameters;
[0100] Calculate the projection mapping relationship from pixels to rays based on intrinsic parameter data, and generate a set of pixel ray vectors according to pixel index;
[0101] The rigid transformation relationship and the set of pixel ray vectors are concatenated column-wise to form a spatial mapping matrix. The spatial mapping matrix is then subjected to coordinate scale normalization, singular value stabilization, and matrix condition number restriction.
[0102] Write the processed spatial mapping matrix into the calibration cache and attach a version identifier and timestamp record;
[0103] S22. Perform noise reduction processing on the illumination data, specifically including:
[0104] Read the black level baseline and bad pixel map corresponding to the illumination data, perform baseline offset correction on each pixel and replace the bad pixel value with the median value in the local pane;
[0105] Median filtering based on a sliding window is performed sequentially across the pixel array to suppress impulse noise;
[0106] Bilateral filtering is performed on the median filtering result to smooth high-frequency noise while preserving edges;
[0107] Wavelet decomposition is performed on the output of the bilateral filter, and soft thresholding is applied to the high-frequency subbands according to the hierarchical threshold.
[0108] For time-series sampling scenarios, the median of adjacent frames is calculated based on pixel position and superimposed, and then weighted and fused with the current frame to reduce periodic interference;
[0109] Based on the spatiotemporal stability of the denoised pixels, the pixel confidence weight is calculated, and a pixel confidence weight map is generated. The denoised pixel array and the pixel confidence weight map are then saved to the processing cache.
[0110] S23. Perform response linearization and spatial back-projection calibration, specifically including:
[0111] The sensor response inverse mapping table is obtained by least squares fitting using response curve data collected from a standard light source, and the denoised pixel values are mapped to linearized illumination values according to pixel index.
[0112] Read the spatial mapping matrix from the calibration buffer and perform a pixel-by-pixel back-projection operation on the linearized illumination value of each pixel according to the pixel ray vector;
[0113] Based on the known detection distance or the defined projection surface equation, the coordinates of the intersection point between the pixel ray and the projection surface are solved, and the linearized illumination value is resampled and mapped to the detection coordinate system according to the intersection point coordinates;
[0114] For the mapping holes, perform nearest neighbor interpolation based on distance weights and constrained bicubic interpolation filling.
[0115] For the mapped boundaries, perform morphological closure operations and boundary consistency resmoothing.
[0116] Output a spatially calibrated illumination matrix and write a pixel confidence weight map, mapping sparsity statistics, and calibration version identifier into the output file.
[0117] In this embodiment, S3 specifically includes:
[0118] S31. An intensity-constrained region segmentation algorithm is used to perform intensity normalization and local statistical analysis on the illumination matrix, and the local mean and local variance are calculated by pixel window.
[0119] S32. Based on the local mean and local variance, and combined with a preset gain factor, a local adaptive threshold field is generated, and the illumination matrix is binary-valued according to the pixel and the corresponding threshold field.
[0120] S33. Perform morphological opening operation on the binary result to remove noise, and perform morphological closing operation to fill small holes to form a binary image.
[0121] S34. Perform connected component labeling on the binary image to extract candidate region boundaries, and filter all connected components according to pixel connectivity attribute and region area attribute to obtain a set of candidate spot regions.
[0122] S35. For each candidate region in the set of candidate light spot regions, calculate the brightness change gradient field on the illumination matrix according to the pixel index, and apply the discrete differential operator in the horizontal and vertical directions to obtain the gradient component map.
[0123] S36. Calculate the gradient magnitude map and gradient direction map based on the gradient component map, perform high-frequency suppression filtering on the gradient magnitude map within the candidate region mask, and perform directional continuity smoothing on the gradient direction map.
[0124] S37. The gradient magnitude is weighted according to the pixel confidence weight map to form a brightness change gradient field;
[0125] S38. Based on the directional consistency and amplitude continuity of the brightness variation gradient field, construct a set of light spot contours, specifically including:
[0126] Perform non-maximum suppression on the gradient magnitude map to accurately locate edge pixels;
[0127] Edge connection tracing is performed according to the gradient direction of edge pixels to form a contour chain;
[0128] Perform hysteresis threshold connection determination on the contour chain and complete contour closure according to pixel connectivity rules;
[0129] Calculate the boundary curvature for the closed profile, and remove short broken chains and fine branches according to the curvature smoothing constraint;
[0130] The final output is a set of light spot contours, and for each contour, the contour pixel sequence, contour length, contour bounding area and contour centroid coordinates are recorded.
[0131] In this embodiment, the calculation scheme for the light spot contour set specifically includes:
[0132] After performing non-maximum suppression on the gradient magnitude map, a direction search chain is established in the illumination matrix according to the gradient direction of each edge pixel, and the forward neighbor pixels that are closest to the current pixel direction in the gradient direction map are read in turn.
[0133] Gradient magnitude comparison is performed on the forward neighbor pixels, and the forward neighbor pixels are added to the contour chain when the continuity condition is met. At the same time, the directional offset is recorded during the addition process, and the directional chain is terminated when the directional offset exceeds the set angle range.
[0134] Local minimum transition detection is performed on the formed contour chain, and when a local transition position is detected, the contour chain is segmented and reorganized. The segmented contour chain is then rearranged in pixel index order to form a closed contour.
[0135] Boundary sampling is performed on the closed contour, and the curvature sequence is calculated based on the sampling point sequence;
[0136] Perform point-by-point smoothing on the curvature sequence and remove edge points with excessive curvature abrupt changes;
[0137] The removed contour sequence is used as the light spot contour set.
[0138] In this embodiment, S4 specifically includes:
[0139] S41. Construct a light pattern description tensor, read the spatially calibrated illumination matrix and light spot contour set, and extract the corresponding pixel set for each contour in the light spot contour set according to the contour mask in the illumination matrix.
[0140] S42. Arrange the pixel set in the detection coordinate system according to the pixel position order and record the pixel intensity value;
[0141] S43. Generate the local illumination sub-matrix of the contour according to the pixel set, and stack all the local illumination sub-matrixes according to the contour index to form a three-dimensional data block of the light pattern description tensor;
[0142] S44. Calculate the component vectors from the light pattern description tensor, and perform the following operations based on the contour index:
[0143] Calculate the peak intensity vector by finding the maximum pixel intensity in the corresponding local illumination submatrix and recording the pixel value and pixel coordinates of the maximum pixel;
[0144] The area vector is calculated by counting the number of pixels corresponding to the contour and multiplying it by the pixel-to-actual-area mapping factor to obtain the physical area value.
[0145] The centroid vector is calculated by summing all pixels within the local illumination submatrix according to their pixel intensities and then dividing by the total pixel intensities to obtain the intensity-weighted centroid coordinates.
[0146] The boundary curvature vector is calculated by performing equidistant resampling and three-point difference method on the contour pixel sequence to obtain discrete curvature values, applying Gaussian smoothing to the curvature sequence, and averaging the smoothed curvature sequence according to a predefined sampling interval to obtain the boundary curvature vector.
[0147] The direction vector of the cutoff ray is calculated by sampling the intensity gradient along the vertical direction in the neighborhood of the contour and applying least squares straight line fitting on the brightness change gradient field to obtain the direction parameters of the cutoff ray. The direction cosine of the fitted line is recorded to form the direction vector.
[0148] S45. Generate a set of feature vectors and output structured tensor data. Concatenate the peak intensity vector, area vector, centroid vector, boundary curvature vector and intercept ray direction vector in a fixed field order to form the feature vector of each contour.
[0149] S46. Perform normalization on each feature vector and store it as a feature vector set according to the contour index. At the same time, record the pixel confidence weight, contour sampling density and construction timestamp in the feature vector set.
[0150] In this embodiment, the calculation scheme for the boundary curvature vector specifically includes:
[0151] Read the pixel sequence of a single contour and calculate the cumulative arc length point by point according to the pixel coordinates;
[0152] Based on the cumulative arc length, the contour is resampled at equal intervals, and a sequence of sampling points with fixed spacing is generated between adjacent pixels through linear interpolation.
[0153] For each resampling point, a certain number of upstream and downstream neighboring points are selected to construct a local point window. The tangent vector between adjacent points is calculated in sequence and then normalized.
[0154] Based on the curvature sequence, the local direction change is obtained by comparing the direction difference of adjacent unit tangent vectors, and the local direction change is divided by the corresponding arc length increment to obtain the discrete curvature sequence.
[0155] A length-adjustable smoothing filter is applied to the discrete curvature sequence for convolutional smoothing to suppress measurement noise and preserve the main curvature features;
[0156] The smoothed curvature sequence is segmented according to a predefined sampling interval, and the average curvature value of each segment is calculated to generate a segmented curvature description. Segments that are too short or whose average curvature is lower than a preset confidence threshold are removed.
[0157] Finally, the average curvature values of each segment are concatenated according to the field order in the contour sampling order to form the boundary curvature vector, and the start and end sampling index, segment length and average curvature confidence of each segment are recorded.
[0158] In this embodiment, S5 specifically includes:
[0159] S51. Read the feature vector set and the reference light pattern feature library, perform normalization processing on each feature vector according to the predefined field order, and map the field values to a uniform numerical range according to the field normalization parameters.
[0160] S52. Calculate the field confidence based on the pixel confidence weight and contour sampling density according to the predetermined fusion rules, and weight the normalized field values to form a weighted feature vector. At the same time, write the weighted feature vector and the corresponding field confidence into the matching cache.
[0161] S53. Match each weighted feature vector in the benchmark light pattern feature library one by one. For each benchmark entry, measure the field difference according to the field weight and generate a field score. The field difference measurement adopts a combination of amplitude difference degree and direction difference degree measurement, and is converted into a field score through nonlinear mapping.
[0162] S54. Execute a missing value imputation strategy for missing fields and perform robust correction on abnormal fields to reduce the impact of outliers. Summarize field scores and calculate the total matching score and matching confidence by combining field confidence. Sort the matching candidates according to the total matching score and write the matching candidate list to the candidate cache.
[0163] S55. Generate a decision unit for each contour based on the matching candidate list. The decision unit includes a field score vector, a total matching score, a matching confidence score, a matching benchmark identifier, and a deviation index.
[0164] S56. Merge all decision units according to the contour index to form a structured decision matrix, and perform column summary statistical operations on the structured decision matrix to calculate the weighted average score, weighted standard deviation and confidence distribution of each field.
[0165] S57. Decision fusion calculation based on hierarchical constraints performed using a structured decision matrix, specifically including:
[0166] The first layer applies a preset pass / fail threshold to the field scores at the field level and marks fields that exceed the threshold as having abnormal characteristics.
[0167] The second layer combines field-level tags in a regularized manner at the regional level and calculates the regional anomaly index.
[0168] The third layer performs confidence-weighted fusion of all regions at the global level based on the regional anomaly index and regional weight, and calculates the global judgment score;
[0169] Based on the global judgment score, the judgment threshold mapping is triggered to generate the light intensity judgment result, the light spot offset judgment result, and the cutoff line anomaly judgment result, forming the final judgment result;
[0170] S58. Record and save all information from the judgment process, and write it into the test report.
[0171] refer to Figure 3 A smart headlight intensity detection system for automobiles, comprising:
[0172] The light acquisition module is used to collect light data of the headlights at specified angles and distances through intelligent sensors;
[0173] The spatial calibration module is used to construct a spatial mapping matrix in the detection coordinate system, perform noise reduction, response linearization, and spatial back-projection calibration on the illumination data, and generate a spatially calibrated illumination matrix.
[0174] The spot extraction module is used to perform an intensity-constrained region segmentation algorithm on the illumination matrix to obtain a set of candidate spot regions, and to calculate the brightness change gradient field in each candidate spot region, and to construct a set of spot contours based on the continuity of the gradient field.
[0175] The light pattern description module is used to construct a light pattern description tensor using the illumination matrix and the light spot contour set. The light pattern description tensor consists of a peak intensity vector, an area vector, a centroid vector, a boundary curvature vector, and a cutoff ray direction vector, and generates a corresponding feature vector set.
[0176] The feature matching module is used to match the feature vector set with the benchmark light pattern feature library item by item, generate a structured judgment matrix based on the matching results, perform judgment fusion calculation based on hierarchical constraints, and output the final judgment results, including light intensity judgment results, spot offset judgment results, and cutoff line anomaly judgment results.
[0177] The report generation module is used to generate a detection report, which includes an illumination matrix, a set of light spot contours, a set of feature vectors, a structured judgment matrix, and a final judgment result. The detection report is written to a specified storage path and a detection summary file is generated. Example
[0178] To verify the feasibility of this invention in practice, it was applied to an automotive lighting inspection scenario. The light intensity performance of headlights from multiple vehicles under different angles and distances was intelligently detected, and compared with traditional manual inspection methods to verify the comprehensive advantages of this invention in terms of data integrity, spot recognition accuracy, judgment consistency, and overall inspection efficiency.
[0179] In this testing scenario, the vehicle is fixed on an adjustable testing platform. Intelligent sensors are installed at standardized light-receiving positions. Testing personnel use a control device to set the angle and distance, ensuring the headlights illuminate under stable conditions. The intelligent sensors begin real-time acquisition of headlight illumination images and intensity distribution, and the continuously acquired data is input into the processing flow of this invention. This invention first constructs a spatial mapping matrix in the testing coordinate system, performing denoising, response linearization, and spatial back-projection calibration on the original illumination data. This makes the intensity distribution of the illumination matrix more uniform and the boundaries clearer, effectively solving the problems of high image noise and localized overexposure leading to distorted light spot shapes in traditional testing methods.
[0180] Within a rigorously calibrated illumination matrix, this invention automatically executes an intensity-constrained region segmentation algorithm to accurately pinpoint regions that may constitute the main body of the light spot, and constructs a brightness gradient field in each region. Since the gradient field exhibits significant variation characteristics at the light spot boundary, this invention further extracts the light spot contour based on gradient continuity, clearly separating the true light spot boundary from the complex background. This step effectively solves the problems of large area errors, centroid drift, and difficulty in determining the position of the cutoff ray caused by blurred light spot boundaries in traditional detection methods, resulting in a light spot contour with integrity, traceability, and high reproducibility.
[0181] Subsequently, this invention constructs a light pattern description tensor using the illumination matrix and light spot contour, generating peak intensity vector, area vector, centroid vector, boundary curvature vector, and cutoff ray direction vector, forming a feature vector set based on multi-dimensional information. This feature set is compared item by item with a benchmark light pattern feature library, and through hierarchical constraint fusion calculation using a structured judgment matrix, three types of results are finally output: light intensity judgment, light spot offset judgment, and cutoff ray anomaly judgment. The entire judgment process is fully automated, requiring no manual intervention, effectively solving the problems of strong subjectivity in manual comparison, large differences in results among different inspectors, and lack of consistency in traditional detection.
[0182] In actual testing, the headlights of the same vehicle model were tested at multiple angles and distances. The results showed that the illumination matrix noise processed by this invention decreased by more than 30%, the light spot boundary recognition error was reduced to less than a quarter of its original value, the matching consistency rate between the light pattern parameters and the benchmark library was significantly improved, and the overlap between the final judgment result and the manual review result was significantly enhanced. Furthermore, this invention can complete illumination data processing at a higher frame rate, significantly shortening the entire testing cycle and offering higher efficiency and reliability compared to traditional manual testing methods.
[0183] Table 1. Comparison of Light Intensity Intelligent Detection Performance
[0184]
[0185] To further verify the performance of this invention, multiple headlights were selected for repeated testing in the detection scenario. The quality of the illumination matrix before and after denoising, the accuracy of light spot recognition, the consistency of judgments, and the overall detection time were statistically analyzed. The statistical results show that this invention exhibits significant advantages in noise suppression, contour extraction accuracy, light pattern parameter stability, and consistency of judgment results.
[0186] A comprehensive analysis of the data in Table 1 shows that the present invention can significantly reduce illumination matrix noise, improve the accuracy of spot contour extraction, and enhance the consistency of light pattern determination in actual detection environments, while completing automated detection within a consistently stable timeframe. This detection method not only provides stable output in terms of light intensity determination, spot offset analysis, and anomaly identification of cutoff rays, but also achieves higher repeatability and reliability through a structured determination matrix, demonstrating the significant effectiveness of the present invention in practical applications.
[0187] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for intelligently detecting the light intensity of an automobile headlight, characterized in that, The method comprises the following steps: S1, collecting light data of the headlamp at a specified angle and distance by an intelligent sensor; S2, constructing a space mapping matrix in a detection coordinate system, performing denoising processing, response linearization processing and space back projection calibration processing on the light data, and generating a space calibrated light matrix; The response linearization processing and the space back projection calibration processing are performed, specifically including: The response curve data collected by the standard light source is used to obtain the sensor response inverse mapping table by least squares fitting, and the denoised pixel value is mapped to a linearized light value according to the pixel index; Read the space mapping matrix in the calibration cache, and perform pixel-by-pixel back projection operation on each pixel linearized light value according to the pixel light vector; According to the known detection distance or the defined projection surface equation, the intersection coordinates of the pixel light and the projection surface are solved, and the linearized light value is resampled and mapped to the detection coordinate system according to the intersection coordinates; For mapping holes, perform nearest neighbor interpolation based on distance weight and constrained bicubic interpolation filling, For the mapping boundary, morphological closing operation and boundary consistency resmoothing processing are performed; Output the space calibrated light matrix, and write the pixel confidence weight map, the mapping sparsity statistics and the calibration version identifier in the output file; S3, performing an intensity constraint based region segmentation algorithm on the light matrix to obtain a set of light spot candidate regions, and calculating a brightness change gradient field in each light spot candidate region, and constructing a set of light spot outlines according to the gradient field continuity; S4, constructing a light type description tensor using the light matrix and the set of light spot outlines, the light type description tensor being composed of a peak intensity vector, an area vector, a centroid vector, a boundary curvature vector, and a cut-off line direction vector, and generating a corresponding feature vector set; S5, matching the feature vector set with a reference light type feature library item by item, generating a structured judgment matrix according to the matching result, and performing a hierarchical constraint based judgment fusion calculation to output a final judgment result, including light intensity judgment result, light spot offset judgment result and cut-off line abnormality judgment result; S6, generating a detection report, the detection report containing the light matrix, the set of light spot outlines, the feature vector set, the structured judgment matrix and the final judgment result, and writing the detection report to a specified storage path and generating a detection summary file.
2. The method for detecting the light intensity of an automobile headlight according to claim 1, characterized in that, The light data is a parameter matrix synchronously acquired by the intelligent sensor under specified angle, specified distance and specified exposure condition, the parameter matrix being composed of pixel intensity values arranged in row and column order, and containing sensor pose parameters, acquisition point space coordinate parameters, ambient light compensation parameters and temperature compensation parameters at the corresponding acquisition time.
3. The method for detecting the light intensity of an automobile headlight according to claim 1, characterized in that, The S2 specifically includes: S21, constructing a space mapping matrix in a detection coordinate system, specifically including: Reading the intelligent sensor intrinsic parameter calibration data and extrinsic parameter calibration data, and establishing a rigid transformation relationship in the detection coordinate system according to the sensor pose parameters; According to the intrinsic parameter data, the projection mapping relationship of the pixel to the light is calculated, and a set of pixel light vectors is generated according to the pixel index; The rigid transformation relationship is connected with the pixel light vector set by column to form a space mapping matrix, and coordinate scale normalization processing, singular value stabilization processing and matrix condition number limitation processing are performed on the space mapping matrix; The processed space mapping matrix is written into a calibration cache and an additional version identifier and timestamp record are added; S22, performing denoising processing on the illumination data, specifically including: Reading the black level reference and the bad pixel map corresponding to the illumination data, performing baseline offset correction on each pixel, and replacing the bad pixel value with the median value in the local window; Performing median filtering based on a sliding window to suppress impulse noise in the order of the pixel array; Performing bilateral filtering on the median filtering result to smooth high-frequency noise while preserving edges; Performing wavelet decomposition on the bilateral filtering output, and performing soft threshold denoising on the high-frequency subband according to the hierarchical threshold; For time series sampling scenarios, calculate the median superposition result of adjacent frames according to the pixel position and weight fusion with the current frame to reduce periodic interference; Based on the spatiotemporal stability of the denoised pixels, calculate the pixel confidence weight, generate the pixel confidence weight map, and save the denoised pixel array and the pixel confidence weight map to the processing cache.
4. The automobile headlight light intensity intelligent detection method according to claim 1, characterized in that, The S3 specifically includes: S31, performing intensity normalization and local statistical analysis on the illumination matrix by executing an intensity-constrained region segmentation algorithm, calculating local mean and local variance according to the pixel window; S32, based on the local mean and the local variance, and combined with a preset gain factor, generate a local adaptive threshold field, and perform binary determination on the illumination matrix according to the pixel and the corresponding threshold field; S33, performing morphological opening operation on the binary result to remove noise points, and performing morphological closing operation to fill small holes to form a binary graph; S34, performing connected component labeling on the binary graph to extract the candidate region boundary, and screening all connected components according to the pixel connectivity attribute and the area attribute to obtain a set of candidate regions of light spots; S35, for each candidate region in the set of candidate regions of light spots, calculate the brightness change gradient field on the illumination matrix according to the pixel index, and obtain the gradient component graph by applying the discrete differential operator in the horizontal direction and the vertical direction; S36, based on the gradient component graph, calculate the gradient amplitude graph and the gradient direction graph, perform high-frequency suppression filtering on the gradient amplitude graph within the candidate region mask, and perform direction continuity smoothing on the gradient direction graph; S37, according to the pixel confidence weight graph, weight the gradient amplitude to form the brightness change gradient field; S38, according to the direction consistency and amplitude continuity of the brightness change gradient field, construct a set of light spot contours, specifically including: Performing non-maximum suppression on the gradient amplitude graph to accurately locate the edge pixels; Performing edge connection tracking according to the gradient direction of the edge pixels to form a contour chain; Performing lag threshold connection judgment on the contour chain, and completing contour closure according to the pixel connectivity rule; Calculating the boundary curvature for the closed contour, and removing short broken chains and thin branches according to the curvature smoothing constraint; Finally, output the set of light spot contours, and record the contour pixel sequence, contour length, contour enclosed area and contour centroid coordinates for each contour.
5. The method of claim 1, wherein the method comprises: The S4 specifically includes: S41, construct the light pattern description tensor, read the space calibrated illumination matrix and the light spot profile set, and extract the corresponding pixel set in the illumination matrix according to the profile mask for each profile in the light spot profile set; S42, arrange and record the pixel intensity values in the detection coordinate system according to the pixel position sequence of the pixel set; S43, generate the local illumination sub-matrix of the profile according to the pixel set, and stack all the local illumination sub-matrices to form a three-dimensional data block of the light pattern description tensor according to the profile index; S44, calculate the component vector from the light pattern description tensor, and perform the following operations according to the profile index: Calculate the peak intensity vector by finding the maximum pixel intensity in the corresponding local illumination sub-matrix and recording the pixel value and pixel coordinates of the maximum pixel; Calculate the area vector by counting the number of pixels of the corresponding profile and multiplying the pixel to the actual area mapping factor to obtain the physical area value; Calculate the centroid vector by summing all the pixels in the local illumination sub-matrix according to the pixel intensity and dividing the sum of the pixel intensity to obtain the intensity-weighted centroid coordinates; Calculate the boundary curvature vector by performing equidistant resampling on the profile pixel sequence, calculating the discrete curvature value by three-point difference method, applying Gaussian smoothing to the curvature sequence, and segmenting and averaging the smoothed curvature sequence according to the predefined sampling interval to obtain the boundary curvature vector; Calculate the vignetting line direction vector by sampling the intensity gradient in the vertical direction in the profile neighborhood and applying least square linear fitting to the brightness change gradient field to obtain the vignetting line direction parameters, and record the direction cosine of the fitted straight line to form the direction vector; S45, generate a feature vector set and output structured tensor data, and splice the peak intensity vector, area vector, centroid vector, boundary curvature vector and vignetting line direction vector according to a fixed field order to form a feature vector of each profile; S46, perform normalization processing on each feature vector, and store the feature vector set in the profile index, and record the pixel confidence weight, profile sampling density and construction timestamp in the feature vector set.
6. The method of claim 1, wherein the method comprises: The S5 specifically includes: S51, read the feature vector set and the reference light pattern feature library, perform normalization processing on each feature vector according to the predefined field order, and map the field value to the uniform numerical interval according to the field normalization parameter; S52, calculate the field confidence according to the predetermined fusion rule based on the pixel confidence weight and the profile sampling density, weight the normalized field value to form a weighted feature vector, and write the weighted feature vector and the corresponding field confidence into the matching cache; S53, match each weighted feature vector in the reference light pattern feature library item by item, and for each reference item, measure the field difference according to the field weight and generate a field score, wherein the field difference measurement adopts a combined measurement of amplitude difference degree and direction difference degree, and is converted into a field score through nonlinear mapping; S54, perform missing value filling strategy for missing fields and robust correction for abnormal fields to reduce outlier influence, aggregate field scores and combine field confidence to calculate matching total score and matching confidence, sort matching candidates by matching total score, and write matching candidate list to candidate cache; S55, generate a decision unit for each profile according to the matching candidate list, the decision unit including field score vector, matching total score, matching confidence, matching reference identification and deviation index; S56, merge all decision units by profile index to form a structured decision matrix, and perform column aggregate statistical operation on the structured decision matrix to calculate weighted average score, weighted standard deviation and confidence distribution of each field; S57, perform hierarchical constraint decision fusion calculation based on the structured decision matrix, specifically including: The first layer applies a preset qualified threshold to the field score at the field level, and marks the fields exceeding the threshold as abnormal features; The second layer combines the field-level marks and calculates the regional-level abnormal index at the regional level; The third layer performs confidence-weighted fusion on all regions according to the regional-level abnormal index and regional weight at the global level, and calculates the global decision score; According to the global decision score, trigger the decision threshold mapping to generate light intensity decision result, light spot offset decision result and cutting line abnormality decision result, and form the final decision result; S58, record and save the information of the decision process, and write into the detection report.
7. An intelligent detection system for the light intensity of an automobile headlight, which implements an intelligent detection method for the light intensity of an automobile headlight according to any one of claims 1 to 6, characterized in that, It includes: Illumination acquisition module, for collecting illumination data of headlamp at specified angle and distance through intelligent sensor; Space calibration module, for constructing space mapping matrix in detection coordinate system, implementing denoising processing, response linearization processing and space inverse projection calibration processing on illumination data, and generating space calibrated illumination matrix; Spot extraction module, for performing region segmentation algorithm based on intensity constraint on illumination matrix to obtain spot candidate region set, and calculating brightness change gradient field in each spot candidate region, and constructing spot profile set according to gradient field continuity; Light pattern description module, for constructing light pattern description tensor using illumination matrix and spot profile set, the light pattern description tensor being composed of peak intensity vector, area vector, centroid vector, boundary curvature vector and cutting line direction vector, and generating corresponding feature vector set; Feature matching module, for matching feature vector set with reference light pattern feature library item by item, generating structured decision matrix according to matching result and performing decision fusion calculation based on hierarchical constraint, and outputting final decision result including light intensity decision result, light spot offset decision result and cutting line abnormality decision result; Report generation module, for generating detection report containing illumination matrix, spot profile set, feature vector set, structured decision matrix and final decision result, writing the detection report into specified storage path and generating detection summary file.
Citation Information
Patent Citations
Energy-saving LED tunnel lamp light distribution method capable of effectively improving visual environment
CN115823536A
Bridge detection image recognition method and system based on artificial intelligence
CN118823481A