Detection method and detection system

Through the method of image acquisition and coordinate system establishment, the position deviation of the PIN needle is accurately detected, which solves the problem of inaccurate position detection of the PIN needle in the prior art, improves signal transmission reliability and reduces material waste.

CN119146851BActive Publication Date: 2025-06-27HESAI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411604780.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-06-27
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The prior art is difficult to accurately detect the position of the PIN pin, resulting in unstable signal transmission and waste of materials.

Method used

The image of the base and PIN needle is acquired through the image acquisition device, the base coordinate system is established, the actual position of the PIN needle is determined, and its position deviation is calculated.

Benefits of technology

Accurate detection of PIN pin position deviation is achieved, avoiding the skewed PIN pin into the base, reducing material waste, and improving the reliability of connector signal transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119146851B_ABST
    Figure CN119146851B_ABST
Patent Text Reader

Abstract

A detection method, a detection system, and a computer-readable storage medium are used to detect PIN pins, which can be inserted into a base. The detection method includes: collecting an image of the base through an image acquisition device; comparing the predetermined position of the base with its position in the image according to the image of the base, and establishing a base coordinate system based on the image of the base; collecting an image of the PIN pin through the same image acquisition device; determining the actual position of the PIN pin according to the base coordinate system and the image of the PIN pin; and comparing the actual position of the PIN pin with its predetermined position to determine the position deviation of the PIN pin. The detection method of the present disclosure can accurately detect the position deviation of the PIN pin before the PIN pin is inserted into the base, which helps to timely discover PIN pins with abnormal positions and avoid the PIN pins being skewed into the base, resulting in material waste. When the PIN pin is applied to a connector, accurately detecting the position deviation of the PIN pin helps to improve the reliability of signal transmission of the connector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of detection, and particularly to a detection method and a detection system. Background Art

[0002] The exposed PINs of the connector need to be inserted into the base holes. The position of the PINs is crucial for the connector. If the PINs are too skewed, it is not only unfavorable for the effective transmission of signals, but also likely to cause the scrapping of both the PINs and the base materials. However, the existing solutions are difficult to accurately detect the position of the PINs. Therefore, it is necessary to propose a new solution to optimize the position detection of the PINs.

[0003] The content of the background art section is only the technology known to the inventor and does not necessarily represent the prior art in this field. Summary of the Invention

[0004] In view of one or more of the problems existing in the prior art, the present disclosure provides a detection method for detecting PINs, where the PINs can be inserted into a base. The detection method includes: collecting an image of the base through an image acquisition device; comparing a predetermined position of the base with its position in the image according to the image of the base, and establishing a base coordinate system based on the image of the base; collecting an image of the PINs through the same image acquisition device; determining an actual position of the PINs according to the base coordinate system and the image of the PINs; and comparing the actual position of the PINs with their predetermined position to determine a position deviation of the PINs.

[0005] Optionally, the step of comparing a predetermined position of the base with its position in the image according to the image of the base and establishing a base coordinate system based on the image of the base further includes: identifying a positioning feature according to the image of the base; determining a reference origin of the base according to the positioning feature; and determining a position of the base according to the reference origin.

[0006] Optionally, the positioning feature includes at least one of a positioning pin, an edge, and a corner of the base. The step of determining the reference origin includes: determining a center of the base according to at least two of the positioning features, and taking the center as the reference origin.

[0007] Optionally, the step of collecting the image of the PINs includes: irradiating the PINs with a linear light source.

[0008] Optionally, the linear light source includes a first linear light source and a second linear light source, which are symmetrically arranged on both sides of the PINs, and the light emitted by both is perpendicular to the PINs.

[0009] Optionally, the first line light source and the second line light source include line laser light sources. The step of determining the actual position of the PIN pin according to the base coordinate system and the image of the PIN pin includes: identifying the tip of the PIN pin according to the image of the PIN pin; and determining the coordinates of the center of the tip based on the base coordinate system, and taking it as the actual position of the PIN pin in the base coordinate system.

[0010] Optionally, the step of determining the position deviation of the PIN pin includes: determining the square root of the distance between the actual position and the predetermined position; and judging whether the position deviation of the PIN pin is abnormal according to the square root of the distance and a preset threshold.

[0011] Optionally, the step of collecting the image of the base includes: turning on the light supplement device to irradiate the base.

[0012] Optionally, when the base is a planar structure, the light supplement angle of the light supplement device is normal incidence to the base; when the base is a non-planar structure, the light supplement angle is oblique incidence to the base.

[0013] Optionally, the light supplement device includes a light emitting unit and an opening. The light emitting unit is arranged around the opening. The image acquisition device is arranged on the side of the light supplement device opposite to the base. The opening, the image acquisition device and the base are coaxially arranged.

