Method based on polychromatic light DIP board preprocessing and defect classification
Through the pre-processing and defect classification method of DIP board based on multi-color light, combined with RGB three-color light source and deep learning model, the problems of low efficiency and insufficient accuracy of traditional detection methods are solved, and efficient and accurate DIP chip board defect detection is achieved.
Patent Information
- Application Number
- CN202411623823.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional DIP chip board defect detection methods rely on low manual inspection efficiency, easy to miss and miss detection. Computer vision-based systems lack the ability to identify complex defects, and detection accuracy needs to be further improved.
The DIP board preprocessing and defect classification methods based on multi-color light are adopted, including image acquisition, color normalization, image preprocessing, feature extraction and defect classification modules, and detection is performed using RGB three-color light sources and deep learning models (such as Yolov8).
Through the combination of multi-color light irradiation and deep learning models, detection accuracy and efficiency are significantly improved, and different types of defects can be accurately identified and adapted to the detection requirements of different specifications and types of DIP chip boards.
Smart Images

Figure CN119438215A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electronic product detection, and in particular to a method for preprocessing and defect classification of a DIP board based on polychromatic light. Background Art
[0002] DIP chips are widely used in the electronics manufacturing industry, and their quality is directly related to the performance and reliability of electronic products.
[0003] Traditional DIP chip board defect detection methods mainly rely on manual inspection, but due to the low efficiency of manual inspection, easy to miss and misdetect, it is difficult to meet the requirements of high efficiency and high precision of modern manufacturing. With the development of machine vision technology, DIP chip board defect detection systems based on computer vision have gradually been applied, but these systems still have insufficient capabilities in complex defect recognition, and the detection accuracy also needs to be further improved.
[0004] To address the above issues, we have introduced a method for DIP board preprocessing and defect classification based on multi-color light. Summary of the invention
[0005] The invention discloses a method for preprocessing and defect classification of a DIP board based on polychromatic light, aiming to solve the technical problems in the background technology.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions: A method for preprocessing and defect classification of DIP boards based on polychromatic light, comprising the following steps: S1. First determine the expected performance indicators, evaluate the current status of manual inspection and computer vision-based defect detection methods, analyze the main problems of these methods, list the technical problems that need to be solved in the project, such as improving image quality, enhancing defect area contrast, improving detection accuracy, etc., evaluate the feasibility of the technical solution, and consider the cost, technical difficulty and time required; S2. Design the overall architecture of the system, determine the main modules, including image acquisition module, color normalization module, image preprocessing module, feature extraction module and defect classification module, define the specific functions and input and output of each module in detail, select suitable hardware, and select or develop suitable software tools to ensure that all parts of the system can work together efficiently; S3. Select RGB three-color light source and ensure its uniformity and stability, arrange the light source reasonably so that it can illuminate the DIP chip board from different angles, test the impact of different light source angles and intensities on image quality, select a suitable high-resolution camera to ensure that high-quality images can be collected, and adjust the camera parameters to optimize the image effect, set the frequency and interval of image acquisition to ensure full coverage of all areas of the DIP chip board, realize the automation of image acquisition through programming, improve acquisition efficiency, and store the collected image data to ensure data integrity and traceability; S4. Use RGB three-color light to collect images of the DIP chip board under different light sources, provide the normalization formula of RGB three-color light, write the color normalization algorithm code, and test its effect on different images. Adjust the parameters of the normalization formula through experiments to find the optimal normalization effect, record the optimization process and results, and provide reference for subsequent steps; S5. Use appropriate noise reduction algorithms to reduce the noise of the collected images, test different parameters to find the best noise reduction effect, enhance the image contrast through different image enhancement algorithms, evaluate the quality of the enhanced image to ensure that the defect area is more obvious, convert the color image to a grayscale image to reduce the data dimension, and further convert it to a binary image to highlight the defect area, use corrosion and expansion operations to remove small holes in the image to ensure the integrity of the DIP components, and optimize the parameters of these operations to ensure that the accuracy of defect detection is not affected; S6. Use the Canny operator for feature extraction. Select the Canny operator and understand its working principle in detail. Use the Gaussian filter to smooth the image and reduce noise while ensuring that important information is not lost. Calculate the gradient amplitude and direction of the image. Determine the best parameters through experiments. Use non-maximum suppression to refine the edges and remove redundant edges to ensure that the edges are clearer. Use dual threshold detection to connect the edges and suppress noise. Select appropriate high and low thresholds to ensure the continuity and accuracy of the edges. S7. Select Yolov8 as the deep learning model, and learn about its structure and working principle in detail. Collect and annotate different types of DIP chip board defect images, ensure sample balance to improve model generalization ability, write training scripts, configure parameters and conduct multiple trainings, record loss values and accuracy, optimize model performance by adjusting hyperparameters, and evaluate its accuracy and stability on the validation set. Use the test set to verify the performance of the model in actual applications, record the results and make necessary adjustments and improvements. S8, integrates modules such as image acquisition, color normalization, image preprocessing, feature extraction and defect classification to ensure smooth data transmission, test the functions of each module, record and fix problems, verify the detection speed, accuracy and stability of the system, compare with traditional methods, deploy the system to the actual production environment, collect operator feedback, and continuously optimize.
[0007] The step S1 can be refined as follows: S11. The project aims to improve the efficiency and accuracy of DIP chip board defect detection and determine the expected performance indicators; S12. Evaluate the status of current manual inspection and computer vision-based defect detection methods, and analyze the main problems of these methods; S13. List the technical problems that need to be solved in the project, including improving image quality, enhancing the contrast of defective areas, improving detection accuracy, etc., determine the feasibility of the technical solution, and consider the cost, technical difficulty and time required.
[0008] The step S2 can be refined as follows: S21. Design the overall architecture of the DIP chip board defect detection system based on polychromatic light, and determine the main modules, including image acquisition module, color normalization module, image preprocessing module, feature extraction module, defect classification module, etc.; S22, define the specific functions and input and output of each module in detail; S23. Select appropriate hardware and choose or develop appropriate software tools.
[0009] The step S3 can be refined as follows: S31. Select RGB three-color light source to ensure the uniformity and stability of the light source, plan the arrangement of the light source so that it can illuminate the DIP chip board from different angles, and test the impact of different light source angles and intensities on image quality; S32. Select a suitable high-resolution camera to ensure that high-quality images can be collected and adjust the camera parameters; S33. Set the frequency and interval of image acquisition to ensure that all areas of the DIP chip board can be fully covered. Automate image acquisition through programming to improve acquisition efficiency, store the acquired image data, and ensure data integrity and traceability.
[0010] The step S4 can be refined as follows: S41. Use RGB three-color light to collect images of the DIP chip board under different light sources. Different colors of light have different inclinations, and the reflected light obtained is also different. Red light indicates that the slope of the illuminated object surface is the largest. S42. Provide a normalization formula for RGB three-color light, write a color normalization algorithm code, and test its effect on different images; S43. Adjust the parameters of the normalization formula through experiments to find the optimal normalization effect, record the optimization process and results, and provide a reference for subsequent steps.
[0011] The step S5 can be refined as follows: S51, using an appropriate noise reduction algorithm to perform noise reduction processing on the collected image, testing different noise reduction parameters, and finding the best noise reduction effect; S52. Enhance the contrast of the image through different image enhancement algorithms, evaluate the quality of the enhanced image, and ensure that the defect area is more obvious; S53, converting the color image into a grayscale image to reduce the data dimension, and further converting the grayscale image into a binary image to highlight the defect area; S54. Use corrosion and expansion operations to remove small holes in the image, ensure the integrity of DIP components, and optimize the parameters of corrosion and expansion to ensure that the accuracy of defect detection is not affected.
[0012] The step S6 can be refined as follows: S61, select the Canny operator as the feature extraction algorithm, and describe the working principle and steps of the Canny operator in detail; S62, using a Gaussian filter to smooth the image, reduce noise, and adjust the parameters of the Gaussian filter to ensure that the image does not lose important information while denoising; S63, calculating the gradient amplitude and direction of the image, and determining the optimal parameters for gradient calculation through experiments; S64. Use non-maximum suppression to refine edges, remove redundant edges, evaluate the effect of non-maximum suppression, and ensure that edges are clearer; S65. Use dual thresholds to detect connected edges and suppress noise, and select appropriate high and low thresholds to ensure edge continuity and accuracy.
[0013] The step S7 can be refined as follows: S71. Select Yolov8 as the deep learning model for defect classification, and describe the structure and working principle of Yolov8 in detail; S72. Collect different types of DIP chip board defect images and annotate the data to ensure a balanced number of positive and negative samples and improve the generalization ability of the model; S73. Write a training script, configure training parameters, perform multiple iterations of training, and record the loss value and accuracy during the training process; S74. Optimize model performance by adjusting the model's hyperparameters and evaluate the performance of the optimized model on the validation set to ensure its accuracy and stability. S75. Use the test set to verify the performance of the model, evaluate the accuracy and efficiency in practical applications, record the test results, and make necessary adjustments and improvements.
[0014] The step S8 can be refined as follows: S81. Integrate each module (image acquisition, color normalization, image preprocessing, feature extraction, defect classification) into a complete system and ensure smooth data transmission and processing between modules without bottlenecks; S82. Test each functional module of the system to ensure its normal operation, record problems found during the test, and perform debugging and repair; S83, test the detection speed, accuracy and stability of the system, compare it with the traditional method, and verify the advantages of this method; S84. Deploy the system to the actual production environment, conduct on-site testing, record the operation status, collect feedback from operators, and conduct continuous optimization.
[0015] The method for preprocessing and defect classification of DIP boards based on polychromatic light provided by the present invention has the following advantages: The present invention uses a multicolor light source for illumination, which can provide richer image information and help improve the accuracy of subsequent processing. Through color normalization and image preprocessing, the key features in the image are more prominent, thereby significantly improving the detection efficiency. Using a deep learning algorithm for defect classification, different types of defects, such as notches, scratches, bent pins, and cold solder joints, can be accurately identified, further improving the accuracy of detection. In addition, the present invention is easy to implement and expand, can adapt to the detection needs of DIP chip boards of different specifications and types, and has good versatility and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention provides a schematic diagram of the overall process of a method for preprocessing and defect classification of DIP boards based on polychromatic light.
[0017] Figure 2 This is a schematic diagram of the detailed flow of step S1 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0018] Figure 3 This is a schematic diagram of the detailed flow of step S2 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0019] Figure 4 This is a schematic diagram of the detailed flow of step S3 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0020] Figure 5 This is a schematic diagram of the detailed flow of step S4 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0021] Figure 6This is a schematic diagram of the detailed flow of step S5 of the method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0022] Figure 7 This is a schematic diagram of the detailed flow of step S6 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0023] Figure 8 This is a schematic diagram of the detailed flow of step S7 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention.
[0024] Fig. 9 This is a schematic diagram of the detailed flow of step S8 of a method for preprocessing and defect classification of DIP boards based on multi-color light proposed by the present invention. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application usually described and marked in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0026] The invention discloses a method for preprocessing and defect classification of a DIP board based on polychromatic light.
[0027] Reference Figure 1 , Figure 2 , Figure 3 and Figure 4 As shown, a method for preprocessing and defect classification of DIP boards based on multi-color light includes the following steps: S1. First determine the expected performance indicators, evaluate the current status of manual inspection and computer vision-based defect detection methods, analyze the main problems of these methods, list the technical problems that need to be solved in the project, such as improving image quality, enhancing defect area contrast, improving detection accuracy, etc., evaluate the feasibility of the technical solution, and consider the cost, technical difficulty and time required; The step S1 can be refined as follows: S11. The project aims to improve the efficiency and accuracy of DIP chip board defect detection and determine the expected performance indicators; S12. Evaluate the status of current manual inspection and computer vision-based defect detection methods, and analyze the main problems of these methods; S13. List the technical problems that need to be solved in the project, including improving image quality, enhancing the contrast of defective areas, improving detection accuracy, etc., determine the feasibility of the technical solution, and consider the cost, technical difficulty and time required.
[0028] S2. Design the overall architecture of the system, determine the main modules, including image acquisition module, color normalization module, image preprocessing module, feature extraction module and defect classification module, define the specific functions and input and output of each module in detail, select suitable hardware, and select or develop suitable software tools to ensure that all parts of the system can work together efficiently; The step S2 can be refined as follows: S21. Design the overall architecture of the DIP chip board defect detection system based on polychromatic light, and determine the main modules, including image acquisition module, color normalization module, image preprocessing module, feature extraction module, defect classification module, etc.; S22, define the specific functions and input and output of each module in detail; S23. Select appropriate hardware and choose or develop appropriate software tools.
[0029] S3. Select RGB three-color light source and ensure its uniformity and stability, arrange the light source reasonably so that it can illuminate the DIP chip board from different angles, test the impact of different light source angles and intensities on image quality, select a suitable high-resolution camera to ensure that high-quality images can be collected, and adjust the camera parameters to optimize the image effect, set the frequency and interval of image acquisition to ensure full coverage of all areas of the DIP chip board, realize the automation of image acquisition through programming, improve acquisition efficiency, and store the collected image data to ensure data integrity and traceability; The step S3 can be refined as follows: S31. Select RGB three-color light source to ensure the uniformity and stability of the light source, plan the arrangement of the light source so that it can illuminate the DIP chip board from different angles, and test the impact of different light source angles and intensities on image quality; S32. Select a suitable high-resolution camera to ensure that high-quality images can be collected and adjust the camera parameters; S33. Set the frequency and interval of image acquisition to ensure that all areas of the DIP chip board can be fully covered. Automate image acquisition through programming to improve acquisition efficiency, store the acquired image data, and ensure data integrity and traceability.
[0030] S4. Use RGB three-color light to collect images of the DIP chip board under different light sources, provide the normalization formula of RGB three-color light, write the color normalization algorithm code, and test its effect on different images. Adjust the parameters of the normalization formula through experiments to find the optimal normalization effect, record the optimization process and results, and provide reference for subsequent steps; The step S4 can be refined as follows: S41. Use RGB three-color light to collect images of the DIP chip board under different light sources. Different colors of light have different inclinations, and the reflected light obtained is also different. Red light indicates that the slope of the illuminated object surface is the largest. S42. Provide a normalization formula for RGB three-color light, write a color normalization algorithm code, and test its effect on different images; S43. Adjust the parameters of the normalization formula through experiments to find the optimal normalization effect, record the optimization process and results, and provide a reference for subsequent steps.
[0031] The RGB three-color light has different irradiation angles, and the slope of the object surface irradiated by red light is the largest. The problem of uneven reflection can be solved by normalizing the obtained three-color light. The normalization formula of RGB three-color light is as follows:
[0032] On top of that, for the RGB three-color light, the more prominent the color, the larger the value after normalization, making the important color gamut in the light source more prominent.
[0033] S5. Use appropriate noise reduction algorithms to reduce the noise of the collected images, test different parameters to find the best noise reduction effect, enhance the image contrast through different image enhancement algorithms, evaluate the quality of the enhanced image to ensure that the defect area is more obvious, convert the color image to a grayscale image to reduce the data dimension, and further convert it to a binary image to highlight the defect area, use corrosion and expansion operations to remove small holes in the image to ensure the integrity of the DIP components, and optimize the parameters of these operations to ensure that the accuracy of defect detection is not affected; The step S5 can be refined as follows: S51, using an appropriate noise reduction algorithm to perform noise reduction processing on the collected image, testing different noise reduction parameters, and finding the best noise reduction effect; S52. Enhance the contrast of the image through different image enhancement algorithms, evaluate the quality of the enhanced image, and ensure that the defect area is more obvious; S53, converting the color image into a grayscale image to reduce the data dimension, and further converting the grayscale image into a binary image to highlight the defect area; S54. Use corrosion and expansion operations to remove small holes in the image, ensure the integrity of DIP components, and optimize the parameters of corrosion and expansion to ensure that the accuracy of defect detection is not affected.
[0034] The collected color images are preprocessed by noise reduction, enhancement, grayscale, binarization and other operations to improve the accuracy of defect detection. Different colors on the color image are used to reflect the inclination of different objects, and RGB color fusion is performed to enhance the contrast of the defect area. The following formula is adopted:
[0035] in, Different weight coefficients and coefficient ratios are selected to highlight the key features of the image. Finally, corrosion and expansion are used on the color image to filter out some small voids to ensure the integrity of DIP components.
[0036] S6. Use the Canny operator for feature extraction. Select the Canny operator and understand its working principle in detail. Use the Gaussian filter to smooth the image and reduce noise while ensuring that important information is not lost. Calculate the gradient amplitude and direction of the image. Determine the best parameters through experiments. Use non-maximum suppression to refine the edges and remove redundant edges to ensure that the edges are clearer. Use dual threshold detection to connect the edges and suppress noise. Select appropriate high and low thresholds to ensure the continuity and accuracy of the edges. The step S6 can be refined as follows: S61, select the Canny operator as the feature extraction algorithm, and describe the working principle and steps of the Canny operator in detail; S62, using a Gaussian filter to smooth the image, reduce noise, and adjust the parameters of the Gaussian filter to ensure that the image does not lose important information while denoising; S63, calculating the gradient amplitude and direction of the image, and determining the optimal parameters for gradient calculation through experiments; S64. Use non-maximum suppression to refine edges, remove redundant edges, evaluate the effect of non-maximum suppression, and ensure that edges are clearer; S65. Use dual thresholds to detect connected edges and suppress noise, and select appropriate high and low thresholds to ensure edge continuity and accuracy.
[0037] First, a Gaussian filter is used to smooth the image to reduce noise. Then, the gradient magnitude and direction of the image are calculated. Next, non-maximum suppression is used to refine the edge. Finally, dual threshold detection is used to connect the edge and suppress noise. The formula is:
[0038] in, To select different weight coefficients, img1 is the original color image, img2 is the feature image after Canny operator processing, and different coefficient ratios are selected to effectively combine the original image and the feature image, while not losing the original information of the image, better provide edge texture information and increase the richness of feature information.
[0039] S7. Select Yolov8 as the deep learning model, and learn about its structure and working principle in detail. Collect and annotate different types of DIP chip board defect images, ensure sample balance to improve model generalization ability, write training scripts, configure parameters and conduct multiple trainings, record loss values and accuracy, optimize model performance by adjusting hyperparameters, and evaluate its accuracy and stability on the validation set. Use the test set to verify the performance of the model in actual applications, record the results and make necessary adjustments and improvements. The step S7 can be refined as follows: S71. Select Yolov8 as the deep learning model for defect classification, and describe the structure and working principle of Yolov8 in detail; S72. Collect different types of DIP chip board defect images and annotate the data to ensure a balanced number of positive and negative samples and improve the generalization ability of the model; S73. Write a training script, configure training parameters, perform multiple iterations of training, and record the loss value and accuracy during the training process; S74. Optimize model performance by adjusting the model's hyperparameters and evaluate the performance of the optimized model on the validation set to ensure its accuracy and stability. S75. Use the test set to verify the performance of the model, evaluate the accuracy and efficiency in practical applications, record the test results, and make necessary adjustments and improvements.
[0040] S8, integrate image acquisition, color normalization, image preprocessing, feature extraction and defect classification modules to ensure smooth data transmission, test the functions of each module, record and fix problems, verify the detection speed, accuracy and stability of the system, compare with traditional methods, deploy the system to the actual production environment, collect operator feedback, and continuously optimize; The step S8 can be refined as follows: S81. Integrate each module (image acquisition, color normalization, image preprocessing, feature extraction, defect classification) into a complete system and ensure smooth data transmission and processing between modules without bottlenecks; S82. Test each functional module of the system to ensure its normal operation, record problems found during the test, and perform debugging and repair; S83, test the detection speed, accuracy and stability of the system, compare it with the traditional method, and verify the advantages of this method; S84. Deploy the system to the actual production environment, conduct on-site testing, record the operation status, collect feedback from operators, and conduct continuous optimization.
[0041] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. The replacement may be a replacement of a part of the structure, device, method step, or a complete technical solution. Any equivalent replacement or change according to the technical solution and the inventive concept of the present invention shall be covered within the protection scope of the present invention.
Claims
1. A method for preprocessing and defect classification of DIP boards based on polychromatic light, characterized in that: The following steps are involved: S1. First determine the expected performance indicators, evaluate the current status of manual inspection and computer vision-based defect detection methods, analyze the main problems of these methods, list the technical problems that need to be solved in the project, such as improving image quality, enhancing defect area contrast, improving detection accuracy, etc., evaluate the feasibility of the technical solution, and consider the cost, technical difficulty and time required; S2. Design the overall architecture of the system, determine the main modules, including image acquisition module, color normalization module, image preprocessing module, feature extraction module and defect classification module, define the specific functions and input and output of each module in detail, select suitable hardware, and select or develop suitable software tools to ensure that all parts of the system can work together efficiently; S3. Select RGB three-color light source and ensure its uniformity and stability, arrange the light source reasonably so that it can illuminate the DIP chip board from different angles, test the impact of different light source angles and intensities on image quality, select a suitable high-resolution camera to ensure that high-quality images can be collected, and adjust the camera parameters to optimize the image effect, set the frequency and interval of image acquisition to ensure full coverage of all areas of the DIP chip board, realize the automation of image acquisition through programming, improve acquisition efficiency, and store the collected image data to ensure data integrity and traceability; S4. Use RGB three-color light to collect images of the DIP chip board under different light sources, provide the normalization formula of RGB three-color light, write the color normalization algorithm code, and test its effect on different images. Adjust the parameters of the normalization formula through experiments to find the optimal normalization effect, record the optimization process and results, and provide reference for subsequent steps; S5. Use appropriate noise reduction algorithms to reduce the noise of the collected images, test different parameters to find the best noise reduction effect, enhance the image contrast through different image enhancement algorithms, evaluate the quality of the enhanced image to ensure that the defect area is more obvious, convert the color image to a grayscale image to reduce the data dimension, and further convert it to a binary image to highlight the defect area, use corrosion and expansion operations to remove small holes in the image to ensure the integrity of the DIP components, and optimize the parameters of these operations to ensure that the accuracy of defect detection is not affected; S6. Use the Canny operator for feature extraction. Select the Canny operator and understand its working principle in detail. Use the Gaussian filter to smooth the image and reduce noise while ensuring that important information is not lost. Calculate the gradient amplitude and direction of the image. Determine the best parameters through experiments. Use non-maximum suppression to refine the edges and remove redundant edges to ensure that the edges are clearer. Use dual threshold detection to connect the edges and suppress noise. Select appropriate high and low thresholds to ensure the continuity and accuracy of the edges. S7. Select Yolov8 as the deep learning model, and learn about its structure and working principle in detail. Collect and annotate different types of DIP chip board defect images, ensure sample balance to improve model generalization ability, write training scripts, configure parameters and conduct multiple trainings, record loss values and accuracy, optimize model performance by adjusting hyperparameters, and evaluate its accuracy and stability on the validation set. Use the test set to verify the performance of the model in actual applications, record the results and make necessary adjustments and improvements. S8, integrates modules such as image acquisition, color normalization, image preprocessing, feature extraction and defect classification to ensure smooth data transmission, test the functions of each module, record and fix problems, verify the detection speed, accuracy and stability of the system, compare with traditional methods, deploy the system to the actual production environment, collect operator feedback, and continuously optimize.
2. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S1 can be refined as follows: S11. The project aims to improve the efficiency and accuracy of DIP chip board defect detection and determine the expected performance indicators; S12. Evaluate the status of current manual inspection and computer vision-based defect detection methods, and analyze the main problems of these methods; S13. List the technical problems that need to be solved in the project, including improving image quality, enhancing the contrast of defective areas, improving detection accuracy, etc., determine the feasibility of the technical solution, and consider the cost, technical difficulty and time required.
3. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S2 can be refined as follows: S21. Design the overall architecture of the DIP chip board defect detection system based on polychromatic light, and determine the main modules, including image acquisition module, color normalization module, image preprocessing module, feature extraction module, defect classification module, etc.; S22, define the specific functions and input and output of each module in detail; S23. Select appropriate hardware and choose or develop appropriate software tools.
4. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S3 can be refined as follows: S31. Select RGB three-color light source to ensure the uniformity and stability of the light source, plan the arrangement of the light source so that it can illuminate the DIP chip board from different angles, and test the impact of different light source angles and intensities on image quality; S32. Select a suitable high-resolution camera to ensure that high-quality images can be collected and adjust the camera parameters; S33. Set the frequency and interval of image acquisition to ensure that all areas of the DIP chip board can be fully covered. Automate image acquisition through programming to improve acquisition efficiency, store the acquired image data, and ensure data integrity and traceability.
5. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S4 can be refined as follows: S41. Use RGB three-color light to collect images of the DIP chip board under different light sources. Different colors of light have different inclinations, and the reflected light obtained is also different. Red light indicates that the slope of the illuminated object surface is the largest. S42. Provide a normalization formula for RGB three-color light, write a color normalization algorithm code, and test its effect on different images; S43. Adjust the parameters of the normalization formula through experiments to find the optimal normalization effect, record the optimization process and results, and provide a reference for subsequent steps.
6. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S5 can be refined as follows: S51, using an appropriate noise reduction algorithm to perform noise reduction processing on the collected image, testing different noise reduction parameters, and finding the best noise reduction effect; S52. Enhance the contrast of the image through different image enhancement algorithms, evaluate the quality of the enhanced image, and ensure that the defect area is more obvious; S53, converting the color image into a grayscale image to reduce the data dimension, and further converting the grayscale image into a binary image to highlight the defect area; S54. Use corrosion and expansion operations to remove small holes in the image, ensure the integrity of DIP components, and optimize the parameters of corrosion and expansion to ensure that the accuracy of defect detection is not affected.
7. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S6 can be refined as follows: S61, select the Canny operator as the feature extraction algorithm, and describe the working principle and steps of the Canny operator in detail; S62, using a Gaussian filter to smooth the image, reduce noise, and adjust the parameters of the Gaussian filter to ensure that the image does not lose important information while denoising; S63, calculating the gradient amplitude and direction of the image, and determining the optimal parameters for gradient calculation through experiments; S64. Use non-maximum suppression to refine edges, remove redundant edges, evaluate the effect of non-maximum suppression, and ensure that edges are clearer; S65. Use dual thresholds to detect connected edges and suppress noise, and select appropriate high and low thresholds to ensure edge continuity and accuracy.
8. The method for pre-processing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S7 can be refined as follows: S71. Select Yolov8 as the deep learning model for defect classification, and describe the structure and working principle of Yolov8 in detail; S72. Collect different types of DIP chip board defect images and annotate the data to ensure a balanced number of positive and negative samples and improve the generalization ability of the model; S73. Write a training script, configure training parameters, perform multiple iterations of training, and record the loss value and accuracy during the training process; S74. Optimize model performance by adjusting the model's hyperparameters and evaluate the performance of the optimized model on the validation set to ensure its accuracy and stability. S75. Use the test set to verify the performance of the model, evaluate the accuracy and efficiency in practical applications, record the test results, and make necessary adjustments and improvements.
9. The method for preprocessing and defect classification of DIP boards based on multi-color light according to claim 1, characterized in that: The step S8 can be refined as follows: S81. Integrate each module (image acquisition, color normalization, image preprocessing, feature extraction, defect classification) into a complete system and ensure smooth data transmission and processing between modules without bottlenecks; S82. Test each functional module of the system to ensure its normal operation, record problems found during the test, and perform debugging and repair; S83, test the detection speed, accuracy and stability of the system, compare it with the traditional method, and verify the advantages of this method; S84. Deploy the system to the actual production environment, conduct on-site testing, record the operation status, collect feedback from operators, and conduct continuous optimization.
Citation Information
Cited By
A method and system for intelligent acceptance of machine tool assembly based on computer vision
CN119741300A