A quality inspection method for hardware terminals

By performing grayscale processing and grayscale difference analysis on the hardware terminal image, the arrangement patterns and periodic intervals of the pins are identified, which solves the problem of image deformation in the quality inspection of hardware terminals and achieves accurate quality inspection of hardware terminals.

CN118396984BActive Publication Date: 2024-08-30DONGGUAN SHANG TONG METAL ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410822901.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-08-30
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

It is difficult to effectively detect the quality of hardware terminals with the existing technology, especially due to the image deformation caused by external factors, which makes it impossible to accurately obtain the arrangement pattern and defective areas of the hardware terminal pins.

Method used

By collecting the image of the hardware terminal for grayscale processing, the arrangement pattern and periodic interval of the pins are obtained, the grayscale difference of the pixel points is calculated, and the possibility of each pixel point being a normal point is determined, thereby identifying the defective area of ​​the hardware terminal to be detected. .

Benefits of technology

It realizes the quality inspection of hardware terminals under the condition of image deformation, accurately identifies defective areas, and improves the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396984B
    Figure CN118396984B
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and specifically to a quality inspection method for hardware terminals, the method comprising: collecting images of continuous hardware terminals to be inspected, graying the collected images to obtain gray images; obtaining the arrangement pattern of the hardware terminal pins based on the gray image, the arrangement pattern including the pin arrangement direction and the pin period interval; obtaining the grayscale difference of the same-position pixel points on different pins based on the arrangement pattern, and determining the possibility that the pixel points belong to normal points through the grayscale difference; determining the defective area of ​​the continuous hardware terminals to be inspected based on the possibility. The quality inspection method proposed in the present invention can calculate the possibility that each pixel point belongs to a normal point by determining the arrangement pattern of the hardware terminal pins, thereby obtaining the grayscale difference of the same-position pixel points on different pins, and further determining the defective area of ​​the continuous hardware terminals to be inspected, thereby completing the quality inspection of the hardware terminals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image data processing, and in particular to a quality detection method for hardware terminals. Background Art

[0002] Hardware terminals usually refer to metal connectors that connect wires or conductors and are used to establish reliable electrical connections in electrical and electronic equipment. However, due to the reaction between metal and moisture, oxygen and other chemicals in the environment, these reactions will cause an oxide layer or rust to form on the terminal surface, reducing its conductivity and connection quality. Therefore, it is particularly important to detect rust on the surface of hardware terminals.

[0003] Although the arrangement of continuous hardware terminals is regular, the pictures taken by the camera are deformed due to external factors, so it is impossible to perform effective quality inspection on the hardware terminals. Summary of the invention

[0004] In order to solve the technical problem that it is impossible to effectively detect the quality of hardware terminals, the purpose of the present invention is to provide a quality detection method for hardware terminals, and the technical solution adopted is as follows:

[0005] A quality inspection method for hardware terminals, the quality inspection method comprising: collecting images of continuous hardware terminals to be inspected, graying the collected images to obtain gray images; obtaining arrangement rules of hardware terminal pins based on the gray images, the arrangement rules including pin arrangement directions and pin period intervals; obtaining grayscale differences of pixels at the same position on different pins based on the arrangement rules, and determining the possibility that the pixels belong to normal points through the grayscale differences; and determining defective areas of the continuous hardware terminals to be inspected based on the possibility.

[0006] Preferably, the step of acquiring the arrangement regularity of the pins of the hardware terminal based on the grayscale image comprises: acquiring the gradient direction of all pixels in the grayscale image, and determining the pin arrangement direction based on the gradient direction.

[0007] Preferably, the step of acquiring the arrangement pattern of the hardware terminal pins based on the grayscale image also includes: dividing all pixels into multiple sequences based on the pin arrangement direction; and determining the pin period interval based on the gradient distribution of the pixels in the same sequence.

[0008] Preferably, the step of determining the stitch period interval based on the gradient distribution of pixel points on the same sequence is: obtaining the gradient distribution of pixel points on each sequence, determining the best sequence based on the gradient distribution; and using the period interval of the best sequence as the stitch period interval.

[0009] Preferably, the optimal sequence is determined by analyzing the correlation between the position of the edge point and the interval distance between adjacent edge points in each sequence and the grayscale difference between the edge points.

