Capacitor appearance detection method

By combining high-resolution cameras and LED light sources with high-performance GPU-accelerated image processing, the problems of low efficiency and insufficient precision in capacitor appearance inspection are solved, achieving efficient and accurate defect identification and cost reduction.

CN120815741APending Publication Date: 2025-10-21FUZHIQING ELECTRONICS (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510666503.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Existing capacitor appearance inspection methods are inefficient, inconsistent, and difficult to identify complex defects such as cracks, scratches, and stains.

Method used

The use of high-resolution industrial cameras and LED strip light sources combined with high-performance GPU accelerated computing for image processing, combined with support for SVM algorithm feature extraction and recognition, achieves multi-angle, multi-spectral image acquisition and automated processing.

Benefits of technology

It improves the efficiency and accuracy of capacitor appearance inspection, can effectively identify complex defects, enhances the adaptability of the inspection system and reduces inspection costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120815741A_ABST
    Figure CN120815741A_ABST
Patent Text Reader

Abstract

The invention discloses a capacitor appearance detection method, and relates to the technical field of capacitor manufacturing, the capacitor appearance detection method comprises a conveyor belt, an image acquisition module, an image processing module and a defect identification module, the image acquisition module comprises an industrial camera and a light source device, and the image processing module comprises an image preprocessing unit and a feature extraction unit. The defect identification module comprises a classifier unit and a database unit, and further comprises S1 capacitor placement and transmission, S2 equipment adjustment and parameter setting, S3 capacitor appearance image acquisition, S4 image preprocessing, S5 image feature extraction, S6 image defect identification, S7 capacitor and image number marking, S8 classification processing and S9 database establishment. Through S1, S3 and S4, the capacitor appearance detection efficiency is improved, and manual intervention is reduced; through S4, S5 and S6, the defect identification precision is improved, and complex defects such as cracks, scratches and stains can be effectively identified; through S2, S6 and S9, the adaptability of the detection system is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of capacitor manufacturing, and in particular to a capacitor appearance detection method. Background Art

[0002] As a crucial component of electronic components, the appearance quality of capacitors directly impacts product performance and reliability. With the miniaturization and increasing performance of electronic products, higher requirements are being placed on the appearance inspection of capacitors. Currently, the capacitor production process primarily relies on manual visual inspection or simple mechanical inspection equipment for appearance inspection. However, manual inspection suffers from low efficiency, poor consistency, and fatigue, while traditional mechanical inspection equipment struggles to identify complex appearance defects such as cracks, scratches, and stains. In recent years, machine vision technology has been gradually applied to industrial inspection, but its application in capacitor appearance inspection still faces challenges such as insufficient accuracy and poor adaptability.

[0003] In the prior art, commonly used methods for capacitor appearance inspection include manual visual inspection, mechanical inspection equipment, and machine vision-based inspection systems. Manual visual inspection involves an operator observing the appearance of the capacitor with the naked eye to determine whether there are any defects. Its advantage is high flexibility, but it also has problems such as low efficiency, poor consistency, and susceptibility to human factors. Mechanical inspection equipment usually uses contact sensors or simple optical sensors, which can detect the size and surface flatness of capacitors, but has limited ability to identify subtle appearance defects. The machine vision-based inspection system captures capacitor images through a camera and uses image processing algorithms for analysis. However, in actual applications, its detection accuracy is often insufficient due to factors such as lighting conditions and reflections on the capacitor surface. It is necessary to design a capacitor appearance inspection method to solve the above-mentioned problems. Summary of the Invention

[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a capacitor appearance detection method to solve the problems in the above technical solutions.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a capacitor appearance inspection device, comprising a conveyor belt, an image acquisition module, an image processing module, and a defect recognition module, wherein the image acquisition module comprises an industrial camera and a light source device, the image processing module comprises an image preprocessing unit and a feature extraction unit, and the defect recognition module comprises a classifier unit and a database unit; The industrial camera is installed above the conveyor belt, and the light source device is arranged on both sides of the conveyor belt; The image preprocessing unit is used to perform denoising, enhancement and correction on the collected capacitor appearance image; The feature extraction unit is used to extract texture, edge and color features of the capacitor appearance image surface; The classifier is used to determine whether there is a defect based on the extracted features; The database is used to store characteristic data of known defects.

[0006] Furthermore, the industrial camera uses a high-resolution CCD camera, the light source device uses an LED strip light source, the image processing module uses a high-performance GPU accelerated calculation, the classifier uses a support SVM algorithm, and the feature extraction unit includes a geometric feature extraction unit, a texture feature extraction unit and a color feature extraction unit.

[0007] Furthermore, it also includes a marking module, which includes an image marking unit and a capacitor marking unit; The image marking unit is used to number and mark the collected capacitor appearance image, and mark the fifteen defect types and defect locations on the capacitor appearance image; The capacitor marking unit is used to number and mark capacitors.

[0008] Furthermore, the industrial camera can be replaced by a CMOS camera, the light source device can be replaced by a halogen lamp light source, and the classifier can be replaced by a neural network algorithm.

[0009] A capacitor appearance inspection method, applied to the above-mentioned capacitor appearance inspection device, includes the following inspection methods: S1. Capacitor placement and conveyance: Place the capacitors to be tested neatly on the conveyor belt, ensuring the spacing between the capacitors. Start the conveyor belt and move the capacitors toward the testing area at a steady speed. The conveyor belt speed can be adjusted according to the processing capacity of the testing equipment and the size of the capacitors to ensure smooth transmission without jamming or jitter. S2. Equipment Adjustment and Parameter Settings: Adjust the position and angle of the industrial camera so that the center of its lens is aligned with the inspection area of ​​the capacitor to ensure that the capacitor's appearance image can be fully captured. At the same time, adjust the camera's focal length, aperture, shutter speed and other parameters according to the size and surface characteristics of the capacitor to obtain a clear image with appropriate contrast. Adjust the position, angle and brightness of the light source device to ensure uniform illumination of the capacitor surface and avoid shadows or reflections that affect image quality. According to the type of capacitor and common defect types, the parameters of the image preprocessing unit and feature extraction unit of the image processing module are initialized and set, and the classifier unit and database unit of the defect recognition module are configured accordingly, and the filtering algorithm and threshold parameters of the image preprocessing, as well as the feature type and feature extraction method of the feature extraction are set; S3. Capacitor Appearance Image Capture: When the capacitor to be inspected enters the image acquisition area along the conveyor belt, the industrial camera, in conjunction with the light source device, captures images of the capacitor's appearance according to the pre-set acquisition frequency and trigger mode. The captured images are multi-angle, multi-spectral image sequences, providing comprehensive information about the capacitor's appearance. The captured images are transmitted in real time to the image processing module via the data transmission interface for subsequent processing. S4. Image preprocessing: Run the image preprocessing unit of the image processing module to preprocess the collected capacitor appearance image and use the Gaussian filtering algorithm to perform denoising on the collected image to remove noise interference in the image and improve the image clarity and quality; at the same time, convert the color image into a grayscale image to reduce the image data volume and highlight the grayscale features of the image; The grayscale image is enhanced by using histogram equalization and contrast stretching methods to improve the contrast and brightness of the image and make the details in the image more clearly visible. The edge detection algorithm is used to perform edge detection on the enhanced image and extract the edge contour information of the capacitor.

[0010] S5. Image feature extraction: The preprocessed image is extracted in the feature extraction unit to extract the image features. The geometric shape features and size information of the capacitor are extracted by the geometric feature extraction unit. The texture features of the capacitor surface are extracted by the gray level co-occurrence matrix and local binary pattern method of the texture feature extraction unit. The color mean, color variance and color histogram of the capacitor image are extracted by the color feature extraction unit. S6. Image defect recognition: The feature-extracted image is compared with the feature templates of various defect types stored in the database unit of the defect recognition module, and the defect is recognized in the classifier unit. The comparison process uses the Euclidean distance and cosine similarity calculation methods, and the similarity score between the extracted feature vector and each feature template is calculated. Based on the dual judgment of the similarity score and the defect recognition of the classifier unit, it is determined whether the capacitor has defects and the type of defects; The feature templates in the database are regularly updated and maintained to adapt to the changes in the appearance characteristics of capacitors of different batches and types. At the same time, the similarity threshold is reasonably set according to the actual detection situation to avoid misjudgment and missed judgment. When the similarity score is close to the threshold, multi-angle image comparison and multi-feature fusion comparison verification methods can be used for verification; S7. Capacitors and their image numbering and marking: For capacitor images identified as having defects, the image marking unit annotates the image with information such as the location, type, and severity of the defect using a combination of rectangular and circular frames and text descriptions. Simultaneously, the capacitor marking unit numbers the defective capacitors and records the corresponding defect information using inkjet coding and labeling to ensure clear and durable markings for subsequent classification, processing, and traceability. S8. Classification and processing: Capacitors are classified into different categories based on the type and severity of the marked defects. Qualified products are directly transported to the next process via a conveyor belt; products with minor defects can be repaired and then retested; products with serious defects are scrapped or returned to the production link for improvement; S9. Database establishment: Store the marked defect images in the designated database, and record the image acquisition time, capacitor number, defect type and severity. The storage method adopts file system storage or database storage; According to the results of each inspection, the database supporting the SVM algorithm is continuously updated and improved, new defect samples and normal samples are added to the database, and the SVM classifier is retrained to improve the accuracy and adaptability of the classifier.

[0011] Furthermore, in the S2 equipment adjustment and parameter setting step, after the industrial camera is replaced with a CMOS camera, and the light source device is replaced with a halogen lamp light source; When adjusting the position and angle of the CMOS camera, based on the actual inspection environment and the size of the capacitor, the CMOS camera should be installed at a suitable position above the conveyor belt, with the center of the lens precisely aligned with the inspection area of ​​the capacitor to fully capture the capacitor's appearance image. At the same time, for capacitors with highly reflective surfaces, the aperture can be appropriately reduced to increase the depth of field and improve image clarity. For fast-moving capacitors, the shutter speed can be increased to avoid image blur. When adjusting the position, angle, and brightness of the halogen lamp light source, the distance between the light source and the capacitor and camera should be set appropriately. By adjusting the angle of the light source, the surface of the capacitor is evenly illuminated to avoid shadows or reflections. The brightness of the light source should be precisely adjusted according to the surface characteristics of the capacitor and the sensitivity of the industrial camera or CMOS camera.

[0012] Furthermore, in the steps of S6 image defect recognition and S9 database establishment, after the classifier is replaced with a neural network algorithm; Before image defect recognition, the neural network is first trained using a large number of capacitor images with known defect types and normal conditions as training data. The extracted feature vectors are input into the neural network. The neural network automatically discovers the complex relationship between features and defect types through calculation and learning of multiple layers of neurons. During the actual inspection process, the capacitor image feature vector after preprocessing and feature extraction is input into the trained neural network. The neural network will output the predicted probability of each defect type. Based on these probability values, it is judged whether the capacitor has defects and the type of defects. When the predicted probability is close to the threshold, multi-angle image comparison, multi-feature fusion comparison and other verification methods are used for further confirmation. At the same time, as the inspection data continues to accumulate, the neural network is regularly retrained and optimized.

[0013] In summary, the present invention provides a capacitor appearance inspection method, which has the following beneficial effects: 1. Through the S1 capacitor placement and transportation, S3 capacitor appearance image acquisition, and S4 image preprocessing steps, the efficiency of capacitor appearance inspection is improved and manual intervention is reduced. In the S1 step, the conveyor belt stably transports capacitors, providing a stable foundation for subsequent processes. The S3 step realizes real-time multi-angle and multi-spectral image acquisition to efficiently obtain information. The automated image preprocessing operation in the S4 step quickly removes noise and enhances the image, reducing manual intervention and improving inspection efficiency.

[0014] 2. Through the S4 image preprocessing, S5 image feature extraction, and S6 image defect recognition steps, the accuracy of defect recognition is improved, and it can effectively identify complex defects such as cracks, scratches, and stains. The S4 step denoises, enhances, and detects edges on the image to highlight defect characteristics. The S5 step extracts image features from multiple dimensions to provide rich data for defect recognition. The S6 step uses a dual judgment mechanism and scientific calculation methods, combined with regularly updated database feature templates, to accurately identify various complex defects.

[0015] 3. Through the S2 equipment adjustment and parameter setting, S6 image defect recognition and S9 database establishment steps, the adaptability of the detection system is enhanced, and it can work stably under different lighting conditions; the S2 step can adjust the equipment parameters according to the capacitor and environmental characteristics to adapt to different lighting conditions; the database feature templates in the S6 step are regularly updated to adapt to the appearance changes of different batches and types of capacitors; the S9 step continuously updates the database and trains the classifier, so that the system can continue to learn, better respond to changes in conditions such as lighting, and maintain a stable working state.

[0016] 4. Through the S1 capacitor placement and transportation, S7 capacitor and image number marking, and S8 classification processing steps, the inspection cost is reduced and false detections and missed detections caused by human factors are reduced; the S1 step standardizes the capacitor transportation to ensure inspection accuracy and reduce false detections due to positioning issues; the S7 step marks the defect information in detail to facilitate subsequent accurate classification processing and avoid human judgment errors; the S8 step rationally classifies capacitors, reduces resource waste, improves production efficiency, and reduces inspection costs overall. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Schematic diagram of the process architecture of a capacitor appearance inspection method of the present invention. DETAILED DESCRIPTION

[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0019] Example: See also Figure 1 As shown, the present invention provides a technical solution: a capacitor appearance inspection device, including a conveyor belt, an image acquisition module, an image processing module and a defect recognition module, the image acquisition module includes an industrial camera and a light source device, the image processing module includes an image preprocessing unit and a feature extraction unit, and the defect recognition module includes a classifier unit and a database unit; The industrial camera is installed above the conveyor belt, and the light source devices are arranged on both sides of the conveyor belt; The image preprocessing unit is used to perform denoising, enhancement and correction on the collected capacitor appearance image; The feature extraction unit is used to extract the texture, edge and color features of the capacitor appearance image surface; The classifier is used to determine whether there is a defect based on the extracted features; The database is used to store characteristic data of known defects.

[0020] The industrial camera uses a high-resolution CCD camera, the light source device uses an LED strip light source, the image processing module uses a high-performance GPU accelerated calculation, the classifier uses a support SVM algorithm, and the feature extraction unit includes a geometric feature extraction unit, a texture feature extraction unit, and a color feature extraction unit.

[0021] It also includes a marking module, which includes an image marking unit and a capacitor marking unit; The image marking unit is used to number and mark the collected capacitor appearance image, and mark the fifteen defect types and defect locations on the capacitor appearance image; The capacitor marking unit is used to number and mark capacitors.

[0022] The industrial camera can be replaced by a CMOS camera, the light source device can be replaced by a halogen lamp light source, and the classifier can be replaced by a neural network algorithm.

[0023] A capacitor appearance inspection method, applied to the above-mentioned capacitor appearance inspection device, includes the following inspection methods: S1. Capacitor placement and conveyance: Place the capacitors to be tested neatly on the conveyor belt, ensuring spacing between them. Start the conveyor belt and move the capacitors toward the testing area at a steady speed. The conveyor belt speed can be adjusted based on the processing capacity of the testing equipment and the size of the capacitors. Ensure smooth transmission of the conveyor belt without any jamming or jitter. This not only ensures the stable position of the capacitors during testing, avoiding incomplete or inaccurate image acquisition due to positional offset or shaking, but also provides a stable foundation for subsequent accurate testing, effectively improving the reliability of the test results. S2. Equipment adjustment and parameter setting: Adjust the position and angle of the industrial camera so that the center of its lens is aligned with the inspection area of ​​the capacitor to ensure that the appearance image of the capacitor can be fully captured. At the same time, adjust the camera's focal length, aperture, shutter speed and other parameters according to the size and surface characteristics of the capacitor to obtain a clear image with appropriate contrast. Adjust the position, angle and brightness of the light source device to ensure that the surface of the capacitor is evenly illuminated to avoid shadows or reflections that affect the image quality. Accurate equipment adjustment and parameter setting can obtain high-quality capacitor appearance images, providing clear and accurate data for subsequent image processing and defect identification, reducing the probability of misjudgment and missed judgment, and improving detection accuracy. According to the type of capacitor and common defect types, the parameters of the image preprocessing unit and feature extraction unit of the image processing module are initialized and set, and the classifier unit and database unit of the defect recognition module are configured accordingly. The filtering algorithm and threshold parameters of the image preprocessing, as well as the feature type and feature extraction method of the feature extraction are set. The parameter configuration is optimized for different types of capacitors and common defects, which can make the detection system more targeted, improve the recognition ability of various defects, and adapt to diverse detection needs. At the same time, the image preprocessing is set to improve the image preprocessing ability during the detection process, thereby improving efficiency and detection accuracy. S3. Capacitor Appearance Image Capture: When the capacitor to be inspected enters the image acquisition area along the conveyor belt, the industrial camera, in conjunction with the light source device, captures images of the capacitor's appearance according to the pre-set acquisition frequency and triggering method. The captured images are multi-angle, multi-spectral image sequences, obtaining comprehensive capacitor appearance information. The captured images are transmitted in real time to the image processing module via the data transmission interface for subsequent processing. Multi-angle, multi-spectral image acquisition can obtain richer capacitor appearance information and comprehensively present possible defects. Real-time transmission ensures the timeliness of data, making the inspection process efficient and coherent, and improving overall inspection efficiency. S4. Image preprocessing: Run the image preprocessing unit of the image processing module to preprocess the collected capacitor appearance image, and use the Gaussian filtering algorithm to denoise the collected image to remove noise interference in the image and improve the image clarity and quality; at the same time, convert the color image into a grayscale image to reduce the image data volume and highlight the grayscale features of the image. Denoising and converting the grayscale image can simplify the image data, reduce interference information, make subsequent feature extraction more accurate and efficient, enhance the image detail display effect, and facilitate the discovery of minor defects; Grayscale images are enhanced using histogram equalization and contrast stretching methods to improve image contrast and brightness, making details in the image more visible. Image enhancement further highlights defect features, making previously subtle defects easier to identify, thereby improving detection accuracy and reliability. The edge detection algorithm is used to perform edge detection on the enhanced image to extract the edge contour information of the capacitor. Accurate extraction of edge contour information helps to determine whether the shape of the capacitor is complete, provides a key basis for defect judgment, and assists in determining the location and scope of the defect.

[0024] S5. Image feature extraction: The preprocessed image is extracted in the feature extraction unit to extract the image features. The geometric shape features and size information of the capacitor are extracted by the geometric feature extraction unit. The texture feature extraction unit uses the gray level co-occurrence matrix and local binary pattern method to extract the texture features of the capacitor surface. The color feature extraction unit extracts the color mean, color variance and color histogram of the capacitor image. Multi-dimensional feature extraction comprehensively obtains the characteristic information of the capacitor from aspects such as geometric shape, texture and color, providing rich data support for defect identification, making defect judgment more accurate and comprehensive, and improving the reliability of the detection system. S6. Image defect recognition: The feature-extracted image is compared with the feature templates of various defect types stored in the database unit of the defect recognition module, and defect recognition is performed within the classifier unit. The comparison process uses Euclidean distance and cosine similarity calculation methods, and the similarity score between the extracted feature vector and each feature template is calculated. Based on the similarity score and the dual judgment of the classifier unit's defect recognition, it is determined whether the capacitor has defects and the type of defects. The dual judgment mechanism combined with scientific calculation methods improves the accuracy and reliability of defect recognition. Regular update and maintenance of the database feature templates can adapt to changes in different batches and types of capacitors, effectively avoiding misjudgments and missed judgments. The feature templates in the database are regularly updated and maintained to adapt to the changes in the appearance characteristics of capacitors of different batches and types. At the same time, the similarity threshold is reasonably set according to the actual detection situation to avoid misjudgment and missed judgment. When the similarity score is close to the threshold, multi-angle image comparison and multi-feature fusion comparison verification methods can be used for verification. The constantly updated feature templates and flexible verification methods enable the detection system to keep pace with the times, better respond to changes in the production process, ensure the accuracy of the detection results, and improve the adaptability of the detection system. S7. Capacitors and their image number marking: For capacitor images identified as having defects, the image marking unit marks the defect location, type, severity, and other information on the image using a combination of rectangular and circular frames and text descriptions. Simultaneously, the capacitor marking unit numbers the defective capacitors and records the corresponding defect information using inkjet coding and labeling to ensure clear and durable markings, facilitating subsequent classification and tracing. Detailed marking facilitates rapid differentiation of defective capacitors and their defect conditions, providing an intuitive basis for subsequent classification and tracing, facilitating tracing back to the point where the defect occurred, and helping to promptly identify problems in the production process, thereby improving the efficiency and quality of production management. S8. Classification and processing: Capacitors are classified into different categories based on the type and severity of the marked defects. Qualified products are directly transported to the next process via a conveyor belt; products with minor defects can be repaired and then retested; products with serious defects are scrapped or returned to the production process for improvement. Reasonable classification and processing can effectively screen out capacitors of different quality conditions, so that production resources can be used rationally. Repairing and retesting products with minor defects can reduce waste, and the processing of products with serious defects can prevent them from flowing into subsequent links and affecting product quality, thereby ensuring the quality and efficiency of the entire production process. S9. Database establishment: Store the marked defect images in a designated database, and record the image acquisition time, capacitor number, defect type, and severity. The storage method uses file system storage or database storage. Establishing a database facilitates long-term storage of test data and provides a basis for subsequent data analysis. By analyzing historical data, potential problems and patterns in the production process can be discovered, providing data support for optimizing production processes and test procedures. Based on the results of each test, the database supporting the SVM algorithm is continuously updated and improved, new defect samples and normal samples are added to the database, and the SVM classifier is retrained to improve the accuracy and adaptability of the classifier. Continuous updating of the database and training of the classifier allows the detection system to continuously learn new sample features, improve its ability to identify defects, better adapt to changes in the production process, and ensure the reliability and stability of the detection results.

[0025] In the S2 equipment adjustment and parameter setting steps, after replacing the industrial camera with a CMOS camera and the light source device with a halogen lamp; When adjusting the position and angle of the CMOS camera, based on the actual inspection environment and the size of the capacitor, the CMOS camera is installed in a suitable position above the conveyor belt, so that the center of the lens is precisely aligned with the inspection area of ​​the capacitor to fully capture the capacitor's appearance image. At the same time, for capacitors with strong surface reflections, the aperture can be appropriately reduced to increase the depth of field and improve image clarity. For fast-moving capacitors, the shutter speed can be increased to avoid image blur. The CMOS camera's flexible adjustment method enables it to operate stably in different inspection environments, effectively addressing issues such as surface reflections and fast movement of capacitors, ensuring the capture of clear and accurate images and guaranteeing the accuracy and stability of inspections. When adjusting the position, angle, and brightness of the halogen lamp light source, the distance between the light source, the capacitor, and the camera should be reasonably set. By adjusting the angle of the light source, the surface of the capacitor is evenly illuminated to avoid shadows or reflections. The brightness of the light source is precisely adjusted according to the surface characteristics of the capacitor and the sensitivity of the industrial camera or CMOS camera. Precise adjustment of the halogen lamp light source can provide suitable lighting conditions for capacitors with different characteristics, effectively eliminating the impact of shadows and reflections on image quality, ensuring the quality of image acquisition, and improving the applicability of the detection system.

[0026] In the S6 image defect recognition and S9 database establishment steps, the classifier is replaced with a neural network algorithm; Before image defect recognition, the neural network is first trained using a large number of capacitor images with known defect types and normal conditions as training data. The extracted feature vectors are input into the neural network. Through calculation and learning of multiple layers of neurons, the neural network automatically discovers the complex relationship between features and defect types. The training of the neural network gives it powerful learning ability, can mine the complex feature relationships in the data, and improve the ability to identify defects. Compared with traditional algorithms, it can more accurately determine the defect type and enhance the intelligence level of the detection system. During the actual inspection process, the feature vector of the capacitor image after preprocessing and feature extraction is input into the trained neural network. The neural network will output the predicted probability of each defect type. Based on these probability values, it is judged whether the capacitor has defects and the type of defects. When the predicted probability is close to the threshold, multi-angle image comparison, multi-feature fusion comparison and other verification methods are used for further confirmation. At the same time, as the inspection data continues to accumulate, the neural network is regularly retrained and optimized. The probability-based judgment method is combined with the verification method to improve the accuracy of the inspection. Continuous training and optimization enables the neural network to continuously adapt to new data, maintain efficient defect recognition capabilities, and ensure the reliability and timeliness of the inspection results.

[0027] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any person skilled in the art may utilize the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes for application in other fields. However, any simple modification, equivalent change, and modification of the above embodiments made in accordance with the technical essence of the present invention without departing from the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A capacitor appearance inspection device, comprising a conveyor belt, an image acquisition module, an image processing module, and a defect recognition module, characterized in that: The image acquisition module includes an industrial camera and a light source device, the image processing module includes an image preprocessing unit and a feature extraction unit, and the defect recognition module includes a classifier unit and a database unit; The industrial camera is installed above the conveyor belt, and the light source device is arranged on both sides of the conveyor belt; The image preprocessing unit is used to perform denoising, enhancement and correction on the collected capacitor appearance image; The feature extraction unit is used to extract texture, edge and color features of the capacitor appearance image surface; The classifier is used to determine whether there is a defect based on the extracted features; The database is used to store characteristic data of known defects.

2. The capacitor appearance inspection device according to claim 1, characterized in that: The industrial camera uses a high-resolution CCD camera, the light source device uses an LED strip light source, the image processing module uses a high-performance GPU accelerated calculation, the classifier uses a supportive SVM algorithm, and the feature extraction unit includes a geometric feature extraction unit, a texture feature extraction unit, and a color feature extraction unit.

3. The capacitor appearance inspection device according to claim 1, characterized in that: Also included is a marking module, the marking module including an image marking unit and a capacitor marking unit; The image marking unit is used to number and mark the collected capacitor appearance image, and mark the fifteen defect types and defect locations on the capacitor appearance image; The capacitor marking unit is used to number and mark capacitors.

4. The capacitor appearance inspection device according to claim 1, characterized in that: The industrial camera can be replaced by a CMOS camera, the light source device can be replaced by a halogen lamp light source, and the classifier can be replaced by a neural network algorithm.

5. A capacitor appearance inspection method, applied to a capacitor appearance inspection device according to any one of claims 1 to 4, characterized in that: The following detection methods are included: S1. Capacitor placement and conveyance: Place the capacitors to be tested neatly on the conveyor belt, ensuring the spacing between the capacitors. Start the conveyor belt and move the capacitors toward the testing area at a steady speed. The conveyor belt speed can be adjusted according to the processing capacity of the testing equipment and the size of the capacitors to ensure smooth transmission without jamming or jitter. S2. Equipment Adjustment and Parameter Settings: Adjust the position and angle of the industrial camera so that the center of its lens is aligned with the inspection area of ​​the capacitor to ensure that the capacitor's appearance image can be fully captured. At the same time, adjust the camera's focal length, aperture, shutter speed and other parameters according to the size and surface characteristics of the capacitor to obtain a clear image with appropriate contrast. Adjust the position, angle and brightness of the light source device to ensure uniform illumination of the capacitor surface and avoid shadows or reflections that affect image quality. According to the type of capacitor and common defect types, the parameters of the image preprocessing unit and feature extraction unit of the image processing module are initialized and set, and the classifier unit and database unit of the defect recognition module are configured accordingly, and the filtering algorithm and threshold parameters of the image preprocessing, as well as the feature type and feature extraction method of the feature extraction are set; S3. Capacitor Appearance Image Capture: When the capacitor to be inspected enters the image acquisition area along the conveyor belt, the industrial camera, in conjunction with the light source device, captures images of the capacitor's appearance according to the pre-set acquisition frequency and trigger mode. The captured images are multi-angle, multi-spectral image sequences, providing comprehensive information about the capacitor's appearance. The captured images are transmitted in real time to the image processing module via the data transmission interface for subsequent processing. S4. Image preprocessing: Run the image preprocessing unit of the image processing module to preprocess the collected capacitor appearance image and use the Gaussian filtering algorithm to perform denoising on the collected image to remove noise interference in the image and improve the image clarity and quality; at the same time, convert the color image into a grayscale image to reduce the image data volume and highlight the grayscale features of the image; The grayscale image is enhanced by using histogram equalization and contrast stretching methods to improve the contrast and brightness of the image and make the details in the image more clearly visible. The edge detection algorithm is used to perform edge detection on the enhanced image and extract the edge contour information of the capacitor.

6. S5, Image Feature Extraction: Preprocess the image in the feature extraction unit to extract image features. The geometric shape features and size information of the capacitor are extracted by the geometric feature extraction unit. The texture feature extraction unit uses the gray level co-occurrence matrix and local binary pattern method to extract the texture features of the capacitor surface. The color feature extraction unit extracts the color mean, color variance, and color histogram of the capacitor image. S6. Image defect recognition: The feature-extracted image is compared with the feature templates of various defect types stored in the database unit of the defect recognition module, and the defect is recognized in the classifier unit. The comparison process uses the Euclidean distance and cosine similarity calculation methods, and the similarity score between the extracted feature vector and each feature template is calculated. Based on the dual judgment of the similarity score and the defect recognition of the classifier unit, it is determined whether the capacitor has defects and the type of defects; The feature templates in the database are regularly updated and maintained to adapt to the changes in the appearance characteristics of capacitors of different batches and types. At the same time, the similarity threshold is reasonably set according to the actual detection situation to avoid misjudgment and missed judgment. When the similarity score is close to the threshold, multi-angle image comparison and multi-feature fusion comparison verification methods can be used for verification; S7. Capacitors and their image numbering and marking: For capacitor images identified as having defects, the image marking unit annotates the image with information such as the location, type, and severity of the defect using a combination of rectangular and circular frames and text descriptions. Simultaneously, the capacitor marking unit numbers the defective capacitors and records the corresponding defect information using inkjet coding and labeling to ensure clear and durable markings for subsequent classification, processing, and traceability. S8. Classification and processing: Capacitors are classified into different categories based on the type and severity of the marked defects. Qualified products are directly transported to the next process via a conveyor belt; products with minor defects can be repaired and then retested; products with serious defects are scrapped or returned to the production link for improvement; S9. Database establishment: Store the marked defect images in the designated database, and record the image acquisition time, capacitor number, defect type and severity. The storage method adopts file system storage or database storage; According to the results of each inspection, the database supporting the SVM algorithm is continuously updated and improved, new defect samples and normal samples are added to the database, and the SVM classifier is retrained to improve the accuracy and adaptability of the classifier.

7. The capacitor appearance inspection method according to claim 5, characterized in that: In the S2 equipment adjustment and parameter setting step, after the industrial camera is replaced with a CMOS camera, and the light source device is replaced with a halogen lamp light source; When adjusting the position and angle of the CMOS camera, install it at a suitable position above the conveyor belt based on the actual inspection environment and the size of the capacitor, so that the center of the lens is accurately aligned with the inspection area of ​​the capacitor to fully capture the appearance image of the capacitor; At the same time, for capacitors with strong surface reflection, the aperture can be appropriately reduced to increase the depth of field and improve image clarity; for capacitors moving quickly, the shutter speed can be increased to avoid image blur; When adjusting the position, angle, and brightness of the halogen lamp light source, the distance between the light source and the capacitor and camera should be set appropriately. By adjusting the angle of the light source, the surface of the capacitor is evenly illuminated to avoid shadows or reflections. The brightness of the light source should be precisely adjusted according to the surface characteristics of the capacitor and the sensitivity of the industrial camera or CMOS camera.

8. The capacitor appearance inspection method according to claim 5, characterized in that: In the steps of S6 image defect recognition and S9 database establishment, after replacing the classifier with a neural network algorithm; Before image defect recognition, the neural network is first trained using a large number of capacitor images with known defect types and normal conditions as training data. The extracted feature vectors are input into the neural network. The neural network automatically discovers the complex relationship between features and defect types through calculation and learning of multiple layers of neurons. During the actual inspection process, the capacitor image feature vector after preprocessing and feature extraction is input into the trained neural network. The neural network will output the predicted probability of each defect type. Based on these probability values, it is judged whether the capacitor has defects and the type of defects. When the predicted probability is close to the threshold, multi-angle image comparison, multi-feature fusion comparison and other verification methods are used for further confirmation. At the same time, as the inspection data continues to accumulate, the neural network is regularly retrained and optimized.