A method, system, device and storage medium for detecting polarization of a capacitive device
By combining deep learning and engineering processing techniques with target segmentation models and vector operations, the problems of low efficiency and low accuracy in detecting polarity defects in capacitor components are solved, achieving fast and accurate detection of polarity defects in capacitor components.
Patent Information
- Application Number
- CN202310800874.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-07-03
AI Technical Summary
Existing methods for detecting polarity defects in capacitor components suffer from low efficiency, low accuracy, and missed detections, leading to potential safety hazards in electrical equipment.
By employing deep learning and engineering processing techniques, the outlines of the cathode wire, pins, and tubing of capacitor components are extracted through a target segmentation model. Their spatial relationships are calculated, and polarity defects are determined using direction vectors and angle calculations, achieving rapid and accurate detection.
It achieves efficient and accurate detection of polarity defects in capacitor components with no missed detections, with a detection speed of about 50ms, and is suitable for large-scale testing tasks.
Smart Images

Figure CN116823780B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial quality inspection technology, and more specifically, to a method, system, device, and storage medium for detecting the polarity of capacitor components. Background Technology
[0002] Industrial circuit board manufacturing is complex and cumbersome, and various product defects can easily be introduced during the manufacturing process. Capacitors, as common components on industrial circuit boards, are ubiquitous on the core circuit boards of various electrical devices. Therefore, the quality level of capacitors directly affects or determines the qualification of the core circuit board and even the electrical equipment. Among these defects, capacitor polarity, a common manufacturing defect, poses a significant safety hazard to electrical equipment, and in severe cases, can even cause the core circuit board and electrical equipment to burn out, leading to disastrous consequences.
[0003] In the quality inspection of electronic components, the industry currently faces a huge number of component quality inspection tasks and can only use manual sampling to conduct batch quality assessments. Since manual sampling is greatly affected by personal and environmental factors, it suffers from low efficiency, low accuracy, and missed inspections, which also means that it poses certain safety hazards to subsequent equipment assembly. Summary of the Invention
[0004] To address the problems of low efficiency, low accuracy, and missed detection in existing capacitor component polarity defect detection methods, this invention provides a capacitor component polarity detection method, system, device, and storage medium.
[0005] In a first aspect, embodiments of the present invention provide a method for detecting the polarity of a capacitor component, the method comprising the following steps:
[0006] The image of the component to be detected is input into the target segmentation model, and the cathode wire contour, pin contour, and tubing contour are extracted by the target segmentation model. The component image is the bottom image of the capacitor component.
[0007] The approximate width d of the cathode wire is obtained based on the cathode wire profile, pin profile, and hose profile. yjx The center points of the two pins, zj1 and zj2, and the center point p of the bottom outline of the capacitor component. jg and radius r jg ;
[0008] Based on the center point p of the bottom contour of the capacitor component jg and radius r jg Approximate width d of the cathode wire yjx Obtain two auxiliary circles, and based on the two auxiliary circles and the cathode line contour, obtain the contour intersection points yjx1, yjx2, yjx3, and yjx4;
[0009] Based on the intersection points yjx1, yjx2, yjx3, and yjx4 of the contour, a first direction vector l1 and a second direction vector l2 are formed on both sides of the cathode wire contour, and a third direction vector l3 is formed based on the center points zj1 and zj2 of the two pins.
[0010] The deflection angle is calculated based on the angle between the first direction vector l1, the second direction vector l2, and the third direction vector l3, and the deflection angle calculation result is used to output the polarity defect detection result.
[0011] In the above embodiments, deep learning technology and engineering processing technology are used to perform polarity defect detection based on the image of capacitor components. Compared with the traditional manual sampling method, the present invention can achieve no missed detection and has the dual advantages of detection speed and detection accuracy. The detection speed is about 50ms, which can meet the needs of large-scale detection tasks.
[0012] As some optional embodiments of this application, the target segmentation model is trained based on a deep learning network model.
[0013] As some optional implementations of this application, the training process of the target segmentation model is as follows:
[0014] Historical component images were collected, and the cathode wires, pins, and tubing of the historical component images were outlined to form a segmentation training set.
[0015] Image enhancement processing is performed on historical component images in the segmentation training set, and the images are then input into a deep learning network model for image feature extraction and iterative training to form a target segmentation model.
[0016] As some optional embodiments of this application, the process of extracting the cathode wire contour, pin contour, and tubing contour using the target segmentation model is as follows:
[0017] The image of the component to be inspected is input into the target segmentation model to obtain the coordinate information of the cathode wire contour, pin contour, and tubing contour.
[0018] Image segmentation is performed on the image of the component to be tested based on the coordinate information of the cathode wire contour, pin contour, and tubing contour to obtain the cathode wire contour, pin contour, and tubing contour.
[0019] In the above embodiments, the target segmentation model is first trained, and then the contour is extracted based on the trained target segmentation model to output the contour of the cathode line, pin, and tubing of the capacitor component.
[0020] As some optional embodiments of this application, the approximate width d of the cathode wire is obtained based on the cathode wire profile, the pin profile, and the hose profile. yjx The center points of the two pins, zj1 and zj2, and the center point p of the bottom outline of the capacitor component. jg and radius r jg The process is as follows:
[0021] The minimum bounding rectangle yjx of the cathode wire profile is obtained based on the coordinate information of the cathode wire profile, and the width of the minimum bounding rectangle yjx is used as the approximate width d of the cathode wire. yjx ;
[0022] Based on the coordinate information of the pin outline, obtain the minimum bounding rectangle zj of the pin outline, and obtain the center points zj1 and zj2 of the two pins based on the minimum bounding rectangle zj of the pin outline.
[0023] Based on the coordinate information of the hose outline, obtain the minimum bounding rectangle jg of the hose outline, and based on the minimum bounding rectangle jg of the hose outline, obtain the center point p of the bottom outline of the capacitor component. jg and radius r jg .
[0024] As some optional implementations of this application, the process of obtaining the intersection points yjx1, yjx2, yjx3, and yjx4 of the contour based on two auxiliary circles and the cathode line contour is as follows:
[0025] Center point p of the bottom outline of the capacitor component jg Centered on, and with (r) jg -d yjx ,r jg Two auxiliary circles are set to define the range of values;
[0026] Obtain the intersection points yjx1 and yjx2 of the two auxiliary circles with the contour on one side of the cathode line and the intersection points yjx3 and yjx4 on the other side.
[0027] As some optional embodiments of this application, the first direction vector l1 is formed with the contour intersection points yjx1 and yjx2 as fixed points, the second direction vector l2 is formed with the contour intersection points yjx3 and yjx4 as fixed points, and the third direction vector l3 is formed with the center points zj1 and zj2 as fixed points.
[0028] As some optional implementations of this application, the process of outputting the polarity defect detection result based on the deflection angle calculation result is as follows:
[0029] Obtain the first angle A between the first direction vector l1 and the second direction vector l2, the second angle B between the first direction vector l1 and the third direction vector l3, and the third angle C between the second direction vector l2 and the third direction vector l3;
[0030] Determine whether the first included angle A is equal to the sum of the second included angle B and the third included angle C. If it is equal, the capacitor component does not have a polarity defect. Otherwise, the capacitor component has a polarity defect, and the deflection angle D of the capacitor component is (B+CA) / 2.
[0031] In the above embodiments, by determining the spatial relationship between the cathode wire, pins, and tubing, it is possible to quickly and accurately determine whether there is a polarity defect in the capacitor components.
[0032] In a second aspect, the present invention provides a bias detection system for capacitor components, the system comprising:
[0033] A contour extraction unit is used to input the image of the component to be detected into a target segmentation model, and extract the contours of the cathode line, pins, and tubing through the target segmentation model. The component image is the bottom image of the capacitor component.
[0034] The coordinate positioning unit obtains the approximate width d of the cathode wire based on the cathode wire profile, the pin profile, and the tubing profile. yjx The center points of the two pins, zj1 and zj2, and the center point p of the bottom outline of the capacitor component. jg and radius r jg ;
[0035] The intersection point acquisition unit is based on the center point p of the bottom contour of the capacitor component. jg and radius r jg Approximate width d of the cathode wire yjx Obtain two auxiliary circles, and based on the two auxiliary circles and the cathode line contour, obtain the contour intersection points yjx1, yjx2, yjx3, and yjx4;
[0036] The vector acquisition unit forms a first direction vector l1 and a second direction vector l2 on both sides of the cathode wire contour based on the contour intersection points yjx1, yjx2, yjx3, and yjx4, and forms a third direction vector l3 based on the center points zj1 and zj2 of the two pins.
[0037] The polarity detection unit performs a deflection angle calculation based on the angle between the first direction vector l1, the second direction vector l2, and the third direction vector l3, and outputs the polarity defect detection result based on the deflection angle calculation result.
[0038] In a third aspect, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor performing the aforementioned method for detecting the polarity of a capacitor component.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for detecting the polarity of a capacitor component.
[0040] The beneficial effects of this invention are as follows:
[0041] This invention uses deep learning technology and engineering processing technology to achieve accurate detection of polarity defects in capacitor components, thus solving the problem of missed detection in existing capacitor component polarity defect detection methods.
[0042] This invention determines the spatial relationship between the cathode wire, pins, and tubing, thus enabling rapid and accurate determination of polarity defects in capacitor components. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating the steps of the capacitor component bias detection method according to an embodiment of the present invention;
[0045] Figure 2 This is a physical diagram of the bias detection of the capacitor component according to an embodiment of the present invention;
[0046] Figure 3 This is a structural block diagram of the capacitor component polarity detection system according to an embodiment of the present invention. Detailed Implementation
[0047] To better understand the above technical solutions, the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations on the technical solutions of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0048] It should also be understood that, in order to simplify the description of the invention and thus aid in the understanding of at least one embodiment, multiple features may sometimes be grouped into a single embodiment, drawing, or description thereof in the foregoing description of the embodiments of the invention. However, this method of disclosure does not imply that the subject matter of the invention requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiment disclosed above.
[0049] Example 1
[0050] This invention provides a method for detecting the polarity of capacitor components. Please refer to [link / reference]. Figure 1 The method includes the following steps:
[0051] (1) Input the image of the component to be detected into the target segmentation model, and extract the cathode line contour, pin contour and tubing contour through the target segmentation model, wherein the component image is the bottom image of the capacitor component.
[0052] The target segmentation model is trained based on a deep learning network model, which includes convolutional layers, pooling layers, and fully connected layers. The convolutional layers are mainly used for image learning, the pooling layers are used for image normalization, and the fully connected layers are used for extracting cathode line contours, pin contours, and tubing contours.
[0053] In this embodiment of the invention, the training process of the target segmentation model is as follows:
[0054] (1.1) Collect historical component images and perform contour annotation on the cathode lines, pins and tubing of the historical component images to form a segmentation training set.
[0055] (1.2) Perform image enhancement processing on the historical component images in the segmentation training set, and input them into the deep learning network model for image feature extraction and iterative training to form the target segmentation model.
[0056] In this embodiment of the invention, image enhancement processing is performed on the collected historical component images to improve the brightness of the image data, which is beneficial for model learning and accurate reasoning.
[0057] In the embodiments of the present invention, please refer to Figure 2 The process of extracting the cathode wire contour, pin contour, and tubing contour using the target segmentation model is as follows:
[0058] (1.3) Input the image of the component to be detected into the target segmentation model to obtain the coordinate information of the cathode wire contour, pin contour and tubing contour.
[0059] (1.4) Based on the coordinate information of the cathode line profile, pin profile and tubing profile, the image of the component to be tested is segmented to obtain the cathode line profile, pin profile and tubing profile.
[0060] (2) Obtain the approximate width d of the cathode wire based on the cathode wire profile, pin profile, and hose profile. yjx The center points of the two pins, zj1 and zj2, and the center point p of the bottom outline of the capacitor component. jg and radius r jg .
[0061] Specifically, obtain the approximate width d of the cathode wire. yjx The center points of the two pins, zj1 and zj2, and the center point p of the bottom outline of the capacitor component. jg and radius r jg The process is as follows:
[0062] (2.1) Obtain the minimum bounding rectangle yjx of the cathode wire profile based on the coordinate information of the cathode wire profile, and use the width of the minimum bounding rectangle yjx of the cathode wire profile as the approximate width d of the cathode wire. yjx .
[0063] (2.2) Obtain the minimum bounding rectangle zj of the pin outline based on the coordinate information of the pin outline, and obtain the center points zj1 and zj2 of the two pins based on the minimum bounding rectangle zj of the pin outline.
[0064] (2.3) Obtain the minimum bounding rectangle jg of the hose outline based on the coordinate information of the hose outline, and obtain the center point p of the bottom outline of the capacitor component based on the minimum bounding rectangle jg of the hose outline. jg and radius r jg .
[0065] (3) Based on the center point p of the bottom contour of the capacitor component jg and radius r jg Approximate width d of the cathode wire yjx Obtain two auxiliary circles, and based on the two auxiliary circles and the cathode line contour, obtain the contour intersection points yjx1, yjx2, yjx3, and yjx4;
[0066] Specifically, the process of obtaining the intersection points yjx1, yjx2, yjx3, and yjx4 of the contour based on two auxiliary circles and the cathode line contour is as follows:
[0067] (3.1) Taking the center point p of the bottom outline of the capacitor component as an example jg Centered on, and with (r) jg -d yjx ,r jg Two auxiliary circles are set to define the range of values;
[0068] (3.2) Obtain the intersection points yjx1 and yjx2 of the two auxiliary circles with the contour on one side of the cathode line and the intersection points yjx3 and yjx4 on the other side.
[0069] (4) Based on the contour intersection points yjx1, yjx2, yjx3, and yjx4, a first direction vector l1 and a second direction vector l2 are formed on both sides of the cathode wire contour, and a third direction vector l3 is formed based on the center points zj1 and zj2 of the two pins.
[0070] Specifically, the first direction vector l1 is formed with the contour intersection points yjx1 and yjx2 as fixed points, the second direction vector l2 is formed with the contour intersection points yjx3 and yjx4 as fixed points, and the third direction vector l3 is formed with the center points zj1 and zj2 as fixed points; that is, the direction of the first direction vector l1 is from yjx1 to yjx2, the direction of the second direction vector l2 is from yjx3 to yjx4, and the direction of the third direction vector l3 is from zj1 to zj2.
[0071] The deflection angle is calculated based on the angle between the first direction vector l1, the second direction vector l2, and the third direction vector l3, and the deflection angle calculation result is used to output the polarity defect detection result.
[0072] Specifically, the process for outputting the polarity defect detection result based on the deflection angle calculation result is as follows:
[0073] (5.1) Obtain the first angle A between the first direction vector and the second direction vector, the second angle B between the first direction vector and the third direction vector, and the third angle C between the second direction vector and the third direction vector.
[0074] (5.2) Determine whether the first included angle A is equal to the sum of the second included angle B and the third included angle C. If it is equal, then the capacitor component does not have a polarity defect. Otherwise, the capacitor component has a polarity defect, and the deflection angle D of the capacitor component is (B+CA) / 2.
[0075] In this embodiment, the target segmentation model is first trained using historical component images. The trained model then extracts the contours of the components to be detected, obtaining the contours of the cathode line, pins, and tubing. Finally, the polarity defect of the capacitor component is determined based on these contours. This comprehensive approach, combining deep learning and engineering processing techniques with the actual structure of the capacitor component, solves the problem of missed detections in existing capacitor component polarity defect detection methods.
[0076] Example 2
[0077] This invention provides a polarity detection system for capacitor components. Please refer to [link / reference]. Figure 3 The system corresponds one-to-one with the method in Embodiment 1, and the system includes:
[0078] The contour extraction unit is used to input the image of the component to be detected into the target segmentation model, and extract the contour of the cathode line, the pin contour, and the tube contour through the target segmentation model. The component image is the bottom image of the capacitor component.
[0079] The coordinate positioning unit obtains the approximate width d of the cathode wire based on the cathode wire profile, the pin profile, and the tubing profile. yjx The center points of the two pins, zj1 and zj2, and the center point p of the bottom outline of the capacitor component. jg and radius r jg .
[0080] The intersection point acquisition unit is based on the center point p of the bottom contour of the capacitor component. jg and radius r jg Approximate width d of the cathode wire yjx Obtain two auxiliary circles, and based on the two auxiliary circles and the cathode line contour, obtain the contour intersection points yjx1, yjx2, yjx3, and yjx4.
[0081] The vector acquisition unit forms a first direction vector l1 and a second direction vector l2 on both sides of the cathode wire profile based on the contour intersection points yjx1, yjx2, yjx3, and yjx4, and forms a third direction vector l3 based on the center points zj1 and zj2 of the two pins.
[0082] The polarity detection unit performs a deflection angle calculation based on the angle between the first direction vector l1, the second direction vector l2, and the third direction vector l3, and outputs the polarity defect detection result based on the deflection angle calculation result.
[0083] Example 3
[0084] This invention provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the computer program executes the bias detection method for capacitor components described in Embodiment 1 when the processor is running.
[0085] The computer device provided in this embodiment can implement the method described in Embodiment 1. To avoid repetition, it will not be described again here.
[0086] Example 4
[0087] This invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the bias detection method for capacitor components described in Embodiment 1.
[0088] The computer-readable storage medium provided in this embodiment can implement the method described in Embodiment 1. To avoid repetition, it will not be described again here.
[0089] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0090] The memory can be used to store the computer program and / or modules. The processor implements various functions of the capacitor component polarity detection system in the invention by running or executing the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart memory card, secure digital card, flash memory card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0091] If a capacitor component polarity detection system is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program that can be stored in a computer-readable storage medium. When executed by a processor, this computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory, random access memory, dot carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0092] The basic concepts of this invention have been described. It is obvious to those skilled in the art that the detailed disclosure above is merely illustrative and does not constitute a limitation of this specification. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this specification. Such modifications, improvements, and corrections are suggested in this specification and therefore remain within the spirit and scope of the exemplary embodiments described herein.
Claims
1. A method of detecting a polarization of a capacitor device, characterized by, The method comprises the following steps: input the component image to be detected into a target segmentation model, and extract the cathode line contour, pin contour and rubber tube contour through the target segmentation model, wherein the component image is a bottom image of a capacitor component; Based on the cathode wire profile, the needle profile and the rubber tube profile, the approximate width d of the cathode wire is obtained yjx , the center points zj1, zj2 of the two needle points, and the center point p of the capacitor device bottom profile jg and the radius r jg ; Based on the cathode wire profile, the needle profile and the rubber tube profile, the approximate width d of the cathode wire is obtained yjx , the center points zj1, zj2 of the two needle points, and the center point p of the bottom profile of the capacitor element jg and the radius r jg The flow is as follows: Based on the coordinate information of the cathode wire profile, a minimum circumscribed rectangle yjx of the cathode wire profile is obtained, and the width of the minimum circumscribed rectangle yjx of the cathode wire profile is taken as the approximate width d of the cathode wire yjx ; obtain the minimum circumscribed rectangle zj of the pin contour based on the coordinate information of the pin contour, and obtain the center points zj1 and zj2 of the two pins based on the minimum circumscribed rectangle zj of the pin contour; Based on the coordinate information of the hose contour, a minimum circumscribed rectangle jg of the hose contour is obtained, and a center point p of a circle of the bottom contour of the capacitor device is obtained based on the minimum circumscribed rectangle jg of the hose contour jg and a radius r jg ; The center point p of the circle based on the bottom profile of the capacitive element jg and the radius r jg , the approximate width d of the cathode line yjx Two auxiliary circles are obtained, and the profile intersection points yjx1, yjx2, yjx3, yjx4 are obtained based on the two auxiliary circles and the cathode line profile the process of obtaining the contour intersection points yjx1, yjx2, yjx3 and yjx4 based on the two auxiliary circles and the cathode line contour is as follows: with the center point p of the bottom profile of the capacitive element jg with the center point p of the bottom profile of the capacitive element jg -d yjx , r jg ) as value range two auxiliary circles are set; obtain the contour intersection points yjx1, yjx2 on one side of the cathode line contour and the contour intersection points yjx3, yjx4 on the other side of the cathode line contour; form the first direction vector l1 and the second direction vector l2 on both sides of the cathode line contour based on the contour intersection points yjx1, yjx2, yjx3 and yjx4, and form the third direction vector l3 based on the center points zj1 and zj2 of the two pins; the first direction vector l1 is formed with the contour intersection points yjx1 and yjx2 as the fixed points, the second direction vector l2 is formed with the contour intersection points yjx3 and yjx4 as the fixed points, and the third direction vector l3 is formed with the center points zj1 and zj2 as the fixed points; perform deflection angle calculation based on the included angles between the first direction vector l1, the second direction vector l2 and the third direction vector l3, and output the polar defect detection result based on the deflection angle calculation result.
2. The method of claim 1, wherein: The target segmentation model is obtained based on a deep learning network model training.
3. The method of claim 2, wherein: The training process of the target segmentation model is as follows: collect historical component images, and perform contour labeling on the cathode lines, pins and rubber tubes of the historical component images to form a segmentation training set; perform image enhancement processing on the historical component images in the segmentation training set, and input the deep learning network model for image feature extraction and iterative training to form the target segmentation model.
4. The method of claim 1, wherein: The process of extracting the cathode line contour, pin contour and rubber tube contour through the target segmentation model is as follows: input the component image to be detected into the target segmentation model to obtain the coordinate information of the cathode line contour, pin contour and rubber tube contour; perform image segmentation on the component image to be detected according to the coordinate information of the cathode line contour, pin contour and rubber tube contour to obtain the cathode line contour, pin contour and rubber tube contour.
5. The method of claim 1, wherein: The process of outputting the polar defect detection result based on the deflection angle calculation result is as follows: obtain the first included angle A between the first direction vector l1 and the second direction vector l2, the second included angle B between the first direction vector l1 and the third direction vector l3, and the third included angle C between the second direction vector l2 and the third direction vector l3; determine whether the first included angle A is equal to the sum of the second included angle B and the third included angle C, if yes, the capacitor component does not have a polar defect, otherwise, the capacitor component has a polar defect, and the deflection angle D of the capacitor component is (B+C-A) / 2.
6. A system for detecting the polarization of a capacitive device, comprising: The system comprises: A contour extraction unit is configured to input a component image to be detected into a target segmentation model, and extract a cathode line contour, a pin contour, and a tube contour by the target segmentation model, wherein the component image is a bottom image of a capacitor component; a coordinate positioning unit that obtains an approximate width d of the cathode wire based on a cathode wire profile, a pin profile, and a tube profile yjx , center points zj1, zj2 of the two pins, and a center point p of a bottom profile of the capacitor element jg and a radius r jg ; Based on the cathode wire profile, the needle profile and the rubber tube profile, the approximate width d of the cathode wire is obtained yjx , the center points zj1, zj2 of the two needle points, and the center point p of the bottom profile of the capacitor element jg and the radius r jg The flow is as follows: Based on the coordinate information of the cathode wire profile, a minimum circumscribed rectangle yjx of the cathode wire profile is obtained, and the width of the minimum circumscribed rectangle yjx of the cathode wire profile is taken as the approximate width d of the cathode wire yjx ; A minimum circumscribed rectangle zj of the pin contour is obtained based on coordinate information of the pin contour, and center points zj1 and zj2 of two pins are obtained based on the minimum circumscribed rectangle zj of the pin contour; Based on the coordinate information of the hose profile, a minimum circumscribed rectangle jg of the hose profile is obtained, and a center point p of a circle of the bottom profile of the capacitor element is obtained based on the minimum circumscribed rectangle jg of the hose profile jg and a radius r jg ; An intersection obtaining unit obtains the intersection point yjx1, yjx2, yjx3, yjx4 based on the center point p of the bottom profile of the capacitive element and the radius r jg and the approximate width d of the cathode line jg of the cathode line yjx Two auxiliary circles are obtained, and the profile intersection points yjx1, yjx2, yjx3, yjx4 are obtained based on the two auxiliary circles and the cathode line profile A process of obtaining contour intersection points yjx1, yjx2, yjx3, and yjx4 based on the two auxiliary circles and the cathode line contour is as follows: with the center point p of the bottom profile of the capacitive element jg (r jg , r yjx ) as value range two auxiliary circles are set jg The contour intersection points yjx1 and yjx2 on one side of the cathode line contour and the contour intersection points yjx3 and yjx4 on the other side are obtained; A vector obtaining unit is configured to form a first direction vector l1 and a second direction vector l2 on both sides of the cathode line contour based on the contour intersection points yjx1, yjx2, yjx3, and yjx4, and form a third direction vector l3 based on the center points zj1 and zj2 of the two pins; The first direction vector l1 is formed with the contour intersection points yjx1 and yjx2 as fixed points, the second direction vector l2 is formed with the contour intersection points yjx3 and yjx4 as fixed points, and the third direction vector l3 is formed with the center points zj1 and zj2 as fixed points; A polarity detection unit is configured to perform a deflection angle operation based on an included angle between the first direction vector l1, the second direction vector l2, and the third direction vector l3, and output a polarity defect detection result based on a result of the deflection angle operation.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the capacitor component polarity detection method in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores the computer program, and the computer program is executed by the processor to implement the capacitor component polarity detection method in any one of claims 1-5.
Citation Information
Patent Citations
Printed circuit element polarity machine vision detection method and device
CN103675588A
Capacitor appearance defect identification method and device
CN109978875A