[0014] The present disclosure also provides a detection system for detecting a PIN pin. The PIN pin can be plugged into a base. The detection system includes: an image acquisition device; and a controller, connected to the image acquisition device and configured to execute the detection method as described above.

[0015] Optionally, the detection system further includes: a light supplement device, connected to the controller, and including a light emitting unit and an opening. The light emitting unit is arranged around the opening. The image acquisition device is arranged on the side of the light supplement device opposite to the base. The opening, the image acquisition device and the base are coaxially arranged.

[0016] Optionally, the detection system further includes: a line light source, which includes a first line light source and a second line light source, symmetrically arranged on both sides of the PIN pin and connected to the controller. The light emitted by the first line light source and the second line light source is perpendicular to the PIN pin. The first line light source and the second line light source include line laser light sources.

[0017] The present disclosure also provides a computer-readable storage medium, including computer-executable instructions stored thereon. The executable instructions, when executed by a processor, implement the detection method as described above.

[0018] The detection method and detection system of the present disclosure can perform two image acquisitions using a line light source, construct a base coordinate system based on the base image, and then determine the actual position of the PIN pin in the base coordinate system. Thus, before the PIN pin is inserted into the base, precise detection of the position deviation of the PIN pin can be achieved, which helps to promptly detect PIN pins with abnormal positions and avoid the skew insertion of PIN pins into the base, resulting in material waste. When the PIN pin is applied to a connector, precise detection of the position deviation of the PIN pin helps to improve the reliability of signal transmission of the connector. Description of the Drawings

[0019] To more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will introduce the drawings used in the description of the embodiments by way of example. The drawings in the following description are only the embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation to the present disclosure. In the drawings:

[0020] Figure 1 Shows a schematic flow chart of a detection method according to some embodiments of the present disclosure.

[0021] Figure 2 Shows a schematic diagram of a detection system according to some embodiments of the present disclosure.

[0022] Figure 3 Shows a schematic diagram of a detection system according to some embodiments of the present disclosure.

[0023] Figure 4 Shows an enlarged schematic diagram of a supplementary lighting device according to some embodiments of the present disclosure.

[0024] Figure 5 Shows a schematic diagram of an image of a base according to some embodiments of the present disclosure.

[0025] Figure 6 Shows a schematic flow chart of the sub-steps of step S12 according to some embodiments of the present disclosure.

[0026] Figure 7 Shows a schematic diagram of a base coordinate system based on a base image according to some embodiments of the present disclosure.

[0027] Figure 8 Shows a schematic diagram of an image of a PIN pin according to some embodiments of the present disclosure.

[0028] Figure 9 Shows a schematic flow chart of the sub-steps of step S14 according to some embodiments of the present disclosure. Detailed implementation manners

[0029] In the following, only some exemplary embodiments are described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present disclosure. Therefore, the accompanying drawings and the description are regarded as being exemplary in nature rather than restrictive.

[0030] In the description of the present disclosure, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation to the present disclosure. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present disclosure, "a plurality" means two or more unless otherwise specifically defined.

[0031] In the description of the present disclosure, it should be noted that unless otherwise clearly specified and defined, the terms "mounted", "connected", "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection, an electrical connection, or a connection that can communicate with each other; it may be directly connected, or indirectly connected through an intermediate medium, and it may be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.

[0032] In the present disclosure, unless otherwise clearly specified and defined, the fact that the first feature is "above" or "below" the second feature may include the direct contact between the first and second features, or may include the situation where the first and second features are not in direct contact but in contact through other features therebetween. Moreover, the fact that the first feature is "above", "over" and "on" the second feature includes that the first feature is directly above and obliquely above the second feature, or simply means that the horizontal height of the first feature is higher than that of the second feature. The fact that the first feature is "below", "beneath" and "under" the second feature includes that the first feature is directly below and obliquely below the second feature, or simply means that the horizontal height of the first feature is lower than that of the second feature.

[0033] Numerous different embodiments or examples are provided below to implement different structures of the present disclosure. To simplify the present disclosure, components and settings of specific examples are described below. Of course, they are merely examples and are not intended to limit the present disclosure. In addition, the present disclosure may repeat reference numerals and / or reference letters in different examples. This repetition is for the purpose of simplification and clarity and does not itself indicate the relationship between the various embodiments and / or settings discussed. In addition, the present disclosure provides examples of various specific processes and materials, but those of ordinary skill in the art can be aware of the application of other processes and / or the use of other materials.

[0034] Some embodiments of the present disclosure will be described below with reference to the accompanying drawings. It should be understood that some of the embodiments described herein are only used to illustrate and explain the present disclosure and are not used to limit the present disclosure.

