Circuit board detection method of intelligent superlens light field camera based on deep reinforcement learning

Through the intelligent superlens light field camera circuit board detection method based on deep reinforcement learning, the intelligent light source, intelligent object carrier platform and intelligent electro-optical crystal superlens are used for collaborative control, which solves the problems of slow automatic focus speed and light pollution of traditional detection equipment, and achieves efficient and fine PCBA board detection.

CN119147549BActive Publication Date: 2025-04-18NINGBO CECJC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411659732.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-04-18
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

There are many problems with traditional manual detection. Automatic optical detection equipment faces problems such as light pollution, huge data volume, large redundant information, high spatial characteristics, angle characteristics and depth characteristics, and slow automatic focus speed. Especially in hybrid vision detection systems for circuit boards of different sizes and areas, the automatic focus speed is slow, resulting in insufficient algorithm capabilities and low real-time performance.

Method used

The intelligent superlens light field camera circuit board detection method based on deep reinforcement learning is adopted. By constructing a PCBA board detection model of the intelligent superlens light field camera, the combined light source agent, the object carrier platform agent and the electro-optical crystal superlens intelligent lens agent are used for intelligent control. Combined with dense optical flow method, light field layer-by-layer scanning technology and photoelectric intelligent frequency multiplexing modulation technology, a 5D light field model is built, and the space-time angle depth reinforcement learning model of multiple agents is used to optimize the coordinated control action.

Benefits of technology

The circuit board imaging system that realizes mixed production and detection of circuit boards in different sizes and areas has unique automatic focus and ultra-depth of field capabilities, reduces light pollution, improves automatic focus speed and algorithm capabilities, and enhances the detection ability of tiny features on the surface of PCBA boards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119147549B_ABST
    Figure CN119147549B_ABST
Patent Text Reader

Abstract

The present invention relates to a circuit board detection method of an intelligent super-lens light field camera based on deep reinforcement learning, including: constructing a circuit board detection model of an intelligent super-lens light field camera; obtaining illumination parameters of the circuit board surface using a real-time global illumination model; accurately positioning the circuit board using a dense optical flow method to obtain refocusing parameters of a light field image; obtaining depth parameters of the light field image using light field layer-by-layer scanning technology and optoelectronic intelligent frequency multiplexing modulation technology; constructing a 5D light field model of an intelligent super-lens light field camera to obtain a 5D light field image of the circuit board; constructing a spatiotemporal angle deep reinforcement learning model based on multiple agents, inputting illumination parameters, refocusing parameters, depth parameters and 5D light field images into the spatiotemporal angle deep reinforcement learning model, and outputting collaborative decision control optimized by multiple agents. The intelligent super-lens light field camera of the present invention opens up a new idea for accurate intelligent detection of circuit board defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect detection of light field cameras and PCBA boards, and in particular to a circuit board detection method of an intelligent superlens light field camera based on deep reinforcement learning. Background Art

[0002] With the development of electronic technology and the electronic manufacturing industry, the requirements for smaller components, higher installation density, and more precise integration have posed higher challenges to PCBA board defect detection, so the difficulty of detection has continued to increase. Traditional manual detection has many problems. In order to ensure the performance of electronic products, faster, more precise, and non-contact automatic optical defect detection technology has become a powerful tool in the electronics industry, and can better adapt to the requirements of automated production lines.

[0003] Automatic optical inspection based on machine vision technology combines AI artificial intelligence and deep learning to greatly improve the accuracy and efficiency of inspection. Therefore, more and more electronic manufacturers use automatic optical inspection and deep learning software to accurately detect and mark PCBA surface defects, such as material surface defects, welding defects or missing or misaligned components. The main challenges faced by automatic optical inspection equipment include light pollution, large amount of data, much redundant information, high dimensions of spatial features, angle features and depth features, and slow autofocus speed. Among them, some gaps and discontinuity defects are difficult to be found under inappropriate light sources, which will lead to light pollution and misjudgment. The choice of light source is crucial. Intelligent lighting methods such as ring light sources or backlight light sources can effectively reduce the impact of reflections and shadows. When operating in mixed production lines, the hybrid visual inspection system for circuit boards of different sizes has the problem of slow autofocus speed. These challenges will also lead to insufficient algorithmic capabilities and low real-time performance of automatic optical inspection equipment when extracting limited defect information from massive data. The meta-lens light field camera with extreme imaging depth of field can realize large depth of field achromatic light field imaging inspection of circuit boards of different sizes within the depth of field range. Summary of the invention

