Flat cable detection method and device, equipment and storage medium

By combining the detection algorithm of 2D and 3D cameras, the 2D image and depth map of the cable are analyzed, and the problems of high error rate and high leakage detection in the prior art are solved, thereby achieving more accurate and reliable cable detection.

CN119555680APending Publication Date: 2025-03-04HAIWEI ZHIZAO TECH (WUHAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411883187.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing wire detection methods have problems with high misjudgment rate and high missed detection rate, especially when detecting whether the buckle is well covered.

Method used

Using a detection algorithm combining 2D and 3D cameras, the 2D image and depth map of the cable are obtained, and whether the cable is inserted in place is analyzed and determined by calculating the height difference between the cable and the vehicle supporting the cable is used to determine whether the cable is popped up.

Benefits of technology

It effectively reduces the misjudgment rate and missed detection rate, can accurately detect various NG states of the cable, and improves the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119555680A_ABST
    Figure CN119555680A_ABST
Patent Text Reader

Abstract

The invention discloses a flat cable detection method, device and equipment and a storage medium, and is used for flat cable detection, the flat cable is provided with a buckle, and the method specifically comprises the following steps: obtaining a flat cable 2D image; analyzing and detecting the obtained 2D image, and judging whether the flat cable is inserted in place or not; acquiring a flat cable image and generating a depth map; the acquired depth map is analyzed, the RO I of the buckle area is searched, the height difference value between the buckle and a carrier for supporting the flat cable is calculated, and whether the buckle is bounced off or not is judged; according to the method, usable high-quality images can be obtained, various NG states of the flat cable can be effectively detected through the 2D + 3D detection algorithm, the detection algorithm is stable and reliable, the misjudgment rate is low, and the omission ratio is zero.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic device connection technology, and more particularly to a method for testing ribbon cables. Background Technology

[0002] A ribbon cable, generally speaking, refers to a cable or flexible printed circuit (FPC) used to connect components of electronic devices. The screen and PCB board are connected using ribbon cables; if the ribbon cable is not properly connected, screen flickering or even a black screen may occur. Therefore, checking whether the ribbon cable is properly connected is essential. Currently, most inspections are done manually, with some using machine vision, but these still face problems such as high false positive rates and missed detections.

[0003] Currently, there are also machine vision-based ribbon cable inspection systems that use 2D area scan cameras to detect whether the ribbon cable is in good condition. The hardware includes an area scan camera, a line scan camera, a lens, a ring light source with a polarizer, a polarizing filter, and an industrial computer. The image acquisition module uses a polarizing filter on the lens, combined with a ring light source with a polarizer, to effectively avoid the effects of ribbon cable reflections. The 2D inspection module uses a 2D area scan camera to acquire high-quality images to detect whether the ribbon cable is inserted correctly, whether it is misaligned, whether it is inserted properly, or whether it is inserted backwards. The 3D inspection module uses a 3D line scan camera to acquire point cloud data, which is then converted into a depth map to detect whether the ribbon cable clips are properly secured.

[0004] However, the above-mentioned technical methods have the problem of high false judgment rate and are prone to missed detection when checking whether the buckle is closed. Summary of the Invention

[0005] The main objective of this invention is to provide a method, apparatus, device, and storage medium for testing ribbon cables, aiming to solve existing technical problems.

[0006] To achieve the above objectives, the present invention provides a ribbon cable detection method for detecting ribbon cables, wherein the ribbon cable is provided with a clip, comprising:

[0007] Obtain a 2D image of the ribbon cable;

[0008] The acquired 2D images are analyzed and inspected to determine whether the ribbon cable is properly inserted.

[0009] Acquire the ribbon cable image and generate a depth map;

[0010] Analyze the acquired depth map, find the ROI of the latch area, calculate the height difference between the latch and the carrier supporting the cable, and determine whether the latch has popped open.

[0011] Furthermore, the analysis and detection of the acquired 2D image specifically includes the following steps:

[0012] Image enhancement converts color images into grayscale images;

[0013] Template matching is used to match stable features around the ribbon cable and obtain the center coordinates of the matching box. Subsequent detection ROIs follow the center coordinates.

[0014] For positive and negative detection, a template matching method is used to match fixed features on the ribbon cable. If a match is found, the ribbon cable is not inserted backwards; if no match is found, it is inserted backwards.

[0015] Mark line search: The image is cropped based on the ROI at the mark line. A bilateral filtering algorithm is used to filter out noise interference in the image and retain edge information. Canny edge detection is used to detect all edges in the ROI. Hough line detection algorithm is used to detect straight lines of all edges.

[0016] PCB trace finding: detect all straight lines, remove interfering lines based on PCB trace characteristics, and filter out PCB traces;

[0017] Dimension calculation, calculate the angle between the Mark line and the PCB line;

[0018] The result determination is based on an angle threshold to determine if the ribbon cable is inserted crookedly, and on a distance threshold to determine if the ribbon cable is inserted correctly.

[0019] Furthermore, the process of acquiring the ribbon cable image and generating a depth map specifically includes the following steps:

[0020] The motion mechanism adjusts the angle of the 3D camera and moves it to the initial acquisition point;

[0021] After the motion mechanism receives a trigger signal, it moves at a constant speed along the latching direction, and the 3D camera captures images to generate a depth map.

[0022] After obtaining the depth map, the detection algorithm locates the buckle area and calculates the height difference between the buckle and the base to determine whether the product is qualified.

[0023] Furthermore, the 3D cable detection algorithm includes,

[0024] Preprocess the depth map;

[0025] Normalization: Normalize the depth map.

[0026] Find the reference point by locating the intersection of the piano lid base and the side edge;

[0027] To find the edge of the snap fastener, use Hough line search and filter out the snap fastener edges by the property that the depth value on the left side of the snap fastener edge is greater than that on the right side;

[0028] Calculate the height difference between the base and the buckle. The above steps can accurately locate the piano lid base and the edge of the buckle. Select an appropriate number of ROIs according to the size of the piano lid, calculate the height difference within each group of ROIs, and thus determine whether the buckle is closed.

[0029] Furthermore, before acquiring the image of the ribbon cable, the average gray value of the ROI of the ribbon cable is first obtained and denoted as the standard average gray value: standard_gray. When acquiring a new image, the average gray value of the ROI of the ribbon cable, mean_gray, is obtained from the formula:

[0030]

[0031] By obtaining the brightness change value (bright), and multiplying each pixel in the grayscale image by bright, the enhanced image can be obtained.

[0032] A ribbon cable testing device is used for testing ribbon cables, wherein the ribbon cable is provided with a clip, comprising,

[0033] D-camera and D-line scan camera are used to acquire images of ribbon cables;

[0034] X-axis servo, used to provide X-axis steering;

[0035] Y-axis servo, used to provide Y-axis steering;

[0036] Z-axis servo, used to provide Z-axis steering;

[0037] A carrier used to carry the cabling and place it on the conveyor line;

[0038] The D-camera and the D-line scan camera are mounted on the Z-axis servo and connected by a rotating mechanism to provide U-axis steering.

[0039] Furthermore, the lens modules of both the D camera and the D line scan camera include polarizers or polarizing filters.

[0040] Furthermore, the D-line scanning camera is installed horizontally 60mm above the buckle, and its scanning direction is consistent with the horizontal direction of the buckle.

[0041] A ribbon cable testing device includes: a memory, a processor, and a ribbon cable testing program stored in the memory and executable on the processor, the ribbon cable testing program being configured to implement the steps of the ribbon cable testing method described above.

[0042] A storage medium storing a ribbon cable detection program, which, when executed by a processor, implements the steps of the ribbon cable detection method described above.

[0043] The beneficial effects of this invention are reflected in:

[0044] This invention uses a polarizer and a polarizing filter together to effectively avoid reflections from the ribbon cable, thereby obtaining a usable high-quality image.

[0045] This invention combines detection algorithms from 2D and 3D cameras to effectively detect various non-compliant states of ribbon cables with a low false positive rate.

[0046] In this invention, the camera is movable, and the algorithm is compatible with multiple products. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the cable testing method of the present invention;

[0048] Figure 2 This is a schematic diagram of the process for analyzing, detecting, and acquiring 2D images according to the present invention;

[0049] Figure 3 This is a schematic diagram illustrating the process of acquiring cable images and generating depth maps according to the present invention.

[0050] Figure 4 This invention provides the depth of the cable in a closed state, captured by a 3D camera.

[0051] Figure 5 This is the depth of the ribbon cable in the open state, captured by a 3D camera according to the present invention.

[0052] Figure 6 This is a schematic diagram showing the selection of ROI in the 3D cable detection algorithm of this invention;

[0053] Figure 7 This is a schematic diagram of the cable testing device of the present invention;

[0054] Figure 8 This is a schematic diagram of the 3D line scan camera of the present invention.

[0055] Explanation of reference numerals in the attached figures:

[0056] A. Ribbon cable; B. Clip;

[0057] 100, 2D camera; 200, 3D line scan camera; 300, X-axis servo; 400, Y-axis servo; 500, Z-axis servo; 600, rotary mechanism; 700, vehicle. Detailed Implementation

[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] Please see Figure 1 This invention relates to a method for detecting ribbon cables, specifically for detecting ribbon cable A, which has a clip B. The method includes the following steps:

[0060] Obtain a 2D image of ribbon cable A;

[0061] The acquired 2D image is analyzed and inspected to determine whether ribbon cable A is properly inserted;

[0062] Acquire image of ribbon cable A and generate depth map;

[0063] Analyze the acquired depth map, locate the ROI of the buckle B area, calculate the height difference between buckle B and the vehicle supporting cable A, and determine whether buckle B has popped open.

[0064] This invention can acquire usable high-quality images and effectively detect various NG states of ribbon cables through a 2D+3D detection algorithm. The detection algorithm is stable and reliable, with a low false positive rate and a 0% false negative rate.

[0065] In one embodiment, please refer to Figure 2 The analysis and detection of the acquired 2D images specifically includes the following steps:

[0066] Image enhancement converts color images into grayscale images;

[0067] Template matching involves matching stable features around the cabling to obtain the center coordinates of the matching box. Subsequent ROI detections follow these center coordinates. This step is to prevent changes in the vehicle's position from causing inaccurate ROI detections.

[0068] For positive and negative detection, a template matching method is used to match fixed features on the ribbon cable. If a match is found, the ribbon cable is not inserted backwards; if no match is found, it is inserted backwards.

[0069] Mark line search involves cropping the image based on the Region of Interest (ROI) at the mark line, employing a bilateral filtering algorithm to remove noise interference while preserving edge information; using Canny edge detection to detect all edges within the ROI; and using the Hough line detection algorithm to detect straight lines along all edges. Specifically, the difference between the grayscale values ​​of the region above and below each found line is calculated. Since the mark line is white and surrounded by black, the difference between the upper and lower edges of the mark line is less than 0, while the difference between the upper and lower edges is greater than 0. This process removes interference lines, resulting in the two straight lines of the mark line.

[0070] The PCB line search method is the same as the Mark line method, but the parameters are slightly different. Detect all straight lines, remove interference lines according to the characteristics of PCB lines, and filter out the PCB lines.

[0071] Dimension calculation: Calculate the angle between the Mark line and the PCB line; divide into three segments: the two ends and the middle, and calculate the distance between the midline of the two straight lines detected by the Mark line and the PCB line.

[0072] The result determination is based on an angle threshold to determine if the ribbon cable is inserted crookedly, and on a distance threshold to determine if the ribbon cable is inserted correctly.

[0073] In one embodiment, please refer to Figure 3 The process of acquiring a ribbon cable image and generating a depth map includes the following steps:

[0074] The motion mechanism adjusts the angle of the 3D camera and moves it to the initial acquisition point;

[0075] After the motion mechanism receives a trigger signal, it moves at a constant speed along the latching direction, and the 3D camera captures images to generate a depth map.

[0076] After obtaining the depth map, the detection algorithm locates the buckle area and calculates the height difference between the buckle and the base to determine whether the product is qualified.

[0077] In one embodiment, the 3D cable detection algorithm includes depth map preprocessing: after obtaining the depth map, the depth measurement range of the 3D camera is limited, and objects outside this range may not be measured correctly, resulting in abnormal depth values. Therefore, it is necessary to preprocess the object to obtain an image that matches the actual object.

[0078] Normalization: Normalize the depth map (pixel values ​​0-65535) to (0-255) for subsequent image processing.

[0079] Finding the reference point: Determine the reference point by locating the intersection of the piano lid base and the side edge.

[0080] Finding the snap-on edge: Use Hough line search and filter snap-on edges by the property that the depth value on the left side of the snap-on edge is greater than that on the right side.

[0081] Calculate the height difference between the base and the latch: The above steps allow for precise positioning of the piano lid base and the edge of the latch. Select the appropriate number of ROIs based on the size of the piano lid. For example... Figure 6 There are three groups of ROIs shown. The height difference within each group of ROIs is calculated to determine whether the buckle is closed.

[0082] Please see Figure 4 and Figure 5 The depth map was captured by a 3D camera. In the map, the large squares represent the snap-fit ​​area and the small squares represent the ribbon cable area.

[0083] In one embodiment, before acquiring the image of the ribbon cable, the average gray value of the ROI of the ribbon cable is first obtained and denoted as the standard average gray value: standard_gray. When acquiring a new image, the average gray value mean_gray of the ROI of the ribbon cable is obtained by formula:

[0084]

[0085] By obtaining the brightness change value (bright), multiplying each pixel in the grayscale image by bright yields the enhanced image. This enhanced image ensures consistent brightness with the image used during debugging, preventing inconsistent brightness caused by changes in the surrounding environment.

[0086] This invention also provides a ribbon cable testing device; please refer to [link / reference]. Figure 7 Used for testing ribbon cable A, which has a clip B, including...

[0087] A 2D camera 100 and a 3D line scan camera 200 are used to acquire images of ribbon cable A;

[0088] X-axis servo 300, used to provide X-axis steering;

[0089] Y-axis servo 400, used to provide Y-axis steering;

[0090] Z-axis servo 500, used to provide Z-axis steering;

[0091] Carrier 700 is used to carry cable A and place it on the conveyor line;

[0092] The 2D camera 100 and the 3D line scan camera 200 are mounted on the Z-axis servo 500 and connected by a rotating mechanism 600 to provide U-axis steering.

[0093] The camera module in this device has a wide range of motion and can detect all the ribbon cables on the PCB board. Depending on the product, only the carrier and the calibration of the detection position need to be changed, so the device can be compatible with multiple products. It can also achieve four-axis adjustment of X, Y, Z and U, which is highly adjustable and compatible with multiple products.

[0094] The 3D line scan camera 200 is mounted on the rotating mechanism 600 with a rotating shaft. If the direction of the ribbon cable A changes, the 3D line scan camera 200 can complete the detection by rotating 90°. It has strong compatibility and can be compatible with multiple products.

[0095] In one embodiment, the lens modules of both the 2D camera 100 and the 3D line scan camera 200 include polarizers or polarizing filters.

[0096] In this embodiment, the surface of the ribbon cable A is an insulating flexible substrate that is prone to reflection. Currently, most detection devices rely on ambient light to acquire images. Although this method does not reflect light, it is easily affected by ambient light, resulting in extremely unstable imaging.

[0097] By setting a polarizer (or polarizing filter), only light waves with the same polarization direction are allowed to pass through. When the polarizer is installed in front of a light source, it produces polarized light.

[0098] In addition, by adjusting the angle of the polarizing filter in front of the lens, the amount of polarized light passing through the lens can be controlled, further reducing the influence of reflected light.

[0099] Please see Figure 8 The 3D line scanning camera 200 is installed horizontally 60mm above the buckle B, and its scanning direction is consistent with the horizontal direction of the buckle B.

[0100] In addition, a ribbon cable testing device is provided, comprising: a memory, a processor, and a ribbon cable testing program stored in the memory and executable on the processor, the ribbon cable testing program being configured to implement the steps of the ribbon cable testing method described above.

[0101] Furthermore, this embodiment of the invention also proposes a storage medium storing a detection program, which, when executed by a processor, implements the steps of the ribbon cable detection method described above.

[0102] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0103] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0104] In addition, for technical details not described in detail in this embodiment, please refer to the ribbon cable detection method provided in any embodiment of the present invention, which will not be repeated here.