[0035] Each embodiment of the present disclosure provides a detection method and a detection system. A line light source can be used to perform two image acquisitions, a base coordinate system can be constructed based on the base image, and then the actual position of the PIN pin in the base coordinate system can be determined. Thus, before the PIN pin is inserted into the base, accurate detection of the position deviation of the PIN pin can be achieved, which helps to timely detect PIN pins with abnormal positions and avoid the waste of materials caused by the skew insertion of the PIN pins into the base. The solutions of each embodiment of the present disclosure can be applied to different PIN pin detection tasks, can reduce the time for each development and debugging, are convenient for maintenance and upgrade, and reduce the maintenance cost.

[0036] Figure 1 A flowchart showing a detection method according to some embodiments of the present disclosure is shown. As Figure 1 shown, the detection method 10 includes steps S11 to S15. In step S11, an image of the base is acquired by an image acquisition device. In step S12, based on the image of the base, the predetermined position of the base is compared with its position in the image of the base, and a base coordinate system based on the base image is established. In step S13, an image of the PIN pin is acquired by the same image acquisition device. In step S14, based on the base coordinate system and the image of the PIN pin, the actual position of the PIN pin is determined. In step S15, the actual position of the PIN pin is compared with its predetermined position to determine the position deviation of the PIN pin. The detection method of the present disclosure and each of its steps can be executed by a controller.

[0037] In some embodiments, the controller may include components or circuits such as a control circuit, a central processing unit (CPU), a micro control unit (MCU), a graphic processing unit (GPU), a digital signal processor (DSP), other general-purpose processors, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a complex programmable logic device (CPLD), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0038] In some embodiments, at step S11, the controller may control the image acquisition device to acquire an image of the base. Alternatively, the image acquisition device acquires an image of the base and then sends it to the controller. As Figure 2 shown, the base B is within the field of view of the image acquisition device 21. The base B is coaxially arranged with the image acquisition device 21. For example, the center of the base B is disposed on the optical axis AXIS1 of the image acquisition device 21. The controller 22 is connected to the image acquisition device 21. The controller 22 may control the image acquisition device 21 to acquire an image IMAG1 of the base B. Alternatively, after the image acquisition device 21 acquires the image IMAG1 of the base B, it sends it to the controller 22. The image IMAG1 of the base B is as Figure 5 shown and will be specifically introduced later.

[0039] In some embodiments, the image acquisition device 21 / 31 may include a CCD camera, a CMOS camera, a line array camera, a area array camera, an interlaced camera, a progressive scan camera, a normal resolution camera, a high-resolution camera, an analog camera, a digital camera, a monochrome (black and white) camera, a color camera, a normal speed camera, a high-speed camera, a visible light (ordinary) camera, an infrared camera, an ultraviolet camera, a 2D camera, a 3D camera, etc.

[0040] In some embodiments, the controller 22 / 32 may include components or circuits such as a control circuit, a CPU, an MCU, a GPU, a DSP, other general-purpose processors, an ASIC, an FPGA, a CPLD, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0041] In some embodiments, acquiring an image of the base includes determining a light source according to the shape of the base. For example, for a columnar base, a linear light source can be used for lighting to obtain an image of the base. For a hole-shaped or planar contour, a light source with a high angle can be used.

[0042] In some embodiments, acquiring an image of the base includes turning on a fill light device to irradiate the base. As Figure 3 shown, the fill light device 34 includes an opening 341 and a light-emitting unit 342. The light-emitting unit 342 is disposed around the opening 341. The light-emitting unit 342 may include LED lamp beads. The image acquisition device 31 is disposed on the side of the fill light device 34 opposite to the base B. The opening 341, the image acquisition device 31, and the base B are coaxially arranged. For example, they are commonly arranged on the optical axis AXIS2 of the image acquisition device 31. The controller 32 is communicatively connected to the fill light device 34. The controller 32 can control the fill light device 34 to turn on or off. When acquiring the image IMAG1 of the base B, the controller 32 can control the fill light device 34 to turn on to irradiate the base B, and control the image acquisition device 31 to acquire the image IMAG1 of the base B, which helps to eliminate shadow interference and acquire a clear image IMAG1 of the base B, and helps to accurately determine the position of the base B in the base image IMAG1 subsequently, so as to accurately establish a base coordinate system based on the base image IMAG1.

[0043] In some embodiments, the fill light angle of the fill light device is related to the structure of the surface of the base (the side of the base facing the image acquisition device). When the base is a planar structure, the fill light angle of the fill light device is normal incidence to the base. When the base is a non-planar structure, the fill light angle of the fill light device is oblique incidence to the base. Adopting different fill light angles based on different base structures helps to flexibly and clearly present the structural details of the base, helps to accurately identify the positioning features of the base subsequently, and accurately determine the position of the base in the base image.