[0004] The purpose of the present invention is to provide a circuit board detection method based on deep reinforcement learning using an intelligent superlens light field camera, to realize a circuit board imaging system for mixed production and detection of circuit boards of different sizes, which has unique automatic focusing and super depth of field capabilities and is suitable for PCB / SMT detection.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] The circuit board detection method of the intelligent super-lens light field camera based on deep reinforcement learning includes the following steps:

[0007] S1. Build a PCBA board detection model for the smart superlens light field camera;

[0008] S2, using the light source action variables to intelligently control the combined light source agent, and using the real-time global illumination model to obtain the illumination parameters of the target PCBA board surface;

[0009] S3, using the platform action variables to intelligently control the moving speed and direction of the platform agent, using the dense optical flow method to accurately locate the target PCBA board, and obtaining the refocusing parameters of the light field image;

[0010] S4. Using the action variables of the electro-optic crystal meta-lens to intelligently control the position and refractive index of the electro-optic crystal meta-lens intelligent body, and using the light field layer-by-layer scanning and optoelectronic intelligent frequency multiplexing modulation technology to obtain the depth parameters of the light field image;

[0011] S5. Build a 5D light field model of the intelligent superlens light field camera to obtain a 5D light field image of the target PCBA board;

[0012] S6. Construct a multi-agent based spatiotemporal angular deep reinforcement learning model, input the obtained illumination parameters, refocusing parameters, depth parameters and 5D light field images into the spatiotemporal angular deep reinforcement learning model, and output the multi-agent optimized collaborative control actions.

[0013] The step S1 comprises the following steps:

[0014] S11, constructing a PCBA board detection model based on the intelligent superlens light field camera, including a loading platform agent, a target PCBA board, a combined light source agent, a main lens, an electro-optical crystal superlens agent and an image sensor;

[0015] S12, the loading platform intelligent body is used to place the target PCBA board;

[0016] S13, constructing the combined light source intelligent body including the RGB ring light source and the coaxial light source;

[0017] S14, constructing the electro-optic crystal meta-lens intelligent body, which is provided with a meta-lens array and an electro-optic crystal fusion body, a high-precision driving micro-motor and an external electric field.

[0018] The step S2 comprises the following steps:

[0019] S21, using the light source action variable to intelligently control the RGB ring light source illumination angle, color and brightness of the coaxial light source in the combined light source intelligent body;

[0020] S22, using a real-time global illumination model to obtain illumination parameters of the target PCBA board surface, wherein establishing a real-time global illumination model is expressed as:

[0021] ;

[0022] in, is the ambient light component, is the diffuse component, is the specular highlight component; The ambient light component formula is expressed as:

[0023] ;

[0024] in, is the ambient light intensity, is the ambient illumination coefficient; The formula for the diffuse reflection component is expressed as:

[0025] ;

[0026] in, is the intensity of the light source, is the diffuse reflectance, is the surface normal vector, is the light source direction vector; The formula for the specular highlight component is:

[0027] ;

[0028] in, ( ) is the material's specular reflection coefficient, is the reflected light vector, which indicates the direction of the light after it is reflected from the surface of the object. is the sight direction vector, indicating the direction of the main lens, is the specular index, which indicates the glossiness of the object surface; the lighting parameter is expressed as , using the real-time global illumination model to measure and calculate the color difference between the test multiple combined light and the reference light, to obtain the illumination parameters of the combined light source intelligent body , which is used to characterize the quality of the color rendering of the light source.

[0029] The step S3 comprises the following steps:

