HDMI high-definition cable production defect detection method, device, computer equipment and medium
By acquiring and preprocessing the original and depth images of HDMI high-definition lines, detecting the difference in the average depth value of the connector interface and pin area, and adjusting the lighting conditions, the detection false alarm problem caused by light interference is solved, and more accurate and efficient detection is achieved.
Patent Information
- Application Number
- CN202411143491.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-08-20
AI Technical Summary
During the HDMI high-definition line production process, due to the large number of light interference factors, the detection result false alarm rate is high, which seriously affects the detection efficiency.
By acquiring the original image and depth image, pre-processing, detecting the connector interface area and pin area, comparing the difference in average depth values, adjusting the lighting conditions to eliminate interference, and ensuring detection accuracy.
It improves the accuracy and efficiency of HDMI high-definition line production defect detection, and reduces the impact of lighting conditions on the detection results.
Smart Images

Figure CN119086560B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection technology, and in particular to a method, device, computer equipment and medium for detecting production defects of HDMI high-definition cables. Background Art
[0002] HDMI (High Definition Multimedia Interface) high-definition cable is a cable harness used to transmit high-definition video and multi-channel audio data. It is widely used in devices such as set-top boxes, personal computers, televisions, game consoles, integrated amplifiers, digital audio and televisions.
[0003] During the HDMI cable manufacturing process, images of the cables are typically captured using image acquisition equipment, followed by image detection algorithms to detect defects. However, due to the complex production environment and the numerous factors influencing light interference, false positives are often detected due to light interference, severely impacting HDMI cable inspection efficiency. Summary of the Invention
[0004] Based on this, it is necessary to provide a HDMI high-definition cable production defect detection method, device, computer equipment and medium to address the problem that the detection results of HDMI high-definition cables are often false positives due to the influence of light, which seriously affects the detection efficiency of HDMI high-definition cables.
[0005] A method for detecting production defects of an HDMI high-definition cable, comprising:
[0006] Acquire an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and preprocess the original image to generate a preprocessed image;
[0007] Detecting a connector interface area and a pin area in the connector interface area in the preprocessed image;
[0008] If an abnormal pin area is detected, determining an ideal distribution area of the abnormal pin area under normal conditions according to the normal pin area;
[0009] According to the depth image, determining the average depth value of the ideal distribution area as a first average depth value, and determining the average depth value of the normal pin area as a second average depth value;
[0010] If the difference between the first average depth value and the second average depth value is greater than a first difference threshold, it is determined that a pin defect exists; if the difference between the first average depth value and the second average depth value is not greater than the first difference threshold, the lighting conditions are adjusted to re-perform the inspection.
[0011] The present invention provides a method for detecting production defects of HDMI high-definition cables. During detection, the method first obtains an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and pre-processes the original image to generate a pre-processed image. Then, the connector interface area and the pin area in the connector interface area in the pre-processed image are detected. If an abnormal pin area is detected, the ideal distribution area of the abnormal pin area under normal conditions is determined based on the normal pin area. Based on the depth image, the average depth value of the ideal distribution area is determined as a first average depth value, and the average depth value of the normal pin area is determined as a second average depth value. If the difference between the first average depth value and the second average depth value is greater than a first difference threshold, it is determined that a pin defect exists. If the difference between the first average depth value and the second average depth value is not greater than the first difference threshold, the lighting conditions are adjusted to re-detect. By comparing the first average depth value with the second average depth value, the interference of the lighting conditions on the detection results can be eliminated, making the detection results more accurate and improving the detection efficiency.
[0012] In one embodiment, the connector interface area is trapezoidal, and the method further comprises:
[0013] Determine the length of the upper base, the length of the lower base, and the height of the trapezoid;
[0014] Determine the ideal distribution position of the center point of each pin area according to the length of the upper base, the length of the lower base and the height of the trapezoid;
[0015] The distance difference between the actual distribution position and the ideal distribution position of the center point is calculated, and the pin area whose distance difference is not greater than the second difference threshold is determined as a normal pin area, and the pin area whose distance difference is greater than the second difference threshold is determined as an abnormal pin area.
[0016] In one embodiment, determining the ideal distribution position of the center point of each pin area according to the upper base length, the lower base length, and the trapezoid height includes:
[0017] Determine the ideal distribution positions of the center points of the pin regions of the first pin, the second pin, the eighteenth pin, and the nineteenth pin according to the upper base length, the lower base length, and the trapezoid height;
[0018] Determining the ideal distribution positions of the center points of the pin regions of the pins between the first pin and the nineteenth pin based on the ideal distribution positions of the center points of the pin regions of the first pin and the nineteenth pin;
[0019] The ideal distribution positions of the center points of the pin regions of the pins between the second pin and the eighteenth pin are determined according to the ideal distribution positions of the center points of the pin regions of the second pin and the eighteenth pin.
[0020] In one embodiment, preprocessing the original image to generate a preprocessed image includes:
[0021] Performing grayscale processing on the original image;
[0022] performing a first filtering process on the grayscale processed image using a mean filter, and performing a second filtering process on the grayscale processed image using a Gaussian filter;
[0023] Performing gradient processing and threshold segmentation on the image after the second filtering process to generate a pre-processed image.
[0024] In one embodiment, the original image includes multiple images taken from different positions.
[0025] In one embodiment, the original image includes a first original image and a second original image, and the method further includes:
[0026] Preprocessing the first original image and the second original image to generate a first preprocessed image and a second preprocessed image respectively;
[0027] The connector interface area is detected by using the first pre-processed image, and the cable area is detected by using the second pre-processed image.
[0028] In one embodiment, the method further comprises:
[0029] detecting a cable region in the second preprocessed image;
[0030] If an abnormal cable area is detected, the original contour line of the abnormal cable area is expanded and reduced to generate an expanded contour line and a reduced contour line respectively;
[0031] determining, based on the depth image, an average depth value of an area between the expanded contour line and the original contour line as a third average depth value, and determining an average depth value of an area between the reduced contour line and the original contour line as a fourth average depth value;
[0032] If the difference between the third average depth value and the fourth average depth value is greater than a third difference threshold, it is determined that a cable defect exists; if the difference between the third average depth value and the fourth average depth value is not greater than the third difference threshold, the lighting conditions are adjusted to re-perform the inspection.
[0033] A device for detecting production defects of an HDMI high-definition cable, comprising:
[0034] a processing module, configured to obtain an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and preprocess the original image to generate a preprocessed image;
[0035] a detection module, configured to detect a connector interface region and a pin region in the connector interface region in the preprocessed image;
[0036] a first determining module, configured to determine an ideal distribution area of the abnormal pin area under a normal state according to the normal pin area if the detecting module detects the abnormal pin area;
[0037] A second determining module is configured to determine a first average depth value of the ideal distribution area and a second average depth value of the normal pin area according to the depth image;
[0038] an analysis module configured to determine that a lead defect exists if the difference between the first average depth value and the second average depth value is greater than a preset difference threshold, and to adjust lighting conditions to re-perform inspection if the difference between the first average depth value and the second average depth value is not greater than the preset depth difference threshold.
[0039] A computer device includes a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the computer program implements the above-mentioned HDMI high-definition cable production defect detection method.
[0040] A computer-readable storage medium stores a computer program, which implements the above-mentioned HDMI high-definition cable production defect detection method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of a method for detecting production defects of HDMI high-definition cables according to the present invention;
[0042] Figure 2 This is a schematic structural diagram of the connector interface area in the HDMI high-definition cable production defect detection method of the present invention;
[0043] Figure 3 This is a schematic diagram of the structure of the HDMI high-definition cable production defect detection device of the present invention;
[0044] Figure 4 Schematic diagram of the structure of the computer device of the present invention. DETAILED DESCRIPTION
[0045] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0046] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be an intermediate element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be an intermediate element at the same time. In contrast, when an element is referred to as being "directly on" another element, there is no intermediate element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only."
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. The terms used herein in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0048] The present invention discloses a method, device, computer equipment and medium for detecting production defects of an HDMI high-definition cable.
[0049] like Figures 1 to 2 As shown, the HDMI high-definition line production defect detection method includes:
[0050] Step S11: obtaining an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and preprocessing the original image to generate a preprocessed image.
[0051] In this step, before conducting HDMI high-definition cable production defect detection, hardware layout needs to be carried out at the detection site. Hardware layout includes light source selection, camera selection, hardware platform construction, etc. Furthermore, there are multiple light sources, which are installed in different positions to cooperate with full-angle detection of HDMI high-definition cables. During the detection process, due to factors such as light reflection, uneven lighting and camera resolution, it may be necessary to adjust the lighting conditions to avoid affecting the detection results. Adjusting the lighting conditions includes but is not limited to adjusting the on and off status of one or more light sources, and adjusting the luminous power of one or more light sources. The original image contains two-dimensional image information taken by the first camera, and the depth image contains three-dimensional image information taken by the second camera.
[0052] Furthermore, preprocessing the original image to generate a preprocessed image includes: grayscaling the original image; performing a first filtering process on the grayscaled image using a mean filter, and a second filtering process on the grayscaled image using a Gaussian filter; and performing gradient processing and threshold segmentation on the second filtered image to generate the preprocessed image. The mean filter can merge pixels with large differences in pixel value with the surrounding background pixel values, smoothing the gradient of the image background pixels and highlighting the location and feature information of the HDMI cable to be detected. The Gaussian filter can further filter out high-frequency noise in the image.
[0053] Step S12: Detecting the connector interface area in the pre-processed image and the pin area in the connector interface area.
[0054] Among them, such as Figure 2 As shown, the HDMI high-definition cable to be tested uses a standard connector interface. The connector interface area is a trapezoid, where 1-19 represent pins 1 to 19, respectively. Specifically, there are two rows of pins. The first row of pins includes odd-numbered pins such as pin 1, pin 3...pin 19, and the second row of pins includes even-numbered pins such as pin 2, pin 4...pin 18.
[0055] When inspecting the pin areas in the connector interface area, the pin areas of the first row of pins and the pin areas of the second row of pins can be inspected separately. Furthermore, during inspection, the upper base length, lower base length, and trapezoidal height of the trapezoidal connector interface area are first determined; the ideal distribution position of the center point of each pin area is determined based on the upper base length, lower base length, and trapezoidal height; the distance difference between the actual distribution position of the center point and the ideal distribution position is calculated, and pin areas with a distance difference no greater than a second difference threshold are determined as normal pin areas, while pin areas with a distance difference greater than the second difference threshold are determined as abnormal pin areas.
[0056] It should be noted that when pin defects such as pin tilt or pin loss occur in the connector interface area, the position of the pin area's center point changes accordingly, allowing for the distinction between normal and abnormal pin areas. Due to the influence of detection error, pin areas with a distance difference no greater than the second difference threshold are considered normal pin areas. This second difference threshold represents the maximum allowable error.
[0057] Furthermore, when determining the ideal distribution position of the center point of each pin area based on the upper base length, the lower base length and the trapezoid height, the ideal distribution positions of the center points of the pin areas of the first pin, the second pin, the eighteenth pin and the nineteenth pin are first determined based on the upper base length, the lower base length and the trapezoid height; then, based on the ideal distribution positions of the center points of the pin areas of the first pin and the nineteenth pin, the ideal distribution positions of the center points of the pin areas of the pins between the first pin and the nineteenth pin are determined; and then, based on the ideal distribution positions of the center points of the pin areas of the second pin and the eighteenth pin, the ideal distribution positions of the center points of the pin areas of the pins between the second pin and the eighteenth pin are determined.
[0058] It should be noted that the first pin and the nineteenth pin are respectively the pins at the two ends of the first row of pins in the connector interface area, and the second pin and the eighteenth pin are respectively the pins at the two ends of the second row of pins in the connector interface area. The ideal distribution position of the center point of the pin area of the pin between the first pin and the nineteenth pin is determined based on the ideal distribution position of the center point of the pin area of the pin between the first pin and the nineteenth pin, and the ideal distribution position of the center point of the pin area of the pin between the second pin and the eighteenth pin is determined based on the ideal distribution position of the center point of the pin area of the pin between the second pin and the eighteenth pin, which can reduce detection errors.
[0059] Step S13: If an abnormal pin region is detected, an ideal distribution region of the abnormal pin region under normal conditions is determined based on the normal pin region.
[0060] The abnormal pin region is the pin region corresponding to the actual distribution position of the center point of the pin region, and the ideal distribution region is the pin region corresponding to the ideal distribution position of the center point of the pin region. Because the difference between the actual distribution position and the ideal distribution position of the center point of the pin region is greater than a second difference threshold, the abnormal pin region deviates from the ideal distribution region.
[0061] Determining the ideal distribution area of the abnormal pin area under normal conditions based on the normal pin area can be achieved through the normal pins adjacent to the abnormal pins. For example, if the pin area of the fifth pin is an abnormal pin area, while the pin area of the third pin and the pin area of the seventh pin are normal pin areas, the ideal distribution area of the fifth pin under normal conditions can be determined based on the pin area of the third pin and the pin area of the seventh pin. According to the characteristics of the connector interface area, the center point of the pin area of the third pin and the center point of the pin area of the seventh pin are located on both sides of the center point of the pin area of the fifth pin, and the distance from the center point of the pin area of the fifth pin to the center point of the pin area of the third pin and the center point of the pin area of the seventh pin is equal, the ideal distribution area of the fifth pin under normal conditions can be determined accordingly.
[0062] Step S14: According to the depth image, the average depth value of the ideal distribution area is determined as a first average depth value, and the average depth value of the normal pin area is determined as a second average depth value.
[0063] In this step, since the depth image contains distance information, the first average depth value and the second average depth value can be determined respectively according to the depth image.
[0064] For example, the pin area of the fifth pin is an abnormal pin area, while the pin area of the third pin and the pin area of the seventh pin are normal pin areas, then the average depth value of the pin area of the third pin and the pin area of the seventh pin can be determined as the second average depth value, and the average depth value of the ideal distribution area of the fifth pin in the normal state can be determined as the first average depth value.
[0065] Step S15: If the difference between the first average depth value and the second average depth value is greater than a first difference threshold, it is determined that a lead defect exists; if the difference between the first average depth value and the second average depth value is not greater than the first difference threshold, the lighting conditions are adjusted to re-perform the inspection.
[0066] Among them, if the abnormal pin area is misidentified due to factors such as light interference, the first average depth value should be equal to the second average depth value, or the difference between the first average depth value and the second average depth value is within a reasonable error range. If the abnormal pin area is a real pin defect, the difference between the first average depth value and the second average depth value will be quite large.
[0067] If the difference between the first average depth value and the second average depth value is greater than the first difference threshold, it can be determined that there is a pin defect; due to the influence of detection error, if the difference between the first average depth value and the second average depth value is not greater than the first difference threshold, it is considered that the difference between the first average depth value and the second average depth value is within a reasonable error range, and the first difference threshold is the maximum allowable error. At this time, the detection result of the abnormal pin area is very likely to be caused by the interference of lighting conditions. The lighting conditions should be adjusted for re-detection to eliminate the influence of the interference of lighting conditions on the detection results.
[0068] The original image includes multiple images taken from different positions. Further, the original image includes a first original image and a second original image, and the above method further includes:
[0069] The first original image and the second original image are preprocessed to generate a first preprocessed image and a second preprocessed image, respectively. The connector interface area is detected using the first preprocessed image, and the cable area is detected using the second preprocessed image. Because the connector interface area is located at both ends of the HDMI high-definition cable to be detected, and the cable area is located between the connector interface areas, detecting the connector interface area and the cable area using the first preprocessed image and the second preprocessed image, respectively, can increase the coverage of image acquisition of the connector interface area and the cable area, thereby improving detection efficiency.
[0070] Furthermore, when performing HDMI high-definition cable production defect detection, the cable area in the second pre-processed image can also be first detected; if an abnormal cable area is detected, the original contour line of the abnormal cable area is expanded and reduced respectively to generate an expanded contour line and a reduced contour line respectively; based on the depth image, the average depth value of the area between the expanded contour line and the original contour line is determined as the third average depth value, and the average depth value of the area between the reduced contour line and the original contour line is determined as the fourth average depth value; if the difference between the third average depth value and the fourth average depth value is greater than the third difference threshold, it is determined that a cable defect exists; if the difference between the third average depth value and the fourth average depth value is not greater than the third difference threshold, the lighting conditions are adjusted to re-detect. Considering that the abnormal cable area may be located at the edge of the cable area, before calculating the third average depth value, it is necessary to detect whether there is any part of the area between the expanded contour line and the original contour line that exceeds the cable area, and if so, it is eliminated.
[0071] It should be noted that cable area defect types include scratches and damage. By expanding and reducing the original contour line of the abnormal cable area to generate an expanded contour line and a reduced contour line, respectively, if the abnormal cable area is a real cable defect, the difference between the third average depth value and the fourth average depth value will be large. If the abnormal cable area is a misidentification caused by factors such as light interference, the difference between the third average depth value and the fourth average depth value should be within a reasonable error range. The third difference threshold is the maximum allowable error.
[0072] The present invention provides a method for detecting production defects of HDMI high-definition cables. During detection, the method first obtains an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and pre-processes the original image to generate a pre-processed image. Then, the connector interface area and the pin area in the connector interface area in the pre-processed image are detected. If an abnormal pin area is detected, the ideal distribution area of the abnormal pin area under normal conditions is determined based on the normal pin area. Based on the depth image, the average depth value of the ideal distribution area is determined as a first average depth value, and the average depth value of the normal pin area is determined as a second average depth value. If the difference between the first average depth value and the second average depth value is greater than a first difference threshold, it is determined that a pin defect exists. If the difference between the first average depth value and the second average depth value is not greater than the first difference threshold, the lighting conditions are adjusted to re-detect. By comparing the first average depth value with the second average depth value, the interference of the lighting conditions on the detection results can be eliminated, making the detection results more accurate and improving the detection efficiency.
[0073] like Figure 3 As shown, the HDMI high-definition line production defect detection device 20 disclosed in the present invention includes:
[0074] The processing module 21 is used to obtain an original image containing the HDMI high-definition cable to be detected and a depth image corresponding to the original image under current lighting conditions, and preprocess the original image to generate a preprocessed image; the detection module 22 is used to detect the connector interface area and the pin area in the connector interface area in the preprocessed image; the first determination module 23 is used to determine the ideal distribution area of the abnormal pin area under normal conditions based on the normal pin area if the detection module detects an abnormal pin area; the second determination module 24 is used to determine the first average depth value of the ideal distribution area and the second average depth value of the normal pin area based on the depth image; the analysis module 25 is used to determine that there is a pin defect if the difference between the first average depth value and the second average depth value is greater than a preset difference threshold, and adjust the lighting conditions to re-detect if the difference between the first average depth value and the second average depth value is not greater than the preset depth difference threshold.
[0075] The HDMI high-definition cable production defect detection device of the present invention includes a processing module, a detection module, a first determination module, a second determination module, and an analysis module. The processing module is used to obtain an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and preprocess the original image to generate a preprocessed image; the detection module is used to detect the connector interface area and the pin area in the connector interface area in the preprocessed image; the first determination module is used to determine the ideal distribution area of the abnormal pin area under normal conditions based on the normal pin area if the detection module detects an abnormal pin area; the second determination module is used to determine a first average depth value of the ideal distribution area and a second average depth value of the normal pin area based on the depth image; the analysis module is used to determine the presence of a pin defect if the difference between the first average depth value and the second average depth value is greater than a preset difference threshold, and adjust the lighting conditions to re-perform the detection if the difference between the first average depth value and the second average depth value is not greater than the preset depth difference threshold. By cooperating with each other, the processing module, the detection module, the first determination module, the second determination module and the analysis module, the first average depth value is compared with the second average depth value, which can eliminate the interference of lighting conditions on the detection results, make the detection results more accurate, and improve the detection efficiency.
[0076] The present invention also discloses a computer device. Figure 4 As shown, the computer device 40 includes a processor 41 and a memory 42. The memory 42 is used to store a computer program 43. When the computer program 43 is executed by the processor 41, the above-mentioned HDMI high-definition cable production defect detection method is implemented.
[0077] The computer-readable storage medium disclosed in the present invention stores a computer program, which implements the above-mentioned HDMI high-definition cable production defect detection method when executed by a processor.
[0078] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0079] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A method for detecting production defects of HDMI high-definition cables, characterized in that: include: Acquire an original image containing the HDMI high-definition cable to be detected under current lighting conditions and a depth image corresponding to the original image, and preprocess the original image to generate a preprocessed image; detecting a connector interface area and a pin area in the connector interface area in the preprocessed image; If an abnormal pin area is detected, determining an ideal distribution area of the abnormal pin area under normal conditions according to the normal pin area; According to the depth image, determining the average depth value of the ideal distribution area as a first average depth value, and determining the average depth value of the normal pin area as a second average depth value; If the difference between the first average depth value and the second average depth value is greater than a first difference threshold, it is determined that a lead defect exists; if the difference between the first average depth value and the second average depth value is not greater than the first difference threshold, the lighting conditions are adjusted to re-perform the inspection; Wherein, the original image includes multiple images taken from different positions; Furthermore, the original image includes a first original image and a second original image, and the method further includes preprocessing the first original image and the second original image to generate a first preprocessed image and a second preprocessed image, respectively, detecting the connector interface area using the first preprocessed image, and detecting the cable area using the second preprocessed image; Furthermore, the method also includes detecting the cable area in the second preprocessed image; if an abnormal cable area is detected, the original contour line of the abnormal cable area is expanded and reduced respectively to generate an expanded contour line and a reduced contour line respectively; according to the depth image, the average depth value of the area between the expanded contour line and the original contour line is determined as a third average depth value, and the average depth value of the area between the reduced contour line and the original contour line is determined as a fourth average depth value; if the difference between the third average depth value and the fourth average depth value is greater than a third difference threshold, it is determined that a cable defect exists, and if the difference between the third average depth value and the fourth average depth value is not greater than the third difference threshold, the lighting conditions are adjusted to re-detect.
2. The HDMI high-definition cable production defect detection method according to claim 1, characterized in that: The connector interface area is trapezoidal, and the method further comprises: Determine the length of the upper base, the length of the lower base, and the height of the trapezoid; Determine the ideal distribution position of the center point of each pin area according to the length of the upper base, the length of the lower base and the height of the trapezoid; The distance difference between the actual distribution position and the ideal distribution position of the center point is calculated, and the pin area whose distance difference is not greater than the second difference threshold is determined as a normal pin area, and the pin area whose distance difference is greater than the second difference threshold is determined as an abnormal pin area.
3. The HDMI high-definition cable production defect detection method according to claim 2, characterized in that: Determining the ideal distribution position of the center point of each pin area according to the upper base length, the lower base length, and the trapezoid height includes: Determine the ideal distribution positions of the center points of the pin regions of the first pin, the second pin, the eighteenth pin, and the nineteenth pin according to the upper base length, the lower base length, and the trapezoid height; Determining the ideal distribution positions of the center points of the pin regions of the pins between the first pin and the nineteenth pin based on the ideal distribution positions of the center points of the pin regions of the first pin and the nineteenth pin; The ideal distribution positions of the center points of the pin regions of the pins between the second pin and the eighteenth pin are determined according to the ideal distribution positions of the center points of the pin regions of the second pin and the eighteenth pin.
4. The HDMI high-definition cable production defect detection method according to claim 1, characterized in that: Preprocessing the original image to generate a preprocessed image includes: Performing grayscale processing on the original image; performing a first filtering process on the grayscale processed image using a mean filter, and performing a second filtering process on the grayscale processed image using a Gaussian filter; Performing gradient processing and threshold segmentation on the image after the second filtering process to generate a pre-processed image.
5. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method for detecting production defects of an HDMI high-definition cable according to any one of claims 1 to 4 is implemented.
6. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the HDMI high-definition cable production defect detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Connector pin defect detection method, device, equipment and medium
CN116030053A
Electrical appliance terminal production defect detection method
CN116758056A
Two-dimensional and three-dimensional combined defect detection method, device, medium and equipment
CN117078666A