[0044] In some embodiments, the fill light angle of the fill light device is adjustable. For example, as Figure 4 shown, the fill light device 34 includes a base b carrying the light-emitting unit 342, and the inclination angle θ of the base b is adjustable. The controller 32 can adjust the light-emitting angle of the light-emitting unit 342 by adjusting the inclination angle θ of the base b, thereby adjusting the fill light angle of the fill light device 34.

[0045] In some embodiments, the controller can identify the surface structure of the base according to the image of the base and determine whether it is a planar structure. For example, as Figure 3 and Figure 4As shown, when the base B is a planar structure, the controller 32 adjusts the inclination angle θ of the base b to 0°, so as to adjust the fill light angle of the fill light device 24 to be normally incident on the base B. When the base B is a non-planar structure, the controller 32 adjusts the inclination angle θ of the base b to 0-90°, and the fill light angle is obliquely incident on the base B. In this way, the fill light angle of the fill light device can be flexibly adjusted, the versatility and adaptability of the fill light device can be improved, and the fill light effect of the base can be improved.

[0046] In some embodiments, in step S12, the controller can identify the position of the base in the image of the base based on the image of the base, compare the predetermined position of the base and its position in the image of the base, and when the position of the base in the image matches the predetermined position, the position of the base can be considered reliable, and then, based on the position of the base in the image, a base coordinate system based on the base image is established.

[0047] Figure 5 A schematic diagram showing an image IMAG1 of a base B according to some embodiments of the present disclosure. Figure 6 A flowchart diagram showing sub-steps of step S12 according to some embodiments of the present disclosure is shown. Figure 7 A schematic diagram of a base coordinate system based on a base image according to some embodiments of the present disclosure is shown. Figure 2 , Figure 3 ,as well as Figures 5 to 7 As shown, the controller 22 / 32 compares the predetermined position of the base B with the position of the base B in the image IMAG1 according to the image IMAG1 of the base B, and establishes a base coordinate system XOY based on the base image IMAG1.

[0048] In some embodiments, reference Figure 6 , step S12 further includes sub-steps S121~S123.

[0049] Sub-step S121, identifying positioning features based on the image of the base. Figure 5 As shown, the base B is generally in the shape of a rounded rectangle. The controller 22 / 32 can identify the positioning features of the base B based on the image IMAG1. It should be noted that Figure 5 The shapes and positions of the base B and other components shown are only exemplary, and the present disclosure is not limited thereto. For example, the shape of the base B may also be a regular shape or an irregular shape such as a right-angled rectangle, a triangle, or a trapezoid.

[0050] In some embodiments, the locating feature may include a locating pin of the base. Figure 5As shown, the positioning features include the positioning pins LP1 and LP2 of the base B, and the positioning pins LP1 and LP2 are symmetrically arranged about the center of the base B. The controller 22 / 32 can identify the positioning pins LP1 and LP2 through a visual recognition algorithm. The positioning pins can include cylindrical pins, conical pins, grooved pins, etc.

[0051] In some embodiments, the positioning features may include the edges of the base. For example, as Figure 5 shown, the positioning features include the edges E1, E2, E3, and E4 of the base B. Among them, the edges E1 and E2 are a pair of sides of the base B, and the edges E3 and E4 are the other pair of sides of the base B. The controller 22 / 32 can identify the edges E1 to E4 through a visual recognition algorithm.

[0052] In some embodiments, the positioning features may include the corners of the base. For example, as Figure 5 shown, the positioning features include the corners C1, C2, C3, and C4 of the base B. Among them, the corners C1 and C3 are one diagonal of the base B, and the corners C2 and C4 are the other diagonal of the base B. The controller 22 / 32 can identify the corners C1 to C4 through a visual recognition algorithm.

[0053] In some embodiments, the positioning features may also include a combination of multiple items among the positioning pins, edges, and corners of the base. For example, the positioning features can include both positioning pins and edges, or both positioning pins and corners, or both edges and corners, or all of the positioning pins, edges, and corners. The controller can identify the positioning features of the base through a visual recognition algorithm. The present disclosure does not limit the specific visual recognition algorithm, nor the quantity and position distribution of the positioning features on the base, which can be determined according to requirements in practical applications.

[0054] Sub-step S122, determining the reference origin of the base according to the positioning features. The controller can determine the center of the base according to at least one positioning feature and use the center of the base as the reference origin. When only one positioning feature is adopted, at least two such positioning features are required to determine the center of the base.