[0030] S31, using the action variables of the loading platform to intelligently control the moving speed and direction of the loading platform intelligent body, and obtaining a multi-view sub-image array of the target PCBA board with Mark points that is gradually translated;

[0031] S32. Use dense optical flow method to accurately locate, jointly displace and superimpose the Mark points of the multi-view sub-image array to obtain the refocusing parameters of the light field image.

[0032] The step S4 comprises the following steps:

[0033] S41, adjusting the position of the electro-optic crystal meta-lens intelligent body through the electro-optic crystal meta-lens action variables, realizing layer-by-layer focusing on components of different heights on the target PCBA board, and calculating the depth of field in real time using the light field layer-by-layer scanning technology; the focal length of the electro-optic crystal meta-lens intelligent body The object distance from the secondary image and the secondary imaging distance The positional relationship between them satisfies the Gaussian formula:

[0034] ;

[0035] Under the Galileo type condition, the secondary imaging distance range is greater than half the focal length and less than one focal length;

[0036] S42. The refractive index of the electro-optic crystal is adjusted by the action variable of the electro-optic crystal meta-lens, and the depth parameters of components of different heights on the target PCBA board are obtained by using the optoelectronic intelligent frequency multiplexing modulation technology.

[0037] The step S5 comprises the following steps:

[0038] S51. Construct a 5D light field model of the smart superlens light field camera to characterize the viewpoint image resolution and angular resolution.

[0039] S52, jointly controlling multiple intelligent agents in real time, and adopting a segmentation method with maximum inter-class variance to obtain a 5D light field image of the target PCBA board.

[0040] The step S6 comprises the following steps:

[0041] S61. Construct a multi-agent-based spatiotemporal deep reinforcement learning model, and establish an optimization problem for multi-agent joint actions with optimal image quality evaluation;

[0042] S62, using the actor network, extracting correlation features between illumination parameters, refocusing parameters, depth parameters and the 5D light field image in the time domain, space domain and angle domain, and outputting action variables of each agent;

[0043] S63. Input illumination parameters, refocusing parameters, depth parameters, 5D light field images, light source motion variables, carrier platform motion variables and electro-optic crystal metalens motion variables into the centrally trained Critic network of the spatiotemporal angular deep reinforcement learning model. The centrally trained Critic network outputs the global value function with the best image quality evaluation SSIM and MSE. The strategy gradient mechanism of centralized training and decentralized execution is used to realize the detection method of circuit boards by intelligent superlens light field cameras.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) The present invention uses a combined light source intelligent body to reduce light pollution, and can simultaneously achieve different illumination angles, brightness and color combinations, ensuring that the light source remains consistent in different environments, providing uniform illumination of the target PCBA board, and highlighting scratches, flaws, marks and other tiny features on the surface of the PCBA board under different frequency lights;

[0046] (2) The present invention uses intelligent control of the electro-optical crystal meta-lens and the loading platform to track, detect, analyze, and identify and understand the defects of the moving target PCBA board, making full use of spatial features, angle features, and depth features, expanding the depth of field imaging and improving the vertical clarity range of the field of view. When operating in a mixed production line, it solves the problem of slow automatic focusing speed of the mixed visual inspection system for circuit boards of different sizes, and solves the problem of large depth of field synthesis of components of different heights;

[0047] (3) The present invention adopts a multi-agent-based spatiotemporal-angular deep reinforcement learning model to extract the correlation characteristics of illumination parameters, refocusing parameters, depth parameters and 5D light field images in the time domain, space domain and angle domain respectively, output multi-agent optimized collaborative control actions, and realize the detection method of circuit boards by intelligent superlens light field cameras. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of the method of the present invention;

[0049] Figure 2 Schematic diagram of a 5D light field model of the intelligent superlens light field camera of the present invention;

[0050] Figure 3 It is a schematic diagram of the PCBA board detection model of the intelligent superlens light field camera of the present invention;

[0051] Figure 4 Schematic diagram of the multi-agent based spatiotemporal deep reinforcement learning model of the present invention. DETAILED DESCRIPTION