[0010] Preferably, by calculating the sequence evaluation values, the sequence corresponding to the maximum value in the sequence evaluation values ​​is taken as the optimal sequence;

[0011] The sequence evaluation value The calculation formula is:

[0012]

[0013] In the formula, It represents the Pearson correlation coefficient reflected by the position and interval distance of the edge points in each sequence. represents the number of edge points in each sequence, Represents the gray value corresponding to the nth edge point in the mth sequence, Represents the grayscale mean of all edge points in the mth sequence.

[0014] Preferably, the step of determining the stitch period interval based on the gradient distribution of pixel points on the same sequence comprises: obtaining the gradient distribution of pixel points on each sequence, determining the best sequence based on the gradient distribution; and correcting the period interval of the best sequence to obtain the stitch period interval.

[0015] Preferably, the step of correcting the period interval of the optimal sequence to obtain the stitch period interval comprises:

[0016] Taking the cycle interval of the best sequence as the reference cycle interval, the rate of change of the cycle interval is calculated;

[0017] Based on the change rate, the reference cycle interval is corrected to obtain the stitch cycle interval.

[0018] Preferably, the step of obtaining the grayscale difference of the pixels at the same position on different pins based on the arrangement rule and determining the possibility that the pixels belong to normal points is specifically as follows:

[0019] For each pixel point, multiple pixels at the same position on other pins corresponding to the current pixel point are obtained according to the arrangement rule, and after multiple gray value differences are calculated, the absolute values ​​are summed to obtain the possibility.

[0020] Preferably, the method of determining the defective region of the continuous hardware terminal to be detected based on the possibility is to determine the defective region by performing adaptive linear grayscale stretching based on the calculated possibility.

[0021] The present invention has the following beneficial effects: the quality inspection method for hardware terminals proposed in the present invention determines the arrangement pattern of the hardware terminal pins, thereby obtaining the grayscale difference of the pixels at the same position on different pins, and can calculate the possibility that each pixel point is a normal point, thereby determining the defective area of ​​the continuous hardware terminal to be inspected, and completing the quality inspection of the hardware terminals. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A schematic flow chart of a method for quality inspection of hardware terminals provided by one embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of an image collected in one embodiment of the present invention;

[0025] Figure 3 A schematic diagram of a sub-flow of step S20 in a method for quality inspection of hardware terminals provided by an embodiment of the present invention;

[0026] Figure 4 A schematic diagram of a sub-flow of step S23 in a method for quality inspection of hardware terminals provided by an embodiment of the present invention;

[0027] Figure 5 A sub-flow diagram of step S232 in a method for detecting quality of hardware terminals provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the quality inspection method of a hardware terminal proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0029] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0030] The specific scheme of the quality inspection method for hardware terminals provided by the present invention is described in detail below in conjunction with the accompanying drawings.

[0031] See also Figure 1 , which shows a method flow chart of a method for quality inspection of hardware terminals provided by an embodiment of the present invention, the quality inspection method comprising:

[0032] Step S10, collecting an image of the continuous hardware terminal to be inspected, and graying the collected image to obtain a grayscale image;

[0033] Step S20, obtaining an arrangement rule of the pins of the hardware terminal based on the grayscale image, wherein the arrangement rule includes a pin arrangement direction and a pin period interval;

[0034] Step S30, based on the arrangement rule, obtaining the grayscale difference of the pixel points at the same position on different pins, and determining the possibility that the pixel point is a normal point through the grayscale difference;

[0035] Step S40: determining the defective area of ​​the continuous hardware terminal to be inspected based on the possibility.

[0036] The present invention is a quality inspection method for continuous hardware terminals. The quality inspection method for hardware terminals determines the arrangement pattern of the pins of the hardware terminals to be inspected, thereby obtaining the grayscale difference of pixels at the same position on different pins of the hardware terminals. The possibility of each pixel being a normal point can be calculated using the grayscale difference, and then the defective area of ​​the continuous hardware terminals to be inspected is determined to complete the quality inspection of the hardware terminals.

[0037] The following is a detailed description of each step:

[0038] In step S10, refer to Figure 2 , we can see the collected images of continuous hardware terminals. Although the pins of continuous hardware terminals are arranged periodically, it is difficult to conduct effective quality inspection because the images taken by the camera will be deformed due to external factors. It can be understood that the grayscale of the same position points on different pins of qualified hardware terminals is consistent; if there are defective areas on the surface of the pins of the hardware terminals, that is, when an oxide layer or rust is formed, the grayscale of the position points of the defective areas will be different from the grayscale of the same position points on other pins.

[0039] It should be noted that each pixel point on the pin has a corresponding pixel point at the same position on other pins, which can also be called the periodic point of the pixel point. The detection method proposed by the present invention is to achieve the purpose of completing the quality detection of hardware terminals in the case of image deformation.

[0040] In step S20, it can be understood that the grayscale of pixels located in the same area (background area or stitch area) will remain consistent; while at the edge points, that is, the pixels located at the junction of the stitches and the background, there will be a large grayscale difference. Therefore, the grayscale differences of all pixels can be analyzed based on the grayscale image to obtain the pin arrangement direction and pin cycle interval of the hardware terminal. The pin cycle interval here is the period length, that is, the distance between the pins. The pin arrangement direction is as follows Figure 2 The direction indicated by arrow A.

[0041] Preferably, the stitch arrangement direction is determined by using the overall gradient direction of all pixels in the image. Figure 3 That is, the step S20 includes a step S21 of obtaining the gradient direction of all pixels in the grayscale image, and determining the stitch arrangement direction based on the gradient direction.

[0042] like Figure 2 As shown in , for continuous hardware terminals, each pin is mainly in the form of a strip, and the strip-shaped pins will make the pins have a higher gradient in the vertical direction, and the pin arrangement direction to be obtained is perpendicular to the pins, so the overall gradient direction of all pixels in the image can be used to determine the pin arrangement direction. In some preferred embodiments, the sum vector of the gradient vectors of all pixels in the entire image can be obtained, and the direction of the sum vector is the pin arrangement direction. Specifically, the gradient of any pixel point is determined as a vector, where the gradient amplitude is the vector modulus, and the gradient direction is the vector direction, and then the vectors corresponding to the gradients of all pixels are summed to obtain the sum vector of the gradient vectors of all pixels in the entire image. At this time, the direction of the sum vector obtained is the pin arrangement direction.

[0043] More preferably, the step of obtaining the arrangement rule of the hardware terminal pins based on the grayscale image further includes: dividing all pixels into multiple sequences based on the pin arrangement direction; and determining the pin period interval based on the gradient distribution of the pixels in the same sequence. Figure 3 As shown in , the step S20 further includes: step S22, dividing all the pixels into a plurality of sequences based on the stitch arrangement direction; and step S23, determining the stitch period interval based on the gradient distribution of the pixels in the same sequence.

[0044] By acquiring each sequence in a determined stitch arrangement direction, each pixel point and its periodic point are in the same sequence, which facilitates the subsequent search for the periodic point corresponding to the pixel point, and determines the stitch periodic interval based on the gradient distribution of the pixel points in the same sequence, so that accurate stitch periodic interval data can be obtained.

[0045] In step S23, it can be understood that since the stitches are continuous in the arrangement direction and there is a large grayscale difference between the stitches and the background, there is a large gradient change at the edge of the stitches, so all periodic intervals can be obtained through the gradient distribution of the pixels on each sequence. Some implementations are to obtain the gradient distribution of the pixels on each sequence, determine the best sequence based on the gradient distribution, and use the periodic interval of the best sequence as the stitch periodic interval. By screening out the best sequence without defective points and using the periodic interval of the best sequence as the periodic interval, the accuracy of the detection result can be guaranteed.

[0046] More preferably, the optimal sequence is determined by analyzing the correlation between the position of the edge point in each sequence and the interval distance between adjacent edge points and the grayscale difference between the edge points.

[0047] This is because the surface defects of the pins will also cause a large gradient on a sequence, and this gradient cannot be used as a basis for reflecting the periodic changes of the image. In addition, due to the deformation of the image caused by taking pictures, the periodic interval of the pins has a certain change pattern on a sequence, and the defective edge points will break this regularity. At the same time, the grayscale value of the defective edge points is different from the grayscale values ​​of other edge points. Therefore, by analyzing the correlation between the position of the edge points on each sequence and the interval distance between the adjacent edge points, as well as the grayscale difference between the edge points, and comprehensively evaluating the interval distance obtained by the best sequence, the sequence with the best periodic performance can be confirmed.

