A method for guiding in the later stage of coaxial assembly based on machine vision

By using machine vision technology in coaxial assembly, the assembly site images are collected and processed, the assembly is autonomous navigation is achieved, the problems of low accuracy and low efficiency in the existing technology are solved, and high-precision and high-efficiency automated assembly is achieved.

CN118617091BActive Publication Date: 2025-06-10NANJING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410766678.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-06-10
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

The existing coaxial assembly technology relies on manual alignment or offset positioning labels, which has problems such as low accuracy, low efficiency and cumulative error.

Method used

Using a machine vision-based method, the assembly site images are collected through the camera, image preprocessing, multi-level filtering and pixel coordinate calculation are carried out to realize the independent navigation of assembly.

Benefits of technology

It improves assembly accuracy and efficiency, reduces the difficulty and error of manual intervention, and realizes automated coaxial assembly positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118617091B_ABST
    Figure CN118617091B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for guiding in the later stage of coaxial assembly based on machine vision, which is used to improve the degree of automation of assembly operations. The steps include: installing a camera at the front of the active end of the assembly to collect operation images, and pasting a target on the passive end of the assembly for end point identification, so as to form an assembly vision end navigation system; preprocessing the collected images to obtain a binary image containing the target image area; constructing a multi-level filter to filter the binary image to obtain a binary image with only target information; performing sub-pixel accuracy calculation on the target binary image to obtain the pixel position coordinates of the target; calibrating the camera to obtain the relationship between pixels and physical movement distances; calculating the offset distance for assembly navigation; after the navigation is completed, collecting the scene images again for error analysis. If the requirements are met, the assembly navigation is ended. If not, compensation is performed through step-by-step movement until the error tolerance requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of industrial assembly and machine vision, and particularly relates to a method for guiding in the later stage of coaxial assembly based on machine vision. Background Art

[0002] The information provided in this section is only background information related to the present disclosure, and it is not necessarily prior art.

[0003] Coaxial assembly is crucial in many industrial fields such as automobile manufacturing, aerospace, and precision machinery equipment production. This process requires one or more components to be precisely installed on the axis of another component to ensure that the mechanical system can operate smoothly and meet the expected performance standards.

[0004] Current assembly technologies mostly rely on manual alignment or conversion through offset positioning tags. Although these methods solve the assembly accuracy problem to a certain extent, they also bring many challenges and limitations. First, manual alignment requires operators to have a high skill level and experience. Even so, it is still difficult to completely avoid errors in manual operation. As the complexity of the assembly task increases, the efficiency of manual alignment will also decrease significantly. In addition, the repeatability of manual operation is poor, which easily leads to fatigue and errors, thus affecting the assembly quality.

[0005] Conversion through offset positioning tags is another coaxial assembly method, but it essentially relies on precise tag positioning and complex mathematical calculations. This method not only increases the complexity of the layout but also places high requirements on the computing system. Especially in the multi-step and multi-station assembly process, the management of positioning tags and the complexity of calculations increase exponentially, and cumulative errors are extremely likely to occur. In industrial production, it is difficult to perform manual intervention in the later stage of assembly, with low accuracy and efficiency. Summary of the Invention

[0006] To solve the above technical problems, the present invention proposes a method for guiding in the later stage of coaxial assembly based on machine vision.

[0007] A method for guiding in the later stage of coaxial assembly based on machine vision, by means of machine vision technology, collects the scene information of the assembly process, extracts the pixel coordinates of the target position, calculates the offset, and realizes the autonomous navigation of the assembly. It provides a method for using machine vision to collect the scene information of the assembly site, complete the offset calculation, and realize autonomous navigation, including the following steps:

[0008] Step 1, install the equipment. Install a camera on the active end of the assembly to collect images of the assembly operation site. The camera is equipped with an illumination source, and set a target on the passive end of the assembly for end marking to form an assembly vision end navigation system. The illumination source provides illumination when necessary.

[0009] Step 2, Image preprocessing: Preprocess the image collected in Step 1 to obtain a binary image of the suspected target image area.

[0010] Step 3, Image filtering: Construct a multi-level filter to filter the binary image obtained in Step 2 to obtain a binary image of the target.

[0011] Step 4, Coordinate conversion: Perform sub-pixel accuracy calculation on the binary image of the target obtained in Step 3 to obtain the pixel position coordinates of the binary image of the target.