[0052] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0053] This embodiment provides a circuit board detection method for an intelligent superlens light field camera based on deep reinforcement learning, such as Figure 1 shown.

[0054] S1. Build a PCBA board detection model for the smart superlens light field camera;

[0055] S11, constructing a PCBA board detection model based on the intelligent superlens light field camera, including a carrier platform agent, a target PCBA board, a combined light source agent, a main lens, an electro-optical crystal superlens agent and an image sensor, such as Figure 2 As shown;

[0056] S12, the loading platform intelligent body is used to place the target PCBA board, the linear guide rail of the loading platform intelligent body adopts a linear guide rail, the motor adopts a high-precision stepper motor, the movement speed and distance can be adjusted, the conveyor belt adopts a steel wire transmission belt, and the communication method adopts a SMEMA signal interface;

[0057] S13, constructing the combined light source intelligent body including RGB ring light source and coaxial light source; the RGB ring light source can include red light (600-720nm), green light (510-530nm), blue light (430-480nm), and can be controlled with different irradiation angles and color combinations to highlight the light characteristics of different frequencies of the target PCBA board; the coaxial light source provides uniform illumination of the target PCBA board, and the brightness can be adjusted to ensure that the brightness of the light source remains consistent in different environments, highlighting the scratches, flaws, marks and other tiny features on the surface of the target PCBA board;

[0058] S14. Construct the electro-optic crystal metalens intelligent body, fuse the metalens array with the electro-optic crystal, and equip it with a high-precision driving micromotor and an external electric field; the electro-optic crystal metalens intelligent body fuses the metalens array with the electro-optic crystal, so that the electro-optic crystal is immersed between the micro-columns of the metalens array, and a transparent electrode is coated on the edge of the electro-optic crystal. The refractive index of the electro-optic crystal can be controlled by applying an electric field to the electrode; the metalens array is equipped with a high-precision driving micromotor, and the metalens array can be moved forward and backward by the micromotor to adjust the focal length.

[0059] S2, using the light source action variables to intelligently control the combined light source agent, and using the real-time global illumination model to obtain the illumination parameters of the target PCBA board surface;

[0060] S21, using light source action variables to intelligently control the RGB ring light source illumination angle, color and brightness of the coaxial light source in the combined light source intelligent body; the light source action variables are expressed as , which consists of two action components {u}_{1}=\left [ {{u}_{11},{u}_{12}} \right ] ,in Used to control the irradiation angle, red, green and blue switching of the RGB ring light source, and highlight the light characteristics of different frequencies of the target PCBA board through different irradiation angles and color combinations; Used to control the brightness of the coaxial light source to ensure uniform illumination of the light source under different environments, highlighting scratches, flaws, marks and other tiny features on the surface of the target PCBA board;

[0061] S22, using a real-time global illumination model to obtain illumination parameters of the target PCBA board surface, wherein establishing a real-time global illumination model is expressed as:

[0062] ;

[0063] in, is the ambient light component, is the diffuse component, is the specular highlight component; The ambient light component formula is expressed as:

[0064] ;

[0065] in, is the ambient light intensity, is the ambient illumination coefficient; The formula for the diffuse reflection component is expressed as:

[0066] ;

[0067] in, is the intensity of the light source, is the diffuse reflectance, is the surface normal vector, is the light source direction vector; The formula for the specular highlight component is:

[0068] ;

[0069] in, ( ) is the material's specular reflection coefficient, is the reflected light vector, which indicates the direction of the light after it is reflected from the surface of the object. is the sight direction vector, indicating the direction of the main lens, is the specular index, which indicates the glossiness of the object surface; the lighting parameter is expressed as , using a real-time global illumination model to measure and calculate the color difference between the light of the combined light source agent and the reference light, and obtain the illumination parameters of the combined light source agent , which is used to characterize the quality of color rendering of the combined light source intelligent entity.

[0070] S3, using the platform action variables to intelligently control the moving speed and direction of the platform agent, using the dense optical flow method to accurately locate the target PCBA board, and obtaining the refocusing parameters of the light field image;

