Method for detecting the positioning of a car b-pillar press

CN122617983BActive Publication Date: 2026-11-03XINXIYUAN (JIANGSU) INTELLIGENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611117754.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-11-03
Estimated Expiration
2046-07-27

AI Technical Summary

Technical Problem

Existing technologies make it difficult to achieve high-precision automatic alignment and pressing quality inspection of automotive B-pillar glass and plastic parts, especially in mass production where defects such as glass misalignment and uneven gaps exist, affecting product appearance and assembly quality.

Method used

A camera baseline is created using camera calibration and a positioning search box. Edge lines are obtained through positioning template image matching and edge finding algorithms. Combined with top and bottom view camera segmented imaging, accurate positioning and pressing detection of glass and plastic parts are achieved.

Benefits of technology

It improves the bonding accuracy and inspection efficiency of glass and plastic parts, achieves micron-level positioning accuracy and automated inspection, avoids human error, and enhances production consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122617983B_ABST
    Figure CN122617983B_ABST
Patent Text Reader

Abstract

The application discloses a kind of positioning detection methods of automobile B column compression, comprising: S1, debugging standard compression site and standard photographing site, calibrating camera;S2, create two positioning search boxes, glass / plastic part positioning template image;S3, in the compression image, two positioning search boxes are used to select glass / plastic part rough positioning image respectively, and glass / plastic part positioning image is obtained by template matching;S4, the edge straight line of glass / plastic part is obtained using edge finding algorithm, and the positioning key point of glass / plastic part is determined;S5, the center point of glass / plastic part is determined, compared with respective reference coordinate, the offset of each is determined, the offset is compensated to compression mechanism and executes compression;S6, the assembly after compression is detected by camera, the distance from glass edge to plastic part edge is measured, and the compression detection result is output.The application not only improves the precision of glass and plastic part positioning result;It can also realize the automatic detection of quality after compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of positioning and detection technology, and in particular to a positioning and detection method for the pressing of a car B-pillar. Background Technology

[0002] As the automotive industry moves towards lightweighting and intelligentization, B-pillars are increasingly integrating sensors, smart surfaces, and other functions, often employing a structure where a glass panel is bonded to a plastic base. This structure not only requires an aesthetically pleasing appearance but also necessitates ensuring a uniform gap between the glass and the plastic component. During B-pillar manufacturing, automated pressing equipment is typically used to assemble the glass and plastic components for mass production. However, during the pressing process, factors such as incoming material tolerances, mechanical positioning errors, and visual positioning deviations can lead to defects in some products, such as glass misalignment and uneven gaps. These defects may include misalignment between the glass and plastic component edges, gaps that are too large or too small on one side after pressing, and glass tilting, severely impacting product appearance quality and subsequent assembly.

[0003] To ensure product quality, production lines typically require vision positioning systems to precisely align glass and plastic parts before lamination. However, the B-pillar, being a slender and irregularly shaped component, has glass parts that are translucent and reflective, while the plastic parts are made of a black, light-absorbing material. The significant differences in edge characteristics between the two materials make it difficult for traditional vision positioning solutions to simultaneously capture their edges. Furthermore, the B-pillar's asymmetrical geometry (one end is larger and curved, the other smaller) limits the area of ​​straight edges, making edge positioning prone to inaccuracies.

[0004] Existing solutions often rely on manual adjustments or simple mechanical limits, which are not only inefficient but also struggle to achieve micron-level positioning accuracy, especially in mass production. Post-pressing quality inspection primarily depends on manual visual inspection, which is time-consuming and prone to omissions, disrupting subsequent processes. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a positioning and detection method for pressing automotive B-pillars, which not only improves the accuracy of positioning results for glass and plastic parts, thereby improving pressing accuracy, but also enables automatic detection of the quality after pressing.