[0048] In some embodiments, the method for determining the best sequence is to obtain the gradient distribution of each sequence and take the interval of all edge points n with the same gradient direction and a gradient greater than 150, which is recorded as , represents the distance between the nth edge point and the next edge point in the mth sequence .

[0049] More preferably, by calculating the sequence evaluation value, the sequence corresponding to the maximum value in the sequence evaluation value is taken as the best sequence; the sequence evaluation value The calculation formula is:

[0050]

[0051] In the formula, It represents the Pearson correlation coefficient reflected by the location and interval distance of the edge points in each sequence. It reflects the correlation between two variables through the quotient of the product of the covariance and the standard deviation between the two variables. The range of the correlation coefficient is [-1, +1]. A negative value indicates that as the value of one variable increases, the other decreases. A positive value indicates that as the value of one variable increases, the other also increases. 0 indicates that the increase or decrease of one variable has no effect on the value of the other.

[0052] represents the number of edge points in each sequence, Represents the gray value corresponding to the nth edge point in the mth sequence, Represents the grayscale mean of all edge points in the mth sequence.

[0053] Evaluate the value in this sequence In the calculation formula, it is calculated by multiplying two fractions. In the first fraction, the periodicity of the edge points obtained on the sequence is evaluated; specifically, the numerator is It can be understood that since the grayscale of the defect point is close to that of the normal point in the pin, by taking the pixel point with a gradient greater than 150 as the edge point, for a certain hardware terminal to be tested, is a constant; and the denominator is It can be understood that if the periodicity of the sequence is better, the grayscale difference between the obtained edge points is smaller or even no difference, and the value of the score is larger; and in some ideal conditions, when the grayscale between the obtained edge points is completely consistent, In the second score, the correlation between the position of the edge point obtained on the sequence and the distance between the adjacent edge points is evaluated; specifically, the numerator is a fixed value of 1, and the denominator is It can be understood that if the correlation between the position of the edge point obtained on the sequence and the interval distance between adjacent edge points is better, then The closer the value of is to 1, the larger the value of the fraction will be; and under certain ideal conditions, The value of is equal to 1 so In the case of 0, it is impossible, so +0.1. Therefore, this calculation formula can comprehensively evaluate the periodic performance of the sequence and thus determine the best sequence.

[0054] This allows us to calculate each sequence The final calculated value is The sequence corresponding to the maximum value is the optimal sequence.

[0055] See also Figure 4 In some other implementations, the step S23 includes:

[0056] Step S231, obtaining the gradient distribution of the pixel points in each sequence, and determining the best sequence based on the gradient distribution;

[0057] Step S232, correcting the period interval of the optimal sequence to obtain the stitch period interval.

[0058] After the best sequence is determined, the period interval of the best sequence is corrected to obtain a more accurate stitch period interval, thereby improving the accuracy of finding the periodic points corresponding to the pixel points, thereby further ensuring the accuracy of the detection results.

[0059] The specific method of step S231 may refer to the content of determining the best sequence described above, which will not be described in detail here.

[0060] For step S232, see Figure 5 In some preferred embodiments, step S232 includes:

[0061] Step S2321, taking the cycle interval of the best sequence as the reference cycle interval, calculating the rate of change of the cycle interval;

[0062] Step S2322: Based on the change rate, the reference period interval is corrected to obtain the stitch period interval.

[0063] It can be understood that the stitch period interval is not a fixed value due to image deformation, and the stitch period interval will gradually increase or decrease, so that the period length of the pixels in the period interval will be inconsistent, but it will still follow the law of gradually increasing or decreasing the period length. For all the pixels in a period interval, the period length of the pixels will gradually increase or decrease. At this time, although the corresponding period interval cannot directly reflect the period performance of all the pixels contained, it can show the period difference with the pixels in different intervals, so at this time, the period interval can be determined as the reference period of all the pixels contained in it, reflecting the overall period performance. Generally speaking, the change of the period performance of the pixels in the sequence is uniform, so the change of the period interval can directly reflect the period change relationship of the sequence, and then the period of all the pixels in the period interval is corrected according to the period change relationship to obtain the period size of all the pixels. Therefore, the reference period length can be corrected by analyzing the change relationship of the period interval. That is, the period interval of the best sequence is used as a reference, and the change law of the period interval is analyzed to obtain a more accurate stitch period interval.