[0071] S31, using the platform action variables to intelligently control the moving speed and direction of the platform agent, and obtaining a multi-view sub-image array of the target PCBA board with Mark points gradually translated; the platform action variables are expressed as , transmitted through the SMEMA signal interface of the platform agent, used to intelligently control the moving speed and direction of the platform agent, gradually translate the target PCBA board within the effective illumination range of the combined light source agent and the light transmission range of the main lens, and obtain a multi-view sub-image array of the target PCBA board with Mark points;

[0072] S32, using dense optical flow method to accurately locate, jointly displace and superimpose the Mark points of the multi-view sub-image array to obtain the refocusing parameters of the light field image; the refocusing parameters are expressed as , use the dense optical flow method to accurately locate the Mark points in the multi-view sub-image array, take multiple sub-images of a row or a column in the multi-view sub-image array, and perform joint displacement and superposition according to the rules. Use straight line light to pass through the same point of the object in different sub-images from the vertical direction. When the straight line is vertical, it indicates that it is in the focused state. When the straight line is in an inclined state, there is a different degree of out-of-focus blur, and joint displacement and superposition are required to achieve refocusing of the light field image, and record the refocusing parameters of each light field image. .

[0073] S4. Using the action variables of the electro-optic crystal meta-lens to intelligently control the position and refractive index of the electro-optic crystal meta-lens intelligent body, and using the light field layer-by-layer scanning technology and the optoelectronic intelligent frequency multiplexing modulation technology to obtain the depth parameters of the light field image;

[0074] S41. Adjust the position of the electro-optic crystal meta-lens intelligent body through the electro-optic crystal meta-lens action variables to achieve layer-by-layer focusing on components of different heights on the target PCBA board, and use the light field layer-by-layer scanning technology to calculate the depth of field in real time;

[0075] The action variable of the electro-optic crystal metalens is expressed as {u}_{3}=\left [ {{u}_{31},{u}_{32}} \right ] ,in The high-precision drive micro-motor used to control the meta-lens array dynamically adjusts the position of the meta-lens array. The meta-lens array can move back and forth behind the focal plane of the main lens to adjust the focal length, so as to achieve layer-by-layer focusing of components of different heights on the target PCBA board. The focal length of the electro-optical crystal meta-lens intelligent body The object distance from the secondary image and the secondary imaging distance The positional relationship between them satisfies the Gaussian formula:

[0076] ;

[0077] Under the Galileo type condition, the secondary imaging distance range is greater than half the focal length and less than one focal length;

[0078] S42, adjusting the refractive index of the electro-optic crystal through the action variables of the electro-optic crystal meta-lens, and obtaining the depth parameters of components of different heights on the target PCBA board using optoelectronic intelligent frequency multiplexing modulation technology;

[0079] Action variables of electro-optic crystal metalens The amount Through the transmission of the edge electrode of the electro-optic crystal, the frequency multiplexing modulation technology is used to perform photoelectric intelligent frequency multiplexing modulation on the light of different frequencies before reaching the image sensor, so that the transmittance of each focal point light on the metalens array is different, and the refractive index, phase and polarization state of the electro-optic crystal are intelligently controlled. The refractive index of the electro-optic crystal is in a power relationship with the modulated electric field, and the refractive index difference is:

[0080] ;

[0081] in Refractive index difference, is the electro-optic Kerr constant, is the vacuum wavelength of the incident light, To apply the electric field strength, the optoelectronic intelligent frequency multiplexing modulation technology based on the refractive index is used to focus the light of different frequencies of the electro-optical crystal and obtain the depth parameters of the components of different heights on the target PCBA board. .

[0082] S5. Build a 5D light field model of the intelligent superlens light field camera to obtain a 5D light field image of the target PCBA board;

[0083] S51. Construct a 5D light field model of the smart superlens light field camera to characterize the viewpoint image resolution and angular resolution.