[0105] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0106] In addition, for technical details not described in detail in this embodiment, please refer to the ribbon cable detection method provided in any embodiment of the present invention, which will not be repeated here.

[0107] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0108] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0110] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A cable detection method, for detecting a cable (A), wherein the cable (A) is provided with a buckle (B), characterized in that: The specific steps include: Get the 2D image of the wiring (A); Analyze and detect the acquired 2D image to determine whether the cable (A) is properly inserted; Get the line (A) image and generate a depth map; The acquired depth map is analyzed to find the ROI of the buckle (B) area, and the height difference between the buckle (B) and the carrier supporting the cable (A) is calculated to determine whether the buckle (B) is popped open.

2. The cable detection method according to claim 1, characterized in that: The 2D image obtained by analysis and detection specifically includes the following steps: Image enhancement, converting color images into grayscale images; Template matching, matching stable features around the line, obtaining the center coordinates of the matching box, and subsequent detection roi all follow the center coordinates; Front and back detection uses template matching method to match the fixed features on the cable. If it matches, the cable is not plugged in reverse. If it does not match, it is plugged in reverse. Mark line search, crop the image according to the ROI at the line mark line, use the bilateral filtering algorithm to filter out the noise interference in the image and retain the edge information; use the Canny edge detection to detect all the edges in the ROI; use the Hough line detection algorithm to detect all the straight lines on the edges; PCB line search, detect all straight lines, remove interference lines according to PCB line characteristics, and filter out PCB lines; Size calculation, calculate the angle between the Mark line and the PCB line; The result is judged by setting a threshold according to the angle to determine whether the cable is inserted crookedly, and by setting a distance threshold to determine whether the cable is inserted in place.