[0064] Wherein, the step 2321 is specifically as follows:

[0065] The pin arrangement direction of the hardware terminal is taken as the X direction, and the direction in which the period interval gradually increases is taken as the positive direction of the X axis. At this time, the rate of change of the period interval is k, and the calculation formula is as follows:

[0066]

[0067] In the formula, represents the change between adjacent cycles, Represents the distance between two center pixels corresponding to adjacent periodic intervals, Indicates the number of adjacent cycle intervals. Indicates the rate of change of the periodic interval;

[0068] The step 2322 is specifically as follows:

[0069] The period length of the center point in a period interval represents the average period length of all pixels in the period interval. At this time, the period length of the center point is the period interval length. Therefore, the center point in a period interval is taken as the reference point on the period interval. The reference period length is . (It should be noted here that: if the number of pixels in the period interval is an odd number, the pixel at one position in the center of the period interval is taken as the reference point. Otherwise, the pixel at two positions in the center of the period interval is taken as the reference point).

[0070] The period length of the pixels behind the reference point gradually increases, and the period length of the pixels in front of it gradually decreases. The calculation formula for the period length of the pixels within a period interval is as follows:

[0071]

[0072]

[0073] Where: It represents the period length of the i-th pixel point behind the reference point in the n-th period interval. = , It represents the period length of the i-th pixel point in front of the reference point within the n-th period interval. = .

[0074] Specifically, the length of the benchmark period of the benchmark point is , the period length of the first pixel behind the reference point = , the period length of the second pixel point behind the reference point = , the period length of the third pixel behind the reference point = , and so on, the cycle lengths of subsequent pixels are based on the previous one and calculated according to the rate of change; the cycle length of the first pixel in front of the reference point is = , the period length of the second pixel point in front of the reference point = , the period length of the third pixel behind the reference point = , and so on, the period length of subsequent pixels is based on the previous one and is calculated according to the rate of change.

[0075] By calculating with the above formula, the period length L of all pixels in all period intervals can be finally obtained.

[0076] In step S30, since the grayscale values ​​of the corresponding pixel points in each stitch in the continuously arranged stitch image are consistent, and if there is a defect in the stitch, the grayscale value of the pixel point at the defective position is inconsistent with the grayscale value of the pixel points at the corresponding position on other stitches, the possibility that the current pixel point belongs to a normal point can be determined by the grayscale difference between the current pixel point and the pixel points at other corresponding positions. That is, based on the stitch period interval, multiple periodic points in the same sequence as the current pixel point can be found. If there is no difference or a small difference in grayscale between the current pixel point and multiple periodic points, the possibility that the current pixel point belongs to a normal point is high, and if there is a difference in grayscale between the current pixel point and multiple periodic points, the possibility that the current pixel point belongs to a normal point is low.

[0077] Preferably, step S30 specifically includes, for each pixel point, obtaining multiple pixels at the same position on other pins corresponding to the current pixel point according to the arrangement rule, calculating multiple gray value differences, and then taking the absolute value sum to obtain the possibility.

[0078] The possibility The calculation formula is:

[0079]

[0080] Where: Indicates the gray value of the current pixel. Indicates the grayscale value of the current pixel corresponding to multiple pixels at the same position on other pins.

[0081] In this way, the grayscale difference between the current pixel and its multiple periodic points can be calculated and expressed as a specific value. Wherein, N can be selected according to the number of pins of the hardware terminal to be detected. In some preferred embodiments, N is 3-7, and in some specific embodiments, N is 5.

[0082] In step S40, the probability For example, a threshold can be set if the probability of a pixel If the pixel exceeds the threshold, it is considered a normal point. If it does not exceed the threshold, it is judged as a defect point, thereby determining the defect area of ​​the hardware terminal to be inspected.