[0006] The technical solution adopted by this invention to solve its technical problem is: a positioning and detection method for the pressing of a car B-pillar, comprising the following steps: S1. Adjust the standard pressing position and standard shooting position to ensure that the top corner edge of the glass is completely captured within the camera's field of view and that there is space reserved between it and the edge of the plastic part; calibrate the camera and create a camera reference. S2. Place the glass and plastic parts at the standard pressing position, take a picture of the original image of the standard pressing position using the camera, create two positioning search boxes, and create a glass positioning template image and a plastic part positioning template image. S3. Before pressing, take a picture with the camera to obtain a pressing image. In the pressing image, use two positioning search boxes to select the glass coarse positioning image and the plastic part coarse positioning image respectively. In the glass coarse positioning image, perform glass positioning template image matching to obtain the glass positioning image. In the plastic part coarse positioning image, perform plastic part positioning template image matching to obtain the plastic part positioning image. S4. Using an edge-finding algorithm, obtain the straight lines of the glass edge and the straight lines of the plastic part edge in the glass positioning image and the plastic part positioning image, and obtain the key points of glass positioning based on the straight lines of the glass edge. The key positioning points of the plastic part are obtained based on the straight lines of the plastic part's edge. ; S5. Based on the glass positioning key points Determine the center point of the glass and locate the key points of the plastic part. Determine the center point of the plastic part, compare the center point of the glass and the center point of the plastic part with their respective reference coordinates, determine their respective offsets, compensate the offsets to the pressing mechanism, and perform pressing; S6. The pressed components are inspected by a camera, the distance from the edge of the glass to the edge of the plastic part is measured, and the result is compared with the preset standard value and limit value. The pressing test result is then output.

[0007] Furthermore, step S2 specifically includes: In the original image, create a positioning search box in the area containing the glass outline and another positioning search box in the area containing the plastic part outline. The size of the positioning search boxes is smaller than that of the original image. In the image area framed by the location search box, select the region of interest, which includes the complete edge of glass or the edge of a plastic part; Edge features are extracted from the region of interest using the Canny operator and the Sobel gradient operator, and glass positioning template images and plastic part positioning template images are generated based on the edge features.

[0008] Furthermore, step S4 specifically includes: An edge-finding search box is set up to locate the straight-line area of ​​the edge of the glass / plastic part; the edge-finding search box can follow the positioning template image of the glass / plastic part. Within the edge search box, multiple scan lines are generated in a direction perpendicular to the edge of the glass / plastic part. The gray-level gradient is calculated on each scan line, and the point with the largest gray-level gradient on each scan line is extracted as a candidate edge point to obtain a set of candidate edge points. A weighted least squares method is used to fit a straight line to the candidate edge points in the candidate edge point set, with the weights set as the gradient magnitude. The fitted straight line is the edge line of the target. The intersection of the two straight lines along the edges of the glass is the key point for glass positioning. The intersection of the two straight lines along the edges of the plastic part is the key positioning point for the plastic part. .

[0009] Furthermore, step S5 specifically includes: Key positioning points for the glass are obtained in the upper left and lower right corners of the glass, respectively. The center point of the glass is calculated by connecting the two key positioning points. The center point of the glass is then compared with the reference coordinates of the glass center to calculate the offset between the two. Simultaneously calculate the rotation angle deviation between the glass placement posture and the reference posture. ; The key positioning points of the plastic part are obtained in the upper left and lower right corner areas respectively. The center point of the plastic part is calculated by connecting the two key positioning points. The center point of the plastic part is compared with the reference coordinates of the center of the plastic part, and the offset between the two is calculated. Simultaneously calculate the rotation angle deviation between the plastic part's placement posture and the reference posture. ; The offset , and rotation angle deviation , Compensation is given to the pressing mechanism.

[0010] Furthermore, step S5 also includes: When compensating for the offset position of glass / plastic parts, a mechanical error compensation value is introduced. and the compensation value of the supplier , This indicates the manufacturer's code for glass and plastic parts; by identifying the supplier of the glass / plastic parts, the corresponding supplier compensation value can be retrieved. ; Total glass compensation value given to the pressing mechanism for: + + ; + + ; + ; Total compensation value for plastic parts to be compensated by the pressing mechanism for: + + ; + + ; + .

[0011] Furthermore, step S4 also includes: edge direction determination, which determines the edge direction based on the grayscale difference between the target pixel and its neighboring pixels. If the gray level on the right is greater than that on the left and the edge is found from dark to light, it is considered a valid edge; Alternatively, if the gray level on the right is less than that on the left and the edge is found from light to dark, it is considered a valid edge.

[0012] Furthermore, the formula for calculating the edge distance in step S6 is as follows:

