Light source aging recognition method, device, equipment, storage medium and program product
By acquiring and preprocessing the images to be evaluated, calculating multi-dimensional feature parameters, and combining a reference illumination surface template and a multi-device comparison mechanism, the accuracy and stability issues of AOI light source aging identification are solved. This enables early identification, graded warning, and abnormal channel location of light source aging, ensuring the long-term stable operation of the detection system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGJIA MICROVISION (SHENZHEN) SEMICONDUCTOR TECHNOLOGY CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-07-14
Smart Images

Figure CN122385144A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision inspection technology, and more specifically, to a method, apparatus, equipment, storage medium, and program product for identifying light source aging. Background Technology
[0002] In industrial applications of Automated Optical Inspection (AOI) machine vision inspection, the light source provides the basic illumination conditions for inspection imaging. Its brightness stability and spatial distribution uniformity directly determine image quality, defect contrast, and the consistency of the detection algorithm, making it a core element in ensuring the accuracy and reliability of AOI inspection. During long-term continuous operation, light sources are prone to aging problems such as brightness decay, uneven luminous surface distribution, optical component aging, and slight changes in installation angle. Furthermore, lens contamination can further exacerbate the vignetting effect. Therefore, accurate identification and lifespan assessment of the light source's aging status are crucial to ensure the continuous and stable operation of inspection work.
[0003] In existing technologies, the monitoring of AOI light source status mostly adopts methods such as the average brightness of the whole image and a single sharpness index. By collecting relevant index values in real time and comparing them with preset thresholds, it is determined whether the light source is abnormal.
[0004] However, the above solutions have the following drawbacks: First, single brightness indicators are easily confused with changes in external operating conditions such as equipment exposure gain adjustment and production process changes, making it impossible to accurately distinguish between the actual aging of the light source and changes in operating conditions, which can easily lead to misjudgments. Second, judging solely based on basic numerical thresholds cannot quantify and characterize latent aging problems such as spatial distribution drift of the light source and increased vignetting, making it difficult to achieve early identification and warning of aging. Third, the lack of a precise positioning mechanism for light source channels makes it impossible to effectively distinguish between the impact of global operating conditions and the independent anomalies of a single light source channel, which brings great inconvenience to subsequent troubleshooting and targeted maintenance. Summary of the Invention
[0005] The main purpose of this application is to provide a method, device, equipment, storage medium and program product for identifying light source aging, in order to solve the problems of inaccurate identification of light source aging in automatic optical detection, lack of early warning, and difficulty in locating fault channels. It can realize quantitative identification of light source aging, graded early warning, and remaining life assessment, and can accurately locate the abnormality of a single light source channel, ensuring the stability of detection.
[0006] To achieve the above objectives, a first aspect of this application proposes a method for identifying light source aging, comprising: acquiring an image to be evaluated during the production and operation of an automated optical inspection system, wherein the image to be evaluated is a multi-frame image within an evaluation window constructed based on a preset detection frequency for the same light source channel; extracting a target region of interest from the image to be evaluated, and performing preprocessing operations on the target region of interest to obtain a target illumination surface, wherein the preprocessing operations include removing interference regions, estimating the illumination surface, and normalizing the processing; comparing the target illumination surface with a reference illumination surface template to calculate multi-dimensional feature parameters characterizing the state of the light source, and constructing a light source degradation feature vector based on the multi-dimensional feature parameters, wherein the multi-dimensional feature parameters include spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source; performing robust aggregation and trend detection on the light source degradation feature vector within the evaluation window, and determining the light source aging result by combining a preset threshold judgment strategy and a multi-device comparison mechanism; wherein the light source aging result includes an aging risk level, a light source remaining life assessment result, and an abnormal light source channel location result, and the reference illumination surface template is constructed based on a multi-frame reference image after the camera and light source have been calibrated.
[0007] According to the light source aging identification method provided in this application, the target region of interest includes a fixed region of interest and an adaptive region of interest.
[0008] According to the light source aging identification method provided in this application, the illumination surface estimation is implemented by low-pass filtering and / or surface fitting.
[0009] According to the light source aging identification method provided in this application, before comparing the target illumination surface with the reference illumination surface template, the method further includes: acquiring multiple reference images after the camera and light source have been manually calibrated; storing the multiple reference images and corresponding light source identification information to obtain a light source reference file; wherein, the light source reference file includes the reference illumination surface template, brightness statistics and histogram template, and the light source identification information includes light source channel identification, detection formula identification and region of interest identification.
[0010] According to the light source aging identification method provided in this application, the spatial feature parameters include similarity, vignetting index, uniformity error, and histogram distance, and the brightness feature parameters include brightness quantile drift and saturation ratio change.
[0011] According to the light source aging identification method provided in this application, the robust aggregation and trend detection of the light source degradation feature vector within the evaluation window includes: using the median or truncated mean of each feature index in the light source degradation feature vector as a window value characterizing the light source state in the current evaluation period, and using the absolute median difference as a feature index to quantify the degree of window fluctuation.
[0012] This application also provides a light source aging identification device, comprising the following modules: an acquisition module and a processing module; the acquisition module is used to acquire an image to be evaluated during the production operation of an automatic optical inspection system, the image to be evaluated being multiple frames within an evaluation window constructed based on a preset detection frequency for the same light source channel; the processing module is used to extract the target region of interest from the image to be evaluated, and perform preprocessing operations on the target region of interest to obtain a target illumination surface, the preprocessing operations including removing interference regions, illumination surface estimation, and normalization processing; the target illumination surface is compared with a reference illumination surface template to calculate the characteristic light... The source state has multi-dimensional feature parameters, and a light source degradation feature vector is constructed based on these multi-dimensional feature parameters. The multi-dimensional feature parameters include spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. Combined with a preset threshold judgment strategy and a multi-device comparison mechanism, the light source aging result is determined. The light source aging result includes the aging risk level, the light source remaining life assessment result, and the abnormal light source channel location result. The reference illumination surface template is constructed based on multiple frames of reference images after the camera and light source have been calibrated.
[0013] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described light source aging identification methods.
[0014] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the light source aging identification method as described above.
[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described light source aging identification methods.
[0016] The technical solutions provided by the embodiments of this application may include the following beneficial effects: By comparing and calculating the target illumination surface with the reference illumination surface template, multi-dimensional feature parameters including spatial feature parameters and brightness feature parameters are obtained, and a light source degradation feature vector is constructed. Therefore, the light source state can be quantitatively characterized from both spatial distribution and brightness distribution dimensions, accurately capturing latent aging problems such as light source spatial distribution drift and dark corner aggravation, realizing early identification and warning of aging, and solving the defect that traditional single indicators cannot quantitatively characterize latent aging. Because the target region of interest in the image to be evaluated is subjected to preprocessing operations such as interference removal, illumination surface estimation, and normalization, and the degradation feature vectors within the evaluation window are robustly aggregated and trend detected, and the light source status is analyzed in combination with a preset threshold judgment strategy, it can effectively eliminate the interference of accidental factors and external operating condition changes on the judgment of the light source status, accurately distinguish between the actual aging of the light source and operating condition changes such as equipment exposure gain adjustment and production process changes, avoid misjudgment, and solve the problem that traditional single indicators are easily confused with operating condition changes. Because the evaluation window is built based on the same light source channel with a preset detection frequency and multiple frames of images to be evaluated are obtained, and the light source aging result is determined by combining a multi-device comparison mechanism, and the aging result includes the abnormal light source channel location result, it can effectively distinguish between the global operating condition influence and the independent abnormality of a single light source channel, and achieve accurate location of abnormal light source channels, providing a clear basis for subsequent fault diagnosis and targeted maintenance, and solving the defects of traditional solutions that lack accurate location mechanism and are inconvenient to maintain; Since the aging results also include the aging risk level and the remaining life assessment of the light source, it can realize graded early warning of light source aging and advance assessment of the remaining life. This provides a scientific and quantitative basis for predictive maintenance and spare parts planning of light sources in automatic optical inspection systems, realizing the transformation of light source maintenance from passive fault repair to proactive early protection, thereby ensuring the long-term stable operation of the inspection system. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application. In the drawings: Figure 1 A schematic diagram of the light source aging identification method provided in this application; Figure 2 This is a schematic diagram of the structure of the light source aging identification device provided by the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] In this application, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing this application and its embodiments, and are not intended to limit the indicated device, element, or component to having a specific orientation, or to be constructed and operated in a specific orientation.
[0021] Furthermore, in addition to indicating location or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in some cases to indicate a certain dependency or connection relationship. Those skilled in the art can understand the specific meaning of these terms in this application based on the specific circumstances.
[0022] Furthermore, the terms "installation," "setup," "equipped with," "connection," "linked," and "socketing" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, components, or parts. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0023] This application describes some exemplary embodiments for illustrative purposes. It should be understood that this application may be implemented in other ways not specifically shown in the accompanying drawings.
[0024] like Figure 1 As shown, this application provides a light source aging identification method, which can be applied to a light source aging identification device. The light source aging identification method may include steps S101-S104: S101, The light source aging identification device acquires the image to be evaluated during the production and operation of the automatic optical inspection system.
[0025] The images to be evaluated are multiple frames within an evaluation window constructed based on the same light source channel with a preset detection frequency.
[0026] Users can pre-set a reasonable detection frequency based on the production line's detection efficiency and the general law of light source aging to obtain the preset detection frequency. After receiving the preset detection frequency, the light source aging identification device can determine the evaluation cycle and build a corresponding evaluation window for each independent light source channel in the automatic optical inspection system to ensure that an evaluation window is associated with only the image data of the same light source channel. When the acquisition command is obtained, the light source aging identification device can extract multiple frames of detection images of the target light source channel in this evaluation cycle and store them as images to be evaluated in the preset data area.
[0027] For example, in an automated optical inspection production line for circuit boards, for a certain strip light source next to the inspection lens, an inspection frequency of 100 circuit boards can be set. In each evaluation cycle, 20 frames of images generated by the light source during the inspection process are collected as the images to be evaluated in the evaluation window.
[0028] Based on the above solution, on the one hand, the image acquisition method based on the preset detection frequency matches the production line detection rhythm, without adding extra workload to the production line or affecting the efficiency of product detection, and can adapt to the actual needs of industrial production; on the other hand, since the same light source channel corresponds to a dedicated evaluation window, all subsequent analysis work can be carried out around a single light source, laying the foundation for the final accurate positioning of abnormal light source channels; at the same time, the multi-frame image acquisition method effectively filters out image data errors caused by various accidental factors, ensuring that subsequent processing steps are based on real and valid data, improving the accuracy of the entire light source aging identification method from the source, and avoiding subsequent aging judgment errors caused by accidental deviations of single-frame images.
[0029] S102. The light source aging identification device extracts the target region of interest from the image to be evaluated and performs preprocessing operations on the target region of interest to obtain the target illumination surface.
[0030] The aforementioned preprocessing operations include removing interference regions, estimating the illumination surface, and normalization.
[0031] Optionally, the target region of interest includes a fixed region of interest and an adaptive region of interest. The fixed region of interest refers to a fixed image region pre-calibrated according to a preset detection scene and the illumination range of the light source. The adaptive region of interest refers to an image region dynamically adjusted and defined according to the real-time illumination distribution characteristics of the image to be evaluated and the actual placement position of the product.
[0032] It should be noted that the fixed region of interest remains unchanged throughout the entire process of light source aging recognition. It can adapt to standardized inspection scenarios with fixed products, fixed inspection stations, and fixed light source layouts on the production line, and can accurately define the core effective area of normal light source illumination. The adaptive region of interest can automatically adapt and adjust the boundary of the region according to the actual light emission range of the light source in each frame of the image to be evaluated and the real-time position of the product in the image. It can effectively adapt to scenarios where the product placement is slightly offset and the light source illumination range changes slightly due to slight aging, thus making up for the static limitations of the fixed region of interest.
[0033] The light source aging identification device can first select a target region of interest in the image to be evaluated based on the detection requirements of the automatic optical inspection system. This target region of interest is a purely illuminated area excluding the product shape and the inspection background. Then, a preprocessing operation is performed on this target region of interest, including: (1) Eliminating interference areas. The light source aging identification device can identify and block defective and saturated areas within the target's region of interest using image recognition algorithms; It should be noted that defective areas are areas of abnormal brightness and darkness in the image caused by product surface flaws and impurities, which are not caused by light sources. Saturated areas are areas where the camera pixel value reaches its limit due to excessive light from the light source, making it impossible to distinguish details. Since these two types of areas are unrelated to the actual aging state of the light source, removing them ensures that subsequent analysis will focus solely on the illumination data of the light source itself.
[0034] (2) Perform illumination surface estimation on the pure illumination area after removing the interference area. The light source aging identification device can estimate and restore the true brightness distribution of the light source in space from the pure illumination area after removing the interference area, and obtain a smooth, clean brightness surface that can represent the light emission state of the light source.
[0035] Optionally, the illumination surface estimation can be implemented using low-pass filtering and / or surface fitting.
[0036] Specifically, the light source aging identification device can choose a low-pass filtering smoothing method according to the actual detection scenario, filter pixel noise in the image through a fuzzy algorithm, and restore the overall distribution pattern of the light source illumination. Alternatively, it can choose a surface fitting processing method, which can be a quadratic surface fitting or a block polynomial fitting, to fit discrete illumination pixels into a continuous illumination surface, thus more intuitively and accurately representing the brightness distribution characteristics of the light source in space. (3) Normalize the processed illumination surface. The light source aging identification device can map the brightness values of all pixels in the illumination surface to a unified value range according to a preset algorithm, eliminating the problem of overall brightness value offset caused by camera exposure parameter fine-tuning and device running time, so that the illumination surface data obtained in different evaluation cycles and different detection periods have a unified comparison benchmark, and ensure that the spatial distribution pattern can still be compared under different exposure gain conditions.
[0037] For example, in AOI inspection of circuit boards, the light source aging recognition device can first extract the illumination area of the light source above the circuit board as the target region of interest in the image to be evaluated, then remove the defect area formed by the solder joint defects of the circuit board and the saturated area formed by the strong light in the center of the light source, then perform low-pass filtering on the remaining area to filter out pixel noise in the image, and finally map the brightness value of the processed illuminated surface to the numerical range of 0-1 to complete the normalization process, so as to obtain the target illuminated surface that can truly reflect the actual illumination state of the strip light source.
[0038] Based on the above scheme, on the one hand, the accurate extraction of the target region of interest and the elimination of interference regions eliminate interference from non-light source factors such as product, environment, and equipment imaging, allowing all subsequent analysis to be based on the illumination data of the light source itself, greatly improving the accuracy of light source status analysis. On the other hand, illumination surface fitting or smoothing effectively restores the illumination distribution characteristics of the light source, transforming discrete image pixel data into continuous data that can intuitively represent the spatial luminous state of the light source, which is more in line with the analysis needs of light source aging. Furthermore, normalization processing eliminates the brightness value deviation under different detection conditions, ensuring the effectiveness of the comparison between the target illumination surface and the reference illumination surface template, as well as illumination surfaces at different evaluation periods, avoiding the deviation in feature parameter calculation caused by inconsistent data benchmarks.
[0039] S103. The light source aging identification device compares the target illumination surface with the reference illumination surface template to calculate multi-dimensional feature parameters that characterize the light source state, and constructs a light source degradation feature vector based on the multi-dimensional feature parameters.
[0040] The reference illumination surface template is constructed based on multiple reference images after the camera and light source have been calibrated. The multi-dimensional feature parameters include spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source.
[0041] Optionally, before comparing the target illumination surface with the reference illumination surface template, the method further includes: acquiring multiple reference images after the camera and light source have been manually calibrated; storing the multiple reference images and corresponding light source identification information to obtain a light source reference file, wherein the light source reference file includes the reference illumination surface template, luminance statistics and histogram template, and the light source identification information includes light source channel identification, detection formula identification and region of interest identification.
[0042] Specifically, the light source benchmark file is established after the automatic optical inspection system has completed the installation, debugging, and manual calibration of the camera and light source, but before it is officially put into production. It serves as a standard reference for the health status of the light source. During the establishment of the benchmark file, the light source aging identification device can collect multiple frames of benchmark images of the current light source in a stable, interference-free, and aging-free state. The target region of interest extraction, interference region removal, illumination surface estimation, and normalization processing are performed on the multiple frames of benchmark images in sequence to obtain multiple frames of initial illumination surface data. Then, the mean calculation or robust fusion processing is performed on the multiple frames of initial illumination surface data to finally generate a stable and reliable benchmark illumination surface template and store it in the light source benchmark file synchronously with the corresponding light source channel identifier, detection formula identifier, and region of interest identifier.
[0043] Optionally, the spatial feature parameters include similarity, vignetting index, uniformity error, and histogram distance, and the brightness feature parameters include brightness quantile drift and saturation ratio variation.
[0044] Specifically, spatial feature parameters are used to indicate the spatial distribution and structural differences of light emission from the light source. Similarity measures the degree of closeness between the target illuminated surface and the reference illuminated surface in overall distribution; vignetting index characterizes the severity of brightness attenuation in the edge region of the light source; uniformity error quantifies the difference in brightness balance within the emitting surface; and histogram distance reflects the degree of deviation of the overall brightness distribution from the reference template. These parameters can comprehensively capture latent aging characteristics such as spatial distribution drift, local darkening, and deterioration of symmetry. Brightness feature parameters reflect changes in the brightness intensity of the light source. Brightness quantile drift characterizes the deviation of a typical brightness level from the reference state; saturation ratio change statistically measures the change in the proportion of pixel saturation areas caused by excessive illumination relative to the reference. Brightness feature parameters can accurately identify explicit aging or abnormal states such as overall brightness attenuation, abnormal brightness increase, and local overexposure.
[0045] Optionally, similarity can be obtained by calculating the normalized cross-correlation or cosine similarity between the target illumination surface and the reference illumination surface template; vignetting index can be calculated based on the normalized brightness difference between the central and edge regions of the target illumination surface; uniformity error can be taken from the standard deviation or absolute median difference of the normalized illumination surface within the region of interest; brightness quantile drift can be obtained by calculating the difference between the brightness quantile of the current illumination surface and the corresponding quantile of the reference illumination surface template; histogram distance can be measured by the chi-square distance or the distance the Earth moves between the brightness histogram of the current illumination surface and the reference histogram; saturation ratio change can be obtained by calculating the difference between the saturated pixel ratio of the current illumination surface and the saturated pixel ratio of the reference illumination surface.
[0046] The light source aging identification device can first retrieve the corresponding reference illumination surface template, and then compare the target illumination surface with the reference illumination surface template in a region-by-region, multi-dimensional feature comparison: On the one hand, it calculates spatial feature parameters to determine the consistency of the spatial distribution of light emission from the light source. For example, by comparing the morphological similarity between the target illumination surface and the reference illumination surface template, it can determine whether the light source has spatial distribution drift problems such as a shift in the emission range or an expansion of dark corner areas; by calculating the uniformity error, it quantifies the brightness balance of the light emission surface of the light source and captures problems such as local brightness unevenness caused by the aging of the light source components; On the other hand, it calculates brightness feature parameters to determine the overall brightness change trend of the light source. For example, by analyzing the brightness quantile point drift and histogram distance between the target illumination surface and the reference template, it quantifies the overall brightness decay of the light source and captures problems such as brightness reduction and changes in brightness distribution morphology caused by light source aging. After obtaining the specific quantified values of the spatial characteristic parameters and the brightness characteristic parameters, all parameters are integrated into a set of ordered vector data according to the preset characteristic dimension order to obtain the light source degradation characteristic vector. This light source degradation characteristic vector can comprehensively cover the state information of the light source in the two core dimensions of spatial distribution and brightness distribution, realizing a three-dimensional and quantitative characterization of the aging state of the light source.
[0047] Based on the above scheme, the introduction of the reference illumination surface template establishes a unified and stable comparison benchmark, thus avoiding the subjective problem of aging judgment caused by the lack of standard reference and ensuring the effectiveness of comparison between different evaluation cycles and different light sources. Since the multi-dimensional feature parameters cover both the implicit aging of the spatial distribution of the light source and the explicit aging of the brightness distribution, a comprehensive capture of the aging state of the light source is achieved, solving the one-sidedness of traditional single indicators. Since the light source degradation feature vector integrates the scattered multi-dimensional parameters into a unified quantitative carrier, it is not only convenient for subsequent robust aggregation of multiple sets of data within the evaluation window, but also can intuitively reflect the aging process of the light source through the trend change of the vector, providing a solid quantitative foundation for subsequent accurate identification of early aging and prediction of remaining lifespan.
[0048] S104. The light source aging identification device performs robust aggregation and trend detection on the light source degradation feature vector within the evaluation window, and determines the light source aging result by combining a preset threshold judgment strategy and a multi-device comparison mechanism.
[0049] The light source aging results include aging risk level, light source remaining life assessment results, and abnormal light source channel location results.
[0050] Optionally, the robust aggregation and trend detection of the light source degradation feature vector within the evaluation window includes: using the median or truncated mean of each feature index in the light source degradation feature vector as a window value characterizing the light source state in the current evaluation period, and using the absolute median difference as a feature index to quantify the degree of window fluctuation.
[0051] Specifically, the light source aging identification device can first robustly aggregate multiple sets of light source degradation feature vectors within the evaluation window: during the window aggregation stage, the median or truncated mean is used as the window value for each feature index to eliminate the interference of extreme values such as accidental impurities and short-term voltage fluctuations in a single frame image, thereby obtaining aggregated features representing the light source status of the current evaluation period; at the same time, the degree of window fluctuation is quantified by the absolute median difference, and when the window fluctuation increases significantly, the light source instability risk level is output to provide early warning of abnormal fluctuations in the working status of the light source.
[0052] Subsequently, trend detection was performed on the window indicator sequences across multiple consecutive evaluation periods: exponentially weighted moving averages or cumulative sums were used to continuously track the aggregated feature sequences, focusing on monitoring the direction and rate of change of key indicators such as similarity, uniformity error, vignetting index, and histogram distance. When similarity continuously decreased, and uniformity error, vignetting index, or histogram distance continuously increased and exceeded preset thresholds, the light source aging risk level was determined to have increased. The preset thresholds could be provided by a manually set percentage degradation threshold or by standardization based on the baseline absolute median.
[0053] After completing the trend analysis, the light source aging identification device can make a comprehensive judgment by combining the preset threshold judgment strategy and the multi-device comparison mechanism: on the one hand, it compares the aggregated feature vector and the rate of change of the trend with the preset aging judgment threshold to preliminarily judge the aging risk level of the light source; on the other hand, in the multi-camera comparison stage, it compares the consistency of multiple light source channels under the same formula. When multiple channels show consistent drift at the same time, it is attributed to changes in global operating conditions, such as ambient temperature and exposure parameter adjustments, and is not judged as aging; when only a single channel shows drift, it is judged as an abnormality of that light source channel.
[0054] Finally, the light source aging identification device can also estimate the remaining lifespan of the light source. Based on the trend slope of key indicators such as similarity and uniformity error, and the cumulative lighting time, a lifespan model is established. The remaining lifespan of the light source is predicted through trend extrapolation, and a maintenance warning is issued before the risk level reaches a preset maintenance threshold.
[0055] Based on the above analysis, the light source aging identification device can output light source aging results that include aging risk level, light source remaining life assessment results, and abnormal light source channel location results, providing accurate basis for subsequent fault diagnosis and targeted maintenance.
[0056] Based on the above solutions, on the one hand, robust aggregation effectively filters out characteristic fluctuations caused by accidental factors, improving the stability of evaluation results; on the other hand, trend detection enables precise tracking of the gradual aging process of the light source, providing early warnings before aging affects detection accuracy; furthermore, the multi-device comparison mechanism accurately distinguishes between actual aging and changes in operating conditions, completely solving the problem of easy misjudgment in traditional solutions; and finally, comprehensive aging result output provides a scientific quantitative basis for predictive maintenance and spare parts planning of the light source in the automatic optical inspection system, which can promote the transformation of light source maintenance from passive fault repair to proactive early protection, ensuring the long-term stable operation of the inspection system.
[0057] In this embodiment, by comparing and calculating the target illumination surface with the reference illumination surface template, multi-dimensional feature parameters including spatial and brightness feature parameters are obtained, and a light source degradation feature vector is constructed. Therefore, the light source state can be quantitatively characterized from both spatial and brightness distribution dimensions, accurately capturing latent aging problems such as spatial distribution drift and increased vignetting, achieving early identification and warning of aging, and solving the deficiency of traditional single indicators in being unable to quantitatively characterize latent aging. Furthermore, because preprocessing operations such as interference region removal, illumination surface estimation, and normalization are performed on the target region of interest in the image to be evaluated, and robust aggregation and trend detection are performed on the degradation feature vector within the evaluation window, combined with a preset threshold judgment strategy to analyze the light source state, the interference of accidental factors and external operating condition changes on the light source state judgment can be effectively eliminated. This accurately distinguishes between actual light source aging and changes in operating conditions such as equipment exposure gain adjustment and production process changes, avoiding misjudgment. This approach solves the problem of traditional single indicators being easily confused with changes in operating conditions. Because it constructs an evaluation window for the same light source channel based on a preset detection frequency and acquires multiple frames of images to be evaluated, and combines a multi-device comparison mechanism to determine the light source aging results, while also including the location results of abnormal light source channels, it can effectively distinguish between the impact of global operating conditions and the independent anomalies of a single light source channel. This enables precise location of abnormal light source channels, providing a clear basis for subsequent fault diagnosis and targeted maintenance, and overcoming the shortcomings of traditional solutions that lack precise location mechanisms and are inconvenient to maintain. Furthermore, because the aging results also include aging risk levels and light source remaining life assessment results, it can achieve graded early warning of light source aging and advance assessment of remaining life, providing a scientific and quantitative basis for predictive maintenance and spare parts planning of light sources in automatic optical inspection systems. This transforms light source maintenance from passive fault repair to proactive early protection, thereby ensuring the long-term stable operation of the inspection system.
[0058] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0059] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0060] The light source aging identification method provided in this application can be executed by a light source aging identification device or a control module for light source aging identification within that device. This application uses the execution of the light source aging identification method by a light source aging identification device as an example to illustrate the light source aging identification device provided in this application.
[0061] It should be noted that the embodiments of this application can divide the light source aging identification device into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. Optionally, the module division in the embodiments of this application is illustrative and is only a logical functional division; other division methods may be used in actual implementation.
[0062] like Figure 2 As shown in the figure, this application embodiment provides a light source aging identification device 200. The light source aging identification device 200 includes: an acquisition module 201 and a processing module 202.
[0063] The acquisition module 201 is used to acquire the image to be evaluated during the production and operation of the automatic optical inspection system. The image to be evaluated is a multi-frame image within an evaluation window constructed based on the same light source channel with a preset detection frequency. The processing module 202 is used to extract the target region of interest from the image to be evaluated, and perform preprocessing operations on the target region of interest to obtain the target illumination surface. The preprocessing operations include removing interference regions, estimating the illumination surface, and normalization. The target illumination surface is compared with the reference illumination surface template to calculate multi-dimensional feature parameters representing the light source state. A light source degradation feature vector is constructed based on the multi-dimensional feature parameters. The multi-dimensional feature parameters include spatial feature parameters representing the spatial distribution state of the light source and brightness feature parameters representing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. Combined with a preset threshold judgment strategy and a multi-device comparison mechanism, the light source aging result is determined. The light source aging results include aging risk level, light source remaining life assessment results, and abnormal light source channel location results. The reference illumination surface template is constructed based on multiple reference images after the camera and light source have been calibrated.
[0064] Optionally, the target region of interest includes a fixed region of interest and an adaptive region of interest.
[0065] Optionally, the illumination surface estimation is implemented by low-pass filtering and / or surface fitting.
[0066] Optionally, before comparing the target illumination surface with the reference illumination surface template, the processing module 202 is used to acquire multiple reference images after the camera and light source have been manually calibrated; and to store the multiple reference images and corresponding light source identification information to obtain a light source reference file; wherein, the light source reference file includes the reference illumination surface template, brightness statistics and histogram template, and the light source identification information includes light source channel identification, detection formula identification and region of interest identification.
[0067] Optionally, the spatial feature parameters include similarity, vignetting index, uniformity error, and histogram distance, and the brightness feature parameters include brightness quantile drift and saturation ratio variation.
[0068] Optionally, the robust aggregation and trend detection of the light source degradation feature vector within the evaluation window includes: using the median or truncated mean of each feature index in the light source degradation feature vector as a window value characterizing the light source state in the current evaluation period, and using the absolute median difference as a feature index to quantify the degree of window fluctuation.
[0069] In this embodiment, by comparing and calculating the target illumination surface with the reference illumination surface template, multi-dimensional feature parameters including spatial and brightness feature parameters are obtained, and a light source degradation feature vector is constructed. Therefore, the light source state can be quantitatively characterized from both spatial and brightness distribution dimensions, accurately capturing latent aging problems such as spatial distribution drift and increased vignetting, achieving early identification and warning of aging, and solving the deficiency of traditional single indicators in being unable to quantitatively characterize latent aging. Furthermore, because preprocessing operations such as interference region removal, illumination surface estimation, and normalization are performed on the target region of interest in the image to be evaluated, and robust aggregation and trend detection are performed on the degradation feature vector within the evaluation window, combined with a preset threshold judgment strategy to analyze the light source state, the interference of accidental factors and external operating condition changes on the light source state judgment can be effectively eliminated. This accurately distinguishes between actual light source aging and changes in operating conditions such as equipment exposure gain adjustment and production process changes, avoiding misjudgment. This approach solves the problem of traditional single indicators being easily confused with changes in operating conditions. Because it constructs an evaluation window for the same light source channel based on a preset detection frequency and acquires multiple frames of images to be evaluated, and combines a multi-device comparison mechanism to determine the light source aging results, while also including the location results of abnormal light source channels, it can effectively distinguish between the impact of global operating conditions and the independent anomalies of a single light source channel. This enables precise location of abnormal light source channels, providing a clear basis for subsequent fault diagnosis and targeted maintenance, and overcoming the shortcomings of traditional solutions that lack precise location mechanisms and are inconvenient to maintain. Furthermore, because the aging results also include aging risk levels and light source remaining life assessment results, it can achieve graded early warning of light source aging and advance assessment of remaining life, providing a scientific and quantitative basis for predictive maintenance and spare parts planning of light sources in automatic optical inspection systems. This transforms light source maintenance from passive fault repair to proactive early protection, thereby ensuring the long-term stable operation of the inspection system.
[0070] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include a processor 310, a communication interface 320, a memory 330, and a communication bus 340. The processor 310, communication interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a light source aging identification method. This method includes: acquiring an image to be evaluated during the production operation of an automatic optical inspection system; the image to be evaluated is a multi-frame image within an evaluation window constructed based on a preset detection frequency for the same light source channel; extracting the target region of interest (ROI) of the image to be evaluated and performing preprocessing operations on the ROI to obtain a target illumination surface; the preprocessing operations include removing interference regions, estimating the illumination surface, and normalization; comparing the target illumination surface with a reference illumination surface template to calculate a multidimensional representation of the light source state. The light source degradation feature vector is constructed based on the multi-dimensional feature parameters, including spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. Combined with a preset threshold judgment strategy and a multi-device comparison mechanism, the light source aging result is determined. The light source aging result includes the aging risk level, the remaining lifespan assessment result of the light source, and the abnormal light source channel location result. The reference illumination surface template is constructed based on multiple frames of reference images after the camera and light source have been calibrated.
[0071] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the light source aging identification method provided by the above methods. The method includes: acquiring an image to be evaluated during the production operation of an automatic optical inspection system, wherein the image to be evaluated is a multi-frame image within an evaluation window constructed based on a preset detection frequency for the same light source channel; extracting a target region of interest from the image to be evaluated, and performing preprocessing operations on the target region of interest to obtain a target illumination surface, wherein the preprocessing operations include removing interference regions, estimating the illumination surface, and normalizing the processing; and then processing the target region of interest into a target illumination surface. The target illumination surface and the reference illumination surface template are compared to obtain multi-dimensional feature parameters characterizing the light source state. Based on these multi-dimensional feature parameters, a light source degradation feature vector is constructed. The multi-dimensional feature parameters include spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. Combined with a preset threshold judgment strategy and a multi-device comparison mechanism, the light source aging result is determined. The light source aging result includes the aging risk level, the light source remaining life assessment result, and the abnormal light source channel location result. The reference illumination surface template is constructed based on multiple frames of reference images after the camera and light source have been calibrated.
[0073] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the light source aging identification method provided by the above methods. This method includes: acquiring an image to be evaluated during the production operation of an automatic optical inspection system, wherein the image to be evaluated is a multi-frame image within an evaluation window constructed based on a preset detection frequency for the same light source channel; extracting a target region of interest from the image to be evaluated, and performing preprocessing operations on the target region of interest to obtain a target illumination surface, wherein the preprocessing operations include removing interference regions, estimating the illumination surface, and normalizing the process; and comparing the target illumination surface with a reference illumination surface template. By comparing the features, multi-dimensional feature parameters characterizing the light source state are calculated. Based on these multi-dimensional feature parameters, a light source degradation feature vector is constructed. The multi-dimensional feature parameters include spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. Combined with a preset threshold judgment strategy and a multi-device comparison mechanism, the light source aging result is determined. The light source aging result includes the aging risk level, the remaining lifespan assessment result of the light source, and the abnormal light source channel location result. The reference illumination surface template is constructed based on multiple frames of reference images after the camera and light source have been calibrated.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0075] Obviously, those skilled in the art should understand that the various units or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps into a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0076] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for identifying light source aging, characterized in that, include: In the production and operation of the automated optical inspection system, an image to be evaluated is acquired. The image to be evaluated is a multi-frame image within an evaluation window constructed based on the same light source channel with a preset detection frequency. Extract the target region of interest from the image to be evaluated, and perform preprocessing operations on the target region of interest to obtain the target illumination surface. The preprocessing operations include removing interference regions, estimating the illumination surface, and normalization processing. The target illumination surface is compared with the reference illumination surface template to calculate multi-dimensional feature parameters characterizing the light source state. A light source degradation feature vector is constructed based on the multi-dimensional feature parameters. The multi-dimensional feature parameters include spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. Combined with a preset threshold judgment strategy and a multi-device comparison mechanism, the light source aging result is determined. The light source aging results include aging risk level, light source remaining life assessment results, and abnormal light source channel location results. The reference illumination surface template is constructed based on multiple reference images after the camera and light source have been calibrated.
2. The light source aging identification method according to claim 1, characterized in that, The target region of interest includes a fixed region of interest and an adaptive region of interest.
3. The light source aging identification method according to claim 1, characterized in that, The illumination surface estimation is achieved through low-pass filtering and / or surface fitting.
4. The light source aging identification method according to claim 1, characterized in that, Before comparing the target illumination surface with the reference illumination surface template, the method further includes: After the camera and light source have been manually calibrated, multiple reference images are acquired. The multi-frame reference images are stored in correspondence with the corresponding light source identification information to obtain a light source reference file; The light source reference file includes the reference illumination surface template, luminance statistics, and histogram template, and the light source identification information includes the light source channel identifier, the detection formula identifier, and the region of interest identifier.
5. The light source aging identification method according to claim 1, characterized in that, The spatial feature parameters include similarity, vignetting index, uniformity error, and histogram distance, while the brightness feature parameters include brightness quantile drift and saturation ratio variation.
6. The light source aging identification method according to claim 1, characterized in that, The robust aggregation and trend detection of the light source degradation feature vector within the evaluation window includes: The median or truncated mean of each feature index in the light source degradation feature vector is used as the window value characterizing the light source status in the current evaluation period, and the absolute median difference is used as the feature index to quantify the degree of window fluctuation.
7. A light source aging identification device, characterized in that, include: Acquisition module and processing module; The acquisition module is used to acquire the image to be evaluated during the production and operation of the automatic optical inspection system. The image to be evaluated is a multi-frame image within an evaluation window constructed based on the same light source channel with a preset detection frequency. The processing module is used to extract the target region of interest of the image to be evaluated, and perform preprocessing operations on the target region of interest to obtain the target illumination surface. The preprocessing operations include removing interference regions, estimating the illumination surface, and normalization processing. The target illumination surface is compared with the reference illumination surface template to calculate multi-dimensional feature parameters characterizing the light source state. A light source degradation feature vector is constructed based on the multi-dimensional feature parameters, including spatial feature parameters characterizing the spatial distribution state of the light source and brightness feature parameters characterizing the brightness distribution state of the light source. Robust aggregation and trend detection are performed on the light source degradation feature vector within the evaluation window. The light source aging result is determined by combining a preset threshold judgment strategy and a multi-device comparison mechanism. The light source aging results include aging risk level, light source remaining life assessment results, and abnormal light source channel location results. The reference illumination surface template is constructed based on multiple reference images after the camera and light source have been calibrated.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the light source aging identification method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the light source aging identification method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the light source aging identification method as described in any one of claims 1 to 6.