Method and device for detecting production defects of HDMI (High Definition Multimedia Interface) high-definition line, computer equipment and medium
By comparing the average depth values of the actual pin area of the HDMI high-definition line with the ideal distribution, the detection false alarm problem caused by light interference is solved, and the accuracy and efficiency of detection are improved.
Patent Information
- Application Number
- CN202411143491.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-20
AI Technical Summary
The detection results of HDMI high-definition cables are often affected by light, resulting in false alarms and seriously affecting the detection efficiency.
By obtaining the original image and depth image under the current lighting conditions, performing preprocessing, detecting the connector interface area and pin area, comparing the actual distribution of the abnormal pin area with the average depth value of the ideal distribution, if the difference is greater than the threshold, it is determined There is a defect, otherwise the lighting conditions are adjusted to re-detection.
Eliminate the interference of lighting conditions on the detection results and improve detection accuracy and efficiency.
Smart Images

Figure CN119086560A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a method, device, computer equipment and medium for detecting production defects of HDMI high-definition lines. 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 set-top boxes, personal computers, televisions, game consoles, integrated amplifiers, digital audio and televisions.
[0003] In the manufacturing process of HDMI high-definition cables, images of HDMI high-definition cables are generally collected through image acquisition equipment after production, and then production defects of HDMI high-definition cables are detected through image detection algorithms. However, due to the complex production environment of HDMI high-definition cables and the many factors affecting light interference, the detection results of HDMI high-definition cables are often affected by light and false alarms occur, which seriously affects the detection efficiency of HDMI high-definition cables. 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 line, comprising: Acquire an original image containing the HDMI high-definition line 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 in the preprocessed image and a pin area in the connector interface area; If an abnormal pin area is detected, determining an ideal distribution area of the abnormal pin area under a normal state 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.
[0006] The HDMI high-definition line production defect detection method of the present invention first obtains the original image containing the HDMI high-definition line to be detected under the current lighting conditions and the depth image corresponding to the original image, and pre-processes the original image to generate a pre-processed image; then detects the connector interface area and the pin area in the connector interface area in the pre-processed image; if an abnormal pin area is detected, the ideal distribution area of the abnormal pin area under normal conditions is determined according to the normal pin area; according to the depth image, the average depth value of the ideal distribution area is determined as the first average depth value, and the average depth value of the normal pin area is determined as the second average depth value; if the difference between the first average depth value and the second average depth value is greater than the first difference threshold, it is determined that there is a pin defect, and 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, so that the detection results are more accurate and the detection efficiency is improved.
[0007] In one embodiment, 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 of the center point and the ideal distribution position 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.
[0008] In one embodiment, determining 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 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 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 the pin area of the pins between the first pin and the nineteenth pin according to the ideal distribution position of the center point of the pin area of the first pin and the nineteenth pin; According to the ideal distribution positions of the center points of the pin regions of the second pin and the eighteenth 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.
[0009] In one embodiment, 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 by using a mean filter, and performing a second filtering process on the grayscale processed image by using a Gaussian filter; The image after the second filtering process is subjected to gradient processing and threshold segmentation to generate a preprocessed image.
[0010] In one embodiment, the original image includes multiple images taken from different positions.
[0011] In one embodiment, 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; 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.
[0012] In one embodiment, the method further comprises: detecting a cable region in the second preprocessed image; If an abnormal cable area is detected, the original contour line of the abnormal cable area is enlarged and reduced to generate an enlarged contour line and a reduced contour line respectively; According to the depth image, determining an average depth value of a region between the enlarged contour line and the original contour line as a third average depth value, and determining an average depth value of a region between the reduced contour line and the original contour line 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; 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 detection.
[0013] A HDMI high-definition line production defect detection device, comprising: A processing module, used to obtain an original image containing the HDMI high-definition line 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; A detection module, used for detecting a connector interface area in the preprocessed image and a pin area in the connector interface area; A first determination module, configured to determine an ideal distribution area of the abnormal pin area under a normal state according to a normal pin area if the detection module detects an abnormal pin area; A second determination module, 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; The analysis module is used 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 the lighting conditions for re-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.
[0014] A computer device 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 above-mentioned HDMI high-definition line production defect detection method is implemented.
[0015] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned HDMI high-definition line production defect detection method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the process of the HDMI high-definition cable production defect detection method of the present invention; Figure 2 It is a structural schematic diagram of the connector interface area in the HDMI high-definition cable production defect detection method of the present invention; Figure 3 It is a structural schematic diagram of the HDMI high-definition cable production defect detection device of the present invention; Figure 4 It is a schematic diagram of the structure of the computer device of the present invention. DETAILED DESCRIPTION
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0018] 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 also be a central 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 a central 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."
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0020] The invention discloses a method, a device, a computer equipment and a medium for detecting production defects of an HDMI high-definition line.
[0021] like Figure 1 to Figure 2 As shown, the HDMI high-definition line production defect detection method includes: Step S11: obtaining an original image containing the HDMI high-definition line 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.
[0022] 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, the number of light sources is multiple, and they are installed in different positions to cooperate with full-angle detection of HDMI high-definition cables. During the detection process, due to the influence of 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.
[0023] Furthermore, preprocessing the original image to generate a preprocessed image includes: graying the original image; performing a first filtering process on the grayed image through a mean filter, and performing a second filtering process on the grayed image through a Gaussian filter; performing gradient processing and threshold segmentation on the image after the second filtering process to generate a preprocessed image. The mean filter can fuse the pixel points with large pixel value differences in the image with the surrounding background pixel values, so that the image background pixel gradient tends to be smooth, thereby highlighting the position and feature information of the HDMI high-definition line to be detected. The Gaussian filter can further filter out high-frequency noise in the image.
[0024] Step S12: Detecting the connector interface area in the pre-processed image and the pin area in the connector interface area.
[0025] Among them, Figure 2As shown, the HDMI high-definition cable to be tested adopts a standard connector interface, and the connector interface area is a trapezoid, wherein 1-19 represent the first pin to the nineteenth pin respectively, and specifically include two rows of pins. The first row of pins includes the first pin, the third pin...the nineteenth pin and other odd-numbered pins, and the second row of pins includes the second pin, the fourth pin...the eighteenth pin and other even-numbered pins.
[0026] When detecting the pin area in the connector interface area, the pin area of the first row of pins and the pin area of the second row of pins can be detected separately. Furthermore, during the detection, the upper bottom side length, the lower bottom side length and the 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 according to the upper bottom side length, the lower bottom side length and the trapezoidal height; the distance difference between the actual distribution position of the center point and the ideal distribution position is calculated, and the pin area with a distance difference not greater than the second difference threshold is determined as a normal pin area, and the pin area with a distance difference greater than the second difference threshold is determined as an abnormal pin area.
[0027] It should be noted that when pin defects such as pin tilt and pin defect occur in the connector interface area, the position of the center point of the pin area changes accordingly, which can be used to distinguish between normal pin areas and abnormal pin areas. Due to the influence of detection error, the pin area with a distance difference not greater than the second difference threshold is determined as a normal pin area, that is, the second difference threshold is the maximum allowable error.
[0028] Furthermore, when 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, the ideal distribution position of the center points of the pin areas of the first pin, the second pin, the eighteenth pin and the nineteenth pin is first determined according to the upper base length, the lower base length and the trapezoid height; then, according to the ideal distribution position of the center points of the pin areas of the first pin and the nineteenth pin, the ideal distribution position of the center points of the pin areas of the pins between the first pin and the nineteenth pin is determined; and then, according to the ideal distribution position of the center points of the pin areas of the second pin and the eighteenth pin, the ideal distribution position of the center points of the pin areas of the pins between the second pin and the eighteenth pin is determined.
[0029] 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.
[0030] Step S13: If an abnormal pin region is detected, an ideal distribution region of the abnormal pin region under a normal state is determined according to the normal pin region.
[0031] The abnormal pin area is the pin area corresponding to the actual distribution position of the center point of the pin area, and the ideal distribution area is the pin area corresponding to the ideal distribution position of the center point of the pin area. Since the difference between the actual distribution position of the center point of the pin area and the ideal distribution position is greater than the second difference threshold, the abnormal pin area deviates from the ideal distribution area.
[0032] 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, and the ideal distribution area of the fifth pin under normal conditions can be determined accordingly.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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.
[0037] 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 different.
[0038] 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 most likely caused by the interference of lighting conditions. The lighting conditions should be adjusted for re-detection to eliminate the influence of interference of lighting conditions on the detection results.
[0039] 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 method further includes: 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 by the first preprocessed image, and the cable area is detected by the second preprocessed image. Since 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, the connector interface area and the cable area are detected by the first preprocessed image and the second preprocessed image, respectively, so that the image acquisition coverage of the connector interface area and the cable area can be increased, and the detection efficiency can be improved.
[0040] Furthermore, when performing HDMI high-definition cable production defect detection, the cable area in the second preprocessed image can also be detected first; if an abnormal cable area is detected, the original contour line of the abnormal cable area is enlarged and reduced respectively to generate an enlarged contour line and a reduced contour line respectively; according to the depth image, the average depth value of the area between the enlarged 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 there is a cable defect, 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. 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 a part in the area between the enlarged contour line and the original contour line that exceeds the cable area, and if so, it is eliminated.
[0041] It should be noted that the defect types of the cable area include scratches, breakages, etc. By enlarging and reducing the original contour line of the abnormal cable area to generate an enlarged 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 is large; if the abnormal cable area is misidentified due to 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, and the third difference threshold is the maximum allowable error.
[0042] The HDMI high-definition line production defect detection method of the present invention first obtains the original image containing the HDMI high-definition line to be detected under the current lighting conditions and the depth image corresponding to the original image, and pre-processes the original image to generate a pre-processed image; then detects the connector interface area and the pin area in the connector interface area in the pre-processed image; if an abnormal pin area is detected, the ideal distribution area of the abnormal pin area under normal conditions is determined according to the normal pin area; according to the depth image, the average depth value of the ideal distribution area is determined as the first average depth value, and the average depth value of the normal pin area is determined as the second average depth value; if the difference between the first average depth value and the second average depth value is greater than the first difference threshold, it is determined that there is a pin defect, and 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, so that the detection results are more accurate and the detection efficiency is improved.
[0043] like Figure 3 As shown, the HDMI high-definition line production defect detection device 20 disclosed in the present invention includes: The processing module 21 is used to obtain the original image containing the HDMI high-definition cable to be detected and the depth image corresponding to the original image under the current lighting conditions, and pre-process the original image to generate a pre-processed image; the detection module 22 is used to detect the connector interface area and the pin area in the connector interface area in the pre-processed image; the first determination module 23 is used to determine the ideal distribution area of the abnormal pin area under normal conditions according to the normal pin area if the detection module detects the 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 according to the depth image; the analysis module 25 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-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.
[0044] The HDMI high-definition line production defect detection device of the present invention comprises 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 a to-be-detected HDMI high-definition line and a depth image corresponding to the original image under current illumination conditions, and preprocess the original image to generate a preprocessed image; the detection module is used to detect a connector interface area and a pin area in the connector interface area in the preprocessed image; the first determination module is used to determine an ideal distribution area of the abnormal pin area under normal conditions according to a 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 according to the depth image; the analysis module is used to determine that a pin 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 if the difference between the first average depth value and the second average depth value is not greater than the preset depth difference threshold, adjust the illumination conditions to re-detect. By comparing the first average depth value with the second average depth value through the cooperation of the processing module, the detection module, the first determination module, the second determination module and the analysis module, the interference of the lighting conditions on the detection results can be eliminated, so that the detection results are more accurate and the detection efficiency is improved.
[0045] 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 line production defect detection method is implemented.
[0046] The computer-readable storage medium disclosed in the present invention stores a computer program, and when the computer program is executed by a processor, the above-mentioned HDMI high-definition line production defect detection method is implemented.
[0047] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.
[0048] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for detecting production defects of HDMI high-definition lines. It is characterized in that include: Acquire an original image containing the HDMI high-definition line 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 in the preprocessed image and a pin area in the connector interface area; If an abnormal pin region is detected, determining an ideal distribution region of the abnormal pin region under a normal state according to the normal pin region; 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.
2. The HDMI high-definition line production defect detection method according to claim 1, It is 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 of the center point and the ideal distribution position 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 line production defect detection method according to claim 2, It is characterized in that Determining 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 includes: Determine the ideal distribution position of the center point of the pin area of the first pin, the second pin, the eighteenth pin and the nineteenth pin according to 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 the pin area of the pins between the first pin and the nineteenth pin according to the ideal distribution position of the center point of the pin area of the first pin and the nineteenth pin; According to the ideal distribution positions of the center points of the pin regions of the second pin and the eighteenth 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.
4. The HDMI high-definition line production defect detection method according to claim 1, It is characterized in that The preprocessing of the original image to generate a preprocessed image comprises: Performing grayscale processing on the original image; Performing a first filtering process on the grayscale processed image by using a mean filter, and performing a second filtering process on the grayscale processed image by 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. The HDMI high-definition line production defect detection method according to claim 1, It is characterized in that The original image includes a plurality of images taken from different positions.
6. The HDMI high-definition line production defect detection method according to claim 5, It is characterized in that 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; 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.
7. The method for detecting production defects of HDMI high-definition lines according to claim 6, It is characterized in that The method further comprises: detecting a cable region in the second preprocessed image; If an abnormal cable area is detected, the original contour line of the abnormal cable area is enlarged and reduced to generate an enlarged contour line and a reduced contour line respectively; According to the depth image, determining an average depth value of a region between the enlarged contour line and the original contour line as a third average depth value, and determining an average depth value of a region between the reduced contour line and the original contour line 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; 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 detection.
8. A HDMI high-definition line production defect detection device, It is characterized in that include: A processing module, used to obtain an original image containing the HDMI high-definition line 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; A detection module, used for detecting a connector interface area in the preprocessed image and a pin area in the connector interface area; A first determination module, configured to determine an ideal distribution area of the abnormal pin area under a normal state according to a normal pin area if the detection module detects an abnormal pin area; A second determination module, 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; The analysis module is used 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 the lighting conditions for re-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.
9. A computer device, It is 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 line according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, It is characterized in that It stores a computer program, and when the computer program is executed by a processor, the method for detecting production defects of an HDMI high-definition line as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
HDMI cable surface quality detection method and system
CN114842017A
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
Connector pin detection method based on image features
CN117372435A
