A flexible flat cable assembly detection method and device, electronic equipment and storage medium
By using machine vision inspection systems and AR glasses technology, the edges of flexible flat cables and connectors are automatically detected, solving the problems of large errors and low efficiency in manual inspection. This achieves efficient and accurate assembly inspection of flexible flat cables, ensuring consistent product quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG XITUMENG DIGITAL TECH CO LTD
- Filing Date
- 2022-06-17
- Publication Date
- 2026-04-24
AI Technical Summary
In the existing technology, the assembly and inspection of flexible flat cable relies on manual operation, which leads to errors in the pass rate, low efficiency and high cost. Furthermore, methods to improve connectors or reduce production cycle time are costly or inefficient.
A machine vision inspection system is used to acquire the initial image of the flexible flat cable assembly, determine its position using a target detection algorithm, extract the edge lines of the flexible flat cable and connector, calculate the included angle value to determine the assembly qualification, and combine AR glasses and industrial cameras for inspection.
It improves the accuracy and efficiency of flexible flat cable assembly and testing, reduces sensitivity to interference, achieves unified quantitative testing indicators, and ensures consistent product quality.
Smart Images

Figure CN115205218B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of testing equipment technology, specifically to a method, apparatus, electronic device, and storage medium for testing the assembly of flexible flat cable. Background Technology
[0002] Flexible flat cables are widely used for connecting printheads to motherboards in various printers, as well as for signal transmission and board-to-board connections in products such as plotters, scanners, copiers, audio equipment, LCD displays, fax machines, and various DVD players. They are widely used in modern electrical equipment. There are many types and specifications of flexible flat cables; please refer to [reference needed]. Figure 8 The image shows flexible flat cables of different specifications. The connection and assembly cannot be standardized. Currently, in most factories, the connection and assembly of flexible flat cables between electronic components is done manually. Due to the fast pace of assembly line production, human error can easily occur, leading to problems such as loosely inserted flat cables causing poor contact. (Refer to...) Figure 9 The left side shows a diagram of a normally connected flexible flat cable, while the right side shows a diagram of a flexible flat cable not being properly inserted.
[0003] Current solutions include improving the flexible flat cable and its corresponding connector, or reducing production cycle time and adding manual inspection steps. The first method is costly and lacks versatility, as different electronic products use different models and specifications of flexible flat cables. Improving each type of flexible flat cable and its corresponding connector would lead to excessive costs, and redesigning would be necessary for different scenarios. The second method trades time for improved yield, reducing production efficiency and also increasing costs. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for testing the assembly of flexible flat cable, aiming to solve the problems of error in the pass rate, low efficiency, and high cost of manual testing of flexible flat cable assembly.
[0005] To solve the above technical problems, the solution is as follows:
[0006] On the one hand, a method for assembling and inspecting flexible flat cables is provided, including:
[0007] Obtain an initial image of the currently assembled flexible flat cable assembly; the flexible flat cable assembly includes a flexible flat cable and a connector;
[0008] The position of the flexible flat cable assembly in the initial image is detected to obtain position information;
[0009] Based on the location information, the first edge straight line of the flexible flat cable and the second edge straight line of the connector are determined;
[0010] Based on the angle between the first edge line and the second edge line, it is determined whether the assembly of the flexible flat cable assembly is qualified, and the detection result is obtained.
[0011] Optionally, detecting the position of the flexible flat cable assembly in the initial image to obtain position information includes:
[0012] Based on the target detection algorithm, a target detection box is determined in the initial image, and the soft flat cable assembly is defined in the target detection box.
[0013] Adjust the distance between the image acquisition end and the initial image, and correct the proportion of the target detection box in the initial image based on a preset field of view;
[0014] Based on the corrected target detection box, the pixel coordinates of the flexible flat cable assembly are determined to obtain the position information.
[0015] Optionally, determining the first edge straight line of the flexible flat cable and the second edge straight line of the connector based on the location information includes:
[0016] Based on the pixel coordinates of the flexible flat cable assembly, the actual physical size of the target detection box is determined, and the actual physical size includes the length and width of the flexible flat cable and the connector;
[0017] The initial image is preprocessed to obtain the image to be analyzed; the preprocessing includes grayscale processing and filtering smoothing.
[0018] For the image to be analyzed, the edges of the flexible flat cable and the connector are determined to obtain the edge information of the flexible flat cable assembly;
[0019] Based on the edge information of the flexible flat cable assembly and the actual physical size of the target detection frame, the first edge line of the flexible flat cable and the second edge line of the connector in the target detection frame are extracted.
[0020] Optionally, determining the edges of the flexible flat cable and the connector for the image to be analyzed, and obtaining the edge information of the flexible flat cable assembly, includes:
[0021] Calculate the gradient magnitude and gradient direction of each pixel in the image to be analyzed;
[0022] Traverse each pixel and determine whether the current pixel is a local maximum value with the same gradient direction among the surrounding pixels; if so, retain the current pixel and determine the first gradient magnitude of each current pixel.
[0023] Thresholding is performed on the current pixel based on the first gradient magnitude to determine the edges of the flexible cable and the connector.
[0024] Optionally, the step of thresholding the current pixel based on the first gradient magnitude to determine the edges of the flexible cable and the connector includes:
[0025] Feature points of the flexible flat cable assembly are extracted based on the scale-invariant feature transform algorithm; the intersection of the feature points and the current pixel is determined;
[0026] Obtain the second gradient magnitude of the feature points in the intersection; determine the first threshold and the second threshold for thresholding based on the second gradient magnitude and the number of feature points in the intersection;
[0027] The edges of the flexible flat cable and the connector are determined based on the comparison between the first gradient magnitude of the current pixel and the first threshold and the second threshold.
[0028] Optionally, determining the edges of the flexible flat cable and the connector based on the comparison between the first gradient magnitude of the current pixel and the first threshold and the second threshold includes:
[0029] If the magnitude of the first gradient is not less than the first threshold, then the current pixel is marked as the first strong edge pixel.
[0030] If the magnitude of the first gradient is greater than the second threshold and less than the first threshold, then the current pixel is marked as a virtual edge pixel.
[0031] If the virtual edge pixel is connected to the first strong edge pixel, then the current pixel is marked as the second strong edge pixel; if the virtual edge is not connected to the first strong edge pixel, then the current pixel is set to zero.
[0032] If the magnitude of the first gradient is not greater than the second threshold, then the current pixel is set to zero.
[0033] The edges of the flexible flat cable and the connector are determined based on the first strong edge pixel and the second strong edge pixel.
[0034] Optionally, determining whether the assembly of the flexible flat cable assembly is qualified based on the angle between the first edge line and the second edge line, and obtaining the detection result includes:
[0035] Determine the first angle between the first edge line of the flexible flat cable and the X-axis, and the second angle between the second edge line of the connector and the X-axis;
[0036] The absolute value of the difference between the first included angle and the second included angle is determined to obtain the included angle value;
[0037] Angle threshold is predetermined based on the width of the flexible flat cable; the angle value is compared with the preset angle threshold.
[0038] If the included angle value is not greater than the included angle threshold, then the first edge line and the second edge line are determined to be parallel, which indicates that the flexible flat cable assembly is qualified.
[0039] Optionally, after determining whether the assembly of the flexible flat cable assembly is qualified based on the angle between the first edge line and the second edge line, and obtaining the detection result, the method further includes:
[0040] In response to an image detection command, the industrial camera is controlled to acquire a video stream containing multiple of the aforementioned flexible flat cable components;
[0041] The video stream is sent to the server so that the server can re-inspect the multiple flexible flat cable components.
[0042] On the other hand, a flexible flat cable assembly testing device is provided, comprising:
[0043] The first image acquisition module is used to acquire an initial image of the currently assembled flexible flat cable assembly; the flexible flat cable assembly includes a flexible flat cable and a connector;
[0044] A position determination module is used to detect the position of the flexible flat cable assembly in the initial image and obtain position information;
[0045] An edge extraction module is used to determine the first edge line of the flexible flat cable and the second edge line of the connector based on the location information.
[0046] The detection module is used to determine whether the assembly of the detection flexible flat cable assembly is qualified based on the angle value between the first edge line and the second edge line, and to obtain the detection result.
[0047] Optionally, the location determination module includes:
[0048] The target detection box determination unit is used to determine a target detection box in the initial image based on a target detection algorithm, wherein the soft flat cable assembly is the target detection box.
[0049] An adjustment unit is used to adjust the distance between the image acquisition end and the initial image, and to correct the proportion of the target detection box in the initial image based on a preset field of view.
[0050] The position determination unit is used to determine the pixel coordinates of the flexible flat cable assembly based on the corrected target detection box, and obtain the position information.
[0051] Optionally, the edge extraction module includes:
[0052] A physical size calculation unit is used to determine the actual physical size of the target detection box based on the pixel coordinates of the flexible flat cable assembly, wherein the actual physical size includes the length and width of the flexible flat cable and the connector;
[0053] The preprocessing module is used to preprocess the initial image to obtain the image to be analyzed; the preprocessing includes grayscale processing and filtering smoothing.
[0054] An edge detection module is used to determine the edges of the flexible flat cable and the connector for the image to be analyzed, and to obtain the edge information of the flexible flat cable assembly;
[0055] The straight line extraction module is used to extract the first edge straight line of the flexible flat cable and the second edge straight line of the connector in the target detection frame based on the edge information of the flexible flat cable assembly and the actual physical size of the target detection frame.
[0056] Optionally, the edge detection module includes:
[0057] The gradient calculation module is used to calculate the gradient magnitude and gradient direction of each pixel in the image to be analyzed.
[0058] The edge refinement module is used to traverse each pixel and determine whether the current pixel is a local maximum value with the same gradient direction among the surrounding pixels; if so, the current pixel is retained and the first gradient magnitude of each current pixel is determined.
[0059] A thresholding module is used to perform thresholding processing on the current pixel based on the first gradient magnitude to determine the edges of the flexible cable and the connector.
[0060] Optionally, the thresholding processing module includes:
[0061] The feature point extraction module is used to extract feature points of the soft flat cable assembly based on the scale-invariant feature transform algorithm; and to determine the intersection of the feature points and the current pixel.
[0062] A threshold calculation module is used to obtain the second gradient magnitude of the feature points in the intersection; and to determine a first threshold and a second threshold for thresholding processing based on the second gradient magnitude and the number of feature points in the intersection.
[0063] An edge thresholding module is used to determine the edges of the flexible flat cable and the connector based on the comparison relationship between the first gradient magnitude of the current pixel and the first threshold and the second threshold.
[0064] Optionally, the edge thresholding module includes:
[0065] The first strong edge pixel determination unit is used to mark the current pixel as a first strong edge pixel if the first gradient magnitude is not less than the first threshold.
[0066] A virtual edge pixel determination unit is used to mark the current pixel as a virtual edge pixel if the first gradient magnitude is greater than the second threshold and less than the first threshold.
[0067] The second strong edge pixel determination unit is configured to mark the current pixel as a second strong edge pixel if the virtual edge pixel is connected to the first strong edge pixel, and to set the current pixel to zero if the virtual edge pixel is not connected to the first strong edge pixel.
[0068] An edge suppression unit is used to set the current pixel to zero if the magnitude of the first gradient is not greater than the second threshold.
[0069] An edge determination unit is used to determine the edges of the flexible flat cable and the connector based on the first strong edge pixel and the second strong edge pixel.
[0070] Optionally, the detection module includes:
[0071] The first calculation unit is used to determine the first angle between the first edge line of the flexible flat cable and the X-axis, and the second angle between the second edge line of the connector and the X-axis.
[0072] The second calculation unit is used to determine the absolute value of the difference between the first included angle and the second included angle, and to obtain the included angle value;
[0073] The comparison unit is used to pre-determine the included angle threshold based on the width of the flexible flat cable; and compare the included angle value with the preset included angle threshold.
[0074] The judgment unit is used to determine that the first edge line and the second edge line are parallel if the included angle value is not greater than the included angle threshold, which indicates that the flexible flat cable assembly is qualified.
[0075] Optionally, the flexible flat cable assembly testing device further includes:
[0076] The second image acquisition module is used to control the industrial camera to acquire a video stream containing multiple of the flexible flat cable components in response to an image detection command.
[0077] The re-inspection module is used to send the video stream to the server so that the server can re-inspect multiple of the flexible flat cable components.
[0078] On the other hand, an electronic device is provided, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the steps of the above method.
[0079] On the other hand, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the steps of the above method.
[0080] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium, wherein a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the above-described method.
[0081] By adopting the above technical solution, the present invention has the following beneficial effects:
[0082] The machine vision inspection system collects and inspects images of the currently assembled flexible flat cable assembly, extracts the edge lines of the flexible flat cable and connector in the assembly, and calculates whether the edge lines are parallel to determine whether the flexible flat cable is assembled correctly. This significantly reduces the degree of interference to the tested target, is more objective and accurate than manual inspection, improves production efficiency, and allows for the formulation of unified and quantitative inspection indicators to ensure the consistency of flexible flat cable product quality.
[0083] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0084] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and the same reference numerals usually represent the same parts. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0085] Figure 1 A flowchart illustrating a flexible flat cable assembly and testing method provided in an embodiment of the present invention;
[0086] Figure 2 This is a schematic flowchart of an optional method for implementing the assembly and testing method for flexible flat cable provided in an embodiment of the present invention;
[0087] Figure 3This is a schematic flowchart of another optional method for implementing the flexible flat cable assembly and testing method provided in an embodiment of the present invention;
[0088] Figure 4 This is a schematic diagram of the system architecture for implementing the flexible flat cable assembly and testing method provided in an embodiment of the present invention;
[0089] Figure 5 This is a schematic diagram of the structure of a flexible flat cable assembly and testing device provided in an embodiment of the present invention;
[0090] Figure 6 A schematic diagram of the server hardware structure for the operation of the flexible flat cable assembly and testing method provided for the implementation of the present invention.
[0091] Figure 7 This is a schematic diagram of the Gaussian filtering process for implementing the flexible flat cable assembly detection method provided in an embodiment of the present invention;
[0092] Figure 8 Schematic diagrams of different specifications of flexible flat cables in the prior art;
[0093] Figure 9 This is a schematic diagram illustrating whether the assembly of a flexible flat cable is qualified in the existing technology;
[0094] Figure 10 This is a schematic diagram illustrating the implementation results of the flexible flat cable assembly and testing method provided in this embodiment of the invention. Detailed Implementation
[0095] 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 some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0096] The term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the invention. In the description of the invention, it should be understood that the terms "upper," "lower," "top," "bottom," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein.
[0097] refer to Figure 1 The diagram illustrates a flowchart of a flexible flat cable assembly and inspection method according to an embodiment of the present invention. It should be noted that while this specification provides the operational steps described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive methods. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system devices or products, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). The flexible flat cable assembly and inspection method provided by this embodiment of the present invention includes:
[0098] S101, Obtain an initial image of the currently assembled flexible flat cable assembly; the flexible flat cable assembly includes a flexible flat cable and a connector;
[0099] Specifically, in this embodiment of the invention, AR glasses are used to capture the initial image of the flexible flat cable assembly. AR stands for Augmented Reality, which is a technology that simulates and processes physical information that is difficult to experience in the real world based on computer and other scientific technologies. It uses various technologies such as multimedia, 3D modeling, real-time tracking and registration, intelligent interaction, and sensing to simulate and apply virtual information such as computer-generated text, images, 3D models, music, and videos to the real world. The two types of information complement each other, thereby enhancing the real world. AR glasses are an intelligent linking device between the virtual and real worlds. Through AR glasses, one can see both the real world and virtual content and interact with visual and auditory information.
[0100] In this embodiment of the invention, after assembling a flexible flat cable, the worker wears AR glasses and controls the imaging module (depth camera) on the AR glasses via a Bluetooth button to capture an image of the assembled flexible flat cable assembly. The flexible flat cable assembly includes a flexible flat cable and a connector. The final inspection target is to determine whether the flexible flat cable and the connector are properly inserted. Additionally, the machine vision inspection system also includes a light source, which illuminates the target, increases brightness, creates an imaging effect conducive to image processing, overcomes ambient light interference, ensures image stability, and improves the system's accuracy and efficiency.
[0101] S102, Detect the position of the flexible flat cable assembly in the initial image to obtain position information;
[0102] In one possible implementation, step S102 includes:
[0103] (1) Based on the target detection algorithm, a target detection box is determined in the initial image, wherein the soft flat cable assembly is the target detection box;
[0104] (2) Adjust the distance between the image acquisition end and the initial image, and correct the proportion of the target detection box in the initial image based on the preset field of view;
[0105] (3) Based on the corrected target detection box, determine the pixel coordinates of the soft flat cable assembly to obtain the position information.
[0106] Specifically, after acquiring the initial image of the flexible flat cable assembly, it is necessary to determine its position within the image. In this embodiment, the AR glasses employ the YOLOv5 object detection algorithm. The YOLOv5 structure mainly consists of three components: Backbone: a convolutional neural network that aggregates and forms image features at different fine-grained levels for feature extraction; Neck: a series of network layers that mix and combine image features and pass them to the prediction layer, primarily to fuse multi-layer features to enhance their expressive power; and PredictionHead: predicts image features, generates bounding boxes, and predicts the category. The YOLOv5 object detection algorithm is small in size and fast, making it suitable for embedded devices such as AR glasses. Based on this algorithm model, the target detection box for the flexible flat cable assembly is determined in the initial image.
[0107] Because AR glasses are worn by workers, the distance between the depth camera and the flexible flat cable assembly is not fixed, and the size of the flexible flat cable connector varies, causing the area of the target detection box detected by the AR glasses to vary in the entire image. Furthermore, differences in worker operating habits can also cause fluctuations in this proportion. A proportion that is too large or too small will affect subsequent image analysis. To ensure the proportion is within a reasonable range, this embodiment of the invention predefines the proportion of the target detection box to the entire image area as normal within the range of 20% to 50%. When the proportion is outside this range, it is corrected by automatically adjusting the field of view (FOV) of the AR glasses camera. FOV, or Field of View, is the angle formed by the two edges of the maximum range through which the image of the measured target can pass through the lens, with the lens as the vertex. It characterizes the angular range of images that the camera can receive, and is also often referred to as the field of view. The FOV supports three selectable modes: 30 degrees, 40 degrees, and 60 degrees.
[0108] Referring to Table 1, when the FOV is 30 degrees and the detected target bounding box occupies less than 20% of the total image area, the AR glasses' voice module will prompt the worker to move the flexible cable assembly components closer. When the FOV is 60 degrees and the detected target bounding box occupies more than 50% of the total image area, the AR glasses' voice module will prompt the worker to move the components further away. In other cases as shown in the table, the AR glasses' FOV will automatically switch according to the table's settings. A FOV between 20% and 50% is considered normal and does not require switching.
[0109] Table 1. Switching of Field of View (FOV)
[0110]
[0111] When the target detection box occupies a normal proportion of the entire image, the pixel coordinates of the soft flat cable component are determined to obtain the position information.
[0112] S103, based on the position information, determine the first edge straight line of the flexible flat cable and the second edge straight line of the connector;
[0113] refer to Figure 2 In one possible implementation, step S103 includes:
[0114] S201, based on the pixel coordinates of the flexible flat cable assembly, determine the actual physical size of the target detection box, wherein the actual physical size includes the length and width of the flexible flat cable and the connector;
[0115] Specifically, in this embodiment of the invention, the pixel coordinates of the flexible flat cable assembly are obtained from the image of the flexible flat cable assembly acquired by the depth camera of the AR glasses. Based on the formula for converting camera pixel coordinates into physical image coordinates in space, the actual physical size of the target detection box can be calculated. Refer to formula (1), where (u,v) are pixel coordinates, the origin is at the upper left corner of the image, the u-axis is parallel to the x-axis to the right, and the v-axis is parallel to the y-axis downwards, with units of pixels; (f x ,f y ,c x ,c y The matrix composed of (X,Y) is called the camera's intrinsic parameter matrix K. Typically, the camera's intrinsic parameters are fixed at the factory and do not change during use. This parameter can be obtained from the camera manufacturer or calculated using a calibration algorithm (such as the Zhang Zhengyou calibration method). (X,Y) represents the physical coordinates of the point corresponding to the pixel in space, and Z can be understood as depth, i.e., the actual distance from the target detection box to the camera. In a coordinate system in physical space with the camera's optical center as the origin, the actual physical size of the target detection box can be obtained.
[0116]
[0117] S202, preprocess the initial image to obtain the image to be analyzed; the preprocessing includes grayscale processing and filtering smoothing.
[0118] Specifically, the collected image of the soft flat cable assembly is an RGB three-channel color image. In order to facilitate subsequent processing, it needs to be converted into a single-channel grayscale image. The conversion formula used in this embodiment of the invention is formula (2), where RGB represents the colors of the red, green and blue channels, and Gray represents grayscale. Multiplying the RGB three-channel colors by the corresponding coefficients unifies the RGB values of each pixel into the same value, that is, grayscale processing.
[0119] Gray=R*0.299+G*0.587+B*0.114 (2)
[0120] Furthermore, due to the shaking during AR glasses wear and the physical characteristics of the internal circuitry, images generate noise. This noise affects subsequent edge detection. Therefore, while preserving as much of the original image information as possible, image smoothing is performed to reduce noise and detail while retaining boundaries. There are many image smoothing filtering algorithms, such as median filtering and Gaussian filtering. This embodiment of the invention uses Gaussian filtering to denoise the image. Its principle is to recalculate the value of each point in the image, averaging the value of that point with its surrounding points to obtain the final filtering result. Generally, the weights are arranged in a matrix form according to their corresponding positions, called a Gaussian kernel. This embodiment of the invention uses a Gaussian kernel K of size 5: The image of the flexible flat cable assembly is denoised to facilitate the extraction of the edges of the flexible flat cable and connector in subsequent steps. In one embodiment, refer to... Figure 7 A Gaussian filter T is used to filter the pixel with a value of 226 in the grayscale image O, and the value of that pixel in the filtered image D is obtained:
[0121] Result = 1 / 56 × (197×1 + 25×1 + 106×2 + 156×1 + 159×1 + 149×1 + 40×3 + 107×4 + 5×3 + 71×1 + 163×2 + 198×4 + 226×8 + 223×4 + 156×2221×1 + 37×3 + 68×4 + 193×3 + 157×1 + 42×1 + 72×1 + 250×2 + 41×1 + 75×1) = 138
[0122] During the filtering process, a weighted average of the pixels surrounding a given pixel is calculated using a Gaussian filter T to obtain the final filtering result. The closer a pixel is to the center, the greater its weight.
[0123] S203, for the image to be analyzed, determine the edges of the flexible flat cable and the connector, and obtain the edge information of the flexible flat cable assembly;
[0124] The edges of flexible flat cables and connectors are relatively obvious and can be extracted from the image being analyzed using edge detection algorithms. Edge detection identifies points in the digital image where brightness values change significantly. Essentially, edge detection calculates the gradient (the change in pixel value) at each point in the image; a larger change value indicates a higher probability of it being an edge. For details, refer to... Figure 3 This includes the following steps:
[0125] S301, Calculate the gradient magnitude and gradient direction of each pixel in the image to be analyzed;
[0126] S302, traverse each pixel and determine whether the current pixel is a local maximum value with the same gradient direction among the surrounding pixels; if so, retain the current pixel and determine the first gradient magnitude of each current pixel.
[0127] Specifically, this embodiment of the invention uses the Laplacian operator to calculate the gradient magnitude and gradient direction of each pixel in the image. The Laplacian operator is the basis for calculating the gray-level difference of pixels in the image neighborhood. It is an image neighborhood enhancement algorithm derived through second-order differentiation. When the gray level of the center pixel in the neighborhood is lower than the average gray level of other pixels in its neighborhood, the gray level of this center pixel should be further reduced; when it is higher, the gray level of the center pixel should be further increased, thereby achieving image sharpening. In the algorithm implementation process, the gradients of the four or eight directions of the center pixel in the neighborhood are calculated, and the gradients are summed to determine the relationship between the gray level of the center pixel and the gray levels of other pixels in the neighborhood. The result of the gradient calculation is used to adjust the pixel gray level. Each pixel is traversed one by one to determine whether the current pixel is the maximum value with the same gradient direction among the surrounding pixels. If the point is a local maximum in the positive / negative gradient direction, the point is retained, and the first gradient magnitude of each current pixel is determined; otherwise, the point is suppressed, i.e., its value is set to zero. This step is the edge thinning process, which removes pixels that are not actually edges but are detected as such.
[0128] S303, based on the first gradient magnitude, thresholding is performed on the current pixel to determine the edges of the flexible cable and the connector.
[0129] In this embodiment of the invention, a dual-threshold method is used to determine the final edge. The determination of the dual thresholds involves the SIFT algorithm, i.e., scale-invariant feature transform, and includes the following steps:
[0130] (1) Extract feature points of the soft flat cable assembly based on the scale-invariant feature transformation algorithm; determine the intersection of the feature points and the current pixel;
[0131] (2) Obtain the second gradient magnitude of the feature points in the intersection; determine the first threshold and the second threshold for thresholding based on the second gradient magnitude and the number of feature points in the intersection;
[0132] (3) Based on the comparison relationship between the first gradient magnitude of the current pixel and the first threshold and the second threshold, determine the edge of the flexible cable and the connector.
[0133] Specifically, the SIFT algorithm is used to extract feature points of the soft flat cable component in the target detection box. The coordinates and pixel values of the feature points are recorded. Combined with the current pixel point with the local maximum value in the same gradient direction, the intersection of the feature point and the current pixel point is determined to obtain the filtered feature point set M. The first threshold maxVal and the second threshold minVal are calculated according to formulas (3) and (4) as the double thresholds for thresholding. Where N is the number of feature points in the filtered intersection, M i It is the second gradient magnitude of the filtered feature points, and the value of i ranges from 1 to N.
[0134]
[0135]
[0136] In step S302, the first gradient magnitude of the current pixel is compared with the first threshold and the second threshold. If the first gradient magnitude is not less than the first threshold, the current pixel is marked as a first strong edge pixel. If the first gradient magnitude is greater than the second threshold and less than the first threshold, the current pixel is marked as a virtual edge pixel. If the virtual edge pixel is connected to the first strong edge pixel, the current pixel is marked as a second strong edge pixel. If the virtual edge pixel is not connected to the first strong edge pixel, the current pixel is reset to zero. If the first gradient magnitude is not greater than the second threshold, the current pixel is reset to zero. Based on the first strong edge pixel and the second strong edge pixel, the edges of the flexible flat cable and the connector are determined.
[0137] S204, based on the edge information of the flexible flat cable assembly and the actual physical size of the target detection frame, extract the first edge line of the flexible flat cable and the second edge line of the connector in the target detection frame.
[0138] Specifically, in this embodiment of the invention, the Hough transform is used to extract the first edge line and the second edge line. For the Hough transform, the line is represented using polar coordinates: r = x cosθ + y sinθ, where (x, y) are the rectangular coordinates of points on the line, and θ is the polar angle. (x ≠ 0) is obtained. For the point (x0, y0), a family of lines passing through this point is: r θ =x0cosθ+y0sinθ, that is, each pair (r θLet θ represent a straight line passing through the point (x0, y0). For the point (x0, y0), plotting all straight lines passing through it in polar coordinates will yield a sine curve. Performing this operation on all points in the image of the flexible flat cable assembly, if the curves obtained after performing this operation on two different points intersect in the polar radius-polar angle plane, it indicates that these two points pass through the same straight line. Tracing the intersection points of the curves corresponding to each point in the image, if the number of curves intersecting at a single point exceeds a threshold, then the parameter pair (r) represented by this intersection point is considered... θ ,θ) is a straight line in the image.
[0139] Since there are many types of flexible flat cables and their sizes vary greatly, the threshold in this embodiment of the invention is determined based on the actual physical length of the target detection box. It is defined that 15 points correspond to every 1cm length. For example, if the length of the target box is 2cm, then at least 30 curves intersecting at one point are considered a straight line. The first edge line of the flexible flat cable and the second edge line of the connector can be obtained through Hough transform. The coordinates of the two endpoints of each line are (x1, y1) and (x2, y2).
[0140] S104, based on the angle between the first edge line and the second edge line, determine whether the assembly of the detected flexible flat cable assembly is qualified, and obtain the detection result.
[0141] Step S204 obtains multiple straight lines within the target detection bounding box, including the first edge line and the second edge line. Due to noise, some burrs may be misidentified as straight lines. These burrs are often short, and their lengths can be filtered out by statistically analyzing the lengths of all detected lines. The remaining lines are then determined by calculating the angle between each pair of lines. When the angle exceeds a certain threshold, the two lines are considered non-parallel. In one possible implementation, step S104 includes:
[0142] (1) Determine the first angle between the first edge line of the flexible flat cable and the X-axis, and the second angle between the second edge line of the connector and the X-axis;
[0143] (2) Determine the absolute value of the difference between the first included angle and the second included angle to obtain the included angle value;
[0144] (3) Determine the included angle threshold in advance based on the width of the flexible flat cable; compare the included angle value with the preset included angle threshold; if the included angle value is not greater than the included angle threshold, determine that the first edge line and the second edge line are parallel, which indicates that the flexible flat cable assembly is qualified.
[0145] Specifically, according to Calculate the first included angle θ1 between the first edge straight line and the X-axis, and the second included angle θ2 between the second edge straight line and the X-axis. If the calculated included angle is greater than 90 degrees, subtract 90 degrees from it; calculate the included angle θ between the two straight lines, take the absolute value of the difference between θ1 and θ2, that is, the included angle value. For flexible printed cables of different sizes in the unfastened state, the range of the included angle is different. It is necessary to pre-determine the included angle threshold according to the type of the flexible printed cable. In the embodiments of the present invention, the included angle threshold is pre-determined according to the width of the flexible printed cable. For example, when the width of the flexible printed cable is 1 cm, the included angle threshold is 4 degrees; when the width of the flexible printed cable is 2 cm, the included angle threshold is 5 degrees. If the included angle value θ is less than the corresponding included angle threshold, it indicates that the first edge straight line and the second edge straight line are parallel, that is, the flexible printed cable assembly is qualified; if the included angle value θ is greater than the corresponding included angle threshold, it indicates that the first edge straight line and the second edge straight line are not parallel, that is, the flexible printed cable assembly is unqualified. Refer to Figure 10 .
[0146] In a possible implementation manner, after step S104, it further includes:
[0147] In response to the image detection instruction, control the industrial camera to collect the video stream containing multiple said flexible printed cable assemblies;
[0148] Send the video stream to the server so that the server re-checks multiple said flexible printed cable assemblies.
[0149] Specifically, a part may contain multiple flexible printed cables. Each time a flexible printed cable assembly is assembled, an AR glasses is used for detection. After the assembly of the entire part is completed, the industrial camera re-checks the part. The industrial camera has a fixed position, and the distance from the part to be detected on the assembly line is fixed. The industrial camera pushes the collected video stream to the background server. The image algorithm model running on the server supports the recognition and detection of multiple flexible printed cable connectors at the same time. The present invention uses the mask-RCNN image segmentation algorithm to determine the position of the flexible printed cable assembly to be detected, obtain the edge information of the flexible printed cable assembly, and perform image analysis and detection. When it is determined to be qualified, the part is transmitted to the next process through the sorting device. When it is determined to be unqualified, the unqualified place is recorded, and the part is sent back to the worker in the previous process for modification through the sorting device.
[0150] In summary, refer to Figure 4 , the detection system based on machine vision in the embodiments of the present invention is mainly applied to the assembly line in the factory. The combination of AR glasses and industrial cameras is used for detection to realize the detection of whether the flexible printed cable is plugged in tightly. The AR glasses include a shooting module (including a depth camera), a Bluetooth module, a voice module and a display module, which are used to assist workers in assembling the flexible printed cable, and the industrial camera re-checks the assembled products.
[0151] After completing the assembly of a flexible printed circuit (FPC), the worker wears AR glasses and controls the shooting module (depth camera) on the AR glasses via a Bluetooth button to capture a picture of the assembled FPC component. After undergoing corresponding image algorithm processing and analysis, the voice module will prompt whether it is qualified. If it is qualified, the process will proceed to the next assembly step. If it is unqualified, that is, the edges of the FPC and the connector are not parallel, refer to Figure 10 , the screen on the glasses will display the picture of the current component and mark the unqualified areas, allowing the worker to correct the marked unqualified areas.
[0152] After completing the FPC assembly of the entire part, the part enters the re-inspection process. The industrial camera pushes the captured video stream to the background server. The image algorithm model running in the background supports the recognition and detection of multiple FPC connectors simultaneously. When it is determined to be qualified, the part is conveyed to the next process by the sorting device. When it is determined to be unqualified, the unqualified areas are recorded, and the part is sent back to the worker in the previous process for modification through the sorting device.
[0153] Corresponding to the above FPC assembly detection method, an embodiment of the present invention also provides an FPC assembly detection device. Since the FPC assembly detection device provided in the embodiment of the present invention corresponds to the above several embodiments of the FPC assembly detection method, the implementation manners of the foregoing FPC assembly detection method are also applicable to the FPC assembly detection device provided in this embodiment and will not be elaborated herein again.
[0154] Refer to Figure 5 , which shows an FPC assembly detection device provided in an embodiment of the present invention. This device has the function of implementing the FPC assembly detection method in the above method embodiment. The function can be implemented by hardware or by hardware executing corresponding software. The device may include:
[0155] A first image acquisition module 510 for obtaining an initial image of the currently assembled FPC component; the FPC component includes an FPC and a connector;
[0156] A position determination module 520 for detecting the position of the FPC component in the initial image to obtain position information;
[0157] An edge extraction module 530 for determining a first edge straight line of the FPC and a second edge straight line of the connector based on the position information;
[0158] A detection module 540 for determining whether the assembly of the detected FPC component is qualified based on the included angle value between the first edge straight line and the second edge straight line to obtain a detection result.
[0159] Optionally, the position determination module 520 includes:
[0160] The target detection box determination unit is used to determine a target detection box in the initial image based on a target detection algorithm, wherein the soft flat cable assembly is the target detection box.
[0161] An adjustment unit is used to adjust the distance between the image acquisition end and the initial image, and to correct the proportion of the target detection box in the initial image based on a preset field of view.
[0162] The position determination unit is used to determine the pixel coordinates of the flexible flat cable assembly based on the corrected target detection box, and obtain the position information.
[0163] Optionally, the edge extraction module 530 includes:
[0164] A physical size calculation unit is used to determine the actual physical size of the target detection box based on the pixel coordinates of the flexible flat cable assembly, wherein the actual physical size includes the length and width of the flexible flat cable and the connector;
[0165] The preprocessing module is used to preprocess the initial image to obtain the image to be analyzed; the preprocessing includes grayscale processing and filtering smoothing.
[0166] An edge detection module is used to determine the edges of the flexible flat cable and the connector for the image to be analyzed, and to obtain the edge information of the flexible flat cable assembly;
[0167] The straight line extraction module is used to extract the first edge straight line of the flexible flat cable and the second edge straight line of the connector in the target detection frame based on the edge information of the flexible flat cable assembly and the actual physical size of the target detection frame.
[0168] Optionally, the edge detection module includes:
[0169] The gradient calculation module is used to calculate the gradient magnitude and gradient direction of each pixel in the image to be analyzed.
[0170] The edge refinement module is used to traverse each pixel and determine whether the current pixel is a local maximum value with the same gradient direction among the surrounding pixels; if so, the current pixel is retained and the first gradient magnitude of each current pixel is determined.
[0171] A thresholding module is used to perform thresholding processing on the current pixel based on the first gradient magnitude to determine the edges of the flexible cable and the connector.
[0172] Optionally, the thresholding processing module includes:
[0173] The feature point extraction module is used to extract feature points of the soft flat cable assembly based on the scale-invariant feature transform algorithm; and to determine the intersection of the feature points and the current pixel.
[0174] A threshold calculation module is used to obtain the second gradient magnitude of the feature points in the intersection; and to determine a first threshold and a second threshold for thresholding processing based on the second gradient magnitude and the number of feature points in the intersection.
[0175] An edge thresholding module is used to determine the edges of the flexible flat cable and the connector based on the comparison relationship between the first gradient magnitude of the current pixel and the first threshold and the second threshold.
[0176] Optionally, the edge thresholding module includes:
[0177] The first strong edge pixel determination unit is used to mark the current pixel as a first strong edge pixel if the first gradient magnitude is not less than the first threshold.
[0178] A virtual edge pixel determination unit is used to mark the current pixel as a virtual edge pixel if the first gradient magnitude is greater than the second threshold and less than the first threshold.
[0179] The second strong edge pixel determination unit is configured to mark the current pixel as a second strong edge pixel if the virtual edge pixel is connected to the first strong edge pixel, and to set the current pixel to zero if the virtual edge pixel is not connected to the first strong edge pixel.
[0180] An edge suppression unit is used to set the current pixel to zero if the magnitude of the first gradient is not greater than the second threshold.
[0181] An edge determination unit is used to determine the edges of the flexible flat cable and the connector based on the first strong edge pixel and the second strong edge pixel.
[0182] Optionally, the detection module 540 includes:
[0183] The first calculation unit is used to determine the first angle between the first edge line of the flexible flat cable and the X-axis, and the second angle between the second edge line of the connector and the X-axis.
[0184] The second calculation unit is used to determine the absolute value of the difference between the first included angle and the second included angle, and to obtain the included angle value;
[0185] The comparison unit is used to pre-determine the included angle threshold based on the width of the flexible flat cable; and compare the included angle value with the preset included angle threshold.
[0186] The judgment unit is used to determine that the first edge line and the second edge line are parallel if the included angle value is not greater than the included angle threshold, which indicates that the flexible flat cable assembly is qualified.
[0187] Optionally, the flexible flat cable assembly testing device further includes:
[0188] The second image acquisition module is used to control the industrial camera to acquire a video stream containing multiple of the flexible flat cable components in response to an image detection command.
[0189] The re-inspection module is used to send the video stream to the server so that the server can re-inspect multiple of the flexible flat cable components.
[0190] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0191] This invention also provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the steps of the flexible flat cable assembly and testing method described above.
[0192] Memory can be used to store software programs and modules. The processor executes various functional applications by running the software programs and modules stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for functions, etc.; the data storage area can store data created based on the use of the device, etc. Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory. The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0193] The methods and embodiments provided in this invention can be executed on a computer terminal, server, or similar computing device. Taking running on a server as an example... Figure 6 This is a schematic diagram of the hardware structure of a server running a flexible flat cable assembly and testing method according to an embodiment of the present invention, as shown below. Figure 6 As shown, the server 600 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 610 (processors 610 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 630 for storing data, and one or more storage media 620 (e.g., one or more mass storage devices) for storing application programs 623 or data 622. The memory 630 and storage media 620 may be temporary or persistent storage. The program stored in the storage media 620 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the processor 610 may be configured to communicate with the storage media 620 and execute the series of instruction operations stored in the storage media 620 on the server 600. Server 600 may also include one or more power supplies 660, one or more wired or wireless network interfaces 650, one or more input / output interfaces 640, and / or one or more operating systems 621, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0194] The input / output interface 640 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 600. In one example, the input / output interface 640 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 640 may be a radio frequency (RF) module for wireless communication with the Internet.
[0195] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 600 may also include... Figure 6 The more or fewer components shown, or having the same Figure 6 The different configurations shown.
[0196] This invention also provides a computer-readable storage medium storing at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the steps of the above-described flexible flat cable assembly detection method. In this invention, the computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0197] This application also provides a computer storage medium storing at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the above-described method. In this embodiment, the computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium may include, but is not limited to, any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium.
[0198] This invention also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the flexible flat cable assembly detection method provided in the various optional implementations described above.
[0199] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for assembling and inspecting flexible flat cables, characterized in that, include: Acquire the initial image of the currently assembled flexible flat cable assembly captured by the AR glasses; The flexible flat cable assembly includes a flexible flat cable and a connector; The position of the flexible flat cable assembly in the initial image is detected to obtain position information; Based on the location information, the first edge straight line of the flexible flat cable and the second edge straight line of the connector are determined; Based on the angle between the first edge line and the second edge line, it is determined whether the assembly of the detected flexible flat cable assembly is qualified, and the detection result is obtained; The step of detecting the position of the flexible flat cable assembly in the initial image to obtain position information includes: Based on the target detection algorithm, a target detection box is determined in the initial image, and the soft flat cable assembly is defined in the target detection box. The distance between the image acquisition end and the initial image is adjusted based on the current proportion of the target detection box in the initial image and the current field of view of the camera. The proportion of the target detection box in the initial image is corrected based on the preset field of view. Based on the corrected target detection box, the pixel coordinates of the flexible flat cable assembly are determined to obtain the position information.
2. The flexible flat cable assembly and testing method according to claim 1, characterized in that, Based on the location information, determining the first edge straight line of the flexible flat cable and the second edge straight line of the connector includes: Based on the pixel coordinates of the flexible flat cable assembly, the actual physical size of the target detection box is determined, and the actual physical size includes the length and width of the flexible flat cable and the connector; The initial image is preprocessed to obtain the image to be analyzed; the preprocessing includes grayscale processing and filtering smoothing. For the image to be analyzed, the edges of the flexible flat cable and the connector are determined to obtain the edge information of the flexible flat cable assembly; Based on the edge information of the flexible flat cable assembly and the actual physical size of the target detection frame, the first edge line of the flexible flat cable and the second edge line of the connector in the target detection frame are extracted.
3. The flexible flat cable assembly and testing method according to claim 2, characterized in that, The step of determining the edges of the flexible flat cable and the connector for the image to be analyzed, and obtaining the edge information of the flexible flat cable assembly, includes: Calculate the gradient magnitude and gradient direction of each pixel in the image to be analyzed; Traverse each pixel and determine whether the current pixel is a local maximum value with the same gradient direction among the surrounding pixels; if so, retain the current pixel and determine the first gradient magnitude of each current pixel. Thresholding is performed on the current pixel based on the first gradient magnitude to determine the edges of the flexible cable and the connector.
4. The flexible flat cable assembly and testing method according to claim 3, characterized in that, The step of thresholding the current pixel based on the first gradient magnitude to determine the edges of the flexible cable and the connector includes: Feature points of the flexible flat cable assembly are extracted based on the scale-invariant feature transform algorithm; the intersection of the feature points and the current pixel is determined; Obtain the second gradient magnitude of the feature points in the intersection; determine the first threshold and the second threshold for thresholding based on the second gradient magnitude and the number of feature points in the intersection; The edges of the flexible flat cable and the connector are determined based on the comparison between the first gradient magnitude of the current pixel and the first threshold and the second threshold.
5. The flexible flat cable assembly and testing method according to claim 4, characterized in that, The determination of the edges of the flexible flat cable and the connector based on the comparison between the first gradient magnitude of the current pixel and the first threshold and the second threshold includes: If the magnitude of the first gradient is not less than the first threshold, then the current pixel is marked as the first strong edge pixel. If the magnitude of the first gradient is greater than the second threshold and less than the first threshold, then the current pixel is marked as a virtual edge pixel. If the virtual edge pixel is connected to the first strong edge pixel, then the current pixel is marked as the second strong edge pixel; if the virtual edge is not connected to the first strong edge pixel, then the current pixel is set to zero. If the magnitude of the first gradient is not greater than the second threshold, then the current pixel is set to zero. The edges of the flexible flat cable and the connector are determined based on the first strong edge pixel and the second strong edge pixel.
6. The flexible flat cable assembly and testing method according to claim 1, characterized in that, The determination of whether the assembly of the flexible flat cable assembly is qualified based on the included angle value between the first edge line and the second edge line, and the resulting test results include: Determine the first angle between the first edge line of the flexible flat cable and the X-axis, and the second angle between the second edge line of the connector and the X-axis; The absolute value of the difference between the first included angle and the second included angle is determined to obtain the included angle value; The included angle threshold is predetermined based on the width of the flexible flat cable; the included angle value is compared with the predetermined included angle threshold; If the included angle value is not greater than the included angle threshold, then the first edge line and the second edge line are determined to be parallel, which indicates that the flexible flat cable assembly is qualified.
7. The flexible flat cable assembly and testing method according to claim 1, characterized in that, The step of determining whether the assembly of the flexible flat cable assembly is qualified based on the included angle value between the first edge line and the second edge line, and obtaining the detection result, further includes: In response to an image detection command, the industrial camera is controlled to acquire a video stream containing multiple of the aforementioned flexible flat cable components; The video stream is sent to the server so that the server can re-inspect the multiple flexible flat cable components.
8. A flexible flat cable assembly testing device, characterized in that, include: The first image acquisition module is used to acquire the initial image of the currently assembled flexible flat cable assembly captured by the AR glasses; The flexible flat cable assembly includes a flexible flat cable and a connector; A position determination module is used to detect the position of the flexible flat cable assembly in the initial image and obtain position information; An edge extraction module is used to determine the first edge line of the flexible flat cable and the second edge line of the connector based on the location information. The detection module is used to determine whether the assembly of the detection flexible flat cable assembly is qualified based on the angle value between the first edge line and the second edge line, and to obtain the detection result; The step of detecting the position of the flexible flat cable assembly in the initial image to obtain position information includes: Based on the target detection algorithm, a target detection box is determined in the initial image, and the soft flat cable assembly is defined in the target detection box. The distance between the image acquisition end and the initial image is adjusted based on the current proportion of the target detection box in the initial image and the current field of view of the camera. The proportion of the target detection box in the initial image is corrected based on the preset field of view. Based on the corrected target detection box, the pixel coordinates of the flexible flat cable assembly are determined to obtain the position information.
9. An electronic device, characterized in that, The method includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the steps of the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the steps of the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for adjusting field angle of camera
CN111491093A
Failure detection method and device based on flexible flat cable
CN113976452A
Dam body crack identification and measurement method based on unmanned aerial vehicle vision
CN114331986A