[0013] in, For the first The straight line position of the glass edge at each measurement location. For the first The straight line position of the edge of the plastic part at each measurement location. For the first The perpendicular distance between the glass edge and the plastic part edge at each measurement location. These correspond to four different measurement locations.

[0014] Furthermore, the judgment rule for the pressing test result in step S6 is as follows:

[0015] in, For the first The perpendicular distance between the glass edge and the plastic part edge at each measurement location. For standard spacing, The allowable tolerance limit is when all measured distances meet the following conditions. When the measurement distance is within the specified range, the pressing result is considered OK; otherwise, the pressing result is considered NG.

[0016] Furthermore, in step S1, the downward-viewing camera and the upward-viewing camera are calibrated separately, including: The downward-looking camera and the upward-looking camera were calibrated using the nine-point calibration method. The spatial coordinate transformation formula after calibration is: , , in, For the camera's sub-pixel coordinates, Physical coordinates in the world coordinate system. , The pixel-to-physical size scaling factor is obtained through a nine-point calibration method; the downward-viewing camera and the upward-viewing camera share the same set of pixel-to-physical size scaling factors.

[0017] Furthermore, the camera takes multiple photos of the glass / plastic part while acquiring the original image of the glass / plastic part.

[0018] The beneficial effects of this invention are: (1) In the early stage, standardize the shooting position and pressing position, and complete the camera calibration work. This ensures that the top corner of the glass and the edge of the plastic part are completely within the camera's field of view, while reserving a reasonable imaging space. By calibrating the camera, image distortion and system errors are eliminated. In conjunction with the creation of a benchmark, a unified detection benchmark is established to ensure the standardization and effectiveness of image acquisition from the source.

[0019] (2) By pre-building a positioning search box and a dedicated positioning template for parts, a two-level positioning mode of "coarse positioning + precise template matching" is adopted. First, the target area is filtered through the search box to complete the coarse positioning and narrow the search range of the algorithm. Then, the glass and plastic parts areas are accurately locked by template matching, which effectively reduces invalid calculations, improves image matching efficiency, and reduces the computational power consumption of the algorithm.

[0020] (3) Based on the edge finding algorithm, the edge lines of glass and plastic parts are respectively fitted and obtained, and the edge lines are used to select exclusive positioning key points. The edge key points are used as the positioning basis. Compared with the whole-domain pixel comparison, the core area required for pressing can be accurately focused, the interference of invalid pixels is avoided, and the stability of component edge recognition and feature positioning is improved.

[0021] (4) Calculate the center point based on the key positioning points of the components, compare the real-time center point coordinates with the preset reference coordinates, and quantify the positional offset of the glass and plastic parts. The offset data is directly compensated to the pressing actuator to correct the material inlet deviation, realize the fine adjustment of component alignment, and greatly improve the pressing alignment accuracy of the B-pillar glass and plastic parts.

[0022] (5) After the pressing process is completed, a visual re-inspection step is added to automatically measure the edge distance between the glass and the plastic parts, and judge the pressing quality by combining the preset standard value and the limit threshold. This realizes the closed-loop operation of positioning and correction before pressing and automatic re-inspection after pressing, abandoning the traditional manual visual inspection mode, avoiding the error of human subjective judgment, and improving the consistency of inspection. Attached Figure Description

[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0024] Figure 1 This is a flowchart of the positioning and detection method for the pressing of the B-pillar of a car according to the present invention.

[0025] Figure 2 This is an image of the upper left corner area of ​​the glass / plastic part taken by the camera of this invention.

[0026] Figure 3 This is an image of the lower right corner of the glass / plastic part taken by the camera of this invention. Detailed Implementation

[0027] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0028] like Figures 1 to 3 As shown, the positioning and detection method for the B-pillar pressing of a car in this embodiment includes the following steps: S1. Adjust the standard pressing position and standard shooting position to ensure that the top corner edge of the glass is fully captured within the camera's field of view and that there is space reserved between it and the edge of the plastic part; calibrate the camera and create a camera reference.

[0029] S2. Place the glass and plastic parts at the standard pressing position, take a picture of the original image of the standard pressing position, create two positioning search boxes, and create glass positioning template images and plastic part positioning template images.