3. The cable detection method according to claim 1, wherein: The method of obtaining the line image and generating the depth map specifically includes the following steps: The motion mechanism adjusts the 3D camera angle and moves to the acquisition initial point; After the motion mechanism gives a trigger signal, it moves at a constant speed along the buckle direction, and the 3D camera collects images to generate a depth map; After obtaining the depth map, the detection algorithm locates the buckle area and calculates the height difference between the buckle and the base to determine whether the product is qualified.

4. The cable detection method according to claim 3, characterized in that: The 3D wiring detection algorithm includes: Preprocess the depth map; Normalization: normalize the depth map; Find the reference point, and determine the reference point by accurately finding the intersection of the piano lid base and the side edge; Find the buckle edge, use the Hough line to search, and filter out the buckle edge by the characteristic that the depth value on the left side of the buckle edge is larger than that on the right side; Calculate the height difference between the base and the buckle. The above steps can accurately locate the base of the piano cover and the edge of the buckle. Select a suitable number of ROIs according to the size of the piano cover, calculate the height difference in each group of ROIs, and then determine whether the buckle is closed.

5. The cable detection method according to claim 1, wherein: Before obtaining the image of the cable, the average gray value of the cable ROI is obtained and recorded as the standard average gray value: standard_gray. When obtaining a new image, the average gray value of the cable ROI is mean_gray, which is calculated by the formula: Get the brightness change bright, multiply each pixel in the grayscale image by bright, and you can get the enhanced image.