[0012] Step 5, Length conversion: Calibrate the camera to obtain the relationship between pixels and physical length.

[0013] Step 6, Calculate the offset distance and perform assembly navigation.

[0014] Step 7, Accuracy inspection: After navigation is completed, collect the scene image again, calculate the pixel position coordinates of the binary image of the target, perform error analysis. If the requirements are met, end the navigation; if not, repeat Step 6 again until the error tolerance requirements are met.

[0015] Further, Step 2 includes:

[0016] Step 2-1, Convert the color space of the image collected in Step 1 from the RGB color space to the HSV color space.

[0017] Step 2-2, Separate the H, S, and V channel images of the image obtained in Step 2-1 and obtain single-channel grayscale images.

[0018] Step 2-3, Extract the V channel for target images with white background and black labels and the S channel for target images with other color combinations.

[0019] Step 2-4, Binarize the single-channel image obtained in Step 2-3.

[0020] Step 2-5, For the binarized image obtained in Step 2-4, eliminate discontinuous noise through morphological filtering and retain the area of the suspected target image.

[0021] By converting the image from the RGB color space to the HSV color space, separating the H, S, and V channels and selecting appropriate channels for processing according to different target colors, target information can be more effectively extracted; then, noise is eliminated through binarization and morphological filtering, ensuring the accurate identification of the target area. This improves the robustness and accuracy of image processing and reduces background interference.

[0022] Further, the image filtering in Step 3 includes:

[0023] Step 3-1, First filtering: Calculate the ratio of the long side of the circumscribed rectangle of the connected component to the short side of the whole image as Feature 1, and perform image filtering according to Feature 1 to obtain the first binary image of the suspected target.

[0024] Step 3-2, Second filtering: Calculate the ratio of the short side to the long side of the circumscribed rectangle of the connected component of the first binary image of the suspected target extracted by Feature 1 as Feature 2, and perform image filtering according to Feature 2 to obtain the second binary image of the suspected target.

[0025] Step 3-3, Third filtering: Calculate the ratio of the area of the connected component to the area of the circumscribed rectangle of the second binary image of the suspected target extracted by Feature 2 as Feature 3, and perform image filtering according to Feature 3 to obtain the third binary image of the suspected target.

[0026] Step 3-4, Fourth filtering: Calculate the ratio of the long side of the circumscribed rectangle of the connected component of the third binary image of the suspected target extracted by Feature 3 to the short side of the whole image as Feature 4, and perform image filtering according to Feature 4 to obtain the fourth binary image of the suspected target.

[0027] During the four filtering processes, when only one connected component is retained in the filtering result, it is considered that the connected component is the binary image of the target, and the filtering ends. If there are still multiple connected components after four feature classification extractions, the active end of the micro-motion assembly re-collects the image of the assembly operation site and performs filtering again.

[0028] The multi-level filtering method gradually screens by successively using features such as the ratio of the long side of the circumscribed rectangle of the connected component to the short side of the whole image, the aspect ratio of the circumscribed rectangle of the connected component, and the ratio of the area of the connected component to the area of the circumscribed rectangle, eliminating background noise and irrelevant interferences, and accurately identifying the target area. By gradually refining the screening criteria, the reliability of the final filtering result is ensured.

[0029] Further, the specific calculation method of the features in Step 3 is as follows:

[0030] The calculation method of Feature 1 is: Feature 1 = max(circumscribed rectangle length, circumscribed rectangle width) / min(whole image length, whole image width), and the classification threshold is 0.3, that is, the area where Feature 1 < 0.3 is the first binary image of the suspected target;

[0031] The calculation method of Feature 2 is: Feature 2 = min(circumscribed rectangle length, circumscribed rectangle width) / max(circumscribed rectangle length, circumscribed rectangle width), and the classification threshold is 0.9, that is, the area where Feature 2 > 0.9 is the second binary image of the suspected target;

[0032] The calculation method of Feature 3 is: Feature 3 = S 二值连通域面积 / S 二值连通域外接矩形面积 , and the classification threshold is 0.7, that is, the area where Feature 3 < 0.7 is the third binary image of the suspected target; where S二值连通域面积 is the area of the binary connected domain, S 二值连通域外接矩形面积 is the area of the circumscribed rectangle of the binary connected domain;

[0033] The calculation method of the feature 4 is: feature 4 = max(length of the circumscribed rectangle, width of the circumscribed rectangle) / min(length of the whole image, width of the whole image), and the classification threshold is 0.05, that is, the area where feature 4 > 0.05 is the binary image of the fourth suspected target;