[0055] For example, the controller 22 / 32 determines the symmetric center of the positioning pins LP1 and LP2, uses the symmetric center as the center of the base B, and uses the center of the base B as the reference origin.

[0056] For another example, the controller 22 / 32 can determine the symmetry center of the two edges E1 and E2 according to the edges E1 and E2, use the symmetry center of the two edges as the center of the base B, and use the center of the base B as the reference origin. Or, the controller 22 determines the symmetry center of the two edges E3 and E4 according to the edges E3 and E4, uses the symmetry center of the two edges as the center of the base B, and uses the center of the base B as the reference origin. Or, the controller 22 determines the average value of the symmetry center of the edges E1 and E2 and the symmetry center of the edges E3 and E4 according to the edges E1 to E4, uses the average value as the center of the base B, and uses the center of the base B as the reference origin.

[0057] For another example, the controller 22 / 32 determines the symmetry center of the two corners C1 and C3 according to the corners C1 and C3, uses the symmetry center of the two corners as the center of the base B, and uses the center of the base B as the reference origin. Or, the controller 22 determines the symmetry center of the two corners C2 and C4 according to the corners C2 and C4, uses the symmetry center of the two corners as the center of the base B, and uses the center of the base B as the reference origin. Or, the controller 22 determines the average value of the symmetry center of the corners C1 and C3 and the symmetry center of the corners C2 and C4 according to the corners C1 to C4, uses the average value as the center of the base B, and uses the center of the base B as the reference origin.

[0058] For another example, the controller 22 / 32 uses the average value of the symmetry center of the positioning pins LP1 and LP2 and the symmetry center of the edges E1 and E2 as the center of the base B, and uses the center of the base B as the reference origin.

[0059] For example, the controller 22 / 32 uses the average value of the symmetry center of the positioning pins LP1 and LP2 and the symmetry center of the corners C1 and C3 as the center of the base B, and uses the center of the base B as the reference origin.

[0060] For example, the controller 22 / 32 uses the average value of the symmetry center of the edges E3 and E4 and the symmetry center of the corners C2 and C4 as the center of the base B, and uses the center of the base B as the reference origin.

[0061] For example, the controller 22 / 32 uses the symmetry center of the positioning pins LP1 and LP2, and the average value of the symmetry center of the edges E1 and E2 and the symmetry center of the corners C1 and C3 as the center of the base B, and uses the center of the base B as the reference origin.

[0062] Sub-step S123, determine the position of the base according to the reference origin. For example, the controller 22 / 32 can compare the position of the reference origin (i.e., the center position of the base) with the predetermined position. If the difference between the two is within the preset range, the position of the reference origin (i.e., the center position of the base) is used as the position of the base B. The controller can use the center of the base B as the reference origin to establish a base coordinate system XOY based on the base image IMAG1.

[0063] In some embodiments, in step S13, an image of the PIN pin is acquired by the same image acquisition device. As Figure 2 or Figure 3 shown, the PIN pin can be plugged into the base B, and the tip of the PIN pin faces the image acquisition device 21 / 31. The PIN pin and the base B are within the field of view of the image acquisition device 21 / 31. The controller 22 / 32 can control the image acquisition device 21 / 31 to acquire the image IMAG2 of the PIN pin. Alternatively, after the image acquisition device 21 / 31 acquires the image IMAG2 of the PIN pin, it is sent to the controller 22 / 32. The image IMAG2 of the PIN pin is as Figure 8 shown.

[0064] In some embodiments, acquiring the image of the PIN pin includes using a linear light source to irradiate the PIN pin. The controller can be communicatively connected to the linear light source. The controller can turn on the linear light source, and the light emitted by the linear light source irradiates the PIN pin. The controller also controls the image acquisition device to acquire the image of the PIN pin, which helps to capture a clear image of the PIN pin so as to accurately determine the actual position of the PIN pin. In existing industrial production, the image of the PIN pin is acquired based on an LED light source system and detected based on the image. However, since the tip feature of the PIN pin is not necessarily located at the center of the PIN pin head, when using an LED light source for imaging, the white spot contour at the tip of the PIN pin does not match the actual PIN head contour, thus bringing errors to the measurement of the entire vision system. Using a linear light source can effectively avoid the occurrence of such problems and helps to improve the accuracy of the measurement results of the vision system.

[0065] In some embodiments, as Figure 3 shown, the linear light source 33 includes a first linear light source 331 and a second linear light source 332. The first linear light source 331 and the second linear light source 332 are symmetrically arranged on both sides of the PIN pin, and the light emitted by both is perpendicular to the PIN pin, which helps to capture a clear contour of the PIN pin and accurately determine the actual position of the PIN pin.