[0030] S3. Before pressing, take a picture with a camera to obtain a pressing image. In the pressing image, use two positioning search boxes to select the coarse positioning image of the glass and the coarse positioning image of the plastic part respectively. In the coarse positioning image of the glass, perform glass positioning template image matching to obtain the glass positioning image. In the coarse positioning image of the plastic part, perform plastic part positioning template image matching to obtain the plastic part positioning image.

[0031] S4. Use an edge-finding algorithm to obtain the straight lines of the glass edge and the straight lines of the plastic part edge in the glass positioning image and the plastic part positioning image, and obtain the key points of glass positioning based on the straight lines of the glass edge. Key positioning points of the plastic part are obtained based on the straight lines of its edge. .

[0032] S5. Based on the key points of glass positioning Determine the center point of the glass and locate the key points based on the plastic parts. Determine the center point of the plastic part, compare the center point of the glass and the center point of the plastic part with their respective reference coordinates, determine their respective offsets, compensate the offsets to the pressing mechanism, and perform pressing.

[0033] S6. The pressed components are inspected by a camera, the distance from the edge of the glass to the edge of the plastic part is measured, and the result is compared with the preset standard value and limit value. The pressing test result is then output.

[0034] The steps described above are explained in detail below.

[0035] In step S1, the equipment must first be debugged. The equipment includes two stations, A and B, each equipped with an upward-viewing camera (shooting downwards) and a downward-viewing camera (shooting upwards). The operator needs to adjust the standard pressing position after standard material loading, and the position of the upward-viewing camera must also be adjusted accordingly. After adjusting the standard pressing position, the standard photo-taking position is then adjusted. The standard photo-taking position needs to adjust the relative position of the B-pillar and the position of the downward-viewing camera. The standard photo-taking position must capture the complete edge of the glass top corner, and there should be a reserved space between the edge of the glass top corner and the edge of the plastic part to prevent inaccurate material loading from causing the positioning tool to fail to find the edge.

[0036] Then, the upward and downward cameras are calibrated. The purpose of calibration is to establish a precise mapping relationship between image pixel coordinates and world three-dimensional physical coordinates, eliminating deviations caused by the lens and imaging system. This embodiment uses a nine-point calibration method to control the mechanical axis to move to nine known world coordinates. Location, Record the corresponding pixel coordinates respectively Solving the affine transformation matrix using the least squares method , so that: The formula for transforming spatial coordinates after calibration is: , ,in, For the camera's sub-pixel coordinates, Physical coordinates in the world coordinate system. , The pixel-to-physical size ratio factor is obtained using a nine-point calibration method; the downward-viewing camera and the upward-viewing camera share the same set of pixel-to-physical size ratio factors. Normally, the camera only needs to be calibrated once, but recalibration is required when the camera axis position changes or the B-pillar shooting height changes.

[0037] Next, a camera reference point needs to be created. This requires aligning the glass and plastic parts with the standard pressing position, then using a suction mechanism to lift the glass and adjust it to the desired photographing height. Finally, take a picture using the upward-viewing camera to create the upward-viewing camera reference point. After setting the upward-viewing camera reference point, use a mechanical axis to move the glass to the desired horizontal position and height for the photograph, thus creating the downward-viewing camera reference point.

[0038] In step S2, it is necessary to create glass / plastic part positioning template images. Specifically, this includes: creating a positioning search box in the original image covering the region containing the glass outline, and creating another positioning search box in the region covering the plastic part outline. The size of each positioning search box is smaller than that of the original image. Within the region image bounded by the positioning search boxes, a region of interest is selected. This region of interest contains the complete edge of the glass or the edge of the plastic part. Edge features are extracted from the region of interest using the Canny operator and the Sobel gradient operator. Based on these edge features, glass positioning template images and plastic part positioning template images are generated.