[0034] Among them, the function max() is to take the larger value, and the function min() is to take the smaller value.

[0035] By setting a clear classification threshold, each filtering operation has a clear standard and goal, so as to accurately screen suspected targets. Feature 1, feature 2 and feature 4 are based on the aspect ratio of the circumscribed rectangle length and width, feature 3 is based on the connected domain area ratio, and the target area is gradually refined and confirmed. Through layer-by-layer filtering, the misjudgment is reduced while ensuring the accuracy of the assembly method.

[0036] Further, step 4 includes,

[0037] Step 4-1, calculate the moments of the connected domains in the target area of the binary image obtained in step 3.

[0038] Step 4-2, use the moments to calculate the centroid of the connected domain of the target binary image obtained in step 4-1, and the centroid is used as the pixel position coordinates of the target binary image.

[0039] Further, step 5 includes,

[0040] Step 5-1, take a photo of the initial state, and obtain the pixel position coordinates of the target in the initial state as (u 0 , v 0 ).

[0041] Step 5-2, the active end of the assembly moves n steps along the x-axis direction and the y-axis direction respectively, and the step sizes in the two directions are λ x and λ y , that is, for the i-th step, the moving distance in the x direction is i * λ x , and the moving distance in the y direction is i * λ y , and the pixel position coordinates of the target obtained in the i-th step are (u i , v i ).