[0066] The controller 32 is communicatively connected to the first linear light source 331 and the second linear light source 332, and can control the turning on or off of both and the turning-on timing. For example, when acquiring the image of the PIN pin, the controller 32 can control the first linear light source 331 and the second linear light source 332 to turn on to irradiate the PIN pin. When not acquiring the image of the PIN pin, the controller 32 can control the first linear light source 331 and the second linear light source 332 to turn off. In some embodiments, the controller can control the first linear light source 331 and the second linear light source 332 to turn on simultaneously, or can control the first linear light source 331 to turn on first, then turn off the first linear light source 331, and then turn on the second linear light source 332.

[0067] In some embodiments, the first line light source 331 and the second line light source 332 include line laser light sources. The laser beam emitted by the line laser light source has concentrated energy, which helps to capture a clearer profile of the PIN needle, so as to more accurately determine the actual position of the PIN needle (which will be specifically introduced later). The line laser light source may include one or more of a vertical-cavity surface-emitting laser (VCSEL), an edge emitting laser (EEL), etc. However, the present disclosure is not limited thereto.

[0068] In some embodiments, the first line light source 331 and the second line light source 332 may be LED line light sources, and these are all within the protection scope of the present disclosure.

[0069] In some embodiments, in step S14, the controller may determine the actual position of the PIN needle according to the base coordinate system and the image of the PIN needle. For example, the controller 22 / 32 determines the actual position P(ActualX, ActualY) of the PIN needle according to the base coordinate system XOY and the image IMAG2 of the PIN needle.

[0070] Figure 9 A flowchart showing the sub-steps of step S14 according to some embodiments of the present disclosure is shown. Step S14 (that is, determining the actual position of the PIN needle according to the base coordinate system and the image of the PIN needle) includes sub-steps S141 to S142.

[0071] Sub-step S141, identify the tip of the PIN needle according to the image of the PIN needle. Figure 8 A schematic diagram showing the image IMAG2 of the PIN needle according to some embodiments of the present disclosure is shown. As Figure 8 shown, the white bright spots are the tips of the PIN needles (for example, tips H1 to H3), and the black is the base B. The PIN needle is inserted into the base B. The controller 22 / 32 may identify the profile of the PIN needle according to the image IMAG2 of the PIN needle and the image recognition algorithm, so as to identify the tip of the PIN needle.

[0072] Sub-step S142, based on the base coordinate system, determine the coordinates of the center of the tip, and use it as the actual position of the PIN needle in the base coordinate system. For example, the controller 22 / 32 may, based on the base coordinate system XOY, according to the image recognition algorithm, identify the coordinates of some points of the tip profile, and determine the coordinates of the center of the tip according to the coordinates of some points of the tip profile, and use it as the actual position P(ActualX, ActualY) of the PIN needle in the base coordinate system XOY.

[0073] In some embodiments, one PIN needle may be inserted into one base B. For example, asFigure 8 As shown, H1 is the tip of a PIN needle. The controller 22 / 32 can determine the center coordinates of the tip H1 based on the base coordinate system XOY, and take the center coordinates of the tip H1 as the actual position P1(ActualX1, ActualY1) of the PIN needle in the base coordinate system XOY.

[0074] In some embodiments, multiple PIN needles can be plugged into a base B. For example, H1, H2, and H3 are the tips of three PIN needles respectively. The controller 22 / 32 can determine the center coordinates of the tips H1, H2, and H3 respectively based on the base coordinate system XOY, and take these three center coordinates as the actual positions P1(ActualX1, ActualY1), P2 (ActualX2, ActualY2), and P3 (ActualX3, ActualY3) of these three PIN needles in the base coordinate system XOY respectively. It should be understood that the three PIN needles here are only for exemplary introduction, and the present disclosure does not limit the number of PIN needles. The actual position of each PIN needle in the base coordinate system can be determined in this way.

[0075] In some embodiments, in step S15, the controller can compare the actual position of the PIN needle with its predetermined position to determine the position deviation of the PIN needle. Taking one PIN needle as an example, as Figure 7 shown, the controller can compare the actual position PAct (ActualX, ActualY) of the PIN needle with its predetermined position PTru (TrueX, TrueY) to determine the position deviation ΔP of the PIN needle.

[0076] In some embodiments, the step of determining the position deviation of the PIN needle includes determining the square root of the distance between the actual position and the predetermined position; and judging whether the position deviation of the PIN needle is abnormal according to the square root of the distance and a preset threshold. For example, the controller 22 / 32 determines the square root of the distance between the actual position PAct (ActualX, ActualY) and the predetermined position PTru (TrueX, TrueY) of the PIN needle, and takes this square root of the distance as the position deviation ΔP of the PIN needle, as follows:

[0077] .