[0039] like Figure 2 and Figure 3 As shown, the yellow line in the image represents the center line of the image window, facilitating observation of whether the target is centered in the field of view. Taking glass as an example, a localization search box is first created (the large green box in the image). This search box needs to completely encompass the edge region of the top corner of the glass. Then, within the image area bounded by the search box, a region of interest (ROI) containing the glass edge is selected (the purple box in the image; the small green box is used for training the ROI). The ROI needs to include both the rounded corner and the straight edge of the glass. Next, edge features are extracted from the ROI image using a combination of the Canny and Sobel gradient operators. The Sobel gradient operator provides a reliable gradient basis for the Canny operator, while the Canny operator optimizes the gradient result of the Sobel operator into high-quality edges. The combination of both yields multiple edge features, including gradient intensity, edge position, and edge direction. These edge features and the ROI are then encapsulated together as a glass localization template image. Finally, the glass localization template image is trained and validated using NCC (Negative Calibration Computation). The NCC calculation formula is... ,in, and The gradient normalization values ​​for the template and target regions are set with a verification threshold of ≥0.85. The template is considered valid when the matching error is ≤±0.5 pixels for 10 consecutive times. In other words, in practical applications, after determining the positioning search box in the original image, the region bounded by the positioning search box is matched using the glass positioning template image. If the match is successful, it indicates that the glass is currently in the pressing position.

[0040] This embodiment utilizes a positioning template image matching strategy, which can not only quickly determine whether a target exists, but also output information such as the target's coordinates and edge features in the image. The processing approach for plastic part positioning template images is the same as that for glass positioning template images, except that the target is replaced by a plastic part instead of glass.

[0041] After the equipment is properly adjusted and the positioning template image for the glass / plastic parts is created, the pressing process can begin. Before pressing, the glass and plastic parts need to be positioned after being placed in the pressing position to determine their exact location.

[0042] In step S3, the pressed images of the glass and plastic parts are first captured using a camera. Within these images, a positioning search box is used to quickly define the coarse positioning images of the glass (i.e., the top corner edge region of the glass) and the plastic parts (i.e., the top corner edge region of the plastic parts). This avoids processing the entire pressed image, reducing computational load and improving processing efficiency. Then, in the coarse positioning image of the glass, a glass positioning template image is used for matching to obtain the glass positioning image, locate the glass edges, and output the corresponding edge features. Similarly, in the coarse positioning image of the plastic part, a plastic part positioning template image is used for matching to obtain the plastic part positioning image, locate the plastic part edges, and output the corresponding edge features.