[0042] Step 5-3, after moving n steps, the pixel position coordinates of the target are [(u 0 , v 0 ), (u 1 , v 1 ),..., (u i , v i ),..., (uj , v j ),...,(u n , v n ). After offset, the new target pixel position coordinates are [(0,0), (u' 1 , v' 1 ),...,(u' i , v' i ),...,(u' j , v' j ),...,(u' n , v' n ). Among them, u' i = u i - u 0 , v' i = v i - v 0 .

[0043] Step 5-4, for the i-th step, there is a physical distance offset of i*λ x = k 1 * u' i + k 2 * v' i in the x direction, and a physical distance offset of i*λ y = k 3 * u' i + k 4 * v' i in the y direction. Use two different target pixel position coordinates to calculate k 1 , k 2 , k 3 , k 4 . Among them

[0044] Step 5-5, according to the k 1 , k 2 , k 3 , k 4 calculation formula in 5-4, traverse n target pixel position coordinates to obtain 4 groups of (n - 1)*(n - 2) coefficients [k 11 , k 12 ,..., k 1(n-1)*(n-2) , [k 21 , k 22 ,..., k 2(n-1)*(n-2) , [k 31 , k 32 ,..., k 3(n-1)*(n-2) , [k 41 , k42 ,..., k 4(n-1)*(n-2) . The active end of the assembly moves n steps, thus obtaining n coordinates. After transforming the coordinate system in Step 5-3, (u0, v0) is transformed into (0, 0), which will cause the denominator in the calculation in Step 5-4 to be 0. Therefore, the number of valid coordinates is n - 1. One k value can be calculated for every two different valid coordinates. Therefore, (n - 1) * (n - 2) k values are obtained.

[0045] Step 5-6: Take the average of each group of coefficients obtained in Step 5-5 to obtain k 1ave , k 2ave , k 3ave , k 4ave , which is used for the subsequent conversion between pixels and physical lengths.

[0046] By taking pictures of the target position in the initial state and making multiple-step movements, the pixel coordinate changes at different positions are calculated to accurately establish the mapping relationship between pixels and physical distances. The offset calculations are performed on multiple position coordinates, the conversion coefficient groups are determined using the linear relationship, and the average of these coefficients is taken to ensure the accuracy of the calculation results. The error that may be brought by single measurement is reduced while the accuracy of the conversion between pixels and physical lengths is improved, providing basic data for the subsequent steps.

[0047] Furthermore, Step 6 includes

[0048] Step 6-1: Collect the starting and target position coordinates. The pixel position coordinates of the binary image of the target at the target end are (u 0 , v 0 ), and the pixel position coordinates of the binary image of the target collected at the starting point are (u, v).

[0049] Step 6-2: Calculate the offset distances in the x direction and y direction as X dist and Y dist respectively according to the coefficients obtained in Step 5, where X dist = k 1ave * (u - u 0 ) + k 2ave * (v - v 0 ), Y dist = k 3ave * (u - u 0 ) + k 4ave * (v - v 0 ). Take X dist and Y dist as the navigation basis and send them to the active end of the assembly for navigation operations.

[0050] Furthermore, Step 7 includes

[0051] Step 7-1, after the active end is assembled and in place at the end of step 6, capture the scene information and extract the target pixel coordinates (u, v).

[0052] Step 7-2, compare the target pixel coordinates (u, v) obtained in step 7-1 with the pixel position coordinates (u 0 , v 0 ) of the target binary image at the end point of the assembly target. If it is within the allowable error range, stop the movement. If it exceeds the allowable error range, perform motion compensation.

[0053] Furthermore, the motion compensation strategy described in step 7-2 is that if the true coordinate u of the target pixel > the target coordinate u of the target pixel 0 , move one step length λ in the direction of decreasing u x , if u < u 0 , move one step length λ in the direction of increasing u x ; if the true coordinate v of the target pixel > the target coordinate v of the target pixel 0 , move one step length λ in the direction of decreasing v y , if v < v 0 , move one step length λ in the direction of increasing v y . After the movement is completed, capture the scene information again to extract the target pixel coordinates (u, v), and compare them with the pixel position coordinates (u 0 , v 0 ) of the target binary image at the end point of the assembly target until the error requirement is met.

[0054] By real-time monitoring and correcting the target pixel coordinates, high-precision positioning during the assembly process is ensured. After each movement in place, the target position is re-captured and extracted. If there is a deviation, precise motion compensation is performed to gradually approach the target position. This iterative correction strategy can effectively eliminate the cumulative error and ensure the efficiency and precision of the assembly process.

[0055] Furthermore, in step 1, the targets pasted on the passive end of the assembly and the target position adopt color combinations that clearly distinguish the foreground from the background. For example, white background with black label, black background with white label, white background with red label, white background with blue label, white background with green label, white background with magenta label, white background with yellow label, white background with cyan label, black background with red label, black background with blue label, black background with green label, black background with magenta label, black background with yellow label, and black background with cyan label.

[0056] Beneficial effects: The method of the present invention uses an industrial camera installed on the active end device of coaxial assembly to collect images of the assembly operation site. After binarizing the on-site images, multi-level filtering is performed on the connected regions to obtain the binary image of the target. This filtering method can effectively solve the influence of ambient light on the target image. The centroid of the connected region is calculated for the binary image of the target to obtain the pixel coordinates of the target. This alternative method improves the positioning accuracy of the target under a certain resolution. By calibration, the mapping relationship between the image pixel coordinates and the physical distance is obtained. During the assembly process, the pixel coordinates of the target are calculated by collecting scene information and compared with the preset position of the target. The spatial offset is obtained through the mapping relationship to drive the active end device, thereby achieving automatic positioning and assembly in coaxial assembly. Description of the Drawings

[0057] The following further detailed description of the present invention will be made in conjunction with the drawings and specific embodiments. The above and / or other advantages of the present invention will become clearer.

[0058] Figure 1 It is a device composition diagram of the present invention. Specific Embodiments

[0059] In the legend: 1 - active end of assembly; 2 - camera; 3 - illumination light source; 4 - passive end of assembly; 5 - target.

[0060] A method for guiding in the later stage of coaxial assembly based on machine vision, characterized by comprising the following steps:

[0061] Step 1, identify the end point. As Figure 1 shown, install a camera 2 on the active end 1 of the assembly to collect images of the assembly operation site. The camera 2 is equipped with an illumination light source 3. Set a target 5 on the passive end 4 of the assembly for end point identification, constituting an assembly vision end navigation system.

[0062] Step 2, image preprocessing. Perform image preprocessing on the image collected in Step 1 to obtain a binary image of the suspected target image area.

[0063] Step 3, image filtering. Construct multi-level filtering, and filter the binary image obtained in Step 2 to obtain the binary image of the target.

[0064] Step 4, convert coordinates. Perform sub-pixel accuracy calculation on the binary image of the target obtained in Step 3 to obtain the pixel position coordinates of the binary image of the target.

[0065] Step 5, convert length. Calibrate the camera to obtain the relationship between pixels and physical length.

[0066] Step 6, calculate the offset distance and perform assembly navigation.

[0067] Step 7, accuracy inspection. After navigation is completed, collect the scene image again, calculate the pixel position coordinates of the binary image of the target, and conduct error analysis. If the requirements are met, end the navigation; if not, repeat Step 6 until the error tolerance requirements are met.

[0068] Step 1: Install a small camera at the front of the active end of the assembly to collect images of the assembly operation site. The camera head is equipped with an illumination source to facilitate supplementary lighting according to on-site requirements. Stick a target on the passive end / target position of the assembly for end-point marking. The two form an assembly vision end navigation system. The targets stuck on the passive end / target position of the assembly adopt color combinations such as white background with black label, black background with white label, white background with red label, white background with blue label, white background with green label, white background with magenta label, white background with yellow label, white background with cyan label, black background with red label, black background with blue label, black background with green label, black background with magenta label, black background with yellow label, black background with cyan label, or other color combinations that can clearly distinguish the foreground and background.

[0069] Step 2: Perform color space conversion on the collected images, convert from the original RGB color space to the HSV color space, and separate the H, S, and V channel images to form single-channel grayscale images. Extract the V channel for the target images of white background with black label and black background with white label, and extract the S channel for the target images of other color combinations. Binarize the single-channel images, and for the binarized images, eliminate discontinuous noise through morphological filtering to retain the regions of suspected target images.

[0070] Step 3: Use the connected component moment features of the binary image to construct a binary filter to filter the binary image obtained in Step 2.

[0071] First, calculate the ratio of the long side of the circumscribed rectangle of the connected component to the short side of the whole image as Feature 1. The calculation method of Feature 1 is: Feature 1 = max(circumscribed rectangle length, circumscribed rectangle width) / min(whole image length, whole image width). The classification threshold is 0.3, that is, the region where Feature 1 < 0.3 is the suspected target binary image. The first step of filtering is a rough filter, aiming to filter out relatively large connected components and remove binary regions that are probably not targets, such as long and narrow bright regions, large-area light spots, etc. Among them, the function max() is used to take the larger value, and the function min() is used to take the smaller value.

[0072] Calculate the aspect ratio of the length and width of the circumscribed rectangle of the connected component for the suspected binary image extracted by Feature 1 as Feature 2. The calculation method of Feature 2 is: Feature 2 = min(circumscribed rectangle length, circumscribed rectangle width) / max(circumscribed rectangle length, circumscribed rectangle width). The classification threshold is 0.9, that is, the region where Feature 2 > 0.9 is the suspected target binary image. Among them, the function max() is used to take the larger value, and the function min() is used to take the smaller value.

[0073] Calculate the ratio of the area of the connected component to the area of the circumscribed rectangle for the suspected binary image extracted by Feature 2 as Feature 3. The calculation method of Feature 3 is: Feature 3 = S二值连通域面积 / S 二值连通域外接矩形面积 , the classification threshold is 0.7, that is, the binary image with feature 3 < 0.7 is the suspected target binary image. Where S 二值连通域面积 is the area of the binary connected component, and S 二值连通域外接矩形面积 is the area of the circumscribed rectangle of the binary connected component.

[0074] Calculate the ratio of the long side of the circumscribed rectangle of the connected component to the short side of the whole image of the suspected binary image extracted from feature 3 as feature 4. The calculation method of feature 4 is: feature 4 = max (length of circumscribed rectangle, width of circumscribed rectangle) / min (length of whole image, width of whole image). The classification threshold is 0.05, that is, the binary image with feature 4 > 0.05 is the suspected target binary image. Where the function max() is to take the larger value, and the function min() is to take the smaller value.

[0075] During the four - time filtering process, when only one connected component is retained in the filtering result, then this connected component is considered as the binary image of the target, and the filtering ends. If there are still multiple connected components after four - time feature classification and extraction, the active end of the micro - motion assembly re - collects the image of the assembly operation site and performs filtering again.

[0076] When selecting the size of the filtering threshold, it needs to be determined according to the specific situation. If the selected filtering threshold is too large, some small targets may be filtered out, thus affecting the subsequent processing results. If the selected filtering threshold is too small, too much noise or unnecessary information may be retained, which will also affect the subsequent processing results. Therefore, it is necessary to select a suitable size of the filtering threshold according to the actual situation.

[0077] Step 4: First, calculate the moments of the connected components in the target area of the binary image, and then use the moments to calculate the centroid of the connected components of the target binary image as the pixel position coordinates of the target binary image.

[0078] Step 5: First, take a photo of the initial state to obtain the pixel position coordinates of the target in the initial state as (u 0 , v 0 ). The active device moves n steps along the x - axis direction and the y - axis direction respectively. The step sizes in the two directions are λ x and λ y . For the i - th step, the moving distance in the x - direction is i * λ x , and the moving distance in the y - direction is i * λ y . The pixel position coordinates of the target obtained in the i - th step are (u i , v i ).

[0079] After moving n steps, a series of pixel position coordinates of the target are obtained as [(u 0 , v 0 ), (u 1 , v1 ),...,(u i ,v i ),...,(u j ,v j ),...,(u n ,v n ), after offset, the new target pixel position coordinates are [(0,0), (u’ 1 ,v’ 1 ),...,(u’ i ,v’ i ),...,(u’ j ,v’ j ),...,(u’ n ,v’ n ), where u’ i = u i - u 0 , v’ i = v i - v 0 .

[0080] For the i-th step, there is a physical distance offset of i*λ x = k 1 * u’ i + k 2 * v’ i in the x direction, and a physical distance offset of i*λ y = k 3 * u’ i + k 4 * v’ i in the y direction. Using 2 different target pixel position coordinates, k 1 , k 2 , k 3 , k 4 can be calculated.

[0081] Traversing n target pixel position coordinates, 4 sets of (n - 1)*(n - 2) coefficients [k 11 , k 12 ,..., k 1(n-1)*(n-2) , [k 21 , k 22 ,..., k 2(n-1)*(n-2) , [k 31 , k 32 ,..., k 3(n-1)*(n-2) , [k 41 , k 42 ,..., k 4(n-1)*(n-2), calculate the mean value for each group of coefficients, and obtain k 1ave , k 2ave , k 3ave , k 4ave , which is beneficial to k 1ave , k 2ave , k 3ave , k 4ave , then the camera calibration can be completed, and the conversion relationship between pixels and physical length can be obtained.

[0082] Step 6: At the known end point of the assembly target, the pixel position coordinates of the target binary image are (u 0 , v 0 ), and the pixel position coordinates of the target binary image collected at the starting point of the assembly are (u, v). Then the offsets in the x and y directions are X dist and Y dist , X dist = k 1ave * (u - u 0 ) + k 2ave * (v - v 0 ), Y dist = k 3ave * (u - u 0 ) + k 4ave * (v - v 0 ). Take X dist and Y dist as the navigation basis and send them to the active end of the assembly for navigation operations.

[0083] Step 7: After the movement in Step 6 stops in place, capture the scene information, extract the target pixel coordinates (u, v), and compare them with the pixel position coordinates (u 0 , v 0 ) of the target binary image at the end point of the assembly target. If it is within the allowable error range, stop moving. If it exceeds the allowable error range, perform motion compensation.

[0084] The compensation strategy is that if u > u 0 , move one step length λ x in the direction of decreasing u. If u < u 0 , move one step length λ x in the direction of increasing u. If v > v 0 , move one step length λ y in the direction of decreasing v. If v < v 0 , move one step length λ y in the direction of increasing v. After the movement is completed, capture the scene information again to extract the target pixel coordinates (u, v), and compare them with the pixel position coordinates (u 0 , v 0)Compare until the error requirement is met.

[0085] The method of the present invention uses an industrial camera installed on the active end device of coaxial assembly to collect images of the assembly operation site. After binarizing the on-site images, multi-level filtering is performed on the connected regions to obtain the binary image of the target. This filtering method can effectively solve the influence of ambient light on the target image. Calculate the centroid of the connected region of the binary image of the target to obtain the pixel coordinates of the target. This alternative method improves the positioning accuracy of the target under a certain resolution. Obtain the mapping relationship between the image pixel coordinates and the physical distance through calibration. During the assembly process, calculate the pixel coordinates of the target by collecting scene information, and compare them with the preset position of the target. Obtain the spatial offset through the mapping relationship to drive the active end device, thereby achieving automatic positioning and assembly in coaxial assembly.

[0086] The present invention provides an idea and method for a method of guiding in the later stage of coaxial assembly based on machine vision. There are many methods and ways to specifically implement this technical solution. The above is only the preferred implementation mode of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be implemented by using the prior art.

Claims

1. A method for guiding in the later stage of coaxial assembly based on machine vision, characterized in that: The following steps are involved: Step 1, marking the end point, installing a camera (2) on the assembly active end (1) to collect images of the assembly operation site, and setting a target (5) on the assembly passive end (4) as the end point mark, thereby forming an assembly visual terminal navigation system; Step 2, image preprocessing, performing image preprocessing on the image captured by the camera (2) to obtain a binary image of the suspected target image area; Step 3: image filtering, constructing a multi-level filter, filtering the binary image obtained in step 2 to obtain a binary image of the target; Step 4, converting the coordinates, performing sub-pixel precision calculation on the binary image of the target obtained in step 3 to obtain the pixel position coordinates of the binary image of the target; Step 5, converting the length, calibrating the camera according to the pixel position coordinates obtained in step 4 to obtain the conversion relationship between pixels and physical length; Step 6, calculating the offset distance according to the conversion relationship obtained in step 5, and performing assembly navigation; Step 7, accuracy check, after navigation is completed, collect the scene image again, calculate the pixel position coordinates of the binary image of the target, and perform error analysis. If the requirements are met, end the navigation. If not, repeat step 6 again until the error tolerance requirements are met; Step 2 includes, Step 2-1, converting the image collected in step 1 into a color space, converting the image color space from RGB color space to HSV color space; Step 2-2, separating the H, S, and V channel images of the image obtained in step 2-1 and obtaining a single channel grayscale image; Step 2-3, extract the V channel for the target images with white background and black label and black background and white label, and extract the S channel for the target images with other color combinations; Step 2-4, binarizing the single-channel image obtained in step 2-3; Step 2-5, using morphological filtering to eliminate discontinuous noise from the binarized image obtained in step 2-4, and retaining the area of ​​the suspected target image; Step 3 image filtering includes, Step 3-1, first filtering, calculate the ratio of the long side of the circumscribed rectangle of the connected domain to the short side of the whole image as feature 1, and perform image filtering according to feature 1 to obtain the first suspected target binary image; Step 3-2, second filtering, for the first suspected target binary image extracted by feature 1, the ratio of the short side of the circumscribed rectangle of the connected domain to the long side of the circumscribed rectangle is calculated as feature 2, and the image is filtered according to feature 2 to obtain the second suspected target binary image; Step 3-3, the third filtering, the ratio of the connected domain to the circumscribed rectangle area of ​​the second suspected target binary image extracted by feature 2 is calculated as feature 3, and the image is filtered according to feature 3 to obtain the third suspected target binary image; Step 3-4, the fourth filtering, the ratio of the long side of the circumscribed rectangle of the connected domain to the short side of the whole image is calculated as feature 4 by using the third suspected target binary image extracted by feature 3, and the image is filtered according to feature 4 to obtain the fourth suspected target binary image; During the four filtering processes, when the filtering result only retains one connected domain, the connected domain is considered to be the binary image of the target and the filtering ends. If there are still multiple connected domains after four feature classification and extraction, the micro-motion assembly active end re-collects the assembly site image and re-filters.

2. A method for guiding in the later stage of coaxial assembly based on machine vision according to claim 1, characterized in that: The feature calculation method described in step 3 is specifically as follows: The calculation method of the feature 1 is: feature 1 = max (circumscribed rectangle length, circumscribed rectangle width) / min (full image length, full image width), the classification threshold is 0.3, that is, the area with feature 1 < 0.3 is the first suspected target binary image; The calculation method of the feature 2 is: feature 2 = min (circumscribed rectangle length, circumscribed rectangle width) / max (circumscribed rectangle length, circumscribed rectangle width), the classification threshold is 0.9, that is, the area with feature 2>0.9 is the second suspected target binary image; The calculation method of the feature 3 is: feature 3 = S 二值连通域面积 / S 二值连通域外接矩形面积 , the classification threshold is 0.7, that is, the area with feature 3 < 0.7 is the third suspected target binary image; where S 二值连通域面积 is the area of ​​the binary connected domain, S 二值连通域外接矩形面积 is the area of ​​the circumscribed rectangle of the binary connected domain; The calculation method of the feature 4 is: feature 4 = max (circumscribed rectangle length, circumscribed rectangle width) / min (full image length, full image width), the classification threshold is 0.05, that is, the area with feature 4>0.05 is the fourth suspected target binary image; The function max() takes the larger value, and the function min() takes the smaller value.

3. The method for guiding in the later stage of coaxial assembly based on machine vision according to claim 1, characterized in that: Step 4 includes, Step 4-1, calculating the connected domain moment of the target area in the binary image obtained in step 3; Step 4-2, using moments to calculate the centroid of the connected domain of the target binary image obtained in step 4-1, the centroid is used as the pixel position coordinate of the target binary image.

4. The method for guiding in the later stage of coaxial assembly based on machine vision according to claim 1, characterized in that: Step 5 includes, Step 5-1, take a photo of the initial state, and obtain the target pixel position coordinates in the initial state as (u0, v0); Step 5-2: The active end moves n steps along the x-axis and y-axis respectively, and the step lengths in the two directions are λ x and λ y , that is, for the i-th step, the moving distance in the x direction is i*λ x , the moving distance in the y direction is i*λ y , the target pixel position coordinates obtained in step i are (u i ,v i ); Step 5-3, after moving n steps, the target pixel position coordinates are [(u0,v0),(u1,v1),...,(u i ,v i ),...,(u j ,v j ),...,(u n ,v n )], the new target pixel position coordinates after offset are [(0,0), (u'1, v'1), ..., (u' i ,v' i ),...,(u' j ,v' j ),...,(u' n ,v' n )], where u' i =u i -u0,v' i =v i -v0; Step 5-4, for the i-th step, the target pixel has i*λ in the x direction x =k1*u' i +k2*v' i The physical distance offset is i*λ in the y direction. y =k3*u' i +k4*v' i The physical distance offset is calculated using two different target pixel position coordinates, k1, k2, k3, k4, where Step 5-5, according to the calculation formula of k1, k2, k3, k4 in step 5-4, traverse the n pixel position coordinates to obtain 4 groups of (n-1)*(n-2) coefficients [k 11 ,k 12 ,...,k 1(n-1)*(n-2) ],[k 21 ,k 22 ,...,k 2(n-1)*(n-2) ],[k 31 ,k 32 ,...,k 3(n-1)*(n-2) ],[k 41 ,k 42 ,...,k 4(n-1)*(n-2) ]; Step 5-6, calculate the mean of each group of coefficients obtained in step 5-5, and get k 1ave , k 2ave , k 3ave , k 4ave , used for subsequent conversion between pixels and physical length.

5. The method for guiding in the later stage of coaxial assembly based on machine vision according to claim 1, characterized in that: Step 6 includes, Step 6-1, collect the starting and target position coordinates, the pixel position coordinates of the target binary image at the assembly target end point are (u0, v0), and the pixel position coordinates of the target binary image collected at the assembly starting point are (u, v); Step 6-2: Calculate the offset distances in the x-direction and y-direction based on the coefficients obtained in step 5. dist and Y dist , where X dist =k 1ave *(u-u0)+k 2ave *(v-v0), Y dist =k 3ave *(u-u0)+k 4ave *(v-v0), X dist and Y dist As the navigation basis, it is sent to the active assembly end for navigation operation.

6. The method for guiding in the later stage of coaxial assembly based on machine vision according to claim 1, characterized in that: Step 7 includes, Step 7-1, the active assembly end captures scene information after stopping at the position in step 6, and extracts the target pixel coordinates (u, v); Step 7-2, compare the target pixel coordinates (u, v) obtained in step 7-1 with the pixel position coordinates (u0, v0) of the target binary image at the end point of the assembly target. If they are within the allowable error range, the movement is terminated. If they are beyond the allowable error range, motion compensation is performed.

7. The method for guiding in the later stage of coaxial assembly based on machine vision according to claim 6, characterized in that: The motion compensation strategy described in step 7 is that if the true coordinate u of the target pixel > the target coordinate u0 of the target pixel, move one step length λ in the direction of decreasing u x , if u < u0, move one step length λ in the direction of increasing u x ; if the true coordinate v of the target pixel > the target coordinate v0 of the target pixel, move one step length λ in the direction of decreasing v y , if v < v0, move one step length λ in the direction of increasing v y , after the movement is completed, take the scene information again to extract the target pixel coordinates (u, v), and compare them with the pixel position coordinates (u0, v0) of the target binary image at the end point of the assembly target until the error requirement is met.

8. The method for guiding in the later stage of coaxial assembly based on machine vision according to claim 1, characterized in that: In step 1, the passive end and the target are assembled using a color scheme that clearly distinguishes the foreground from the background.

Citation Information

Patent Citations

  • Method for guiding at assembly tail end based on machine vision

    CN118181280A