[0078] Wherein, ActualX is the abscissa of the actual position of the PIN needle, ActualY is the ordinate of the actual position of the PIN needle, TrueX is the abscissa of the predetermined position of the PIN needle, and TrueY is the ordinate of the predetermined position of the PIN needle.

[0079] In some embodiments, the controller 22 / 32 determines whether the position deviation of the PIN is abnormal according to the square root of the pitch ΔP (i.e., the position deviation) and a preset threshold THΔP. For example, when the position deviation ΔP of the PIN is greater than or equal to the preset threshold THΔP, the controller 22 / 32 determines that the position deviation of the PIN is abnormal, that is, the position deviation of the PIN is within an intolerable range. Conversely, when the position deviation ΔP of the PIN is less than the preset threshold THΔP, the controller 22 / 32 determines that the position deviation of the PIN is normal, that is, the position deviation of the PIN is within a tolerable range. In this way, the controller can determine the position deviation of each PIN and determine whether the PIN is correctly inserted into the base.

[0080] In some embodiments, when determining the position deviation of each PIN, the controller may determine the average value of the position deviations of the plurality of PINs, compare the average value with the preset threshold THΔP, and determine the overall deviation of these PINs. For example, when the average value ΔPaverage is greater than or equal to the preset threshold THΔP, the controller 22 / 32 determines that the overall position deviation of the PIN is abnormal. Conversely, when the average value ΔPaverage is less than the preset threshold THΔP, the controller 22 / 32 determines that the overall position deviation of the PIN is normal. In this way, the abnormal detection of the overall position deviation of the PIN can be achieved.

[0081] In some embodiments, before the PIN is inserted into the base, for example, when the PIN is about to be inserted into the base, the controller may execute the above detection method to detect the position deviation of the PIN, which helps to timely discover the PIN with abnormal position, so as to avoid the PIN with abnormal position from being inserted into the base and causing material waste.

[0082] In some embodiments, when it is determined that the position deviation of the PIN is abnormal, the controller may timely correct the position of the PIN according to the actual position and the predetermined position of the PIN.

[0083] In some embodiments, when the PIN has been inserted into the base, the controller may execute the above detection method to detect the position deviation of the PIN, which helps to timely discover the PIN with abnormal position.

[0084] The present disclosure also provides a detection system for detecting PINs, and the PINs can be inserted into a base. One or more PINs can be inserted into one base. Figure 2 The schematic diagram of the detection system 20 according to some embodiments of the present disclosure is shown. As Figure 2 shown, the detection system 20 includes an image acquisition device 21 and a controller 22, and the controller 22 is connected to the image acquisition device 21 and is configured to execute the detection method 10 as described above.

[0085] Figure 3 A schematic diagram showing a detection system 30 according to some embodiments of the present disclosure. As Figure 3 shown, the detection system 30 includes an image acquisition device 31, a controller 32, and a line light source 33. The line light source 33 includes a first line light source 331 and a second line light source 332. The first line light source 331 and the second line light source 332 are symmetrically arranged on both sides of the PIN pin and are connected to the controller 32. The light emitted by the first line light source 331 and the second line light source 332 is perpendicular to the PIN pin. The first line light source 331 and the second line light source 332 include line laser light sources.

[0086] In some embodiments, the detection system 30 includes a supplementary light device 34. The supplementary light device 34 is connected to the controller 32. Figure 4 An enlarged schematic diagram showing a supplementary light device according to some embodiments of the present disclosure. As Figure 3 and Figure 4 shown, the supplementary light device 34 includes an opening 341 and a light emitting unit 342. The light emitting unit 342 is arranged around the opening 341, and the image acquisition device 31 is arranged on the side of the supplementary light device 34 opposite to the base B. The opening 341, the image acquisition device 31, and the base B are coaxially arranged.

[0087] In some embodiments, the detection system may include a display (not shown in the figure). The display may be coupled to the controller for visually outputting the detection result. The display may include display screens such as an LCD display (liquid-crystal display, LCD), an LED display (light emitting diode, LED), an OLED display (organic light emitting diode, OLED), etc.

[0088] In some embodiments, the detection system may include a memory (not shown in the figure). The memory may be used to store images acquired by the image acquisition device, program instructions, etc. The memory may include a random access memory (RAM), and may also include a non-volatile memory. Further, the memory may include at least one of: phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), read-only memory (ROM), and electrically erasable programmable read only memory (EEPROM).

[0089] The detection method and detection system of the present disclosure can accurately detect the position deviation of the PIN pins before the PIN pins are inserted into the base, which helps to timely discover the PIN pins with abnormal positions and avoid the PIN pins being skew-inserted into the base, resulting in material waste. When the PIN pins are applied to a connector, accurately detecting the position deviation of the PIN pins helps to improve the reliability of signal transmission of the connector.

