Part surface detection light source control method, system, storage medium and program product
By obtaining the visual data of the detector and the surface pictures of the parts in real time, calculating the light source adjustment parameters, and adjusting the operating parameters of the light source equipment in real time, solving the problems of inefficiency and complexity of traditional detection methods, and achieving efficient and accurate light source control.
Patent Information
- Application Number
- CN202411484592.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The traditional part surface detection method is inefficient and has unstable accuracy, and the multi-light source switching method increases the detection time and system complexity, reducing the efficiency of light source control.
By obtaining the line of sight data of the detector and the surface pictures of the parts in real time, the real-time observation range and surface data are calculated, and inputting them into the light source parameter calculation function to obtain the light source adjustment parameters, and adjust the operating parameters of the light source equipment in real time to improve the efficiency of light source control.
It reduces the time for light source control and part surface detection, reduces the complexity of detection, and improves the efficiency and accuracy of light source control.
Smart Images

Figure CN119364596B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of light source control, and in particular, relates to a method, system, storage medium and program product for controlling a light source for part surface detection. Background Art
[0002] With the rapid development of modern industrial manufacturing, the requirements for product quality are increasing day by day, and part surface inspection plays an increasingly important role in the production process. Traditional part surface inspection methods mainly rely on manual visual inspection, which has problems such as low efficiency, unstable accuracy, and susceptibility to subjective factors. In order to overcome these shortcomings, automated optical inspection systems have emerged, among which light source control is one of the key factors that determine the inspection effect.
[0003] In the related technology, a multi-light source switching method can be used. The basic principle of the multi-light source switching method is to set multiple light sources at different positions and angles in the detection system, and obtain image information of the part surface under different lighting conditions by switching these light sources in a specific order, thereby realizing a comprehensive detection of the part surface features.
[0004] However, the multi-light source switching method requires activating different light sources in sequence and collecting multiple images. This process increases the inspection time. Especially on high-speed production lines, this delay may lead to a decrease in production efficiency. The configuration, control and maintenance of multiple light sources increase the complexity of the system and reduce the efficiency of light source control. Summary of the invention
[0005] The present application provides a method, system, storage medium and program product for controlling a light source for part surface inspection, which are used to reduce the time for light source control, thereby reducing the time for part surface inspection, reducing the complexity of inspection, and thereby improving the efficiency of light source control.
[0006] In a first aspect, the present application provides a method for controlling a light source for part surface inspection, receiving real-time sight data of an inspector sent by an eye tracking device, the real-time sight data including real-time sight direction and real-time observation point coordinates;
[0007] Obtain part surface images through monitoring equipment, and calculate the real-time observation range based on the part surface images and real-time sight data;
[0008] Determine the current detection surface according to the real-time observation range and the part surface image, and determine the surface data corresponding to the current detection surface according to the part surface image. The surface data includes the surface inclination, surface area and surface reflectivity.
[0009] Input the surface data and real-time sight data into the light source parameter calculation function to obtain the light source adjustment parameters, which include light source coordinates, light source intensity and irradiation angle;
[0010] The light source device is controlled to start running and the running parameters of the light source device are adjusted to the light source adjustment parameters.
[0011] By adopting the above technical scheme, the real-time sight line data of the inspector is obtained in real time, and then the current inspection surface to be inspected by the inspector at the current position is determined based on the real-time sight line data and the part surface image, and then the surface data and real-time sight line data that affect the lighting effect are input into the light source parameter calculation function, and the light source adjustment parameters that enable the inspector to accurately detect are calculated. The light source adjustment parameters calculated in this way are the light source parameters that best meet the inspector's needs, and the light source adjustment parameters can be updated in real time as the inspector's position changes, thereby improving the real-time performance of the light source adjustment, reducing the time for light source control, and thereby reducing the time for part surface detection, while reducing the complexity of part surface detection, thereby improving the efficiency of light source control.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the light source parameter calculation function is:
[0013] In the function, is the light source coordinate, is the horizontal coordinate of the light source, is the ordinate of the light source, is the vertical coordinate of the light source, is the light source intensity, is the reference light intensity, is the light intensity attenuation coefficient, is the surface area, is the spatial position vector, is the real-time observation point coordinate vector, is the time variable, is the adjustment parameter of the time dependence of light intensity, is the adjustment parameter of the time dependence of light intensity, is the illumination elevation angle in the illumination angle, is the vertical coordinate of the real-time observation point coordinates, is the surface characteristic length, is the surface reflectivity, is the surface parameterization variable, is the standard deviation of the Gaussian kernel function, is the irradiation azimuth in the irradiation angle, is the ordinate of the real-time observation point coordinates, is the horizontal coordinate of the real-time observation point coordinates, is the surface inclination angle.
[0014] By adopting the above technical solution, the function takes into account the position relationship in three-dimensional space, so that the light source can be more accurately positioned at the optimal lighting position. The calculation of light source intensity introduces factors such as spatial attenuation and time dependence. It not only considers the distance from the light source to the observation point, but also introduces time variables, so that the light intensity can be dynamically adjusted according to the different stages of the detection process. By calculating various parameters, more accurate light source adjustment parameters can be obtained.
[0015] In conjunction with some embodiments of the first aspect, in some embodiments, , and The calculation function is:
[0016] In the function, is the horizontal coordinate of the light source, is the ordinate of the light source, is the vertical coordinate of the light source, is the integrated volume, is the integration variable, is the periodic disturbance amplitude, , and is the angular frequency of the periodic change in the light source position.
[0017] By adopting the above technical solution, the function takes into account the reflectivity distribution in the entire detection volume. This global consideration ensures that the selection of the light source position can adapt to the characteristics of the entire detection object, reduces the impact of detection blind spots or visual fatigue caused by long-term static illumination, and can flexibly control the change amplitude and frequency of the light source position to adapt to different detection requirements and environmental conditions.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the real-time observation range is calculated based on the part surface image and the real-time sight line data, specifically including:
[0019] Establish a three-dimensional model of the part surface based on the part surface picture;
[0020] According to the 3D model and the real-time observation point coordinates, the intersection point between the inspector’s line of sight and the part surface is calculated;
[0021] Taking the intersection as the center, combining the real-time sight direction and the preset field of view angle, the boundary of the real-time observation range is determined on the three-dimensional model, and the real-time observation range is determined based on the boundary.
[0022] By adopting the above technical solution, a three-dimensional model is established based on the part surface image, which reduces the information loss that may be caused by the two-dimensional image and improves the accuracy of spatial positioning. The intersection of the line of sight and the part surface is calculated using the real-time observation point coordinates and the three-dimensional model, which enables the detection personnel to capture their focus. This precise positioning ensures that the light source is always concentrated on the area that the detection personnel are most concerned about, improving the detection efficiency and accuracy. By determining the boundaries of the observation range on the three-dimensional model, the system can accurately divide the areas that need to be focused on, reducing unnecessary light source consumption and also reducing interference with surrounding areas.
[0023] In conjunction with some embodiments of the first aspect, in some embodiments, determining the surface data corresponding to the current detection surface according to the part surface image specifically includes:
[0024] Extract surface texture features from part surface images;
[0025] According to the surface texture characteristics and the preset material database, the surface reflectivity of the part surface image is obtained;
[0026] The surface inclination angle and surface area corresponding to the part surface image are calculated by an image processing algorithm to obtain surface data, which includes surface inclination angle, surface area and surface reflectivity.
[0027] By adopting the above technical solution and extracting the texture features of the part surface image, the system can capture the surface microstructure information. These texture features are important determinants of the surface reflectivity and can reflect the essential properties of the material and the influence of the processing technology. Combined with the preset material database for matching, the system can quickly and accurately determine the surface reflectivity.
[0028] In combination with some embodiments of the first aspect, in some embodiments, after controlling the light source device to start running and adjusting the operating parameters of the light source device to the light source adjustment parameters, the method further includes:
[0029] Record the testing trajectory and stay time of the testing personnel;
[0030] Determine the key areas of focus for testers based on the test trajectory and dwell time;
[0031] The light source device is controlled to stay at the lighting point corresponding to the key focus area for a preset first time period, and to stay at the lighting points corresponding to other areas except the key focus area for a preset second time period, and the preset first time period is greater than the preset second time period.
[0032] By adopting the above technical solutions and recording the inspection trajectory and dwell time of the inspectors, the system can capture key information in the inspection process, which directly reflects the inspectors' attention distribution and inspection strategy. Based on these data, the key focus areas are determined, enabling the system to intelligently identify the parts that need the most careful inspection, thereby improving the pertinence and efficiency of the inspection. By adopting different lighting dwell time strategies in key focus areas and other areas, the system achieves refined and differentiated light source control.
[0033] In combination with some embodiments of the first aspect, in some embodiments, after controlling the light source device to start running and adjusting the operating parameters of the light source device to the light source adjustment parameters, the method further includes:
[0034] Real-time monitoring of the pupil size of the tester;
[0035] When it is determined that the rate of change of the pupil size exceeds a preset threshold, the light source adjustment parameter is adjusted until the pupil size of the detected person is the initial size.
[0036] By adopting the above technical solution and monitoring the pupil size of the inspector in real time, the system can directly obtain the degree of stimulation of the inspection environment to the human eye. Pupil size is one of the most direct and sensitive physiological responses of the human eye to light intensity, so it can accurately capture the slight changes in the visual comfort of the inspector. While ensuring the quality of inspection, it protects the visual health of the inspector.
[0037] In the second aspect, an embodiment of the present application provides a part surface detection light source control system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0038] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a system, causes the system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0039] In a fourth aspect, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a system, the system executes the method described in any possible implementation manner in the first aspect.
[0040] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0041] 1. The present application provides a method for controlling a light source for part surface inspection, which obtains real-time sight line data of an inspector in real time, and then determines the current inspection surface to be inspected by the inspector at the current position based on the real-time sight line data and the part surface image, and then inputs the surface data and real-time sight line data that affect the lighting effect into a light source parameter calculation function, and calculates the light source adjustment parameters that enable the inspector to accurately inspect. The light source adjustment parameters calculated in this way are the light source parameters that best meet the inspector's needs, and the light source adjustment parameters can be updated in real time as the inspector's position changes, thereby improving the real-time performance of the light source adjustment, reducing the time for light source control, and thereby reducing the time for part surface inspection, while reducing the complexity of part surface inspection, thereby improving the efficiency of light source control.
[0042] 2. This application provides a method for controlling light sources for part surface inspection. This function takes into account the positional relationship in three-dimensional space, so that the light source can be more accurately positioned at the optimal lighting position. The calculation of light source intensity introduces factors such as spatial attenuation and time dependence. It not only considers the distance from the light source to the observation point, but also introduces time variables, so that the light intensity can be dynamically adjusted according to different stages of the inspection process. By calculating various parameters, more accurate light source adjustment parameters can be obtained.
[0043] 3. This application provides a method for controlling light sources for part surface inspection, which records the inspection trajectory and dwell time of inspectors. The system can capture key information during the inspection process, which directly reflects the inspectors' attention distribution and inspection strategy. Based on these data, the key focus areas are determined, so that the system can intelligently identify the parts that need the most careful inspection, thereby improving the pertinence and efficiency of the inspection. By adopting different lighting dwell time strategies in key focus areas and other areas, the system achieves refined and differentiated light source control. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of a method for controlling a light source for part surface detection in an embodiment of the present application.
[0045] Figure 2 It is another flow chart of a method for controlling a light source for part surface detection in an embodiment of the present application.
[0046] Figure 3 It is a schematic diagram of the physical device structure of a part surface detection light source control system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.
[0048] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0049] Combine the following Figure 1 , a method for controlling a light source for detecting a part surface in an embodiment of the present application is described as follows:
[0050] See also Figure 1 , which is a flow chart of a method for controlling a light source for part surface detection in an embodiment of the present application.
[0051] S101, receiving real-time sight line data of a detection person sent by an eye tracking device;
[0052] Receive the real-time sight data of the inspector sent by the eye tracking device, which includes the real-time sight direction and the real-time observation point coordinates. In this step, the system receives the sight data of the inspector in real time through the data connection established with the eye tracking device. These data include the real-time sight direction and the real-time observation point coordinates, which provide basic information for subsequent light source control. Eye tracking devices can be implemented using a variety of technologies, such as infrared reflection method, corneal reflection method or video eye tracking method.
[0053] The system can capture tiny changes in the eye movements of the inspector through a high-speed camera, and combine image processing algorithms and eye movement models to accurately calculate the line of sight direction and gaze point position. In order to improve the accuracy and reliability of the data, the system can use multi-sensor fusion technology, using multiple cameras or other types of sensors, such as near-infrared sensors, capacitive sensors, etc., to comprehensively analyze and obtain more accurate line of sight data. Taking into account possible interference factors such as light changes in the detection environment and head movement of the inspector, the system can introduce an adaptive calibration algorithm to maintain tracking accuracy by adjusting parameters in real time.
[0054] In addition, the system can set up a data smoothing and filtering mechanism to remove data noise caused by blinking, rapid scanning, etc., to ensure that the obtained sight data can truly reflect the focus of the inspector's attention. In order to adapt to the eye characteristics of different inspectors, the system can perform personalized calibration before use and establish an eye movement feature model for each inspector, thereby improving the accuracy of sight tracking. The system can also continuously optimize the sight prediction model through deep learning algorithms to improve tracking performance under complex lighting conditions. In order to reduce data transmission delays, the system can use edge computing technology to perform preliminary data processing on the eye tracking device side and only transmit key feature information, thereby achieving more real-time sight data acquisition.
[0055] S102, obtaining a part surface image through a monitoring device, and calculating a real-time observation range based on the part surface image and real-time sight line data;
[0056] The part surface image is obtained through the monitoring equipment, and the real-time observation range is calculated based on the part surface image and the real-time sight line data. Specifically: a three-dimensional model of the part surface is established based on the part surface image;
[0057] According to the 3D model and the real-time observation point coordinates, the intersection point between the inspector’s line of sight and the part surface is calculated;
[0058] Taking the intersection as the center, combining the real-time sight direction and the preset field of view angle, the boundary of the real-time observation range is determined on the three-dimensional model, and the real-time observation range is determined based on the boundary.
[0059] In this step, the system first obtains a high-definition picture of the part surface through a monitoring device. The monitoring device can be a high-resolution camera equipped with autofocus and optical image stabilization to ensure that clear images of the part surface can be obtained under various lighting conditions. The system can use multi-angle shooting technology to capture the part surface from different angles simultaneously through multiple cameras to obtain more comprehensive surface information. After acquiring the picture, the system uses computer vision technology to process the image, including image enhancement, denoising, and edge detection, to improve image quality and detail clarity. Next, the system builds a three-dimensional model of the part surface based on the processed image. This process can use structured light scanning, deep learning-assisted single-lens scanning, and other methods. Figure 3 The construction of the 3D model takes into account the geometric shape, texture characteristics and material properties of the part surface, providing an accurate spatial information basis for subsequent observation range calculation.
[0060] With the 3D model, the system combines the real-time line of sight data to calculate the real-time observation range. First, the system locates the coordinates of the real-time observation point in the 3D model space, which requires precise alignment and conversion of the coordinate system of the eye tracking device with the coordinate system of the 3D model. Then, the system calculates the intersection of the inspector's line of sight and the part surface model, a process that involves complex spatial geometry operations and ray tracing algorithms. To improve computing efficiency, the system can use space segmentation techniques, such as octrees or KD trees, to quickly locate possible intersection areas.
[0061] After determining the intersection, the system uses the intersection as the center, combined with the real-time line of sight and the preset field of view angle, to determine the boundary of the real-time observation range on the three-dimensional model. The field of view angle can be adjusted according to the physiological characteristics of the human eye and the requirements of the detection task. The system can use an adaptive algorithm to dynamically adjust the field of view angle according to the complexity of the part surface and the difficulty of detection to obtain the best observation effect. When determining the boundary of the observation range, the system takes into account the curvature and irregular shape of the part surface, and uses a surface projection algorithm to ensure that the boundary accurately fits the surface contour. Finally, the system extracts the surface information within the real-time observation range according to the determined boundary, including geometric features, texture information, and material properties, etc., to prepare for subsequent surface data analysis and light source parameter calculation.
[0062] S103, determining the current detection surface according to the real-time observation range and the part surface image, and determining the surface data corresponding to the current detection surface according to the part surface image;
[0063] The system determines the current detection surface according to the real-time observation range and the part surface image, and determines the surface data corresponding to the current detection surface according to the part surface image, specifically: extracting the surface texture features of the part surface image;
[0064] According to the surface texture characteristics and the preset material database, the surface reflectivity of the part surface image is obtained;
[0065] The surface inclination angle and surface area corresponding to the part surface image are calculated by an image processing algorithm to obtain surface data, which includes surface inclination angle, surface area and surface reflectivity.
[0066] In this step, the system first determines the current detection surface based on the real-time observation range and the part surface image. This process involves image segmentation and target recognition technology. The system can use deep learning algorithms, such as convolutional neural networks (CNN) or regional convolutional neural networks (R-CNN), to perform semantic segmentation on images within the observation range and identify different surface areas and features. At the same time, the system considers the geometric structure and topological relationship of the parts, and accurately divides the boundaries of the current detection surface through graphics algorithms such as region growing or watershed algorithms.
[0067] After determining the current inspection surface, the system extracts and analyzes the surface data. First, the system extracts the texture features of the part surface image. This process can use multi-scale texture analysis methods, such as wavelet transform or Gabor filter, to capture the microstructure information of the surface. The system can also use techniques such as local binary pattern (LBP) or gray level co-occurrence matrix (GLCM) to extract richer texture statistics.
[0068] Next, the system determines the reflectivity of the part surface based on the extracted texture features and the preset material database. The material database contains the reflectivity characteristics of various common materials. The system uses feature matching algorithms such as k-nearest neighbor (KNN) or support vector machine (SVM) to find the closest material type to obtain accurate surface reflectivity. To improve matching accuracy, the system can use transfer learning technology to use the reflectivity characteristics of known materials to infer the reflectivity of unknown materials.
[0069] At the same time, the system calculates the surface inclination and area through image processing algorithms. For the calculation of surface inclination, the system can use gradient analysis methods, such as Sobel operator or Prewitt operator, to calculate the surface normal vector. On complex surfaces, the system can use surface fitting technology, such as B-spline surface or NURBS surface, to more accurately describe the surface morphology. The calculation of surface area can be combined with the three-dimensional reconstruction results, using meshing and integration methods.
[0070] Finally, the system integrates the surface inclination, area and reflectivity information to form a complete surface data set. These data provide key inputs for subsequent light source parameter calculations, ensuring the accuracy and adaptability of light source control. The system can establish a time series database of surface data, record the changes in surface characteristics during the inspection process, and provide data support for long-term quality control and process optimization.
[0071] S104, inputting the surface data and the real-time realization data into the light source parameter calculation function to obtain the light source adjustment parameters;
[0072] The system inputs the surface data and real-time realization data into the light source parameter calculation function to obtain the light source adjustment parameters, where the light source parameter calculation function is: In the function, is the light source coordinate, is the horizontal coordinate of the light source, is the ordinate of the light source, is the vertical coordinate of the light source, is the light source intensity, is the reference light intensity, is the light intensity attenuation coefficient, is the surface area, is the spatial position vector, is the real-time observation point coordinate vector, is the time variable, is the adjustment parameter of the time dependence of light intensity, is the adjustment parameter of the time dependence of light intensity, is the illumination elevation angle in the illumination angle, is the vertical coordinate of the real-time observation point coordinates, is the surface characteristic length, is the surface reflectivity, is the surface parameterization variable, is the standard deviation of the Gaussian kernel function, is the irradiation azimuth in the irradiation angle, is the ordinate of the real-time observation point coordinates, is the horizontal coordinate of the real-time observation point coordinates, is the surface inclination angle.
[0073] , and The calculation function is:
[0074] In the function, is the horizontal coordinate of the light source, is the ordinate of the light source, is the vertical coordinate of the light source, is the integrated volume, is the integration variable, is the periodic disturbance amplitude, , and is the angular frequency of the periodic change in the light source position.
[0075] When calculating the light source coordinates, the system uses an integral method that takes into account the reflectivity distribution and observation point position within the entire observation volume. By introducing a periodic perturbation term, the system is able to simulate the dynamic adjustment of the light source position to adapt to possible changes in line of sight during the detection process.
[0076] The calculation of light intensity takes into account distance attenuation, surface reflection characteristics and time dependence. The system describes the change of light intensity with distance through an exponential decay model, and introduces a hyperbolic tangent function to simulate the time-varying characteristics of light intensity, which enables the light source to dynamically adjust the brightness according to the detection duration and reduce visual fatigue.
[0077] In the actual calculation process, the system can use numerical methods, such as finite element analysis or Monte Carlo simulation, to handle complex integral and limit operations. In order to improve the calculation efficiency, the system can use parallel computing technology, such as GPU acceleration or distributed computing, to achieve real-time parameter optimization.
[0078] In addition, the system can introduce machine learning algorithms, such as reinforcement learning or genetic algorithms, to continuously optimize the light source parameter calculation model. By analyzing historical detection data and detection effect feedback, the system can adaptively adjust the parameters of the calculation function to improve the accuracy and applicability of the model.
[0079] S105, controlling the light source device to start running and adjusting the running parameters of the light source device to the light source adjustment parameters;
[0080] In this step, the system applies the calculated light source adjustment parameters to the actual light source equipment to achieve precise control of the detection environment lighting conditions.
[0081] First, the system sends a start command to the light source device through the communication interface. This communication process can use a variety of protocols, such as RS-485, CAN bus or Ethernet, to adapt to different types of light source devices. The system uses a real-time operating system or a high-priority thread to process the light source control command to ensure the timely transmission of the control signal.
[0082] Next, the system converts the light source adjustment parameters into specific device control instructions. This conversion process takes into account the hardware characteristics and control accuracy of the light source equipment. For the adjustment of the light source coordinates, the system can control the electric pan-tilt head or multi-axis robotic arm to achieve precise positioning of the light source. The system uses closed-loop control algorithms such as PID control or model predictive control to ensure fast response and stability of the light source position.
[0083] The intensity of the light source is adjusted by controlling the LED drive current or dimming module. The system can use pulse width modulation (PWM) technology or digital-to-analog converter (DAC) to achieve continuously adjustable light intensity control. In order to ensure the stability of the light intensity, the system can introduce a feedback mechanism to monitor the actual light intensity in real time through a light sensor and perform dynamic correction.
[0084] The adjustment of the irradiation angle can be achieved by controlling the focusable lens or optical reflector. The system uses precision stepper motors or piezoelectric ceramic drivers to control the movement of optical components to achieve micron-level angle adjustment accuracy. In order to compensate for the hysteresis and nonlinearity of the mechanical system, the system can use a combination of feedforward control and adaptive control.
[0085] S106. Real-time monitoring of the pupil size of the inspector;
[0086] In this step, the system continuously monitors the pupil size of the inspector to evaluate the impact of the current lighting conditions on the inspector's visual perception. The system can use a high-resolution infrared camera in conjunction with a near-infrared LED light source to achieve clear imaging of the pupil. Infrared imaging technology can maintain stable pupil image quality under different ambient light conditions. In order to improve the contrast and clarity of the image, the system can use an adaptive exposure control algorithm to dynamically adjust the camera parameters based on the current pupil brightness.
[0087] After image acquisition, the system uses real-time image processing algorithms to detect and measure pupils. This process can use a variety of techniques, such as Hough transform circle detection, edge detection combined with ellipse fitting, or deep learning based pupil segmentation algorithms. Considering the possible head movement and blinking of the inspected person, the system introduces pupil tracking algorithms, such as Kalman filtering or particle filtering, to maintain stable tracking of the pupil.
[0088] S107. When it is determined that the rate of change of the pupil size exceeds a preset threshold, adjust the light source adjustment parameter until the pupil size of the detected person is the initial size.
[0089] The system calculates the rate of change of pupil size. This calculation process takes into account the choice of time window. The system can use sliding window technology to calculate short-term and long-term rates of change to capture the pupil's immediate response to light changes and the cumulative effect. The rate of change can be calculated using linear regression or differential algorithms, taking into account the impact of measurement noise.
[0090] The system sets a preset change rate threshold, which is determined based on the physiological characteristics of the human eye and visual comfort research. The threshold can be dynamically adjusted according to different detection tasks and environmental conditions. The system uses fuzzy logic or Bayesian reasoning methods to comprehensively consider the size, duration and trend of the change rate to make a decision on whether the light source needs to be adjusted.
[0091] Once it is determined that adjustment is needed, the system starts the optimization process of the light source parameters. The optimization goal is to restore the pupil size of the inspected person to the initial state. The initial state here refers to the stable pupil size at the beginning of the inspection or after the last adjustment. The system establishes a mapping relationship model between pupil size and light source parameters. This model can be obtained through machine learning algorithms, such as support vector regression or neural networks, based on historical data training.
[0092] The adjustment of light source parameters adopts a gradual strategy to avoid discomfort to the inspector caused by sudden changes in lighting. The system uses a PID controller or model predictive control algorithm to calculate the optimal adjustment path based on the deviation between the current pupil size and the target size. During the adjustment process, the system continuously monitors the changes in pupil size to achieve closed-loop control and ensure the accuracy of the adjustment.
[0093] Considering the complexity of the detection environment, the system introduces a multi-objective optimization algorithm. In addition to restoring the pupil size, it also considers maintaining the uniformity of illumination on the detection surface and minimizing energy consumption. The system seeks a balance between multiple objectives through weight adjustment optimization methods.
[0094] In the above embodiment, the real-time line of sight data of the inspector is acquired in real time, and then the current inspection surface to be inspected by the inspector at the current position is determined based on the real-time line of sight data and the part surface image, and then the surface data and real-time line of sight data that affect the lighting effect are input into the light source parameter calculation function, and the light source adjustment parameters that enable the inspector to accurately detect are calculated. The light source adjustment parameters calculated in this way are the light source parameters that best meet the inspector's needs, and the light source adjustment parameters can be updated in real time as the inspector's position changes, thereby improving the real-time nature of the light source adjustment, reducing the time for light source control, and thereby reducing the time for part surface detection, while reducing the complexity of part surface detection, thereby improving the efficiency of light source control.
[0095] Furthermore, in general, inspectors may have a focus on the inspection range, such as the upper surface or other surfaces of the parts, so the light source equipment needs to focus on the position that the inspectors focus on. Figure 2 , another part surface detection light source control method in the embodiment of the present application is described:
[0096] See also Figure 2 , is another flow chart of a method for controlling a light source for part surface detection in an embodiment of the present application.
[0097] S201, recording the detection trajectory and stay time of the detection personnel;
[0098] The system can record the detection trajectory and residence time of the inspector in a variety of ways. One feasible method is to use a camera or sensor system to track the movement of the inspector in the detection area. The system can capture the location information of the inspector in real time and convert this information into coordinate data to draw the movement trajectory of the inspector. At the same time, the system can also record the residence time of the inspector at each location.
[0099] To improve accuracy, the system can use multiple cameras or sensors to capture the movements of the inspector from different angles. These data can be fused through algorithms to generate more accurate three-dimensional trajectory information. In addition, the system can also use deep learning algorithms to identify the posture of the inspector, so as to more accurately determine whether the inspector stays at a certain location and the specific length of time.
[0100] The system can also record the inspector's operating behavior, such as picking up tools, touching parts, etc. This information can help the system better understand the inspector's intentions and focus. The system can associate this behavior data with location and time data to form a more comprehensive inspection trajectory record.
[0101] To facilitate subsequent analysis, the system can visualize the recorded trajectory and time data to generate heat maps or trajectory maps. These charts can intuitively display the activity patterns and key areas of focus of the inspectors. The system can also perform statistical analysis on these data to calculate indicators such as the distribution of the inspectors' stay time in each area and their movement speed.
[0102] S202, determining the focus area of the inspector according to the inspection trajectory and the stay time;
[0103] Based on the detection trajectory and residence time data recorded in S201, the system can use a variety of algorithms and strategies to determine the focus areas of the detection personnel. First, the system can calculate the cumulative residence time of the detection personnel in each area, and preliminarily mark the area where the residence time exceeds a certain threshold as the focus area. This threshold can be a fixed value or a relative value dynamically calculated based on the total detection time.
[0104] In addition to simply considering dwell time, the system can also analyze the movement patterns of inspectors. For example, the system can identify the behavior of inspectors repeatedly going back and forth to certain areas, which may indicate that these areas need to be examined more carefully. The system can also consider the speed at which inspectors move in a certain area. Areas with slower speeds may be key areas that inspectors are carefully observing.
[0105] The system can further identify areas of focus based on the inspector’s operating behavior. For example, if an inspector frequently uses a magnifying glass or other inspection tool in a certain area, this area is likely to be a focus area. Similarly, if an inspector touches or operates a part multiple times in a certain area, this may also indicate that this area requires special attention.
[0106] To improve the accuracy of identifying key focus areas, the system can use machine learning algorithms. By analyzing a large amount of historical data, the system can learn to identify which behavioral patterns are commonly associated with key focus areas. This approach can help the system more accurately interpret the behavioral intentions of the detected person.
[0107] Considering that different parts may have different inspection focuses, the system can adjust the strategy for determining the focus area according to the type of part currently being inspected. For example, for some part areas known to be prone to defects, the system may determine them as focus areas even if the inspector does not stay for a long time.
[0108] S203: Control the light source device to stay at the lighting point corresponding to the key focus area for a preset first time period, and to stay at the lighting points corresponding to other areas except the key focus area for a preset second time period.
[0109] The system controls the light source device to stay at the lighting point corresponding to the key focus area for a preset first time period, and stay at the lighting points corresponding to other areas except the key focus area for a preset second time period, and the preset first time period is greater than the preset second time period.
[0110] Based on the focus area determined in S202, the system can intelligently control the lighting strategy of the light source device. The system first maps the part surface to the lighting point of the light source device and establishes a corresponding relationship between the area and the lighting point. This mapping can be one-to-one or one-to-many, depending on the accuracy of the light source device and the complexity of the part surface.
[0111] For the focus area, the system controls the light source device to stay at the corresponding lighting point for the preset first time. This time can be set according to the detection requirements and the performance of the light source device. A longer stay time can ensure that the inspector has enough time to observe the area carefully. At the same time, the system can adjust the light intensity and light color of these lighting points to provide the best observation conditions. For example, for areas where subtle defects need to be observed, the system can increase the light intensity or change the light angle to highlight the surface texture.
[0112] For non-focus areas, the system controls the light source equipment to stay at the corresponding lighting point for a preset second duration. This duration is usually shorter than the first duration, but it is still necessary to ensure that the inspector can make necessary observations. The system can dynamically adjust the second duration according to the overall progress and time requirements of the inspection to strike a balance between inspection efficiency and comprehensiveness.
[0113] In order to achieve more flexible lighting control, the system can adopt a gradual lighting strategy. When transitioning from one area to another, the system can gradually adjust the light intensity and dwell time instead of switching suddenly. This smooth transition can reduce the interference of light changes on the vision of inspectors and improve the comfort and efficiency of inspection.
[0114] The system can also dynamically adjust the lighting strategy based on the real-time situation of the inspection. For example, if the system detects that the inspector suddenly becomes interested in a non-key area (such as a sudden increase in the dwell time), the lighting duration and intensity of the area can be increased in time. This adaptive lighting control can better meet the real-time needs of the inspector.
[0115] In the above embodiment, by recording the detection trajectory and dwell time of the detection personnel, the system can capture key information in the detection process, which directly reflects the attention distribution and detection strategy of the detection personnel. Based on these data, the key focus areas are determined, so that the system can intelligently identify the parts that need the most careful inspection, thereby improving the pertinence and efficiency of the detection. By adopting different lighting dwell time strategies in key focus areas and other areas, the system realizes the refinement and differentiation of light source control.
[0116] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , which is a schematic diagram of the physical device structure of a part surface detection light source control system provided in an embodiment of the present application.
[0117] It should be noted that Figure 3 The structure of the system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0118] like Figure 3 As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. Input / output (I / O) interface 305 is also connected to bus 304.
[0119] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a liquid crystal display (LCD) and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
[0120] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.
[0121] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0123] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiment; or may exist independently without being assembled into the system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of a system, the system implements the method provided in the above embodiment.
[0124] 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 cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0125] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0127] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A method for controlling a light source for part surface detection, characterized in that: include: Receiving real-time sight line data of the inspector sent by the eye tracking device, wherein the real-time sight line data includes real-time sight line direction and real-time observation point coordinates; Acquire a part surface image through a monitoring device, and calculate a real-time observation range based on the part surface image and the real-time sight line data; Determine the current detection surface according to the real-time observation range and the part surface image, and determine the surface data corresponding to the current detection surface according to the part surface image, wherein the surface data includes a surface inclination angle, a surface area, and a surface reflectivity; The surface data and the real-time sight data are input into a light source parameter calculation function to obtain light source adjustment parameters, wherein the light source adjustment parameters include light source coordinates, light source intensity and illumination angle. The light source parameter calculation function is: In the function, Q(x, y, z) is the coordinate of the light source, x is the horizontal coordinate of the light source, y is the vertical coordinate of the light source, z is the vertical coordinate of the light source, I is the intensity of the light source, I0 is the reference light intensity, k is the light intensity attenuation coefficient, A is the surface area, r is the spatial position vector, c is the real-time observation point coordinate vector, t is the time variable, μ is the adjustment parameter of the time dependence of the light intensity, τ is the adjustment parameter of the time dependence of the light intensity, θ is the illumination elevation angle in the illumination angle, and c is the illumination angle of the illumination angle. z is the vertical coordinate in the real-time observation point coordinates, L is the surface characteristic length, ρ is the surface reflectivity, s is the surface parameterized variable, σ is the standard deviation of the Gaussian kernel function, φ is the illumination azimuth in the illumination angle, and c y is the ordinate of the real-time observation point coordinates, and c x is the horizontal coordinate in the real-time observation point coordinates, and α(s) is the surface inclination angle; The calculation function of x, y and a is: In the function, x is the horizontal coordinate of the light source, y is the vertical coordinate of the light source, z is the vertical coordinate of the light source, V is the integral volume, r is the integral variable, λ is the periodic disturbance amplitude, and ω is x , the said ω y And the said ω z is the angular frequency of the periodic change of the light source position; The light source device is controlled to start running and the running parameters of the light source device are adjusted to the light source adjustment parameters.
2. The method according to claim 1, characterized in that The real-time observation range is calculated based on the part surface image and the real-time sight line data, specifically including: Establishing a three-dimensional model of the part surface according to the part surface image; Calculate the intersection of the inspection personnel's line of sight and the surface of the part according to the three-dimensional model and the real-time observation point coordinates; Taking the intersection as the center and combining the real-time sight line direction and the preset field of view angle, the boundary of the real-time observation range is determined on the three-dimensional model, and the real-time observation range is determined according to the boundary.
3. The method according to claim 1, characterized in that Determining the surface data corresponding to the current detection surface according to the part surface image specifically includes: Extracting surface texture features of the part surface image; Obtaining the surface reflectivity of the part surface image according to the surface texture features and a preset material database; The surface inclination angle and surface area corresponding to the part surface image are calculated by an image processing algorithm to obtain surface data, wherein the surface data includes the surface inclination angle, the surface area and the surface reflectivity.
4. The method according to claim 1, characterized in that: After controlling the light source device to start running and adjusting the operating parameters of the light source device to the light source adjustment parameters, the method further includes: Record the detection trajectory and stay time of the detection personnel; Determine the focus area of the inspector according to the inspection trajectory and the stay time; The light source device is controlled to stay at the lighting point corresponding to the key focus area for a preset first time period, and stay at the lighting points corresponding to other areas except the key focus area for a preset second time period, and the preset first time period is greater than the preset second time period.
5. The method according to claim 1, characterized in that After controlling the light source device to start running and adjusting the operating parameters of the light source device to the light source adjustment parameters, the method further includes: Real-time monitoring of the pupil size of the detection person; When it is determined that the rate of change of the pupil size exceeds a preset threshold, the light source adjustment parameter is adjusted until the pupil size of the detected person is an initial size.
6. A light source control system for part surface detection, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method as described in any one of claims 1-5.
7. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to execute the method according to any one of claims 1 to 5.
8. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Two-wave-band rendezvous active illumination distance gating imaging system and imaging method
CN110018492A
Rendering a visual representation of a luminaire by re-using light values
US20240338882A1