[0043] Then, the edge-finding algorithm in step S4 is executed, which specifically includes: setting the edge-finding search box ( Figure 2 and Figure 3 The green shaded box in the image indicates the edge search box, which is used to locate the straight line region of the glass / plastic part's edge. The edge search box can move in tandem with the glass / plastic part positioning template image. Within the edge search box, multiple scan lines are generated perpendicular to the edge of the glass / plastic part. The gray-level gradient is calculated on each scan line, and the point with the largest gray-level gradient on each scan line is extracted as a candidate edge point, resulting in a set of candidate edge points. A weighted least squares method is used to fit a straight line to the candidate edge points in the set, with the weights set to the gradient magnitude. The fitted straight line is the edge line of the target (…). Figure 2 and Figure 3 (The red line segment in the image). The intersection of the two straight lines along the glass edge is the key point for glass positioning. The intersection of the two straight lines along the edges of the plastic part is the key positioning point for the plastic part. It should be noted that the coordinates of the intersection point can be obtained by finding the intersection of the extensions of the two edge lines (the blue lines in the diagram).

[0044] For example, three Mark points are marked within the purple region of interest, and their real-time coordinates are recorded. The edge-finding search box is associated with these three Mark points. When the target (glass, plastic part) shifts left or right, moves up or down, or changes angle, this can be quantified using the coordinates of the three Mark points, automatically driving the green edge-finding search box to synchronously translate and rotate to correct its position. This forces the edge-finding search box to fall on the target's straight line segment, preventing it from covering rounded corner areas. After the edge-finding search box position is determined, multiple scan lines (typically N≥20) are generated perpendicular to the edge direction within the search box. The grayscale gradient is calculated on each scan line, and the point with the largest gradient on each scan line is extracted as a candidate edge point. Then, a weighted least squares method is used to fit a straight line to multiple candidate edge points, with the weights set to the gradient magnitude. The resulting straight line is the target edge line. Figure 2As shown, there are two edge search boxes. Therefore, two edge lines of the target can be fitted, and the intersection of the two edge lines can be used as the positioning key point.

[0045] During edge finding, the grayscale image is first converted to a binary image by setting a threshold T to adjust the strength of the edge finding. When the T value is small, more pixels are identified as foreground, and the edges are more sensitive; when the T value is large, only edges with strong contrast are preserved. Simultaneously, the edge direction is determined based on the grayscale difference between the target pixel and its neighboring pixels. If the grayscale value on the right is greater than that on the left and the edge finding follows a "dark to light" pattern, it is considered a valid edge. Alternatively, if the grayscale value on the right is less than that on the left and the edge finding follows a "light to dark" pattern, it is also considered a valid edge.

[0046] In this embodiment, since the glass's dimensions exceed the camera's effective imaging field of view, using a single camera to capture full-frame images would compress the number of pixels per unit size and reduce sub-pixel positioning accuracy. Therefore, this embodiment employs a segmented image acquisition scheme using a top-view camera and a bottom-view camera, capturing images of both the glass and the plastic part twice each. This segmentation increases the effective pixel density of each individual image, which is beneficial for improving alignment accuracy. For example, the top-view camera captures the image of the upper left corner of the target, and the bottom-view camera captures the image of the lower right corner of the target.

[0047] In step S5, when determining the target offset, the glass positioning key points in the upper left and lower right corners of the glass are obtained respectively. The center point of the glass is calculated by connecting the two glass positioning key points. The center point of the glass is compared with the reference coordinates of the glass center to calculate the offset between the two. Simultaneously calculate the rotation angle deviation between the glass placement posture and the reference posture. The key positioning points of the plastic part are obtained in the upper left and lower right corners respectively. The center point of the plastic part is calculated by connecting the two key positioning points. The center point of the plastic part is then compared with the reference coordinates of the plastic part's center to calculate the offset between the two. Simultaneously calculate the rotation angle deviation between the plastic part's placement posture and the reference posture. Offset , and rotation angle deviation , Compensation is given to the pressing mechanism.

[0048] Since both the top-view and bottom-view cameras only capture partial images of the target, determining the target's position based solely on a single partial image may result in inaccurate positioning. Therefore, this embodiment combines partial images captured by both cameras to ultimately determine the target's position. Taking glass as an example, after obtaining two key positioning points in the upper left and lower right corners of the glass, a line segment is drawn connecting these two key points. The midpoint of this line segment is then used as the glass's center point for final positioning. By comparing this glass center point with the pre-calibrated reference coordinates of the glass center, the offset can be obtained. By comparing the coordinates of two key glass positioning points with those of two key glass positioning points on a standard glass image, the rotation angle deviation can be calculated. .

[0049] It should be noted that, considering that the B-pillar is supplied by multiple component manufacturers, and the mold tolerances of different manufacturers are inconsistent, there are systematic deviations in the external dimensions of products of the same specification. Conventional unified compensation parameters cannot be adapted to multiple sources of materials. At the same time, the external dimensions of the glass supporting the B-pillar are relatively large, and a single camera cannot completely cover the entire image. The compression of imaging pixels leads to insufficient edge positioning accuracy, further aggravating the problem of poor pressing gap. Based on this, step S5 of this embodiment also includes: when compensating for the offset position of the glass / plastic part, introducing a mechanical error compensation value. and the compensation value of the supplier , This indicates the manufacturer's code for glass and plastic parts; by identifying the supplier of the glass / plastic parts, the corresponding supplier compensation value can be retrieved. Total compensation value for the glass supplied to the pressing mechanism. for: + + ; + + ; + Total compensation value for plastic parts supplied to the pressing mechanism. for: + + ; + + ; + This embodiment overcomes the positioning difficulties caused by material differences from multiple suppliers by introducing supplier identification and an original compensation mechanism.

[0050] After the lamination process, a camera inspects the laminated component, measuring the distance from the glass edge to the plastic part edge. This distance is then compared to preset standard and limit values, and the lamination inspection result is output. The standard value represents a theoretically error-free standard distance, while the limit value represents upper and lower limits that can fluctuate based on the standard value. The edge distance calculation formula is as follows: ,in, For the first The straight line position of the glass edge at each measurement location. For the first The straight line position of the edge of the plastic part at each measurement location. For the first The perpendicular distance between the glass edge and the plastic part edge at each measurement location. These correspond to four different measurement positions. Standard values ​​for the four measurement distances are set according to the specific measurement positions required for testing. Limit values ​​are based on these standard values; exceeding the limit range results in an NG (Not Acceptable Test). The judgment rule for the pressing test results is as follows: ,in, For the first The perpendicular distance between the glass edge and the plastic part edge at each measurement location. For standard spacing, The allowable tolerance limit is when all measured distances meet the following conditions. When the measurement distance is within the specified range, the pressing result is considered OK; otherwise, the pressing result is considered NG.

[0051] In summary, the positioning and detection method for automotive B-pillar pressing of the present invention has the following advantages: (1) The upper and lower dual cameras are used to perform imaging separately, and large-size targets are photographed in segments to solve the problems of difficulty in complete imaging by a single camera and insufficient pixel accuracy, thus ensuring the quality of image acquisition.

[0052] (2) By pre-building a positioning search box and a dedicated positioning template for parts, a two-level positioning mode of "coarse positioning + precise template matching" is adopted. First, the target area is filtered through the search box to complete the coarse positioning and narrow the search range of the algorithm. Then, the glass and plastic parts areas are accurately locked by template matching, which effectively reduces invalid calculations, improves image matching efficiency, and reduces the computational power consumption of the algorithm.

[0053] (3) Based on the edge-finding algorithm, the edge lines of the glass and plastic parts are fitted and obtained respectively. The edge lines are used to select exclusive positioning key points. Using the edge key points as the positioning basis, compared with the whole-domain pixel comparison, the core area required for pressing can be accurately focused, and the interference of invalid pixels can be avoided, thereby improving the stability of component edge recognition and feature positioning. Based on the three Mark points, the position of the edge-finding search box is adaptively corrected, which can effectively adapt to the fluctuation of material position and make the positioning more flexible.

[0054] (4) The target is located by combining the key points of the diagonal features of the target and calculating the position and angle deviations; with the exclusive compensation mechanism of the material supplier, the deviation caused by the difference of materials from different suppliers can be eliminated, the positioning accuracy is greatly improved, and the pressing mechanism is provided with accurate positioning data.

[0055] (5) Real-time re-inspection throughout the pressing process: automatic detection of pressing quality is achieved by measuring the edge distance and comparing it with standard parameters.

[0056] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for positioning and detecting the pressing of a car B-pillar, characterized in that, Includes the following steps: S1. Adjust the standard pressing position and standard shooting position to ensure that the top corner edge of the glass is completely captured within the camera's field of view and that there is space reserved between it and the edge of the plastic part; calibrate the camera and create a camera reference. S2. Place the glass and plastic parts at the standard pressing position, take a picture of the original image of the standard pressing position using the camera, create two positioning search boxes, and create a glass positioning template image and a plastic part positioning template image. S3. Before pressing, take a picture with the camera to obtain a pressing image. In the pressing image, use two positioning search boxes to select the glass coarse positioning image and the plastic part coarse positioning image respectively. In the glass coarse positioning image, perform glass positioning template image matching to obtain the glass positioning image. In the plastic part coarse positioning image, perform plastic part positioning template image matching to obtain the plastic part positioning image. S4. Using an edge-finding algorithm, obtain the straight lines of the glass edge and the straight lines of the plastic part edge in the glass positioning image and the plastic part positioning image, and obtain the key points of glass positioning based on the straight lines of the glass edge. The key positioning points of the plastic part are obtained based on the straight lines of the plastic part's edge. ; S5. Based on the glass positioning key points Determine the center point of the glass and locate the key points of the plastic part. Determine the center point of the plastic part, compare the center point of the glass and the center point of the plastic part with their respective reference coordinates, determine their respective offsets, compensate the offsets to the pressing mechanism, and perform pressing; S6. The pressed components are inspected by a camera, the distance from the edge of the glass to the edge of the plastic part is measured, and the result is compared with the preset standard value and limit value. The pressing test result is then output.

2. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 1, characterized in that, Step S2 specifically includes: In the original image, create a positioning search box in the area containing the glass outline and another positioning search box in the area containing the plastic part outline. The size of the positioning search boxes is smaller than that of the original image. In the image area framed by the location search box, select the region of interest, which includes the complete edge of glass or the edge of a plastic part; Edge features are extracted from the region of interest using the Canny operator and the Sobel gradient operator, and glass positioning template images and plastic part positioning template images are generated based on the edge features.

3. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 2, characterized in that, Step S4 specifically includes: An edge-finding search box is set up to locate the straight-line area of ​​the edge of the glass / plastic part; the edge-finding search box can follow the positioning template image of the glass / plastic part. Within the edge search box, multiple scan lines are generated in a direction perpendicular to the edge of the glass / plastic part. The gray-level gradient is calculated on each scan line, and the point with the largest gray-level gradient on each scan line is extracted as a candidate edge point to obtain a set of candidate edge points. A weighted least squares method is used to fit a straight line to the candidate edge points in the candidate edge point set, with the weights set as the gradient magnitude. The fitted straight line is the edge line of the target. The intersection of the two straight lines along the edges of the glass is the key point for glass positioning. The intersection of the two straight lines along the edges of the plastic part is the key positioning point for the plastic part. .

4. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 3, characterized in that, Step S5 specifically includes: Key positioning points for the glass are obtained in the upper left and lower right corners of the glass, respectively. The center point of the glass is calculated by connecting the two key positioning points. The center point of the glass is then compared with the reference coordinates of the glass center to calculate the offset between the two. Simultaneously calculate the rotation angle deviation between the glass placement posture and the reference posture. ; The key positioning points of the plastic part are obtained in the upper left and lower right corner areas respectively. The center point of the plastic part is calculated by connecting the two key positioning points. The center point of the plastic part is compared with the reference coordinates of the center of the plastic part, and the offset between the two is calculated. Simultaneously calculate the rotation angle deviation between the plastic part's placement posture and the reference posture. ; The offset , and rotation angle deviation , Compensation is given to the pressing mechanism.

5. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 4, characterized in that, Step S5 also includes: When compensating for the offset position of glass / plastic parts, a mechanical error compensation value is introduced. and the compensation value of the supplier , This indicates the manufacturer's code for glass and plastic parts; by identifying the supplier of the glass / plastic parts, the corresponding supplier compensation value can be retrieved. ; Total glass compensation value given to the pressing mechanism for: + + ; + + ; + ; Total compensation value for plastic parts to be compensated by the pressing mechanism for: + + ; + + ; + 。 6. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 3, characterized in that, Step S4 also includes: edge direction determination, which determines the edge direction based on the grayscale difference between the target pixel and its neighboring pixels. If the gray level on the right is greater than that on the left and the edge is found from dark to light, it is considered a valid edge; Alternatively, if the gray level on the right is less than that on the left and the edge is found from light to dark, it is considered a valid edge.

7. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 1, characterized in that, The formula for calculating the edge distance in step S6 is: in, For the first The straight line position of the glass edge at each measurement location. For the first The straight line position of the edge of the plastic part at each measurement location. For the first The perpendicular distance between the glass edge and the plastic part edge at each measurement location. These correspond to four different measurement locations.

8. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 7, characterized in that, The judgment rule for the pressing test result in step S6 is as follows: in, For the first The perpendicular distance between the glass edge and the plastic part edge at each measurement location. For standard spacing, The allowable tolerance limit is when all measured distances meet the following conditions. When the measurement distance is within the specified range, the pressing result is considered OK; otherwise, the pressing result is considered NG.

9. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 1, characterized in that, In step S1, the downward-viewing camera and the upward-viewing camera are calibrated respectively, including: The downward-looking camera and the upward-looking camera were calibrated using the nine-point calibration method. The spatial coordinate transformation formula after calibration is: , , in, For the camera's sub-pixel coordinates, Physical coordinates in the world coordinate system. , The pixel-to-physical size scaling factor is obtained through a nine-point calibration method; the downward-viewing camera and the upward-viewing camera share the same set of pixel-to-physical size scaling factors.

10. The positioning and detection method for the pressing of the automobile B-pillar as described in claim 1, characterized in that, The camera takes multiple photos of the glass / plastic part while capturing the original image of the glass / plastic part.

Citation Information

Patent Citations

  • UHPC decorative plate pressing quality detection method based on vision

    CN120385683A

  • Position detecting device, drawing device and position detecting method

    JP2013074242A