[0084] Construct a 5D light field model of the smart superlens light field camera. The 5D light field model is expressed as ,in Characterizes the angular resolution, indicating that viewpoint images, Represents the viewpoint image resolution, indicating that the resolution of a single viewpoint image is , represents the time of combined displacement and superposition, such as Figure 3 As shown;

[0085] S52, jointly controlling multiple agents in real time, and adopting a segmentation method with maximum inter-class variance to obtain a 5D light field image of the target PCBA board;

[0086] The 5D light field image is represented as , the combined light source agent, the moving speed and direction of the object-carrying platform agent, the position and refractive index of the electro-optical crystal metalens agent and other multi-agents are jointly controlled in real time, and the Lighting parameters at the moment , refocusing parameters and depth parameters ; also obtained on the image sensor The multi-view images of the single color channel corresponding to the time, the refocused images of the single color channel and the depth map are used to obtain the 5D light field image of the target PCBA board using the segmentation method with the maximum inter-class variance. .

[0087] S6. Construct a spatiotemporal angular deep reinforcement learning model based on multi-agents, input the obtained illumination parameters, refocusing parameters, depth parameters and 5D light field images into the spatiotemporal angular deep reinforcement learning model, and output the multi-agent optimized collaborative control action;

[0088] S61. Construct a multi-agent-based spatiotemporal deep reinforcement learning model, and establish an optimization problem for multi-agent joint actions with optimal image quality evaluation;

[0089] exist At this moment, the illumination parameters, refocusing parameters, depth parameters and 5D light field image are jointly expressed as:

[0090] ;

[0091] The coordinated control actions of multiple agents are expressed as:

[0092] ;

[0093] The multi-agent strategy gradient (COMA) algorithm is used to build a multi-agent spatiotemporal deep reinforcement learning model. Figure 4 As shown in Figure 2, the spatiotemporal deep reinforcement learning model consists of three actor networks and one centralized critic network. The input of the model is , the output structural similarity index SSIM and root mean square error MSE for image quality evaluation are optimal, and the optimization process is:

[0094] initialization: Moment , agent strategies and a centralized global value function ;

[0095] Output: The best action (in At this moment, the optimal coordinated control action of multiple agents );

[0096] In order to promote the joint control of each agent in the multi-agent reinforcement learning scenario, the counterfactual multi-agent policy gradient (COMA) algorithm is used to introduce a counterfactual baseline to simulate the impact of the remaining agent choosing different actions on the structural similarity index SSIM under the premise of fixing the actions of two of the three agents, so as to more accurately measure the contribution of the current action and evaluate the multi-agent policy gradient update through the root mean square error MSE; then, the actions of the other two agents among the three agents are fixed in turn, and the contribution of the current action of the remaining agent is calculated; the structural similarity index SSIM is expressed as:

[0097] ;

[0098] in, and They are and Moment light field image and The average brightness, and They are and Moment light field image and The standard deviation of yes and Moment light field image and The covariance of and is a constant used to avoid zero denominator, usually and ,in and , is the dynamic range of pixel values;

[0099] The root mean square error MSE expression is:

[0100] ;

[0101] in , The values ​​are respectively in the horizontal resolution Vertical resolution Take values ​​within the range;

[0102] S62, using the actor network, extracting correlation features between illumination parameters, refocusing parameters, depth parameters and the 5D light field image in the time domain, space domain and angle domain, and outputting action variables of each agent;

[0103] In the spatial domain, a spatial separation convolution module is used to extract the spatial information correlation features of illumination parameters and 5D light field images, which are input into the actor1 network of the spatiotemporal angular deep reinforcement learning model to output the light source action variables of the combined light source agent. ;

[0104] In the angle domain, the angle separation convolution module is used to extract the refocusing parameters and the angle information correlation characteristics of the 5D light field image, which are input into the actor2 network of the spatiotemporal angle deep reinforcement learning model to output the action variables of the carrier platform. ;

[0105] In the time domain, the temporal pose estimation module is used to extract the temporal information correlation features of the depth parameters and the 5D light field image, which are input into the actor3 network of the spatiotemporal angle deep reinforcement learning model to output the action variables of the electro-optical crystal metalens. ;