6. A cable detection device, used for detecting a cable (A), wherein the cable (A) is provided with a buckle (B), characterized in that: include, A 2D camera (100) and a 3D line scan camera (200) are used to obtain an image of the cable arrangement (A); X-axis servo (300), used to provide X-axis steering; Y-axis servo (400), used to provide Y-axis steering; Z-axis servo (500), used to provide Z-axis steering; A carrier (700) is used to carry the cable (A) and place it on the conveyor line; The 2D camera (100) and the 3D line scan camera (200) are installed on a Z-axis servo (500) and connected via a rotating mechanism (600) to provide U-axis steering.

7. The cable arrangement detection device according to claim 6, characterized in that: The lens modules of the 2D camera (100) and the 3D line scan camera (200) both include polarizing films or polarizing filters.

8. The cable detection method according to claim 6, characterized in that: The 3D line scan camera (200) is installed horizontally and vertically 60 mm above the buckle (B), and its scanning direction is consistent with the level of the buckle (B).

9. A cable detection device, characterized in that: The device comprises: a memory, a processor, and a wiring arrangement detection program stored in the memory and executable on the processor, wherein the wiring arrangement detection program is configured to implement the steps of the wiring arrangement detection method according to any one of claims 1 to 5.

10. A storage medium, characterized in that: The storage medium stores a wiring arrangement detection program, and when the wiring arrangement detection program is executed by the processor, the steps of the wiring arrangement detection method according to any one of claims 1 to 5 are implemented.