Dynamic detection method, device and equipment based on AOI full-inspection equipment and storage medium
By implementing dynamic detection methods on AOI full inspection equipment, including identifying and removing impurities in water droplets in the image, and optimizing image quality through adaptive light source adjustment, the problem of traditional 2D vision detection technology insufficient accuracy and susceptibility to ambient light interference when detecting micron-level components is solved, achieving a more efficient and reliable detection effect.
Patent Information
- Application Number
- CN202510235602.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-17
AI Technical Summary
Traditional 2D vision detection technology has problems such as insufficient accuracy, slow speed and susceptibility to ambient light when detecting micron-level components, which limits the reliability and stability of AOI full inspection equipment under the requirements of high precision and high speed production.
The dynamic detection method based on AOI full inspection equipment is adopted, and the images captured by the detection station are acquired and identified, and the images of the device to be detected are distinguished from impurity images. The intelligent water droplet removal and feature enhancement algorithm are used for decomposition processing, which compensates for image distortion caused by water droplets in real time, and optimizes image quality through adaptive light source adjustment.
It significantly improves the accuracy and efficiency of detection, enhances the reliability and stability of micron-level component detection, optimizes image quality, and provides more stable input for subsequent detection.
Smart Images

Figure CN120163787A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of visual inspection, and in particular, to a dynamic detection method, device, equipment, and storage medium based on an AOI full-inspection device. Background Art
[0002] Currently, in modern electronic manufacturing, AOI full-inspection equipment, as a key precision detection tool, occupies a very important position. The working principle of this equipment mainly relies on optical principles and incorporates advanced image processing technologies, enabling comprehensive and detailed visual inspection of various products. AOI full-inspection equipment not only improves production efficiency and product quality but also significantly reduces labor costs. In recent years, with the progress of image acquisition technology and the optimization of image processing algorithms, the application of AOI full-inspection equipment in the field of electronic manufacturing has become increasingly widespread, becoming a key link in ensuring product quality. Especially in the context of the development of emerging industries such as the Internet of Things, smart homes, and automotive electronics, the demand for high-precision and high-efficiency visual inspection is growing day by day, further highlighting the importance of AOI full-inspection equipment.
[0003] To solve the problem of visual inspection, the commonly used means currently mainly include: a 2D vision system combined with traditional image processing algorithms. These devices usually use high-resolution and high-frame-rate cameras for image acquisition and are combined with relatively simple image processing algorithms such as edge detection and threshold segmentation to identify and analyze defects in images. Also, by introducing advanced technologies such as deep learning, the intelligent level of image processing has been further improved, enhancing the accuracy of recognition and analysis.
[0004] One of the most common problems in the prior art is that traditional 2D visual inspection technologies have problems such as insufficient precision, slow speed, and susceptibility to environmental light interference when detecting micron-level components. These defects limit the reliability and stability of AOI full-inspection equipment in meeting the requirements of modern high-precision and high-speed production. Therefore, there is an urgent need for a new technical solution to solve this problem in order to improve the detection precision and efficiency of AOI full-inspection equipment. Summary of the Invention
[0005] In order to improve the precision and efficiency of AOI detection, this application provides a dynamic detection method, device, equipment, and storage medium based on an AOI full-inspection device.
[0006] The above-mentioned first invention object of this application is achieved through the following technical solutions: A dynamic detection method based on an AOI full-inspection device, the dynamic detection method based on an AOI full-inspection device includes: Obtain an image captured by a detection table, identify the image captured by the detection table, and obtain an image of a device to be detected and an impurity image; Identify the impurity image to obtain a water droplet impurity image, and perform impurity removal processing on the water droplet impurity image using a preset algorithm to obtain image data to be processed; Obtain image light source information from the image data to be processed, generate an adaptive light source adjustment instruction according to the image light source information, and adjust the direction and intensity of the light source according to the ambient light conditions; After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, obtain a threshold image to be adjusted, perform threshold adjustment algorithm calculation on the threshold image to be adjusted to obtain a component detection image, and detect the component detection image.
[0007] By adopting the above technical solution, by obtaining the image captured by the detection stage and identifying it, the image of the device to be detected and the impurity image can be distinguished. Further, the impurity image is further identified to extract the water droplet impurity image, and a preset intelligent water droplet removal and feature enhancement algorithm is used to perform impurity removal processing on it to obtain image data to be processed, and the image distortion caused by water droplets is compensated in real time through a specific calculation formula. For example, on an electronic component production line, water droplets may cause the image captured by the camera to be blurred or reflective. This algorithm can accurately identify and eliminate these interferences, so as to detect the true form of the component. Further, obtain image light source information from the image data to be processed, and generate an adaptive light source adjustment instruction according to this information, so as to actively adjust the direction and intensity of the light source according to the ambient light conditions to optimize the image quality. By dynamically adjusting the light source parameters, the reliability of detection is significantly improved. While optimizing the image quality, it also provides a more stable input for subsequent detection.
[0008] In a preferred example of the present application, it can be further configured as follows: The identification of the impurity image to obtain a water droplet impurity image, and the use of a preset algorithm to perform impurity removal processing on the water droplet impurity image to obtain image data to be processed specifically includes: Obtain the impurity position data corresponding to the water droplet impurity image, and obtain the impurity area data according to the impurity position data; Generate a compensation coefficient according to the impurity area data, and input the compensation coefficient and the impurity position data into the following formula to obtain the image repair data corresponding to the impurity position data: B(x, y) = A(x, y) - k·W(x, y), where N refers to the image repair data, A refers to the image data corresponding to the impurity position data, k is the compensation coefficient, and W(x, y) refers to the impurity position data; Replace the water droplet impurity image with the image repair data to obtain the image data to be processed.
[0009] By adopting the above technical solution, after obtaining the image captured by the detection table, it is recognized, the image of the device to be detected and the impurity image are separated. By further recognizing the impurity image, the water droplet impurity in the image is determined, and a preset intelligent impurity removal algorithm is used to process it. Through this formula calculation, the image repair data corresponding to the impurity position data is obtained and replaces the original water droplet impurity image, and finally the image data to be processed is obtained, thereby effectively removing the influence of the water droplet impurity on the image and significantly improving the image quality and the accuracy and reliability of subsequent detection steps.
[0010] In a preferred example of the present application, it can be further configured that: generating the compensation coefficient according to the impurity area data specifically includes: Obtain a preset coefficient compensation model, input the impurity area data into the coefficient compensation model for calculation, and obtain a coefficient compensation result; Generate the compensation coefficient according to the coefficient compensation result.
[0011] By adopting the above technical solution, by obtaining the impurity area data and inputting it into a preset coefficient compensation model for calculation to generate a coefficient compensation result, it is possible to output an optimal compensation coefficient for different impurity area data, so that the coefficient compensation result is further converted into an actual compensation coefficient for subsequent image repair calculation. At the same time, the dynamic adjustment and application of the compensation coefficient enable the system to better adapt to different detection scenarios, greatly improving the detection quality and stability.
[0012] In a preferred example of the present application, it can be further configured that: obtaining the image light source information from the image data to be processed, generating an adaptive light source adjustment instruction according to the image light source information to adjust the direction and intensity of the light source according to the ambient light conditions, specifically including: Obtain the current ambient light conditions from the image light source information and initialize the direction and intensity of the light source; Generate the adaptive light source adjustment instruction according to the current ambient light conditions.
[0013] By adopting the above technical solution, by analyzing the image light source information in the image data to be processed, the current ambient light conditions are obtained in real time, and the direction and intensity of the light source are initialized accordingly, so that the best configuration of the light source in the initial state can be obtained, reducing the decline in imaging quality caused by improper light source settings. Further, based on the obtained current ambient light conditions, an adaptive light source adjustment instruction is generated to realize the dynamic adjustment of the direction and intensity of the light source, so that the interference factors in the complex light environment, such as strong light, shadow or reflection, can be effectively resisted, thereby significantly improving the image quality and making the subsequent component detection more accurate and reliable.
[0014] In a preferred example, the present application can be further configured as follows: after obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, a threshold image to be adjusted is obtained. After performing a threshold adjustment algorithm calculation on the threshold image to be adjusted, a component detection image is obtained, and the component detection image is detected, specifically including: Obtain the image mean and image standard deviation in the threshold image to be adjusted; Input the image mean and the image standard deviation into the threshold adjustment algorithm for calculation to obtain an image processing threshold: Y = β·J + (1 - β)·S, where Y is the image processing threshold, β is a preset weight coefficient, J is the image mean, and S is the image standard deviation; Process the threshold image to be adjusted through the image processing threshold to obtain the component detection image.
[0015] By adopting the above technical solution, after obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, the obtained threshold image to be adjusted is further refined. By calculating the image mean and image standard deviation in the threshold image to be adjusted and inputting these two key parameters into the adaptive threshold adjustment algorithm, the optimal image processing threshold can be dynamically generated according to the statistical characteristics of real-time image data. The image processing threshold Y calculated by the threshold adjustment algorithm based on the image mean and standard deviation is jointly determined by the preset weight coefficient β, the image mean J, and the image standard deviation S, so that the threshold can be adaptively adjusted under different ambient light conditions, thereby significantly improving the flexibility and effect of image processing.
[0016] The second inventive object of the present application is achieved by the following technical solution: A dynamic detection device based on an AOI full-inspection device, the dynamic detection device based on the AOI full-inspection device includes: An impurity detection module, configured to obtain an image captured by a detection table, identify the image captured by the detection table, and obtain a device image to be detected and an impurity image; An image impurity removal module, configured to identify the impurity image to obtain a water droplet impurity image, and perform impurity removal processing on the water droplet impurity image by using a preset algorithm to obtain image data to be processed; A light source adjustment module, configured to obtain image light source information from the image data to be processed, generate an adaptive light source adjustment instruction according to the image light source information, and adjust the direction and intensity of the light source according to the ambient light conditions; The component detection module is used to obtain the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, obtain the image to be adjusted for threshold, perform threshold adjustment algorithm calculation on the image to be adjusted for threshold, obtain the component detection image, and detect the component detection image.
[0017] By adopting the above technical solution, by obtaining the image captured by the detection table and identifying it, it is possible to distinguish the image of the device to be detected and the impurity image. Further, the impurity image is further identified, the water droplet impurity image is extracted, and the preset intelligent water droplet removal and feature enhancement algorithm is used to perform impurity removal processing on it to obtain the image data to be processed, and the image distortion caused by water droplets is compensated in real time through a specific calculation formula. For example, on an electronic component production line, water droplets may cause the image captured by the camera to be blurred or reflected. This algorithm can accurately identify and remove these interferences, so as to be able to detect the true form of the component. Further, the image light source information is obtained from the image data to be processed, and the adaptive light source adjustment instruction is generated according to this information, so as to actively adjust the direction and intensity of the light source according to the ambient light conditions to optimize the image quality. By dynamically adjusting the light source parameters, the reliability of detection is significantly improved. While optimizing the image quality, it also provides a more stable input for subsequent detection.
[0018] The above object three of the present application is achieved by the following technical solution: A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above dynamic detection method based on the AOI full inspection device are implemented.
[0019] The above object four of the present application is achieved by the following technical solution: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above dynamic detection method based on the AOI full inspection device are implemented.
[0020] In summary, the present application includes at least one of the following beneficial technical effects: 1. By acquiring the images captured by the detection stage and identifying them, it is possible to distinguish the images of the devices to be detected and the impurity images. Further, by further identifying the impurity images, the water droplet impurity images are extracted, and a preset intelligent water droplet removal and feature enhancement algorithm is used to perform impurity removal processing on them, obtaining the image data to be processed. And the image distortion caused by water droplets is compensated in real time through a specific calculation formula. For example, on an electronic component production line, water droplets may cause the images captured by the camera to be blurred or reflective. This algorithm can accurately identify and remove these interferences, so as to detect the true form of the component. Further, the image light source information is obtained from the image data to be processed, and adaptive light source adjustment instructions are generated based on this information, so as to actively adjust the direction and intensity of the light source according to the ambient light conditions to optimize the image quality. By dynamically adjusting the light source parameters, the reliability of detection is significantly improved. While optimizing the image quality, it also provides a more stable input for subsequent detection; 2. After acquiring the images captured by the detection stage, identify them, separate the images of the devices to be detected and the impurity images. By further identifying the impurity images, determine the water droplet impurities in the images, and use a preset intelligent impurity removal algorithm to process them. Through this formula calculation, the image repair data corresponding to the impurity position data is obtained and replaces the original water droplet impurity image, and finally the image data to be processed is obtained, thus effectively removing the influence of water droplet impurities on the image, and significantly improving the image quality and the accuracy and reliability of subsequent detection steps. 3. After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, further refine the obtained image to be adjusted threshold. By calculating the image mean and image standard deviation in the image to be adjusted threshold, and by inputting these two key parameters into the adaptive threshold adjustment algorithm, it is possible to dynamically generate the optimal image processing threshold according to the statistical characteristics of the real-time image data. The image processing threshold Y calculated by the threshold adjustment algorithm based on the image mean and standard deviation is jointly determined by the preset weight coefficient β, the image mean J, and the image standard deviation S, so that under different ambient light conditions, the threshold can be adjusted adaptively, thus significantly improving the flexibility and effect of image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flowchart of a dynamic detection method based on an AOI full-inspection device in an embodiment of the present application; Figure 2 is an implementation flowchart of method step S20 in the dynamic detection based on an AOI full-inspection device in an embodiment of the present application; Figure 3 is an implementation flowchart of method step S22 in the dynamic detection based on an AOI full-inspection device in an embodiment of the present application; Figure 4It is a flowchart of the implementation of method step S30 in the dynamic detection based on the AOI full-inspection device in an embodiment of the present application; Figure 5 It is a flowchart of the implementation of method step S40 in the dynamic detection based on the AOI full-inspection device in an embodiment of the present application; Figure 6 It is a principle block diagram of a dynamic detection system based on the AOI full-inspection device in an embodiment of the present application; Figure 7 It is a schematic diagram of the device in an embodiment of the present application. Detailed implementation manners
[0022] The present application will be further described in detail below with reference to the accompanying drawings.
[0023] In one embodiment, as Figure 1 shown, the present application discloses a dynamic detection method based on an AOI full-inspection device, which specifically includes the following steps: S10: Obtain the images taken by the inspection table, identify the images taken by the inspection table, and obtain the images of the devices to be detected and the impurity images.
[0024] In this embodiment, the images taken by the inspection table refer to the images carrying components taken on the inspection table of the AOI inspection device. The images of the devices to be detected refer to the images of the components that need to be detected by the AOI inspection device. The impurity images refer to the images corresponding to the impurities in the images taken by the inspection table.
[0025] Specifically, in the process of detecting components through the AOI inspection device, the manipulator on the device is controlled to clamp the corresponding components to the shooting device for shooting, so as to obtain the images taken by the inspection table.
[0026] Further, the images taken by the inspection table are identified by a preset component identification model to determine the range of the components in the images taken by the inspection table. The images in this range are used as the images of the devices to be detected, and the parts in the images of the devices to be detected that cannot detect the corresponding components are used as the impurity images, such as the images corresponding to reflections, water droplets formed in a complex environment, and impurities. Among them, the component identification model can be a model trained by the images of the components of this batch model.
[0027] S20: Identify the impurity images to obtain water droplet impurity images, and use a preset algorithm to remove impurities from the water droplet impurity images to obtain the image data to be processed.
[0028] In this embodiment, the image data to be processed refers to the images that need to be processed by the light source.
[0029] Specifically, in order to eliminate impurities and water droplets in the image of the device to be detected, the impurity image is identified to obtain the corresponding impurity image and / or water droplet image as the water droplet impurity image, so that a preset algorithm can be used to accurately remove impurities from the water droplet impurity image, repair the water droplet impurity image in the graph, and then obtain the image data to be processed.
[0030] S30: Obtain image light source information from the image data to be processed, generate an adaptive light source adjustment instruction according to the image light source information, and adjust the direction and intensity of the light source according to the ambient light conditions.
[0031] In this embodiment, the image light source information refers to the data reflecting the external light conditions in the image during image capture.
[0032] Specifically, obtain the light source information external to the detection stage when taking the image from the information such as color and brightness in the image data to be processed, that is, the external ambient light conditions, so as to generate the adaptive light source adjustment instruction to adjust the light source direction, color, and brightness intensity in the image, so that the component image can be clearer during subsequent detection.
[0033] S40: After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, obtain the image to be adjusted threshold image, perform threshold adjustment algorithm calculation on the image to be adjusted threshold image, obtain the component detection image, and detect the component detection image.
[0034] Specifically, after adjusting the color and brightness and other information in the image data to be processed according to the adaptive light source adjustment instruction, trigger the light source adjustment feedback, and then obtain the image to be adjusted threshold image. Calculate the image to be adjusted threshold image through the threshold adjustment algorithm to obtain the threshold during image recognition processing, and perform image recognition according to the threshold to obtain the component detection image, and perform relevant detection on the component detection image.
[0035] In this embodiment, by acquiring the images captured by the detection platform and identifying them, it is possible to distinguish the images of the devices to be detected and the impurity images. For the impurity images on the right side of the gold, further identify the impurity images, extract the water droplet impurity images, and use a preset intelligent water droplet removal and feature enhancement algorithm to perform impurity removal processing on them to obtain the image data to be processed, and compensate for the image distortion caused by water droplets in real time through a specific calculation formula. For example, on an electronic component production line, water droplets may cause the images captured by the camera to be blurred or reflective. This algorithm can accurately identify and remove these interferences, so as to be able to detect the true form of the components. Further, obtain the image light source information from the image data to be processed, and generate an adaptive light source adjustment instruction according to this information, so as to actively adjust the direction and intensity of the light source according to the ambient light conditions to optimize the image quality. By dynamically adjusting the light source parameters, the reliability of detection is significantly improved. While optimizing the image quality, it also provides a more stable input for subsequent detection.
[0036] In one embodiment, as Figure 2 shown, in step S20, that is, identify the impurity image to obtain the water droplet impurity image, and use a preset algorithm to perform impurity removal processing on the water droplet impurity image to obtain the image data to be processed, which specifically includes: S21: Obtain the impurity position data corresponding to the water droplet impurity image, and obtain the impurity area data according to the impurity position data.
[0037] In this embodiment, the impurity position data refers to the specific position of the identified impurity in the image of the device to be detected. The impurity area data refers to the area occupied by the impurity part in the image of the device to be detected.
[0038] Specifically, obtain the coordinates of the impurity edge in the water droplet impurity image as the impurity position data. Further, generate the edge contour of the water droplet impurity according to the coordinates of the impurity edge, and calculate the impurity area data according to the edge contour.
[0039] S22: Generate a compensation coefficient according to the impurity area data, and input the compensation coefficient and the impurity position data into the following formula to obtain the image restoration data corresponding to the impurity position data: B(x, y) = A(x, y) - k·W(x, y), where N refers to the image restoration data, A refers to the image data corresponding to the impurity position data, k is the compensation coefficient, and W(x, y) refers to the impurity position data.
[0040] Specifically, generate a corresponding compensation coefficient according to the area size in the impurity area data, and input the compensation coefficient into the formula. Use W(x,y) to identify the impurity position data, and use the compensation coefficient to repair the image data at the impurity position, and then obtain the image restoration data.
[0041] S23: Replace the water droplet impurity image with the image restoration data to obtain the image data to be processed.
[0042] Specifically, after calculating the image restoration data, that is, after repairing the image at the position of the water droplet impurities, replace the repaired image with the water droplet impurity image, so as to obtain the image data to be processed.
[0043] In one embodiment, as Figure 3 shown, in step S22, that is, generating a compensation coefficient according to the impurity area data, specifically including: S221: Obtain a preset coefficient compensation model, input the impurity area data into the coefficient compensation model for calculation, and obtain a coefficient compensation result.
[0044] In this embodiment, the coefficient compensation model refers to a model used to calculate the corresponding compensation coefficient according to the size of the impurity.
[0045] Specifically, according to the historical records of repairing impurity images, obtain the correlation relationship between the impurity area, impurity color and the corresponding compensation coefficient from the records, so as to train and obtain the coefficient compensation model.
[0046] Further, input the impurity area data and impurity color into the coefficient compensation model for calculation, so as to obtain the correlation relationship between the compensation coefficient and the impurity area data as the coefficient compensation result.
[0047] S222: Generate a compensation coefficient according to the coefficient compensation result.
[0048] Specifically, according to the coefficient compensation result, that is, the correlation relationship, calculate the compensation coefficient.
[0049] In one embodiment, as Figure 4 shown, in step S30, that is, obtaining image light source information from the image data to be processed, generating an adaptive light source adjustment instruction according to the image light source information to adjust the direction and intensity of the light source according to the environmental light conditions, specifically including: S31: Obtain the current environmental light conditions from the image light source information and initialize the direction and intensity of the light source.
[0050] Specifically, from the repaired image to be processed, obtain the information of the light source in the image, that is, the color, reflection and light direction in the image as the current environmental light conditions. Further, after obtaining the current environmental light conditions, convert the current environmental light conditions into image color values and initialize the image color values.
[0051] S32: Generate an adaptive light source adjustment instruction according to the current environmental light conditions.
[0052] Specifically, after initialization, according to the current ambient light conditions, the adaptive light source adjustment instruction is issued to adjust the image color in the image captured by the current detection stage, and the light intensity and direction of the external light are adjusted to facilitate improving the image quality during subsequent shooting. In one embodiment, as Figure 5 shown, in step S40, that is, after obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, an image to be adjusted threshold image is obtained. After performing a threshold adjustment algorithm calculation on the image to be adjusted threshold image, a component detection image is obtained, and the component detection image is detected. Specifically, it includes: S41: Obtain the image mean and image standard deviation in the image to be adjusted threshold image.
[0053] Specifically, perform image processing on the image to be adjusted threshold image, such as binary processing, etc., to obtain the image mean and image standard deviation of the image.
[0054] S42: Input the image mean and image standard deviation into the threshold adjustment algorithm for calculation to obtain an image processing threshold: Y = β·J + (1 - β)·S, where Y is the image processing threshold, β is a preset weight coefficient, J is the image mean, and S is the image standard deviation.
[0055] Specifically, by setting the corresponding weight coefficient and inputting the image mean and image standard deviation into the threshold adjustment algorithm for calculation, the image can be adaptively processed under different light source conditions, thereby improving the flexibility of image processing.
[0056] S43: Process the image to be adjusted threshold image with the image processing threshold to obtain a component detection image.
[0057] Specifically, after obtaining the image processing threshold, use the image processing threshold to perform image processing on the image to be adjusted threshold image to obtain the component detection image.
[0058] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0059] In one embodiment, a dynamic detection device based on an AOI full-inspection device is provided. The dynamic detection device based on the AOI full-inspection device corresponds one-to-one with the dynamic detection method based on the AOI full-inspection device in the above embodiment. As Figure 6 shown, the dynamic detection device based on the AOI full-inspection device includes an impurity detection module, an image impurity removal module, a light source adjustment module, and a component detection module. The detailed description of each functional module is as follows: An impurity detection module, which is used to obtain the images captured by the detection table, identify the images captured by the detection table, and obtain the device image to be detected and the impurity image; An image impurity removal module, which is used to identify the impurity image to obtain the water droplet impurity image, and perform impurity removal processing on the water droplet impurity image by using a preset algorithm to obtain the image data to be processed; A light source adjustment module, which is used to obtain the image light source information from the image data to be processed, generate an adaptive light source adjustment instruction according to the image light source information, so as to adjust the direction and intensity of the light source according to the ambient light conditions; A component detection module, which is used to obtain the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, obtain the image to be adjusted threshold image, perform threshold adjustment algorithm calculation on the image to be adjusted threshold image, obtain the component detection image, and detect the component detection image.
[0060] Optionally, the image impurity removal module includes: An impurity area acquisition sub-module, which is used to obtain the impurity position data corresponding to the water droplet impurity image, and obtain the impurity area data according to the impurity position data; An image restoration sub-module, which is used to generate a compensation coefficient according to the impurity area data, input the compensation coefficient and the impurity position data into the following formula to obtain the image restoration data corresponding to the impurity position data: B(x, y) = A(x, y) - k·W(x, y), where N refers to the image restoration data, A refers to the image data corresponding to the impurity position data, k is the compensation coefficient, and W(x, y) refers to the impurity position data; An image replacement sub-module, which is used to replace the water droplet impurity image with the image restoration data to obtain the image data to be processed.
[0061] Optionally, the image restoration sub-module includes: A model calculation unit, which is used to obtain a preset coefficient compensation model, input the impurity area data into the coefficient compensation model for calculation, and obtain a coefficient compensation result; A coefficient acquisition unit. It is used to generate a compensation coefficient according to the coefficient compensation result.
[0062] Optionally, the light source adjustment module includes: A light source initialization sub-module, which is used to obtain the current ambient light conditions from the image light source information and initialize the direction and intensity of the light source; A light source adjustment sub-module, which is used to generate an adaptive light source adjustment instruction according to the current ambient light conditions.
[0063] Optionally, the component detection module includes: An image calculation sub-module, which is used to obtain the image mean and image standard deviation in the image to be adjusted threshold image; A threshold calculation sub-module, configured to input an image mean value and an image standard deviation into a threshold adjustment algorithm for calculation to obtain an image processing threshold: Y = β·J + (1 - β)·S, where Y is the image processing threshold, β is a preset weight coefficient, J is the image mean value, and S is the image standard deviation; An image detection sub-module, configured to process an image with a threshold to be adjusted through the image processing threshold to obtain a component detection image.
[0064] For the specific limitations of the dynamic detection device based on the AOI full-inspection device, reference can be made to the limitations of the dynamic detection method based on the AOI full-inspection device in the above text, which will not be elaborated here. Each module in the above dynamic detection device based on the AOI full-inspection device can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above-mentioned modules.
[0065] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 7 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a dynamic detection method based on an AOI full-inspection device.
[0066] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: Obtain an image captured by a detection table, identify the image captured by the detection table to obtain an image of a device to be detected and an impurity image; Identify the impurity image to obtain a water droplet impurity image, and perform impurity removal processing on the water droplet impurity image by using a preset algorithm to obtain image data to be processed; Obtain image light source information from the image data to be processed, generate an adaptive light source adjustment instruction according to the image light source information, so as to adjust the direction and intensity of the light source according to the environmental light conditions; After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, a threshold image to be adjusted is obtained. After performing threshold adjustment algorithm calculation on the threshold image to be adjusted, a component detection image is obtained, and the component detection image is detected.
[0067] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Obtain the image captured by the detection table, identify the image captured by the detection table, and obtain the device image to be detected and the impurity image; Identify the impurity image to obtain a water droplet impurity image, and perform impurity removal processing on the water droplet impurity image using a preset algorithm to obtain the image data to be processed; Obtain the image light source information from the image data to be processed, generate an adaptive light source adjustment instruction according to the image light source information, so as to adjust the direction and intensity of the light source according to the environmental light conditions; After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, a threshold image to be adjusted is obtained. After performing threshold adjustment algorithm calculation on the threshold image to be adjusted, a component detection image is obtained, and the component detection image is detected.
[0068] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0069] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0070] The above-described 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 foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A dynamic detection method based on AOI full inspection equipment, characterized in that: The dynamic detection method based on AOI full inspection equipment includes: Acquire the image taken by the detection platform, identify the image taken by the detection platform, and obtain the image of the device to be detected and the impurity image; Identify the impurity image to obtain a water drop impurity image, and use a preset algorithm to remove impurities from the water drop impurity image to obtain image data to be processed; Acquire image light source information from the image data to be processed, and generate an adaptive light source adjustment instruction according to the image light source information to adjust the direction and intensity of the light source according to the ambient light conditions; After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, a threshold image to be adjusted is obtained, and after the threshold adjustment algorithm is calculated on the threshold image to be adjusted, a component detection image is obtained, and the component detection image is detected.
2. The dynamic detection method based on AOI full inspection equipment according to claim 1 is characterized in that: The step of identifying the impurity image to obtain a water drop impurity image and removing impurities from the water drop impurity image using a preset algorithm to obtain image data to be processed specifically includes: Acquire impurity position data corresponding to the water drop impurity image, and acquire impurity area data according to the impurity position data; Generate a compensation coefficient according to the impurity area data, input the compensation coefficient and the impurity position data into the following formula to obtain the image restoration data corresponding to the impurity position data: B(x, y) = A(x, y) - k·W(x, y), wherein N refers to the image restoration data, A refers to the image data corresponding to the impurity position data, k is the compensation coefficient, and W(x, y) refers to the impurity position data; The water drop impurity image is replaced by the image restoration data to obtain the image data to be processed.
3. The dynamic detection method based on AOI full inspection equipment according to claim 2 is characterized in that: Generating a compensation coefficient according to the impurity area data specifically includes: Obtaining a preset coefficient compensation model, inputting the impurity area data into the coefficient compensation model for calculation, and obtaining a coefficient compensation result; The compensation coefficient is generated according to the coefficient compensation result.
4. The dynamic detection method based on AOI full inspection equipment according to claim 1 is characterized in that: The acquiring of image light source information from the image data to be processed and generating an adaptive light source adjustment instruction according to the image light source information to adjust the direction and intensity of the light source according to the ambient light conditions specifically includes: Obtaining the current ambient lighting conditions from the image light source information, and initializing the direction and intensity of the light source; The adaptive light source adjustment instruction is generated according to the current ambient light condition.
5. The dynamic detection method based on AOI full inspection equipment according to claim 1 is characterized in that: After obtaining the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, a threshold image to be adjusted is obtained, a threshold adjustment algorithm is performed on the threshold image to be adjusted, a component detection image is obtained, and the component detection image is detected, specifically including: Obtaining an image mean and an image standard deviation in the threshold image to be adjusted; The image mean and the image standard deviation are input into the threshold adjustment algorithm for calculation to obtain the image processing threshold: Y=β·J+ (1 - β) ·S, where Y is the image processing threshold, β is a preset weight coefficient, J is the image mean, and S is the image standard deviation; The threshold image to be adjusted is processed by using the image processing threshold to obtain the component detection image.
6. A dynamic detection device based on AOI full inspection equipment, characterized in that: The dynamic detection device based on AOI full inspection equipment includes: An impurity detection module is used to obtain an image taken by a detection platform, identify the image taken by the detection platform, and obtain an image of the device to be detected and an impurity image; An image impurity removal module is used to identify the impurity image to obtain a water drop impurity image, and to remove impurities from the water drop impurity image using a preset algorithm to obtain image data to be processed; A light source adjustment module, used to obtain image light source information from the image data to be processed, and generate an adaptive light source adjustment instruction according to the image light source information to adjust the direction and intensity of the light source according to the ambient light conditions; The component detection module is used to obtain the light source adjustment feedback corresponding to the adaptive light source adjustment instruction, obtain the threshold image to be adjusted, calculate the threshold adjustment algorithm for the threshold image to be adjusted, obtain the component detection image, and detect the component detection image.
7. The dynamic detection device based on AOI full inspection equipment according to claim 6 is characterized in that: The image removal module comprises: An impurity area acquisition submodule, used to acquire impurity position data corresponding to the water drop impurity image, and acquire impurity area data according to the impurity position data; The image restoration submodule is used to generate a compensation coefficient according to the impurity area data, and input the compensation coefficient and the impurity position data into the following formula to obtain the image restoration data corresponding to the impurity position data: B(x, y) = A(x, y) - k·W(x, y), wherein N refers to the image restoration data, A refers to the image data corresponding to the impurity position data, k is the compensation coefficient, and W(x, y) refers to the impurity position data; The image replacement submodule is used to replace the water drop impurity image with the image repair data to obtain the image data to be processed.
8. The dynamic detection device based on AOI full inspection equipment according to claim 7 is characterized in that: The image restoration submodule comprises: A model calculation unit, used for obtaining a preset coefficient compensation model, inputting the impurity area data into the coefficient compensation model for calculation, and obtaining a coefficient compensation result; A coefficient acquisition unit is used to generate the compensation coefficient according to the coefficient compensation result.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the dynamic detection method based on AOI full inspection equipment as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the dynamic detection method based on AOI full inspection equipment as claimed in any one of claims 1 to 5 are implemented.