[0106] S63, inputting illumination parameters, refocusing parameters, depth parameters, 5D light field images, light source action variables, object platform action variables, and electro-optic crystal meta-lens action variables into a centrally trained Critic network of a spatiotemporal angular deep reinforcement learning model, the centrally trained Critic network outputs a global value function with optimal image quality evaluation SSIM and MSE, and utilizing a policy gradient mechanism of centralized training and decentralized execution to implement a method for detecting circuit boards using an intelligent super-lens light field camera;

[0107] Using the Counterfactual Multi-Agent Policy Gradient (COMA) method, Time-of-day illumination parameters, refocusing parameters, depth parameters, 5D light field images and time , time The input is fed into the centrally trained critic network of the spatiotemporal deep reinforcement learning model, and a counterfactual benchmark is introduced to evaluate the actions taken by the combined light source agent, the platform agent, and the electro-optical crystal metalens agent. The contribution of each agent to the overall task completion is calculated based on the counterfactual benchmark formula. The global value function of the agent's contribution at the moment and policy gradient ,Will The policy gradient is input to the actor1, actor2 and actor3 networks, and the optimized joint action is gradually output. , to obtain the target PCBA board defect detection by light field camera.

[0108] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A circuit board detection method for an intelligent superlens light field camera based on deep reinforcement learning, characterized in that: The following steps are involved: S1. Construct a PCBA board detection model of an intelligent superlens light field camera, wherein the PCBA board detection model includes a carrier platform agent, a target PCBA board, a combined light source agent, a main lens, an electro-optical crystal superlens agent, and an image sensor, and the carrier platform agent is used to place the target PCBA board; S2, using the light source action variables to intelligently control the combined light source agent, and using the real-time global illumination model to obtain the illumination parameters of the target PCBA board surface; S3. Using the action variables of the object-carrying platform to intelligently control the moving speed and direction of the intelligent body of the object-carrying platform, using the dense optical flow method to accurately locate the target PCBA board, taking multiple sub-images of a row or a column in the multi-view sub-image array, and performing joint displacement and superposition according to a rule, using straight line light to pass through the same point of the object in different superimposed sub-images from the vertical direction, when the straight line should be in a vertical state, it indicates that it is in a focused state, and when the straight line is in an inclined state, there is a different degree of out-of-focus blur, and it is necessary to combine displacement and superposition again to achieve refocusing of the light field image, thereby obtaining the refocusing parameters of the light field image; S4. Using the action variables of the electro-optic crystal meta-lens to intelligently control the position and refractive index of the electro-optic crystal meta-lens intelligent body, and using the light field layer-by-layer scanning technology and the optoelectronic intelligent frequency multiplexing modulation technology to obtain the depth parameters of the light field image; S5. Build a 5D light field model of the intelligent superlens light field camera to obtain a 5D light field image of the target PCBA board; S6. Construct a spatiotemporal angular deep reinforcement learning model based on multi-agents, input the obtained illumination parameters, refocusing parameters, depth parameters and 5D light field images into the spatiotemporal angular deep reinforcement learning model, and output the multi-agent optimized collaborative control action; The step S2 comprises the following steps: S21, using the light source action variable to intelligently control the RGB ring light source illumination angle, color and brightness of the coaxial light source in the combined light source intelligent body; S22, using a real-time global illumination model to obtain illumination parameters of the target PCBA board surface, wherein establishing a real-time global illumination model is expressed as: I=I ambient +I diffuse +I specular ; Among them, I ambient is the ambient light component, I diffuse is the diffuse reflection component, I specular is the specular highlight component; I ambient The ambient light component formula is expressed as: I ambient =I a +K a ; Among them, I a is the ambient light intensity, K a is the ambient illumination coefficient; I diffuse The formula for the diffuse reflection component is expressed as: I diffuse =I d K d (NL); Among them, I d is the intensity of the light source, K d is the diffuse reflection coefficient, N is the surface normal vector, and L is the light source direction vector; L specular The formula for the specular highlight component is: I specular =K s (1 / rv) n ; Among them, K s (0≤K s ≤1) is the specular reflection coefficient of the material, r is the reflected light vector, indicating the direction of the light after being reflected on the surface of the object, v is the sight direction vector, indicating the direction of the main lens, and n is the specular index, indicating the glossiness of the surface of the object; the illumination parameter is denoted as s1, and the real-time global illumination model is used to measure and calculate the color difference between the light of the combined light source intelligent body and the reference light to obtain the illumination parameter s1=I of the combined light source intelligent body, which is used to characterize the quality of the color rendering of the combined light source intelligent body; The step S6 comprises the following steps: S61. Construct a multi-agent-based spatiotemporal deep reinforcement learning model, and establish an optimization problem for multi-agent joint actions with optimal image quality evaluation; S62, using the actor network, extracting correlation features of illumination parameters, refocusing parameters, depth parameters and 5D light field images in the time domain, space domain and angle domain respectively, and outputting action variables of each intelligent agent; S63, input the illumination parameters, refocusing parameters, depth parameters, 5D light field images, light source motion variables, object platform motion variables and electro-optic crystal meta-lens motion variables into the centrally trained critic network of the spatiotemporal angle deep reinforcement learning model, and output the centrally trained critic network to evaluate the image quality The optimal global value function of SSIM and MSE is used to realize the detection method of circuit boards by intelligent super-lens light field camera by using the policy gradient mechanism of centralized training and decentralized execution.