[0090] The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium includes computer-executable instructions stored thereon, and the executable instructions, when executed by a processor, implement the detection method as described above.

[0091] The present disclosure may take the form of a computer program product implemented on one or more storage media that contain program code therein. The computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of the computer storage media include, but are not limited to: PRAM, SRAM, DRAM, other types of RAM, ROM, EEPROM, flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital video disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device.

[0092] It should be noted that the present disclosure may only include Figures 1 - 9 any one or more features of any one or more of the embodiments. In other words, not all of the features shown need to be implemented simultaneously in the detection method and detection system of the present disclosure.

[0093] It should be noted that this specification provides method operation steps such as in the embodiments or schematic diagrams, but based on routine or non-creative labor, there may be more or fewer operation steps. The order of steps listed in the embodiments is only one of the ways of the execution order of numerous steps and does not represent the only execution order. When the actual system or device product is executed, it may be executed in the order shown in the embodiments or flowcharts or executed in parallel.

[0094] It should be noted that although several modules of the detection system are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules can be implemented in one module. Conversely, the features and functions of one module described above can be further divided and implemented by multiple modules.

[0095] Finally, it should be noted that the above are only some embodiments of the present disclosure and are not used to limit the present disclosure. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A detection method for detecting a PIN needle, wherein the PIN needle can be plugged into a base, characterized in that: The detection method comprises: Capturing an image of the base by an image acquisition device; According to the image of the base, comparing the predetermined position of the base with its position in the image, and establishing a base coordinate system based on the base image; The image of the PIN needle is collected by the same image collection device, including: using a line light source to illuminate the PIN needle; the line light source includes a first line light source and a second line light source, the first line light source and the second line light source are symmetrically arranged on both sides of the PIN needle, and the light emitted by the first line light source and the second line light source are perpendicular to the PIN needle; Determining the actual position of the PIN pin based on the base coordinate system and the image of the PIN pin; and Comparing the actual position of the PIN pin with the predetermined position thereof to determine the position deviation of the PIN pin; The step of acquiring an image of the base comprises: turning on a fill light device to illuminate the base; when the base is a planar structure, the fill light angle of the fill light device is normal incidence to the base; when the base is a non-planar structure, the fill light angle is oblique incidence to the base; the fill light device comprises a light emitting unit and an opening, the light emitting unit is arranged around the opening, the image acquisition device is arranged on a side of the fill light device opposite to the base, and the opening, the image acquisition device and the base are coaxially arranged.

2. The detection method according to claim 1, characterized in that: The step of comparing the predetermined position of the base with its position in the image according to the image of the base, and establishing a base coordinate system based on the base image, further comprises: identifying a positioning feature based on the image of the base; Determining the reference origin of the base according to the positioning feature; and The position of the base is determined according to the reference origin.

3. The detection method according to claim 2, characterized in that: The positioning feature includes at least one of a positioning pin, an edge, and a corner of the base, and the step of determining the reference origin includes: The center of the base is determined based on at least two of the positioning features, and the center is used as the reference origin.

4. The detection method according to any one of claims 1 to 3, characterized in that: The first line light source and the second line light source include line laser light sources, wherein the step of determining the actual position of the PIN needle according to the base coordinate system and the image of the PIN needle includes: identifying the needle tip of the PIN needle based on the image of the PIN needle; and Based on the base coordinate system, the coordinates of the needle center are determined and used as the actual position of the PIN needle in the base coordinate system.

5. The detection method according to claim 4, characterized in that: The step of determining the position deviation of the PIN needle comprises: determining a square root of a distance between the actual position and the predetermined position; and Whether the position deviation of the PIN needle is abnormal is determined according to the square root of the spacing and a preset threshold.

6. A detection system for detecting a PIN needle, wherein the PIN needle is plugged into a base, characterized in that: The detection system comprises: Image acquisition device; A controller, connected to the image acquisition device and configured to perform the detection method according to any one of claims 1 to 5; a fill light device connected to the controller and comprising a light emitting unit and an opening, wherein the light emitting unit is arranged around the opening, the image acquisition device is arranged on a side of the fill light device opposite to the base, and the opening, the image acquisition device and the base are arranged coaxially; and The line light source comprises a first line light source and a second line light source, which are symmetrically arranged on both sides of the PIN needle and connected to the controller, and the light emitted by the first line light source and the second line light source is perpendicular to the PIN needle.

7. The detection system according to claim 6, characterized in that: The first line light source and the second line light source include line laser light sources.

Citation Information

Patent Citations

  • Method for detecting positional deviation of connector PIN needle by utilizing lens

    CN110108204A