[0083] In some preferred embodiments, the method for determining the continuous hardware terminal defect area to be detected is to perform adaptive linear grayscale stretching based on the calculated probability. That is, the calculated probability of the pixel point belonging to a normal point is used. , k is adaptively selected by linear grayscale stretching method to obtain an enhanced image of defects. Through the enhanced grayscale image, the threshold segmentation of the image is performed by Otsu algorithm to obtain a binary image. The connected area with a value of 1 in the binary image is the defective area of ​​the hardware terminal.

[0084] It is understandable that since the grayscale of the defective point is close to that of the normal point in the pin, the possibility As the coefficient k value in the linear transformation function, the grayscale value of the defective area can be enhanced, while the grayscale value of the normal area can be weakened, which is equivalent to amplifying the difference between the two. Therefore, grayscale stretching is performed first and then the defective area is determined, which can further improve the accuracy of the detection results.

[0085] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0086] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for quality inspection of hardware terminals, characterized in that: The quality detection method comprises: Collecting images of the continuous hardware terminals to be inspected, and graying the collected images to obtain grayscale images; Acquire an arrangement rule of the pins of the hardware terminal based on the grayscale image, wherein the arrangement rule includes a pin arrangement direction and a pin period interval; Based on the arrangement rule, the grayscale difference of the pixel points at the same position on different pins is obtained, and the possibility of the pixel point being a normal point is determined through the grayscale difference; Determine the defective area of ​​the continuous type hardware terminal to be detected based on the possibility; The step of obtaining the arrangement rule of the hardware terminal pins based on the grayscale image also includes: Divide all pixels into multiple sequences based on the stitch arrangement direction; Determine the stitch period interval based on the gradient distribution of pixels in the same sequence; The step of determining the stitch period interval based on the gradient distribution of pixel points in the same sequence is: Obtaining the gradient distribution of the pixel points on each sequence, and determining the best sequence based on the gradient distribution; using the period interval of the best sequence as the stitch period interval; The optimal sequence is determined by analyzing the correlation between the position of the edge point in each sequence and the interval distance between adjacent edge points and the grayscale difference between the edge points; By calculating the sequence evaluation values, the sequence corresponding to the maximum value in the sequence evaluation values ​​is taken as the optimal sequence; The sequence evaluation value The calculation formula is: In the formula, It represents the Pearson correlation coefficient reflected by the position and interval distance of the edge points in each sequence. represents the number of edge points in each sequence, Represents the gray value corresponding to the nth edge point in the mth sequence, Represents the grayscale mean of all edge points in the mth sequence.

2. The quality inspection method for hardware terminals according to claim 1, characterized in that: The step of obtaining the arrangement rule of the hardware terminal pins based on the grayscale image comprises: The gradient direction of all pixels in the grayscale image is obtained, and the stitch arrangement direction is determined based on the gradient direction.

3. The quality inspection method of hardware terminals according to claim 1, characterized in that: The step of determining the stitch period interval based on the gradient distribution of pixel points on the same sequence includes: obtaining the gradient distribution of pixel points on each sequence, determining the best sequence based on the gradient distribution; and correcting the period interval of the best sequence to obtain the stitch period interval.

4. The quality inspection method of hardware terminals as claimed in claim 3, characterized in that: The step of correcting the cycle interval of the optimal sequence to obtain the stitch cycle interval comprises: Taking the cycle interval of the best sequence as the reference cycle interval, the rate of change of the cycle interval is calculated; Based on the change rate, the reference cycle interval is corrected to obtain the stitch cycle interval.

5. The quality inspection method for hardware terminals according to any one of claims 1 to 4, characterized in that: The step of obtaining the grayscale difference of the pixels at the same position on different pins based on the arrangement rule and determining the possibility that the pixels belong to normal points is specifically as follows: For each pixel point, multiple pixels at the same position on other pins corresponding to the current pixel point are obtained according to the arrangement rule, and after multiple gray value differences are calculated, the absolute values ​​are summed to obtain the possibility.

6. The quality inspection method of hardware terminals according to claim 5, characterized in that: The method of determining the defective region of the continuous hardware terminal to be detected based on the possibility is to determine the defective region by performing adaptive linear grayscale stretching based on the calculated possibility.

Citation Information

Patent Citations

  • Connector pin detection method based on image features

    CN117372435A

  • Automobile horn production quality detection method

    CN117723548A