2. According to the method for detecting circuit boards of intelligent superlens light field cameras based on deep reinforcement learning in claim 1, it is characterized in that: The step S1 further comprises the following steps: Constructing the combined light source intelligent body including an RGB ring light source and a coaxial light source; Construct an electro-optic crystal meta-lens intelligent body, which is equipped with a meta-lens array and electro-optic crystal fusion body, a high-precision driving micro-motor and an external electric field.

3. The circuit board detection method of the intelligent superlens light field camera based on deep reinforcement learning according to claim 1 is characterized in that: The step S3 comprises the following steps: S31, using the platform motion variables to intelligently control the moving speed and direction of the platform agent, using the dense optical flow method for real-time detection and tracking, and obtaining a multi-view sub-image array of the target PCBA board that is gradually translated; S32. Use dense optical flow method to accurately locate, jointly displace and superimpose the Mark points of the multi-view sub-image array to obtain the refocusing parameters of the light field image.

4. The circuit board detection method of the intelligent superlens light field camera based on deep reinforcement learning according to claim 1 is characterized in that: The step S4 comprises the following steps: S41. Adjust the position of the electro-optic crystal meta-lens intelligent body through the electro-optic crystal meta-lens action variables to achieve layer-by-layer focusing on components of different heights on the target PCBA board, and use the light field layer-by-layer scanning technology to calculate the depth of field in real time; The positional relationship between the focal length f of the electro-optic crystal meta-lens intelligent body and the secondary imaging object distance A and the secondary imaging image distance B satisfies the Gaussian formula: 1 / A+1 / B=1 / f; Under the Galileo type condition, the secondary imaging distance range is greater than half the focal length and less than one focal length; S42. The refractive index of the electro-optic crystal is adjusted by the action variable of the electro-optic crystal meta-lens, and the depth parameters of components of different heights on the target PCBA board are obtained by using the optoelectronic intelligent frequency multiplexing modulation technology.

5. The circuit board detection method of the intelligent superlens light field camera based on deep reinforcement learning according to claim 1 is characterized in that: The step S5 comprises the following steps: S51. Construct a 5D light field model of the smart superlens light field camera to characterize the viewpoint image resolution and angular resolution. S52, jointly controlling multiple intelligent agents in real time, and adopting a segmentation method with maximum inter-class variance to obtain a 5D light field image of the target PCBA board.

Citation Information

Patent Citations

  • Optical field image processing method and optical field image processing device as well as optical field camera

    CN104683684A

  • Camera array-based light field microscopic imaging system and method

    CN104849852A