Method and system for dynamic control of machine vision light source based on ambient light feedback
Through ambient light feedback collection and feature extraction, combined with convolutional neural network and Bayesian inference network, the light source of the machine vision system is dynamically adjusted, solving the problem of poor light source adjustment in the existing technology and improving image quality and detection accuracy. , achieving efficient adaptation to complex environments.
Patent Information
- Application Number
- CN202410697384.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-05-31
AI Technical Summary
Existing machine vision systems are difficult to dynamically adjust the light source when the ambient light changes, resulting in reduced image quality and detection errors. They lack intelligence and automation and cannot meet high-precision requirements in complex environments.
Through ambient light feedback collection, Fourier transform and feature extraction, a light source control model is constructed, and the stacked convolutional neural network and Bayesian inference network are used to make light source control decisions. Combined with the genetic algorithm optimization strategy, the light source is dynamically adjusted to adapt to the environment. Light changes.
It improves the image quality and detection accuracy of the machine vision system under various lighting conditions, enhances the accuracy, stability and intelligence of light source control, and continuously improves the accuracy of the light source dynamic control strategy.
Smart Images

Figure CN118334297B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and system for dynamically controlling a machine vision light source based on ambient light feedback. Background Art
[0002] Machine vision systems are used in areas such as quality inspection, automated production, and environmental monitoring. With the development of technology, the performance and accuracy of machine vision systems are constantly improving, but they still face many challenges. One significant issue is the impact of ambient light changes on the vision system. In practical applications, ambient light conditions often change, and these changes can significantly affect the imaging quality and detection accuracy of machine vision systems. Therefore, how to effectively control the light source to adapt to changes in ambient light has become the key to improving the performance of machine vision systems.
[0003] At present, most machine vision systems use fixed light sources or simple light source adjustment methods, which cannot be dynamically adjusted according to changes in real-time ambient light. This method performs poorly in scenes with large changes in lighting conditions, which can easily lead to image quality degradation and detection errors. In addition, traditional light source control methods lack intelligence and automation, rely on manual adjustment or preset parameters, and are difficult to meet high-precision requirements in complex environments. Summary of the invention
[0004] The present application provides a method and system for dynamic control of a machine vision light source based on ambient light feedback, which is used to improve the accuracy of dynamic control of a machine vision light source through ambient light feedback.
[0005] In a first aspect, the present application provides a method for dynamically controlling a machine vision light source based on ambient light feedback, the method comprising:
[0006] Perform real-time collection and standardized processing of ambient light on the machine vision system to obtain ambient light feedback data;
[0007] Performing Fourier transform and feature extraction on the ambient light feedback data to obtain multiple ambient light feature sets;
[0008] Constructing a light source control model and performing feature comprehensive scoring and feature screening on the multiple ambient light feature sets to obtain multiple target light source control feature sets;
[0009] Inputting the plurality of target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information;
[0010] A target light source control strategy for the machine vision system is created according to the light source control decision information.
[0011] In a second aspect, the present application provides a device for dynamically controlling a machine vision light source based on ambient light feedback, the device for dynamically controlling a machine vision light source based on ambient light feedback comprising:
[0012] The acquisition module is used to collect and standardize the ambient light of the machine vision system in real time to obtain ambient light feedback data;
[0013] A transformation module, used for performing Fourier transformation and feature extraction on the ambient light feedback data to obtain a plurality of ambient light feature sets;
[0014] A screening module is used to construct a light source control model and perform feature comprehensive scoring and feature screening on the multiple ambient light feature sets to obtain multiple target light source control feature sets;
[0015] An analysis module, used for inputting the plurality of target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information;
[0016] A creation module is used to create a target light source control strategy for the machine vision system according to the light source control decision information.
[0017] In the technical solution provided by the present application, the accuracy and effectiveness of light source control are ensured by real-time collection and standardized processing of ambient light in the machine vision system. By performing Fourier transform and feature extraction on ambient light feedback data, the frequency components and energy spectral density in the ambient light can be identified, thereby extracting high-frequency features and statistical feature sets, and improving the response speed and accuracy of light source control. By constructing a light source control model and performing feature comprehensive scoring and screening on multiple ambient light feature sets, the most representative target light source control feature set can be screened out, thereby improving the accuracy and stability of light source control. The target light source control feature set is input into a preset stacked convolutional neural network integrated model, which can realize in-depth analysis and decision-making of light source control through multi-level convolution feature operations and weighted fusion of attention mechanisms, thereby improving the intelligent level of light source control. According to the light source control decision information, the target light source control strategy of the machine vision system is created, which can dynamically adjust the intensity and distribution of the light source to adapt to changes in ambient light. It ensures that the machine vision system can obtain high-quality images under various lighting conditions, thereby improving the detection accuracy and stability of the system. Based on the historical ambient light dataset and expert prior knowledge base, a Bayesian inference network is constructed to perform root cause analysis of light source control, and a genetic algorithm is used to optimize the initial light source control strategy. This can continuously improve the light source control strategy and improve the accuracy of dynamic control of machine vision light sources. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0019] Figure 1 A schematic diagram of an embodiment of a method for dynamic control of a machine vision light source based on ambient light feedback in an embodiment of the present application;
[0020] Figure 2 Schematic diagram of an embodiment of a device for dynamic control of a machine vision light source based on ambient light feedback in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The embodiments of the present application provide a method and system for dynamically controlling a machine vision light source based on ambient light feedback. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of a method for dynamically controlling a machine vision light source based on ambient light feedback includes:
[0023] Step S101, performing real-time collection and standardization processing of ambient light on a machine vision system to obtain ambient light feedback data;
[0024] It is understandable that the execution subject of the present application can be a machine vision light source dynamic control device based on ambient light feedback, or a terminal or a server, which is not limited here. The present application embodiment is described by taking the server as the execution subject as an example.
[0025] Specifically, ambient light data is collected for each component in the machine vision system, such as a camera, a light source, and a reflective surface, and initial light feedback data is collected. The initial light feedback data includes parameters of multiple dimensions such as light intensity, spectral distribution, and illumination angle. To ensure the accuracy and consistency of the data, the initial light feedback data is cleaned, and the first ambient light feedback data is obtained by removing noise and outliers. The cleaned first ambient light feedback data is formatted to ensure the compatibility and uniformity of the data in subsequent processing, and the second ambient light feedback data is obtained. The missing values of the second ambient light feedback data are interpolated and filled, and the missing parts of the data are supplemented by an appropriate interpolation algorithm to obtain the third ambient light feedback data. The mean and standard deviation of multiple data dimensions in the third ambient light feedback data are calculated, and the mean and standard deviation of each data dimension are calculated respectively, so as to standardize the data. According to the mean and standard deviation of each data dimension, the third ambient light feedback data is subjected to Z-score weighted multidimensional data standardization. By subtracting the mean of the corresponding dimension from each data point and dividing it by the standard deviation of the dimension, the data of different dimensions are converted into standardized data with the same dimension, eliminating the scale differences between different dimensions. The standardization process ensures the validity and consistency of the ambient light feedback data during subsequent processing and analysis, and finally obtains the standardized ambient light feedback data.
[0026] Step S102, performing Fourier transform and feature extraction on the ambient light feedback data to obtain multiple ambient light feature sets;
[0027] Specifically, the ambient light feedback data is subjected to Fourier transform, and the time domain data is converted to the frequency domain to obtain the frequency domain light feedback data, revealing the potential frequency components and periodic changes in the ambient light signal. The frequency domain light feedback data is subjected to frequency component identification, and multiple initial frequency components are identified, each of which represents the characteristics of the ambient light signal at a specific frequency. The energy spectrum density is calculated for each of the multiple initial frequency components, and the energy spectrum density reflects the energy distribution of each frequency component in the frequency domain, and the energy spectrum density of each initial frequency component is obtained. Based on the energy spectrum density, the high-frequency features of the multiple initial frequency components are identified, and by analyzing the significance of the high-frequency components in the energy spectrum density, those high-frequency components with important features are screened out to obtain multiple target frequency components. At the same time, the statistical features of the frequency domain light feedback data are calculated, and the statistical features include mean, variance, skewness and kurtosis, etc. These statistical features can effectively describe the distribution characteristics of the frequency domain light feedback data. According to multiple target frequency components, feature enhancement processing is performed on the statistical feature set of each data dimension. The important features in the statistical feature set are strengthened by combining the feature information of the target frequency components, so that it can more accurately reflect the characteristics of the ambient light feedback data, and multiple ambient light feature sets are obtained. Each ambient light feature set includes multiple ambient light features, which can comprehensively describe the changing laws and characteristics of ambient light.
[0028] Step S103, constructing a light source control model and performing feature comprehensive scoring and feature screening on multiple ambient light feature sets to obtain multiple target light source control feature sets;
[0029] Specifically, a light source control model is constructed and a plurality of ambient light feature sets are subjected to feature comprehensive scoring and feature screening to obtain a plurality of target light source control feature sets, including constructing a light source control model, wherein the light source control model includes an evaluation layer of ambient light features and light source control targets, an evaluation layer of ambient light features and influencing factors, and an evaluation layer of ambient light features and ambient light features. The evaluation layer of ambient light features and light source control targets includes a state evaluation criterion between each ambient light feature and the light source control target, and the evaluation layer of ambient light features and influencing factors includes an influence coefficient between each ambient light feature and the influencing factors. The evaluation layer of ambient light features and ambient light features is a feature correlation between different ambient light features. According to the evaluation layer of ambient light features and light source control targets, the first feature evaluation scores of the plurality of ambient light features in each ambient light feature set are calculated respectively. By evaluating the contribution of each ambient light feature to the light source control target, its importance is quantified. Similarly, according to the evaluation layer of ambient light features and influencing factors, the second feature evaluation scores of the plurality of ambient light features in each ambient light feature set are calculated respectively. The performance of the ambient light features under the influence of the influencing factors is evaluated to determine its stability and controllability in practical applications. According to the ambient light features and the evaluation layer of the ambient light features, the third feature evaluation scores of the multiple ambient light features in each ambient light feature set are calculated respectively, and the internal connection and mutual influence between different ambient light features are revealed by evaluating the correlation between them. The first feature evaluation score, the second feature evaluation score and the third feature evaluation score are added to obtain the target feature comprehensive score of the multiple ambient light features in each ambient light feature set. The scores of each evaluation layer are combined to form an overall scoring system, which comprehensively reflects the comprehensive performance of each ambient light feature. According to the target feature comprehensive score and the preset target comprehensive score threshold, the multiple ambient light features in each ambient light feature set are feature screened, and the ambient light features with a comprehensive score higher than the threshold are screened out to obtain multiple target light source control feature sets.
[0030] Step S104: input multiple target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information;
[0031] Specifically, multiple target light source control feature sets are input into a preset stacked convolutional neural network integrated model for light source control analysis. The target light source control feature set is convolutionally operated by the convolutional neural network to obtain a multi-level monitoring feature matrix of each convolutional neural network. The convolutional neural network consists of an embedding layer, a convolution layer, an activation function, and a pooling layer. During the convolutional feature operation, the embedding layer embeds the input target light source control feature set and converts it into a feature representation suitable for the convolution operation. The convolution layer extracts features through convolution operations, and the convolution kernel slides on the input features to capture local features and patterns. The activation function then performs a nonlinear transformation on the convolution results to increase the expressive power of the model. The pooling layer reduces the dimension of the feature matrix through downsampling operations, reduces the computational complexity, and retains important features, thereby obtaining a multi-level monitoring feature matrix. Through the attention mechanism in the second-layer meta-model, the multi-level monitoring feature matrix of each convolutional neural network is weightedly fused by the attention mechanism to generate a fused monitoring feature matrix. The attention mechanism focuses on the most critical features for light source control decisions by calculating the importance weights of each feature matrix, thereby improving the effectiveness of feature representation in the fusion process. The attention mechanism weights the features according to their importance, giving higher weights to important features, so that the fused feature matrix can more accurately reflect the characteristics and changing patterns of ambient light. The decision network in the second-layer meta-model performs light source control decision analysis on the fused monitoring feature matrix to obtain light source control decision information. The decision network combines features and performs pattern recognition based on the fused monitoring feature matrix through multiple fully connected layers and nonlinear activation functions, thereby generating accurate light source control decisions.
[0032] Step S105: creating a target light source control strategy for the machine vision system according to the light source control decision information.
[0033] Specifically, the historical ambient light data set and the expert prior knowledge base of the machine vision system are obtained. The historical ambient light data set accumulates the light source control data of the machine vision system under different environmental conditions. These data can reflect the impact of ambient light on the machine vision system. At the same time, the expert prior knowledge base contains the experience and rules summarized by experts in the field in long-term practice. These knowledge can provide valuable reference and guidance. Based on the historical ambient light data set and the expert prior knowledge base, the light source control component dependency analysis and conditional probability calculation are performed on the camera, light source and reflective surface in the machine vision system to determine the dependency and conditional probability between the components, obtain the dependency and conditional probability of the light source control component, and reveal the interaction and influence of the camera, light source and reflective surface under different ambient light conditions. According to the dependency and conditional probability of the light source control component, the Bayesian inference network of the machine vision system is constructed. The Bayesian inference network is a model based on probabilistic reasoning that can perform decision analysis under uncertainty. The network intuitively represents the relationship between the light source control components and their conditional probabilities through the connection of nodes and edges. According to the Bayesian inference network and the light source control decision information, the root cause analysis of the light source control of the machine vision system is performed to obtain the root cause information of the light source control. Root cause analysis is to identify the main reasons that cause specific light source control decisions. Through this analysis, specific ambient light characteristics and system components can be located. According to the root cause information of light source control, the corresponding initial light source control strategy is matched from the expert prior knowledge base, and the rules and experience in the expert prior knowledge base are used to quickly find the control strategy related to the current light source control problem. The initial light source control strategy is optimized by a preset genetic algorithm. The genetic algorithm is an optimization algorithm that simulates the natural evolution process. The light source control strategy is gradually optimized through operations such as selection, crossover and mutation. During the optimization process, the genetic algorithm continuously evaluates and selects strategies with better performance, and finally obtains the target light source control strategy of the machine vision system. This strategy can realize dynamic control of the light source of the machine vision system under complex and changeable ambient light conditions, ensuring that the system can maintain optimal performance and high-quality image acquisition in various environments.
[0034] According to the root cause information of light source control, the corresponding initial light source control strategy is matched from the expert prior knowledge base to obtain the initial light source control strategy that best matches the current ambient light conditions and system requirements. The strategy population of the initial light source control strategy is initialized by a preset genetic algorithm to generate an initial population. The initial population includes multiple first light source control strategies, which constitute the search space and initial solution set of the genetic algorithm. The strategy population initialization of the genetic algorithm ensures that the initial population has diversity and coverage by randomly generating or based on prior knowledge. Based on the dependency relationship of the light source control components, the multiple first light source control strategies are optimized to generate multiple second light source control strategies. By analyzing the dependency relationship between the light source control components, each initial strategy is optimized to perform better under the current ambient light conditions. Fitness analysis is performed on multiple second light source control strategies to obtain the fitness value of each second light source control strategy. By evaluating the effect of each strategy in actual application, its pros and cons are quantified. The higher the fitness value, the better the effect of the strategy. According to the fitness value, the multiple second light source control strategies are divided into populations to generate multiple target populations. The strategies are divided into different groups according to the fitness values, so as to perform more targeted optimization. Population crossover and mutation operations are performed on multiple target populations to generate multiple third light source control strategies. Population crossover is to generate new strategies by exchanging some features between different strategies, so as to explore new solution spaces. The mutation operation is to randomly adjust the strategies to increase the diversity and exploratory nature of the strategies. Multiple third light source control strategies are optimized to obtain the target light source control strategy of the machine vision system. By finally evaluating and selecting the fitness values of the third light source control strategies, the best performing strategy is determined as the target light source control strategy of the machine vision system. In the embodiment of the present application, the accuracy and effectiveness of light source control are ensured by real-time acquisition and standardized processing of ambient light in the machine vision system. By performing Fourier transform and feature extraction on ambient light feedback data, the frequency components and energy spectral density in the ambient light can be identified, thereby extracting high-frequency features and statistical feature sets, and improving the response speed and accuracy of light source control. By constructing a light source control model and performing feature comprehensive scoring and screening on multiple ambient light feature sets, the most representative target light source control feature set can be screened out, thereby improving the accuracy and stability of light source control. By inputting the target light source control feature set into the preset stacked convolutional neural network integrated model, we can achieve in-depth analysis and decision-making on light source control through multi-level convolution feature operations and weighted fusion of attention mechanisms, thereby improving the intelligence level of light source control. Based on the light source control decision information, we create a target light source control strategy for the machine vision system, which can dynamically adjust the intensity and distribution of the light source to adapt to changes in ambient light. This ensures that the machine vision system can obtain high-quality images under various lighting conditions, thereby improving the detection accuracy and stability of the system.Based on the historical ambient light dataset and expert prior knowledge base, a Bayesian inference network is constructed to perform root cause analysis of light source control, and a genetic algorithm is used to optimize the initial light source control strategy. This can continuously improve the light source control strategy and improve the accuracy of dynamic control of machine vision light sources.
[0035] In a specific embodiment, the process of executing step S101 may specifically include the following steps:
[0036] (1) Collecting ambient light data from the camera, light source, and reflective surface in the machine vision system to obtain initial light feedback data, which includes light intensity, spectral distribution, and illumination angle;
[0037] (2) performing data cleaning on the initial light feedback data to obtain first ambient light feedback data, and performing data formatting processing on the first ambient light feedback data to obtain second ambient light feedback data;
[0038] (3) performing interpolation filling of missing values on the second ambient light feedback data to obtain third ambient light feedback data, and calculating means and standard deviations of multiple data dimensions in the third ambient light feedback data to obtain a mean value and a standard deviation of each data dimension;
[0039] (4) According to the mean value and standard deviation of each data dimension, the third ambient light feedback data is subjected to Z-score weighted multidimensional data normalization to obtain the ambient light feedback data.
[0040] Specifically, the camera, light source and reflective surface in the machine vision system are respectively subjected to ambient light data collection to obtain initial light feedback data. The camera data collection can record the intensity and spectral distribution of ambient light through its sensor, the light source data is obtained through its luminous characteristics and the reflection of ambient light, and the reflective surface data collection is achieved by measuring the intensity and angle of reflected light. For example, suppose that in a data collection, the light intensity recorded by the camera is 300 lux, the spectral distribution is displayed as a continuous spectrum in the range of 400-700nm, and the illumination angle is 45 degrees; the light intensity of the light source is recorded as 350 lux, the spectral distribution is also in the range of 400-700nm, and the illumination angle is 50 degrees; the light intensity of the reflective surface is 200 lux, the spectral distribution is similar, and the illumination angle is 55 degrees. The initial light feedback data is cleaned to obtain the first ambient light feedback data. Remove noise and outliers in the data to ensure the accuracy and consistency of the data. For example, there may be some outliers in the initial data caused by sensor failure or environmental interference, such as the light intensity suddenly jumping to 1000 lux. The first ambient light feedback data is formatted to obtain the second ambient light feedback data. The data is converted into a unified format to ensure compatibility and consistency of subsequent processing. For example, all light intensity units are unified into lux, the spectral distribution data is expressed in a standardized wavelength range, and the illumination angle is unified into degrees. Assume that the formatted data is: camera light intensity 300lux, spectral distribution 400-700nm, illumination angle 45 degrees; light source light intensity 350lux, spectral distribution 400-700nm, illumination angle 50 degrees; reflective surface light intensity 200lux, spectral distribution 400-700nm, illumination angle 55 degrees. The second ambient light feedback data is interpolated to fill in missing values to obtain the third ambient light feedback data. In the case of missing values in the data set, these missing values are filled by interpolation methods to ensure the integrity and continuity of the data. Assume that during data collection, the spectral distribution data of the camera is missing at 500nm. Through interpolation methods (such as linear interpolation), the spectral value at 500nm is estimated based on the adjacent spectral data to obtain the complete third ambient light feedback data. The mean and standard deviation of multiple data dimensions in the third ambient light feedback data are calculated to obtain the mean and standard deviation of each data dimension. According to the mean and standard deviation of each data dimension, the third ambient light feedback data is subjected to Z-score weighted multidimensional data standardization to obtain the ambient light feedback data. The Z-score standardization method is to subtract the mean from each data and then divide it by its standard deviation, thereby converting the data into the form of a standard normal distribution (mean is 0 and standard deviation is 1). The specific formula is as follows:
[0041] ;
[0042] in, is the normalized value, is the original data, is the mean, is the standard deviation. Taking the data of light intensity dimension as an example, the Z score of camera light intensity is (300-283.33) / 76.37=0.22, the Z score of light source light intensity is (350-283.33) / 76.37=0.87, and the Z score of reflective surface light intensity is (200-283.33) / 76.37=-1.09. By performing similar standardization processing on data of all dimensions, unified and standardized ambient light feedback data is finally obtained.
[0043] In a specific embodiment, the process of executing step S102 may specifically include the following steps:
[0044] (1) Perform Fourier transform on the ambient light feedback data to obtain frequency domain light feedback data;
[0045] (2) Identify the frequency components of the frequency-domain optical feedback data to obtain multiple initial frequency components;
[0046] (3) Calculating the energy spectral density of multiple initial frequency components respectively to obtain the energy spectral density of each initial frequency component;
[0047] (4) Identify high-frequency features of multiple initial frequency components according to energy spectral density to obtain multiple target frequency components;
[0048] (5) Calculate the statistical features of the frequency domain optical feedback data to obtain a set of statistical features for each data dimension;
[0049] (6) Performing feature enhancement processing on the statistical feature set of each data dimension according to the multiple target frequency components to obtain multiple ambient light feature sets, wherein each ambient light feature set includes multiple ambient light features.
[0050] Specifically, the ambient light feedback data is subjected to Fourier transform to obtain frequency domain light feedback data. Fourier transform is a mathematical transformation used to convert a time domain signal into a frequency domain signal in order to analyze the frequency components of the signal. Assume that there is a set of ambient light feedback data , its Fourier transform formula is as follows:
[0051] ;
[0052] in, represents the frequency domain optical feedback data, is the time domain ambient light feedback data, is the frequency, is time. Through Fourier transform, the time domain signal is converted into a frequency domain signal to reveal the various frequency components in the signal. Frequency components of the frequency domain optical feedback data are identified to obtain multiple initial frequency components. The main frequency components in the frequency domain signal are determined. Assuming that the frequency domain optical feedback data is obtained , multiple initial frequency components are identified through spectrum analysis ,in , representing different frequency components in the signal. The energy spectral density is calculated for multiple initial frequency components respectively to obtain the energy spectral density of each initial frequency component. The energy spectral density is used to describe the energy distribution of the signal at each frequency. The calculation formula of the energy spectral density is as follows:
[0053] ;
[0054] in, Indicates frequency The energy spectral density at is the frequency The amplitude of the frequency domain signal at the location. By calculating the energy spectral density, the energy distribution of each initial frequency component is obtained. According to the energy spectral density, high-frequency feature recognition is performed on multiple initial frequency components to obtain multiple target frequency components. High-frequency feature recognition is to screen out high-frequency components with significant energy by analyzing the energy spectral density. Assume that in the calculation of the energy spectral density, several high-frequency components with significant energy are identified, and these high-frequency components are the target frequency components. Statistical feature calculations are performed on the frequency domain light feedback data to obtain a statistical feature set for each data dimension. Statistical feature calculations include mean, variance, kurtosis, skewness, etc., which are used to describe the statistical characteristics of frequency domain signals. According to multiple target frequency components, feature enhancement processing is performed on the statistical feature set of each data dimension to obtain multiple ambient light feature sets. By combining the information of the target frequency components, the statistical features are weighted or adjusted so that they can more accurately reflect the characteristics of the ambient light feedback data. For example, for each target frequency component, an enhanced feature set is generated by weighting its corresponding statistical features. Assume that for a certain statistical feature Perform weighted processing to obtain enhanced features :
[0055] ;
[0056] in, is the frequency The weight of is the initial statistical feature, is the enhanced feature. Through feature enhancement processing, multiple ambient light feature sets are finally obtained, and each ambient light feature set includes multiple enhanced ambient light features.
[0057] In a specific embodiment, the process of executing step S103 may specifically include the following steps:
[0058] (1) Constructing a light source control model, wherein the light source control model includes: an evaluation layer of ambient light characteristics and light source control targets, an evaluation layer of ambient light characteristics and influencing factors, and an evaluation layer of ambient light characteristics and ambient light characteristics;
[0059] (2) The evaluation layer of ambient light characteristics and light source control targets includes the state evaluation criteria between each ambient light characteristic and the light source control target, the evaluation layer of ambient light characteristics and influencing factors includes the influence coefficient between each ambient light characteristic and the influencing factor, and the evaluation layer of ambient light characteristics and ambient light characteristics is the feature correlation between different ambient light characteristics;
[0060] (3) calculating first feature evaluation scores of multiple ambient light features in each ambient light feature set according to the evaluation layer of ambient light features and light source control targets, calculating second feature evaluation scores of multiple ambient light features in each ambient light feature set according to the evaluation layer of ambient light features and influencing factors, and calculating third feature evaluation scores of multiple ambient light features in each ambient light feature set according to the ambient light features and the evaluation layer of ambient light features;
[0061] (4) Adding the first feature evaluation score, the second feature evaluation score, and the third feature evaluation score to obtain a target feature comprehensive score of the multiple ambient light features in each ambient light feature set;
[0062] (5) Based on the target feature comprehensive score and the preset target comprehensive score threshold, feature screening is performed on multiple ambient light features in each ambient light feature set to obtain multiple target light source control feature sets.
[0063] Specifically, a light source control model is constructed. The light source control model includes three main evaluation layers: an evaluation layer of ambient light characteristics and light source control targets, an evaluation layer of ambient light characteristics and influencing factors, and an evaluation layer of ambient light characteristics and ambient light characteristics. In the evaluation layer of ambient light characteristics and light source control targets, a state evaluation criterion between each ambient light characteristic and the light source control target is defined to evaluate the performance of the ambient light characteristics under different light source control targets. For example, the light intensity characteristic may have different state evaluation criteria under a specific light source control target, such as light uniformity or illuminance stability. In the evaluation layer of ambient light characteristics and influencing factors, an influence coefficient between each ambient light characteristic and the influencing factor is determined. These influence coefficients are used to quantify the changes of the ambient light characteristics under different influencing factors. For example, the light intensity characteristic may be affected by ambient temperature, humidity or other external conditions, and each influencing factor will have a corresponding influence coefficient. In the evaluation layer of ambient light characteristics and ambient light characteristics, the feature correlation between different ambient light characteristics is calculated. The feature correlation describes the relationship between different ambient light characteristics. For example, the correlation between light intensity and spectral distribution may affect the result of light source control. According to the evaluation layer of ambient light features and light source control targets, the first feature evaluation scores of multiple ambient light features in each ambient light feature set are calculated respectively. Assume that there is an ambient light feature set, which includes features such as light intensity, spectral distribution and illumination angle. The performance of each feature under a specific light source control target is evaluated by a state evaluation criterion to obtain a first feature evaluation score. At the same time, according to the evaluation layer of ambient light features and influencing factors, the second feature evaluation scores of multiple ambient light features in each ambient light feature set are calculated respectively. By applying the influence coefficient, the change of each feature under different influencing factors is quantified to obtain the second feature evaluation score. According to the ambient light features and the evaluation layer of ambient light features, the third feature evaluation scores of multiple ambient light features in each ambient light feature set are calculated respectively. By analyzing the feature correlation and evaluating the mutual influence between the features, the third feature evaluation score is obtained. The first feature evaluation score, the second feature evaluation score and the third feature evaluation score are added to obtain the target feature comprehensive score of multiple ambient light features in each ambient light feature set. According to the target feature comprehensive score and the preset target comprehensive score threshold, the multiple ambient light features in each ambient light feature set are feature screened to obtain multiple target light source control feature sets. For example, suppose you need to control an indoor lighting system to ensure uniformity and comfort in the work area. Collect ambient light characteristics, including light intensity, spectral distribution, and lighting angle, and establish corresponding status evaluation criteria, such as light intensity should be between 400 lux and 600 lux, spectral distribution should cover the visible light range, and lighting angle should be as perpendicular to the work plane as possible. In terms of influencing factors, consider the impact of ambient temperature and reflective surface characteristics on light intensity, and determine the influence coefficient through experiments.For example, for every 1 degree Celsius increase in temperature, the light intensity may decrease by 2%, and the influence coefficient of the change in the reflective surface material on the light intensity is 5%. In terms of feature correlation, the relationship between light intensity and spectral distribution is analyzed, and it is found that changes in spectral distribution may affect the uniformity of light intensity, so the correlation coefficient between the two is calculated. Through the analysis and calculation of the above evaluation layer, the first, second and third feature evaluation scores of each ambient light feature are obtained, and the sum is added to obtain a comprehensive score. Assume that the comprehensive score of the light intensity feature is 21, the spectral distribution feature is 18, and the illumination angle feature is 14. When the comprehensive score threshold is 15, light intensity and spectral distribution are selected as the target light source control features.
[0064] In a specific embodiment, the process of executing step S104 may specifically include the following steps:
[0065] (1) Inputting multiple target light source control feature sets into a preset stacked convolutional neural network integration model, the stacked convolutional neural network integration model includes: a first-layer base model and a second-layer meta-model;
[0066] (2) The first-layer base model includes multiple convolutional neural networks, each of which corresponds to a set of target light source control features. The second-layer meta-model includes an attention mechanism and a decision network.
[0067] (3) Performing convolution feature operations on the target light source control feature set through a convolutional neural network to obtain a multi-level monitoring feature matrix of each convolutional neural network, wherein the convolutional neural network includes an embedding layer, a convolution layer, an activation function, and a pooling layer;
[0068] (4) The attention mechanism in the second-layer meta-model is used to perform weighted fusion of the multi-level monitoring feature matrix of each convolutional neural network to generate a fused monitoring feature matrix;
[0069] (5) The decision network in the second-layer meta-model is used to analyze the light source control decision of the fused monitoring feature matrix to obtain the light source control decision information.
[0070] Specifically, multiple target light source control feature sets are input into a preset stacked convolutional neural network integrated model. The model includes a first-layer base model and a second-layer meta-model. The first-layer base model is composed of multiple convolutional neural networks, each of which corresponds to a target light source control feature set. The second-layer meta-model includes an attention mechanism and a decision network. This structure can ensure that each feature set is fully extracted and analyzed, and at the same time, the information is integrated through the attention mechanism and the decision network to form the final light source control decision. In the first-layer base model, each convolutional neural network performs convolution feature operations on a target light source control feature set. The structure of the convolutional neural network includes an embedding layer, a convolution layer, an activation function, and a pooling layer. The embedding layer converts the input feature set into a form suitable for convolution operations, and the convolution layer slides on the input features through the convolution kernel to extract local features. Activation functions such as ReLU perform nonlinear transformations on the convolution results to increase the expression ability of the model. The pooling layer reduces the dimension of the feature matrix through downsampling operations, reduces the computational complexity, and retains important features. Each convolutional neural network outputs a multi-level monitoring feature matrix, which contains deep information about the target light source control feature set. Through the attention mechanism in the second-layer meta-model, the multi-level monitoring feature matrix of each convolutional neural network is weighted and fused to generate a fused monitoring feature matrix. The attention mechanism calculates the importance weights of each feature matrix and focuses on the features that are most critical to the light source control decision. Specifically, the attention mechanism weights the features according to their importance, giving higher weights to important features, thereby improving the effectiveness of the fused feature matrix. Suppose there are multiple convolutional neural networks outputting feature matrices, respectively. , through the attention weight For weighted fusion, the formula is as follows:
[0071] ;
[0072] in, It is The attention weights of the feature matrix, It is The output feature matrix of the convolutional neural network is obtained through weighted fusion by the attention mechanism, and the fused monitoring feature matrix containing key features is obtained. Finally, the fused monitoring feature matrix is analyzed for light source control decision through the decision network in the second-layer meta-model to obtain light source control decision information. The decision network is usually composed of a series of fully connected layers and nonlinear activation functions. These layers perform feature combination and pattern recognition on the fused feature matrix to generate accurate light source control decisions. The output of the decision network can be specific light source control parameters, such as light intensity, spectral distribution, and illumination angle, which will be used to guide the light source configuration of the machine vision system.
[0073] In a specific embodiment, the process of executing step S105 may specifically include the following steps:
[0074] (1) Obtain the historical ambient light dataset and expert prior knowledge base of the machine vision system;
[0075] (2) Based on the historical ambient light dataset and the expert prior knowledge base, the dependency relationship analysis and conditional probability calculation of the light source control components are performed on the camera, light source, and reflective surface in the machine vision system to obtain the dependency relationship and conditional probability of the light source control components;
[0076] (3) Construct a Bayesian inference network for the machine vision system based on the dependencies and conditional probabilities of the light source control components;
[0077] (4) Based on the Bayesian inference network and the light source control decision information, the root cause analysis of the light source control of the machine vision system is performed to obtain the root cause information of the light source control;
[0078] (5) According to the root cause information of light source control, the corresponding initial light source control strategy is matched from the expert prior knowledge base, and the initial light source control strategy is optimized through a preset genetic algorithm to obtain the target light source control strategy of the machine vision system.
[0079] Specifically, the historical ambient light data set and expert prior knowledge base of the machine vision system are obtained. The historical ambient light data set contains the light source control data of the system under different environmental conditions, which can reflect the impact of ambient light on the machine vision system. The expert prior knowledge base contains the experience and rules summarized by experts in the field in long-term practice, which can provide valuable reference and guidance. Based on the historical ambient light data set and the expert prior knowledge base, the light source control component dependency analysis and conditional probability calculation are performed on the camera, light source and reflective surface in the machine vision system. For example, the intensity and spectral distribution of the light source will affect the image quality of the camera, while the material and angle of the reflective surface will affect the reflection effect of the light. Through conditional probability calculation, these dependencies are quantified. For example, if the light source intensity doubles, the brightness captured by the camera increases by 30%, and the change in the reflective surface material causes the light reflection angle to change by 10%. Based on the dependency and conditional probability of the light source control components, a Bayesian inference network of the machine vision system is constructed. The Bayesian inference network is a model based on probabilistic reasoning that can perform decision analysis under uncertain conditions. The Bayesian network consists of nodes and edges. Nodes represent random variables (such as light source intensity, spectral distribution, camera output, etc.), and edges represent conditional dependencies between variables. The weights on the edges are conditional probabilities. Assuming that node A represents light source intensity, node B represents camera brightness, and node C represents the angle of the reflective surface, the weight of edge A->B represents the conditional probability of light source intensity to camera brightness, and the weight of edge B->C represents the conditional probability of camera brightness to the angle of the reflective surface. By constructing a Bayesian inference network, the dependencies and conditional probabilities between different light source control components can be intuitively represented and calculated. Based on the Bayesian inference network and light source control decision information, the light source control root cause analysis is performed on the machine vision system to obtain the light source control root cause information. Root cause analysis is to identify the main reasons for a specific light source control decision. Through this analysis, specific ambient light characteristics and system components can be located. For example, if the image quality is poor, the root cause analysis may indicate that insufficient light source intensity or inappropriate reflective surface angle is the main reason. According to the light source control root cause information, the corresponding initial light source control strategy is matched from the expert prior knowledge base. The expert prior knowledge base stores a wealth of control strategies and empirical rules. The root cause information can be used to quickly find the initial strategy related to the current light source control problem. For example, if the root cause analysis points out that the light source intensity is insufficient, a strategy suitable for enhancing the light source intensity can be found from the knowledge base, such as increasing the light source power or adjusting the light source position. The initial light source control strategy is optimized through the preset genetic algorithm. The genetic algorithm is an optimization algorithm that simulates the natural evolution process. It gradually optimizes the light source control strategy through operations such as selection, crossover, and mutation. During the optimization process, the genetic algorithm continuously evaluates and selects strategies with better performance, and finally obtains the target light source control strategy of the machine vision system.For example, suppose that through root cause analysis, it is found that insufficient light intensity is the main reason for poor image quality. The initial light source control strategy is found from the expert prior knowledge base, that is, increasing the light source intensity. The initial strategy is optimized through the genetic algorithm, the system performance under different light source intensities is evaluated, and the strategy with the best effect is selected as the target light source control strategy. Assuming that the initial strategy is to increase the light source intensity to 500 lux, through genetic algorithm optimization, the control effects of different intensities are evaluated, and it is found that the illumination uniformity and comfort are best at 600 lux. Finally, 600 lux is selected as the target light source control strategy.
[0080] In a specific embodiment, the execution step matches the corresponding initial light source control strategy from the expert prior knowledge base according to the light source control root cause information, and optimizes the initial light source control strategy through a preset genetic algorithm to obtain the target light source control strategy of the machine vision system. The process may specifically include the following steps:
[0081] (1) Match the corresponding initial light source control strategy from the expert prior knowledge base based on the root cause information of light source control;
[0082] (2) initializing the strategy population of the initial light source control strategy by using a preset genetic algorithm to generate an initial population, where the initial population includes a plurality of first light source control strategies;
[0083] (3) Optimizing the multiple first light source control strategies based on the dependency relationship of the light source control components to generate multiple second light source control strategies;
[0084] (4) performing fitness analysis on multiple second light source control strategies to obtain a fitness value of each second light source control strategy;
[0085] (5) Segment the population of multiple second light source control strategies according to the fitness value to generate multiple target populations;
[0086] (6) Performing population crossover and mutation operations on multiple target populations to generate multiple third light source control strategies;
[0087] (7) Optimize and solve multiple third light source control strategies to obtain the target light source control strategy of the machine vision system.
[0088] Specifically, the corresponding initial light source control strategy is matched from the expert prior knowledge base according to the root cause information of light source control. By matching the root cause information, the initial strategy related to the current light source control problem is obtained. For example, if the root cause analysis indicates that insufficient light source intensity is the main problem, an initial strategy suitable for enhancing the light source intensity is found from the knowledge base, such as increasing the light source power or adjusting the light source position. The strategy population of the initial light source control strategy is initialized by a preset genetic algorithm to generate an initial population. The genetic algorithm is an optimization algorithm that simulates natural selection and genetic mechanisms. It gradually optimizes the solution of the problem through operations such as selection, crossover and mutation between individuals. The initial population contains multiple first light source control strategies, which are generated by encoding and randomly mutating the initial strategies. Through initialization, it is ensured that the population has diversity and coverage. Based on the dependency relationship of the light source control components, the strategy optimization of the multiple first light source control strategies is performed. The dependency relationship of the light source control components reflects the mutual influence and action mechanism between the components. Through the dependency relationship, each strategy in the initial population is adjusted and optimized to generate multiple second light source control strategies. For example, it is assumed that one of the strategies in the initial population is to increase the light source intensity to 500 lux and keep the light source position unchanged. Through dependency analysis, it may be found that slightly adjusting the position of the light source can further optimize the lighting effect. Fitness analysis is performed on multiple second light source control strategies to obtain the fitness value of each second light source control strategy. Each strategy is evaluated through the fitness function to measure its advantages and disadvantages. The fitness function can be defined according to indicators in practical applications, such as light source control effect, system performance, energy consumption, etc. According to the fitness value, multiple second light source control strategies are divided into populations to generate multiple target populations. According to the fitness value, the strategies are divided into different groups for more targeted optimization. Strategies with high fitness values enter the excellent population, and strategies with low fitness values enter the ordinary population. Population crossover and mutation operations are performed on multiple target populations to generate multiple third light source control strategies. Population crossover is to generate new strategies by exchanging some genes between different strategies, thereby exploring new solution spaces. Mutation operation is to randomly adjust the strategy to increase the diversity and exploratory nature of the strategy. Multiple third light source control strategies are optimized to obtain the target light source control strategy of the machine vision system. By finally evaluating and selecting the fitness values of the third light source control strategies, the strategy with the best performance is determined as the target light source control strategy of the machine vision system.
[0089] The above describes the method for dynamically controlling the machine vision light source based on ambient light feedback in the embodiment of the present application. The following describes the device for dynamically controlling the machine vision light source based on ambient light feedback in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of a dynamic control device for a machine vision light source based on ambient light feedback includes:
[0090] The acquisition module 201 is used to perform real-time acquisition and standardized processing of ambient light for the machine vision system to obtain ambient light feedback data;
[0091] A transformation module 202 is used to perform Fourier transformation and feature extraction on the ambient light feedback data to obtain multiple ambient light feature sets;
[0092] A screening module 203 is used to construct a light source control model and perform feature comprehensive scoring and feature screening on multiple ambient light feature sets to obtain multiple target light source control feature sets;
[0093] The analysis module 204 is used to input multiple target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information;
[0094] The creation module 205 is used to create a target light source control strategy of the machine vision system according to the light source control decision information.
[0095] Through the collaboration of the above components, the ambient light in the machine vision system is collected and standardized in real time to ensure the accuracy and effectiveness of light source control. By performing Fourier transform and feature extraction on ambient light feedback data, the frequency components and energy spectrum density in the ambient light can be identified, thereby extracting high-frequency features and statistical feature sets to improve the response speed and accuracy of light source control. By constructing a light source control model and performing feature comprehensive scoring and screening on multiple ambient light feature sets, the most representative target light source control feature set can be screened out, thereby improving the accuracy and stability of light source control. The target light source control feature set is input into the preset stacked convolutional neural network integration model, which can realize in-depth analysis and decision-making of light source control through multi-level convolution feature operations and weighted fusion of attention mechanisms, thereby improving the intelligent level of light source control. According to the light source control decision information, the target light source control strategy of the machine vision system is created, which can dynamically adjust the intensity and distribution of the light source to adapt to changes in ambient light. It ensures that the machine vision system can obtain high-quality images under various lighting conditions, thereby improving the detection accuracy and stability of the system. Based on the historical ambient light dataset and expert prior knowledge base, a Bayesian inference network is constructed to perform root cause analysis of light source control, and a genetic algorithm is used to optimize the initial light source control strategy. This can continuously improve the light source control strategy and improve the accuracy of dynamic control of machine vision light sources.
[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0097] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0098] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for dynamic control of machine vision light source based on ambient light feedback, characterized in that: The method comprises: Perform real-time collection and standardized processing of ambient light on the machine vision system to obtain ambient light feedback data; Performing Fourier transform and feature extraction on the ambient light feedback data to obtain multiple ambient light feature sets; specifically comprising: performing Fourier transform on the ambient light feedback data to obtain frequency domain light feedback data; performing frequency component identification on the frequency domain light feedback data to obtain multiple initial frequency components; performing energy spectral density calculation on the multiple initial frequency components respectively to obtain the energy spectral density of each initial frequency component; performing high frequency feature identification on the multiple initial frequency components according to the energy spectral density to obtain multiple target frequency components; performing statistical feature calculation on the frequency domain light feedback data to obtain a statistical feature set of each data dimension; performing feature enhancement processing on the statistical feature set of each data dimension according to the multiple target frequency components to obtain multiple ambient light feature sets, wherein each ambient light feature set includes multiple ambient light features; Constructing a light source control model and performing feature comprehensive scoring and feature screening on the multiple ambient light feature sets to obtain multiple target light source control feature sets; Inputting the plurality of target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information; The target light source control strategy of the machine vision system is created according to the light source control decision information; specifically comprising: obtaining a historical ambient light data set and an expert prior knowledge base of the machine vision system; performing light source control component dependency analysis and conditional probability calculation on the camera, light source and reflective surface in the machine vision system based on the historical ambient light data set and the expert prior knowledge base to obtain the dependency and conditional probability of the light source control components; constructing a Bayesian inference network of the machine vision system according to the dependency and conditional probability of the light source control components; performing light source control root cause analysis on the machine vision system according to the Bayesian inference network and the light source control decision information to obtain light source control root cause information; matching the light source control root cause information from the expert prior knowledge base according to the light source control root cause information. The method comprises the following steps: first, performing strategy optimization on the plurality of first light source control strategies based on the dependency relationship of the light source control components to generate a plurality of second light source control strategies; second, performing fitness analysis on the plurality of second light source control strategies to obtain the fitness value of each second light source control strategy; third, performing population segmentation on the plurality of second light source control strategies according to the fitness value to generate a plurality of target populations; fourth, performing population crossover and mutation operations on the plurality of target populations to generate a plurality of third light source control strategies; and fifth, performing optimization solutions on the plurality of third light source control strategies to obtain the target light source control strategy of the machine vision system.
2. The method for dynamic control of machine vision light source based on ambient light feedback according to claim 1, characterized in that: The real-time collection and standardized processing of ambient light by the machine vision system to obtain ambient light feedback data includes: Collecting ambient light data from a camera, a light source, and a reflective surface in a machine vision system respectively to obtain initial light feedback data, wherein the initial light feedback data includes light intensity, spectral distribution, and illumination angle; Performing data cleaning on the initial light feedback data to obtain first ambient light feedback data, and performing data formatting processing on the first ambient light feedback data to obtain second ambient light feedback data; Performing interpolation filling of missing values on the second ambient light feedback data to obtain third ambient light feedback data, and calculating means and standard deviations of multiple data dimensions in the third ambient light feedback data to obtain a mean value and a standard deviation of each data dimension; According to the average value and standard deviation of each data dimension, Z-score weighted multi-dimensional data normalization is performed on the third ambient light feedback data to obtain ambient light feedback data.
3. The method for dynamic control of machine vision light source based on ambient light feedback according to claim 1, characterized in that: The light source control model is constructed and the multiple ambient light feature sets are subjected to feature comprehensive scoring and feature screening to obtain multiple target light source control feature sets, including: Constructing a light source control model, wherein the light source control model includes: an evaluation layer of ambient light characteristics and light source control targets, an evaluation layer of ambient light characteristics and influencing factors, and an evaluation layer of ambient light characteristics and ambient light characteristics; The evaluation layer of the ambient light characteristics and the light source control target includes a state evaluation criterion between each ambient light characteristic and the light source control target, the evaluation layer of the ambient light characteristics and the influencing factors includes an influence coefficient between each ambient light characteristic and the influencing factor, and the evaluation layer of the ambient light characteristics and the ambient light characteristics is a feature correlation between different ambient light characteristics; Calculating first feature evaluation scores of multiple ambient light features in each ambient light feature set according to the evaluation layer of the ambient light features and the light source control target, calculating second feature evaluation scores of multiple ambient light features in each ambient light feature set according to the evaluation layer of the ambient light features and the influencing factors, and calculating third feature evaluation scores of multiple ambient light features in each ambient light feature set according to the ambient light features and the evaluation layer of the ambient light features; Adding the first feature evaluation score, the second feature evaluation score, and the third feature evaluation score to obtain a target feature comprehensive score for multiple ambient light features in each ambient light feature set; According to the target feature comprehensive score and a preset target comprehensive score threshold, feature screening is performed on multiple ambient light features in each ambient light feature set to obtain multiple target light source control feature sets.
4. The method for dynamic control of machine vision light source based on ambient light feedback according to claim 3, characterized in that: The step of inputting the plurality of target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information includes: Inputting the plurality of target light source control feature sets into a preset stacked convolutional neural network integration model, wherein the stacked convolutional neural network integration model comprises: a first layer base model and a second layer meta model; The first-layer base model includes a plurality of convolutional neural networks, each convolutional neural network corresponds to a target light source control feature set, and the second-layer meta-model includes an attention mechanism and a decision network; Performing convolution feature operations on the target light source control feature set through the convolution neural network to obtain a multi-level monitoring feature matrix of each convolution neural network, wherein the convolution neural network includes an embedding layer, a convolution layer, an activation function and a pooling layer; Performing weighted fusion of the multi-level monitoring feature matrix of each convolutional neural network through the attention mechanism in the second-layer meta-model to generate a fused monitoring feature matrix; The light source control decision analysis is performed on the fused monitoring feature matrix through the decision network in the second-layer meta-model to obtain light source control decision information.
5. A machine vision light source dynamic control device based on ambient light feedback, characterized in that: The device comprises: The acquisition module is used to collect and standardize the ambient light of the machine vision system in real time to obtain ambient light feedback data; A transformation module is used to perform Fourier transformation and feature extraction on the ambient light feedback data to obtain multiple ambient light feature sets; specifically comprising: performing Fourier transformation on the ambient light feedback data to obtain frequency domain light feedback data; performing frequency component identification on the frequency domain light feedback data to obtain multiple initial frequency components; performing energy spectrum density calculation on the multiple initial frequency components respectively to obtain the energy spectrum density of each initial frequency component; performing high-frequency feature identification on the multiple initial frequency components according to the energy spectrum density to obtain multiple target frequency components; performing statistical feature calculation on the frequency domain light feedback data to obtain a statistical feature set of each data dimension; performing feature enhancement processing on the statistical feature set of each data dimension according to the multiple target frequency components to obtain multiple ambient light feature sets, wherein each ambient light feature set includes multiple ambient light features; A screening module is used to construct a light source control model and perform feature comprehensive scoring and feature screening on the multiple ambient light feature sets to obtain multiple target light source control feature sets; An analysis module, used for inputting the plurality of target light source control feature sets into a preset stacked convolutional neural network integrated model to perform light source control analysis to obtain light source control decision information; A creation module is used to create a target light source control strategy for the machine vision system according to the light source control decision information; specifically comprising: obtaining a historical ambient light data set and an expert prior knowledge base of the machine vision system; based on the historical ambient light data set and the expert prior knowledge base, performing light source control component dependency analysis and conditional probability calculation on the camera, light source and reflective surface in the machine vision system to obtain the dependency and conditional probability of the light source control components; constructing a Bayesian inference network of the machine vision system according to the dependency and conditional probability of the light source control components; performing light source control root cause analysis on the machine vision system according to the Bayesian inference network and the light source control decision information to obtain light source control root cause information; and obtaining the light source control root cause information from the expert prior knowledge base according to the light source control root cause information. The method comprises the following steps: matching the corresponding initial light source control strategy in the library; initializing the strategy group of the initial light source control strategy by a preset genetic algorithm to generate an initial population, wherein the initial population includes a plurality of first light source control strategies; optimizing the strategies of the plurality of first light source control strategies based on the dependency relationship of the light source control components to generate a plurality of second light source control strategies; performing fitness analysis on the plurality of second light source control strategies to obtain the fitness value of each second light source control strategy; performing population segmentation on the plurality of second light source control strategies according to the fitness value to generate a plurality of target populations; performing population crossover and mutation operations on the plurality of target populations to generate a plurality of third light source control strategies; and optimizing and solving the plurality of third light source control strategies to obtain the target light source control strategy of the machine vision system.
Citation Information
Patent Citations
Light regulation method, system, and apparatus for growth environment of leafy vegetables
US11978210B1
Intelligent decision-making method and system for unmanned surface vehicle
US20220197281A1
