Vision-based rail vehicle door installation method and installation system
Through the vision-based rail vehicle door installation method, machine vision technology is used to identify and align the to-install holes, and the automatic installation of the rail vehicle door system is realized, solving the problems of large number of workers, high labor intensity and high safety hazards in the existing technology, and improving installation efficiency and safety.
Patent Information
- Application Number
- CN202411983351.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-31
AI Technical Summary
During the installation of existing rail vehicle door systems, there are many workers, high labor intensity, and limited installation space, which poses safety hazards, and it is difficult for robots to adapt to the changing environment at the vehicle installation site.
The door installation method of the vision-based rail vehicle is adopted. By building a clamping device and installing an image acquisition device, using machine vision technology to identify and align the to-install holes, the clamping mechanism is guided to realize the automatic installation of the door mechanism.
It improves the installation efficiency of the door mechanism, reduces the labor intensity of workers, reduces safety hazards during operation, and enables the robot to adapt to the changing environment of the vehicle installation site for automatic installation.
Smart Images

Figure CN119734267A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a vehicle door installation method and an installation system, and in particular to a rail vehicle door installation method and an installation system based on vision. Background Art
[0002] Due to the characteristics of rail vehicle door systems such as large size, heavy weight, and limited installation space, the door system installation is currently mainly done manually, and the team requires a large number of people. For example, when installing the drive mechanism, the worker first lifts the drive mechanism out of the packaging box, then lifts it into the car, and then the worker in the car lifts it to the designated installation location, and finally manually aligns the installation holes and tightens the screws. The entire installation process requires a large number of workers, with high labor intensity, limited installation space, and potential safety hazards.
[0003] The rapid development of robot control technology has made it possible for robots to replace manual labor in the installation of door systems. Currently, most robots work in teaching or offline mode to complete preset tasks or tasks, and it is difficult to adapt to the door system installation requirements in changing environments such as vehicle installation sites and maintenance sites. Summary of the invention
[0004] Purpose of the invention: The first purpose of the present invention is to provide a vision-based rail vehicle door installation method that can adapt to the changing environment of the vehicle installation site and can automatically install the door.
[0005] A second object of the invention is to provide a vision-based rail vehicle door installation system.
[0006] Technical solution: The present invention discloses a method for installing a rail vehicle door based on vision, comprising the following steps:
[0007] S1: Build a clamping device for clamping the door mechanism, and fix the image acquisition device on the clamping device;
[0008] S2: adjusting the clamping device to move the door mechanism with it to a preset target position for installing the door mechanism for rough positioning, and collecting image information of the hole to be installed of the door mechanism by the acquisition device;
[0009] S3: Determine whether the acquired image information correctly contains the complete holes to be installed;
[0010] S4: If the image information correctly includes the complete hole to be installed, proceed to step S6; if the image information does not correctly include the complete hole to be installed, the position of the clamping device is adjusted again for precise positioning, and the acquisition device acquires the image information of the hole to be installed again;
[0011] S5: again judging whether the image information collected after precise positioning correctly includes the complete holes to be installed. If the image information correctly includes the complete holes to be installed, proceed to step S6; if the image information does not correctly include the complete holes to be installed, return to step S2;
[0012] S6: converting the image information to obtain the offset between the current position of the door mechanism and the hole to be installed;
[0013] S7: adjusting the position of the clamping device in the plane where it is located according to the offset;
[0014] S8: The acquisition device acquires image information again and determines whether the correct and complete holes to be installed are acquired;
[0015] S9: If the complete holes to be installed are correctly collected, proceed to the next step; if the complete holes to be installed are not correctly collected, return to step S2;
[0016] S10: adjusting the clamping device according to the offset so that the clamping device moves with the door mechanism along a path perpendicular to the hole to be installed toward the hole to be installed, and installing the door mechanism at the current position.
[0017] Furthermore, the acquisition device described in step S1 includes a first camera installed in the middle position of the clamping device and a second camera installed on one side of the first camera, the first camera acquires image information during fine positioning, and the second camera acquires image information during coarse positioning.
[0018] Furthermore, a Cartesian coordinate system is constructed, in which the length direction of the clamping device is parallel to the X-axis of the Cartesian coordinate system, the width direction of the clamping device is parallel to the Y-axis of the Cartesian coordinate system, the thickness direction of the clamping device is parallel to the Z-axis of the Cartesian coordinate system, and the Z-axis of the Cartesian coordinate system is perpendicular to the plane where the hole to be installed is located; when coarse positioning is performed in step S2, the clamping device moves in the plane formed by the X-axis and the Y-axis; when fine positioning is performed in step S4, the clamping device moves within the range of ±5 mm in the X-axis direction and ±15 mm in the Y-axis direction.
[0019] Furthermore, the offset in step S6 includes a movement distance Δx of the clamping device on the X-axis of the Cartesian coordinate system, a movement distance Δy on the Y-axis of the Cartesian coordinate system, and a movement distance Δz on the Z-axis of the Cartesian coordinate system.
[0020] Furthermore, the steps of obtaining the offset in step S6 are as follows:
[0021] Preprocessing image information;
[0022] The preprocessed image information is converted to obtain hole position information of the holes to be installed and the door mechanism installation holes;
[0023] Based on the hole position information of the hole to be installed and the door mechanism installation hole, the displacement difference between the hole to be installed and the door mechanism installation hole is calculated;
[0024] Based on the displacement difference, it is converted into the offset Δx and Δy of the clamping device in the Cartesian coordinate system.
[0025] Furthermore, the steps of obtaining the hole position information of the hole to be installed are as follows:
[0026] Use a 3×3 Gauss kernel to perform noise reduction on the collected image information;
[0027] Set the region of interest that includes the complete hole to be installed, use the Canny operator to perform edge detection on the denoised image information to obtain a binary image, and use the Sobel operator to calculate the domain gradient of all pixels in the binary image;
[0028] Traverse the non-zero pixel points in the edge detection binary image, map the non-zero pixel points to the corresponding points of the rectangular coordinate system in the plane where the hole to be installed is located, and add 1 to the accumulator of the corresponding point;
[0029] Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the coordinates of the center of the circle (x0, y0) in the rectangular coordinate system;
[0030] Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select the threshold, and find the radius r0 of the hole to be installed corresponding to the center coordinates (x0, y0); that is, establish an accumulation array T(r0), accumulate all edge pixels, and the largest T(r0) is the radius r0 of the hole to be installed corresponding to the center coordinates (x0, y0);
[0031] The center coordinates (x0, y0) are saved as the reference position coordinates, and the radius r0 is saved as the reference radius.
[0032] Furthermore, the steps of obtaining the hole position information of the door mechanism installation hole are as follows:
[0033] Use a 3×3 Gauss kernel to perform noise reduction on the collected image information;
[0034] Set the region of interest that includes the mounting holes of the complete door mechanism, use the Canny operator to perform edge detection on the denoised image information to obtain a binary image, and use the Sobel operator to calculate the domain gradient of all pixels in the binary image;
[0035] Traverse the non-zero pixel points in the edge detection binary image, map the non-zero pixel points to the corresponding points of the rectangular coordinate system in the plane where the hole to be installed is located, and add 1 to the accumulator of the corresponding point;
[0036] Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the center coordinates (x1,y1) in the rectangular coordinate system;
[0037] Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select the threshold, and find the radius r1 of the hole to be installed corresponding to the center coordinates (x1, y1); that is, establish an accumulation array T(r1), accumulate all edge pixels, and the largest T(r1) is the radius r1 of the hole to be installed corresponding to the center coordinates (x1, y1).
[0038] Furthermore, the calculation formula of the displacement difference is as follows:
[0039] Δx'=x1-x0
[0040] Δy'=y1-y0;
[0041] Assume that the transformation matrix between the camera coordinate system of the acquisition device and the Cartesian coordinate system is E T c , and the transformation matrix E T c The way to obtain is as follows:
[0042] A chessboard calibration plate is set at a fixed position in the Cartesian coordinate system, and the coordinates of the corner points of the chessboard calibration plate in the Cartesian coordinate system are calculated using the coordinate transformation method: B t;
[0043] Based on the calibration of the internal and external parameters of the camera of the acquisition device, the coordinates of the corner points of the chessboard calibration plate in the camera coordinate system are calculated as follows: C t;
[0044] The coordinate transformation method is used to calculate the transformation matrix between the coordinate system of the driving mechanism of the clamping device and the Cartesian coordinate system: B T E ;
[0045] Transformation Matrix E T c =( B T E ) -1B t( C t) -1 , using the transformation matrix E T cThe displacement differences Δx', Δy' are converted into offsets Δx, Δy.
[0046] Furthermore, a distance meter is installed on the clamping device for measuring the distance Δz between the clamping device and the plane where the hole to be installed is located, which is the distance moved along the z-axis.
[0047] Based on the same inventive concept, the present invention also discloses a vision-based rail vehicle door installation system, comprising:
[0048] A clamping module, used for clamping the door mechanism to be installed and moving it to the installation hole of the door mechanism;
[0049] An image acquisition module, which is mounted on the clamping module and is used to acquire images of the hole to be installed and the door mechanism installation hole during the installation process, and to measure the vertical distance between the clamping module and the plane where the hole to be installed is located;
[0050] A data analysis module is used to receive the image from the image acquisition module and analyze and process the image to obtain the offset between the clamping module and the hole to be installed;
[0051] A handling module, used to adjust the position of the clamping module;
[0052] A mobile lifting platform module is used to adjust the position of the handling module and then assist in adjusting the position of the clamping module;
[0053] The control module is used to receive the offset of the data analysis module, and regulate the handling module and the mobile lifting platform module according to the offset, so that the clamping module clamps the door mechanism and moves it to the hole to be installed.
[0054] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: The present invention utilizes machine vision technology to identify and align the holes to be installed of the door mechanism, and guides the clamping mechanism (i.e., the robot) to accomplish tasks such as transportation, loading, hole alignment, and installation, which is beneficial to improving the installation efficiency of the door mechanism, and can reduce the labor intensity of workers and reduce safety hazards during operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of the method of the present invention;
[0056] Figure 2 It is a schematic structural diagram of the clamping device of the present invention;
[0057] Figure 3 Schematic diagram of the offsets Δx and Δy of the method of the present invention;
[0058] Figure 4 It is a structural diagram of the system of the present invention. DETAILED DESCRIPTION
[0059] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0060] Example 1
[0061] The present invention provides a method for installing a rail vehicle door based on vision, such as Figure 1 As shown, the following steps are included:
[0062] S1: Build a clamping device for clamping the door mechanism 6, and fix an image acquisition device on the clamping device; the acquisition device includes a first camera 3 installed in the middle of the clamping device and a second camera 4 installed on one side of the first camera 3. Figure 2 As shown, the clamping device includes a base 1 and a support arm 2 for clamping and fixing the door mechanism 6, the first camera 3 is installed on the side at the center of the base 1, and the second camera 4 is embedded and installed on the base 1, and the second camera 4 is located on one side of the base 1. During the alignment of the door mechanism 6 with the hole 7 to be installed, the camera may be blocked due to the narrow installation space of the vehicle. If one camera is used to achieve rough positioning and fine positioning of the hole 7 to be installed, the position of the clamping device needs to be adjusted multiple times due to space limitations, which increases the steps of aligning the hole 7 to be installed and reduces the work efficiency of the entire system; in this embodiment, two cameras are set, and the installation positions of the two cameras on the base 1 are different, one of which is used for rough positioning and the other is used for fine positioning, which is conducive to improving the work efficiency when aligning the hole 7 to be installed.
[0063] S2: The clamping device is adjusted to move the door mechanism 6 with the door mechanism 6 to the preset target position for installation of the door mechanism 6 for rough positioning, and the second camera 4 collects image information of the hole 7 to be installed in the door mechanism 6. A Cartesian coordinate system is constructed, the length direction of the clamping device is parallel to the X-axis of the Cartesian coordinate system, the width direction of the clamping device is parallel to the Y-axis of the Cartesian coordinate system, the thickness direction of the clamping device is parallel to the Z-axis of the Cartesian coordinate system, and the Z-axis of the Cartesian coordinate system is perpendicular to the plane where the hole 7 to be installed is located; and when performing rough positioning, the clamping device moves in the plane formed by the X-axis and the Y-axis.
[0064] S3: Determine whether the acquired image information correctly contains the complete hole 7 to be installed.
[0065] S4: If the image information correctly includes the complete hole 7 to be installed, proceed to step S6; if the image information does not correctly include the complete hole 7 to be installed, the position of the clamping device is adjusted again for fine positioning, and the first camera 3 again collects the image information of the hole 7 to be installed. When fine positioning is performed, the clamping device moves in the plane formed by the X-axis and the Y-axis, and the moving range is ±5mm in the X-axis direction and ±15mm in the Y-axis direction.
[0066] S5: Determine again whether the image information collected after precise positioning correctly includes the complete hole 7 to be installed. If the image information correctly includes the complete hole 7 to be installed, proceed to step S6; if the image information does not correctly include the complete hole 7 to be installed, return to step S2.
[0067] S6: Convert the image information to obtain the offset between the current position of the door mechanism 6 and the hole 7 to be installed. Figure 3 As shown, the offset includes the clamping device moving a distance Δx on the X-axis of the Cartesian coordinate system, a distance Δy on the Y-axis of the Cartesian coordinate system, and a distance Δz on the Z-axis of the Cartesian coordinate system.
[0068] The steps for offset are as follows:
[0069] First, the image information is preprocessed; preferably, the preprocessing includes Guass filtering and grayscale processing, but is not limited to Guass filtering and grayscale processing.
[0070] Then, the pre-processed image information is converted to obtain the hole position information of the hole to be installed 7 and the door mechanism installation hole 8. The steps for obtaining the hole position information of the hole to be installed 7 are as follows:
[0071] Use a 3×3 Gauss kernel to perform noise reduction on the collected image information;
[0072] Set a region of interest that includes the complete hole 7 to be installed, use the Canny operator to perform edge detection on the denoised image information to obtain a binary image, and use the Sobel operator to calculate the domain gradient of all pixels in the binary image;
[0073] Traverse the non-zero pixel points in the edge detection binary image, map the non-zero pixel points to the corresponding points of the rectangular coordinate system in the plane where the hole 7 to be installed is located, and add 1 to the accumulator of the corresponding point;
[0074] Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the coordinates of the center of the circle (x0, y0) in the rectangular coordinate system;
[0075] Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select a threshold, and find the radius r0 of the hole 7 to be installed corresponding to the center coordinates (x0, y0); that is, establish an accumulation array T(r0), accumulate all edge pixels, and the largest T(r0) is the radius r0 of the hole 7 to be installed corresponding to the center coordinates (x0, y0);
[0076] The center coordinates (x0, y0) are saved as the reference position coordinates, and the radius r0 is saved as the reference radius.
[0077] The steps for obtaining the hole position information of the door mechanism mounting hole 8 are as follows:
[0078] Use a 3×3 Gauss kernel to perform noise reduction on the collected image information;
[0079] A region of interest including the mounting hole 8 of the complete door mechanism is set, the Canny operator is used to perform edge detection on the denoised image information to obtain a binary image, and the Sobel operator is used to calculate the domain gradient of all pixels in the binary image;
[0080] Traverse the non-zero pixel points in the edge detection binary image, map the non-zero pixel points to the corresponding points of the rectangular coordinate system in the plane where the door mechanism mounting hole 8 is located, and add 1 to the accumulator of the corresponding point;
[0081] Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the center coordinates (x1,y1) in the rectangular coordinate system;
[0082] Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select a threshold, and find the radius r1 of the door mechanism installation hole 8 corresponding to the center coordinates (x1, y1); that is, establish an accumulation array T(r1), accumulate all edge pixels, and the largest T(r1) is the radius r1 of the door mechanism installation hole 8 corresponding to the center coordinates (x1, y1). The radius r0 of the hole 7 to be installed and the radius r1 of the door mechanism installation hole 8 can be used to indirectly determine whether the center coordinates (x0, y0) of the hole 7 to be installed and the center coordinates (x1, y1) of the door mechanism installation hole 8 are correctly identified. If the difference between the radius r0 and the radius r1 exceeds the preset value, it is necessary to adjust the position and posture of the clamping device so that the acquisition device re-acquires the image information.
[0083] Based on the hole position information of the to-be-installed hole 7 and the door mechanism installation hole 8, the displacement difference between the to-be-installed hole 7 and the door mechanism installation hole 8 is calculated; the calculation formula of the displacement difference is as follows:
[0084] Δx'=x1-x0
[0085] Δy'=y1-y0;
[0086] Assume that the transformation matrix between the camera coordinate system of the acquisition device and the Cartesian coordinate system is E T c , and the transformation matrix E T cThe way to obtain is as follows:
[0087] A chessboard calibration plate is set at a fixed position in the Cartesian coordinate system, and the coordinates of the corner points of the chessboard calibration plate in the Cartesian coordinate system are calculated using the coordinate transformation method: B t;
[0088] Based on the calibration of the internal and external parameters of the camera of the acquisition device, the coordinates of the corner points of the chessboard calibration plate in the camera coordinate system are calculated as follows: C t;
[0089] The coordinate transformation method is used to calculate the transformation matrix between the coordinate system of the driving mechanism of the clamping device and the Cartesian coordinate system: B T E ;
[0090] Transformation Matrix E T c =( B T E ) -1B t( C t) -1 , using the transformation matrix E T c The displacement differences Δx', Δy' are converted into offsets Δx, Δy.
[0091] The clamping device is provided with a rangefinder 5 for measuring the distance Δz between the clamping device and the plane where the hole 7 to be installed is located, i.e., the distance moved along the z-axis. There are two rangefinders 5, both of which are installed on the base 1 and are located on both sides of the first camera 3, respectively.
[0092] S7: adjusting the position of the clamping device in the plane where it is located according to the offset, that is, adjusting the position of the clamping device according to the offsets Δx and Δy, so that the door mechanism mounting hole 8 is opposite to the hole to be mounted 7.
[0093] S8: The acquisition device acquires image information again, and judges whether the acquired image is correct and complete to-be-installed hole 7. Preferably, the first camera 3 acquires image information again for accurate positioning again.
[0094] S9: If the complete hole 7 to be installed is correctly collected, proceed to the next step; if the complete hole 7 to be installed is not correctly collected, return to step S2.
[0095] S10: Adjust the clamping device according to the offset so that it moves with the door mechanism 6 toward the hole 7 to be installed along a path perpendicular to the hole 7 to be installed, that is, adjust the position of the clamping device according to the offset Δz so that the door mechanism 6 is in close contact with the hole 7 to be installed, and then install the door mechanism 6 at the current position.
[0096] Example 2
[0097] The vision-based rail vehicle door installation system of the present invention is as follows: Figure 4 As shown, it includes a clamping module, an image acquisition module, a data analysis module, a handling module, a mobile lifting platform module and a control module.
[0098] The clamping module is used to clamp the door mechanism to be installed and move it to the installation hole of the door mechanism.
[0099] The image acquisition module is installed on the clamping module and is used to collect images of the holes to be installed and the door mechanism installation holes during the installation process, and to measure the vertical distance between the clamping module and the plane where the holes to be installed are located.
[0100] The data analysis module is used to receive the image from the image acquisition module, and analyze and process the image to calculate the offset between the clamping module and the hole to be installed.
[0101] The transport module is used to adjust the position of the clamping module. Preferably, the transport module is configured as a mechanical arm, and the clamping module is mounted on the movable part of the mechanical arm.
[0102] The mobile lifting platform module is used to adjust the position of the transport module and then assist in adjusting the position of the clamping module.
[0103] The control module is used to receive the offset of the data analysis module, and regulate the handling module and the mobile lifting platform module according to the offset, so that the clamping module clamps the door mechanism and moves it to the hole to be installed.
[0104] A Cartesian coordinate system is constructed, in which the length direction of the clamping module is parallel to the X-axis of the Cartesian coordinate system, the width direction of the clamping module is parallel to the Y-axis of the Cartesian coordinate system, the thickness direction of the clamping module is parallel to the Z-axis of the Cartesian coordinate system, and the Z-axis of the Cartesian coordinate system is perpendicular to the plane where the hole to be installed is located; the clamping module moves the door mechanism to a preset target position for installing the door mechanism for coarse positioning, and the image acquisition module acquires image information of the hole to be installed of the door mechanism.
[0105] The data analysis module receives the image captured by the image acquisition module, and determines whether the captured image correctly contains the complete hole to be installed; if the image correctly contains the complete hole to be installed, the data analysis module analyzes and processes the image to calculate the offset between the clamping module and the hole to be installed; if the image does not correctly contain the complete hole to be installed, the control module adjusts the transport module and the mobile lifting platform module, and accurately positions the position of the clamping module, so that the clamping module moves within the plane formed by the X-axis and the Y-axis, and the moving range is ±5mm in the X-axis direction and ±15mm in the Y-axis direction, and the first camera captures the image of the hole to be installed again.
[0106] The data analysis module receives the image captured again by the image acquisition module, and determines whether the image correctly includes the complete holes to be installed. If the image correctly includes the complete holes to be installed, the data analysis module analyzes and processes the image and calculates the offset between the clamping module and the holes to be installed. If the image does not correctly include the complete holes to be installed, it returns to the coarse positioning and repeats the above steps until the image captured by the image acquisition module correctly includes the complete holes to be installed.
[0107] The data analysis module analyzes and processes the image to calculate the offset between the clamping module and the hole to be installed as follows:
[0108] The offset includes a moving distance Δx of the clamping module on the X-axis of the Cartesian coordinate system, a moving distance Δy on the Y-axis of the Cartesian coordinate system, and a moving distance Δz on the Z-axis of the Cartesian coordinate system.
[0109] First, the image information is preprocessed; preferably, the preprocessing includes Guass filtering and grayscale processing, but is not limited to Guass filtering and grayscale processing.
[0110] Then, the pre-processed image information is converted to obtain the hole position information of the hole to be installed and the door mechanism installation hole. The steps for obtaining the hole position information of the hole to be installed are as follows:
[0111] Use a 3×3 Gauss kernel to perform noise reduction on the collected image information;
[0112] Set the region of interest that includes the complete hole to be installed, use the Canny operator to perform edge detection on the denoised image information to obtain a binary image, and use the Sobel operator to calculate the domain gradient of all pixels in the binary image;
[0113] Traverse the non-zero pixel points in the edge detection binary image, map the non-zero pixel points to the corresponding points of the rectangular coordinate system in the plane where the hole to be installed is located, and add 1 to the accumulator of the corresponding point;
[0114] Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the coordinates of the center of the circle (x0, y0) in the rectangular coordinate system;
[0115] Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select the threshold, and find the radius r0 of the hole to be installed corresponding to the center coordinates (x0, y0); that is, establish an accumulation array T(r0), accumulate all edge pixels, and the largest T(r0) is the radius r0 of the hole to be installed corresponding to the center coordinates (x0, y0);
[0116] The center coordinates (x0, y0) are saved as the reference position coordinates, and the radius r0 is saved as the reference radius.
[0117] The steps for obtaining the hole position information of the door mechanism mounting holes are as follows:
[0118] Use a 3×3 Gauss kernel to perform noise reduction on the collected image information;
[0119] Set the region of interest that includes the mounting holes of the complete door mechanism, use the Canny operator to perform edge detection on the denoised image information to obtain a binary image, and use the Sobel operator to calculate the domain gradient of all pixels in the binary image;
[0120] Traverse the non-zero pixel points in the edge detection binary image, map the non-zero pixel points to the corresponding points of the rectangular coordinate system in the plane where the door mechanism installation hole is located, and add 1 to the accumulator of the corresponding point;
[0121] Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the center coordinates (x1,y1) in the rectangular coordinate system;
[0122] Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select the threshold, and find the radius r1 of the door mechanism installation hole corresponding to the center coordinates (x1, y1); that is, establish a cumulative array T(r1), accumulate all edge pixels, and the largest T(r1) is the radius r1 of the door mechanism installation hole corresponding to the center coordinates (x1, y1).
[0123] Based on the hole position information of the hole to be installed and the door mechanism installation hole, the displacement difference between the hole to be installed and the door mechanism installation hole is calculated; the calculation formula of the displacement difference is as follows:
[0124] Δx'=x1-x0
[0125] Δy'=y1-y0.
[0126] Assume that the transformation matrix between the camera coordinate system of the acquisition device and the Cartesian coordinate system is E T c , and the transformation matrix E T c The way to obtain is as follows:
[0127] A chessboard calibration plate is set at a fixed position in the Cartesian coordinate system, and the coordinates of the corner points of the chessboard calibration plate in the Cartesian coordinate system are calculated using the coordinate transformation method: B t;
[0128] Based on the calibration of the internal and external parameters of the camera of the acquisition device, the coordinates of the corner points of the chessboard calibration plate in the camera coordinate system are calculated as follows: C t;
[0129] The coordinate transformation method is used to calculate the transformation matrix between the coordinate system of the driving mechanism of the clamping module (i.e., the coordinate system of the handling module and the mobile lifting platform module) and the Cartesian coordinate system: B T E ;
[0130] Transformation Matrix E T c =( B T E ) -1B t( C t) -1 , using the transformation matrix E T c The displacement differences Δx', Δy' are converted into offsets Δx, Δy.
[0131] The image acquisition module measures the vertical distance between the clamping module and the plane where the hole to be installed is located, that is, the offset Δz.
[0132] The control module adjusts the transport module and the mobile lifting platform module according to the offset, so that the clamping module moves with the door mechanism within the plane where the clamping module is located, that is, the position of the clamping module is adjusted according to the offsets Δx and Δy so that the door mechanism installation hole is opposite to the position of the hole to be installed.
[0133] The acquisition module acquires image information again, and the data analysis module determines whether the correct and complete hole to be installed is acquired. If the complete hole to be installed is acquired correctly, the control module adjusts the handling module and the mobile lifting platform module according to the offset Δz, so that the clamping module moves the door mechanism along a path perpendicular to the hole to be installed toward the hole to be installed, so that the door mechanism fits and contacts the location of the hole to be installed, and then the door mechanism is installed at the current position; if the complete hole to be installed is not acquired correctly, it returns to the rough positioning and repeats the above steps until the image acquired by the image acquisition module correctly contains the complete hole to be installed.
Claims
1. A method for installing a rail vehicle door based on vision, characterized in that: The following steps are involved: S1: constructing a clamping device for clamping a vehicle door mechanism (6), and fixing an image acquisition device on the clamping device; S2: adjusting the clamping device so that it moves the door mechanism (6) with it to a preset target position for installing the door mechanism (6) for rough positioning, and the acquisition device acquires image information of the hole (7) to be installed in the door mechanism; S3: Determine whether the acquired image information correctly contains the complete hole to be installed (7); S4: If the image information correctly includes the complete hole to be installed (7), proceed to step S6; if the image information does not correctly include the complete hole to be installed (7), the position of the clamping device is adjusted again for precise positioning, and the acquisition device acquires the image information of the hole to be installed (7) again; S5: again judging whether the image information collected after precise positioning correctly includes the complete hole to be installed (7); if the image information correctly includes the complete hole to be installed (7), proceeding to step S6; if the image information does not correctly include the complete hole to be installed (7), returning to step S2; S6: converting the image information to obtain the offset between the current position of the door mechanism (6) and the hole to be installed (7); S7: adjusting the position of the clamping device in the plane where it is located according to the offset; S8: The acquisition device acquires image information again and determines whether the correct and complete holes to be installed are acquired (7); S9: If the complete hole to be installed (7) is correctly collected, proceed to the next step; if the complete hole to be installed (7) is not correctly collected, return to step S2; S10: adjusting the clamping device according to the offset so that the clamping device moves with the door mechanism (6) along a path perpendicular to the hole (7) to be installed toward the hole (7) to be installed, and installing the door mechanism (6) at the current position.
2. The method for installing a rail vehicle door based on vision according to claim 1, characterized in that: The acquisition device described in step S1 comprises a first camera (3) installed at the middle position of the clamping device and a second camera (4) installed on one side of the first camera (3), wherein the first camera (3) acquires image information during fine positioning, and the second camera (4) acquires image information during coarse positioning.
3. The method for installing a rail vehicle door based on vision according to claim 1, characterized in that: Step S4 also includes: constructing a Cartesian coordinate system, wherein the length direction of the clamping device is parallel to the X-axis of the Cartesian coordinate system, the width direction of the clamping device is parallel to the Y-axis of the Cartesian coordinate system, the thickness direction of the clamping device is parallel to the Z-axis of the Cartesian coordinate system, and the Z-axis of the Cartesian coordinate system is perpendicular to the plane where the hole (7) to be installed is located; when performing fine positioning in step S4, the clamping device moves within a range of ±5 mm in the X-axis direction and ±15 mm in the Y-axis direction.
4. The method for installing a rail vehicle door based on vision according to claim 3, characterized in that: The offset in step S6 includes a movement distance Δx of the clamping device on the X axis of the Cartesian coordinate system, a movement distance Δy on the Y axis of the Cartesian coordinate system, and a movement distance Δz on the Z axis of the Cartesian coordinate system.
5. The method for installing a rail vehicle door based on vision according to claim 4, characterized in that: The calculation steps of obtaining the offset in step S6 are as follows: Preprocessing image information; The pre-processed image information is converted to obtain hole position information of the to-be-installed hole (7) and the door mechanism installation hole (8); Based on the hole position information of the hole to be installed (7) and the door mechanism installation hole (8), the displacement difference between the hole to be installed (7) and the door mechanism installation hole (8) is calculated; Based on the displacement difference, it is converted into the offset Δx and Δy of the clamping device in the Cartesian coordinate system.
6. The method for installing a rail vehicle door based on vision according to claim 5, characterized in that: The steps for obtaining the hole position information of the hole to be installed (7) are as follows: Use a 3×3 Gauss kernel to perform noise reduction on the collected image information; A region of interest including the complete hole to be installed (7) is set, the Canny operator is used to perform edge detection on the denoised image information to obtain a binary image, and the Sobel operator is used to calculate the domain gradient of all pixels in the binary image; Traversing the non-zero pixel points in the edge detection binary image, mapping the non-zero pixel points to corresponding points in the rectangular coordinate system in the plane where the hole to be installed (7) is located, and adding 1 to the accumulator of the corresponding point; Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the coordinates of the center of the circle (x0, y0) in the rectangular coordinate system; Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select a threshold, and find the radius r0 of the hole (7) to be installed corresponding to the center coordinates (x0, y0); that is, establish an accumulation array T(r0), accumulate all edge pixels, and the largest T(r0) is the radius r0 of the hole (7) to be installed corresponding to the center coordinates (x0, y0); The center coordinates (x0, y0) are saved as the reference position coordinates, and the radius r0 is saved as the reference radius.
7. The method for installing a rail vehicle door based on vision according to claim 6, characterized in that: The steps of obtaining the hole position information of the door mechanism mounting hole (8) are as follows: Use a 3×3 Gauss kernel to perform noise reduction on the collected image information; A region of interest including the mounting hole (8) of the complete door mechanism is set, the Canny operator is used to perform edge detection on the denoised image information to obtain a binary image, and the Sobel operator is used to calculate the domain gradient of all pixels in the binary image; Traversing the non-zero pixel points in the edge detection binary image, mapping the non-zero pixel points to corresponding points in the rectangular coordinate system in the plane where the door mechanism mounting hole (8) is located, and adding 1 to the accumulator of the corresponding point; Find the maximum value of the accumulator and obtain the polar coordinates (ρ θ ,θ), the polar coordinates (ρ θ ,θ) is converted to the center coordinates (x1,y1) in the rectangular coordinate system; Calculate the distance d between all edge pixels and the center of the circle in the binary image, sort d in ascending order to select a threshold, and find the radius r1 of the door mechanism installation hole (8) corresponding to the center coordinates (x1, y1); that is, establish an accumulation array T(r1), accumulate all edge pixels, and the largest T(r1) is the radius r1 of the door mechanism installation hole (8) corresponding to the center coordinates (x1, y1).
8. The method for installing a rail vehicle door based on vision according to claim 7, characterized in that: The calculation formula of the displacement difference is as follows: Δx'=x1-x0 Δy'=y1-y0; Assume that the transformation matrix between the camera coordinate system of the acquisition device and the Cartesian coordinate system is E T c , and the transformation matrix E T c The way to obtain is as follows: A chessboard calibration plate is set at a fixed position in the Cartesian coordinate system, and the coordinates of the corner points of the chessboard calibration plate in the Cartesian coordinate system are calculated using the coordinate transformation method: B t; Based on the calibration of the internal and external parameters of the camera of the acquisition device, the coordinates of the corner points of the chessboard calibration plate in the camera coordinate system are calculated as follows: C t; The coordinate transformation method is used to calculate the transformation matrix between the coordinate system of the driving mechanism of the clamping device and the Cartesian coordinate system: B T E ; Transformation Matrix E T c =( B T E ) -1B t( C t) -1 , using the transformation matrix E T c The displacement differences Δx', Δy' are converted into offsets Δx, Δy.
9. The method for installing a rail vehicle door based on vision according to claim 4, characterized in that: The clamping device is provided with a distance meter (5) for measuring the distance Δz between the clamping device and the plane where the hole (7) to be mounted is located, which is the distance moved along the z-axis.
10. A vision-based rail vehicle door installation system, characterized in that: include, A clamping module, used for clamping the door mechanism (6) to be installed, and moving it to the installation hole (7) of the door mechanism (6); An image acquisition module, the image acquisition module being mounted on the clamping module and being used to acquire images of the hole to be mounted (7) and the door mechanism mounting hole (8) during the installation process, and to measure the vertical distance between the clamping module and the plane where the hole to be mounted (7) is located; A data analysis module, used for receiving the image from the image acquisition module and analyzing and processing the image to obtain the offset between the clamping module and the hole to be installed (7); A handling module, used to adjust the position of the clamping module; A mobile lifting platform module is used to adjust the position of the handling module and then assist in adjusting the position of the clamping module; The control module is used to receive the offset of the data analysis module and regulate the handling module and the mobile lifting platform module according to the offset, so that the clamping module clamps the door mechanism (6) and moves it to the hole to be installed (7).
Citation Information
Patent Citations
Industrial robot automatic pin hole assembling method based on visual guidance
CN106182004A
Visual detection method for rail vehicle door movement
CN115393772A
Positioning error measuring method for aero-engine nacelle acoustic liner drilling
CN118470117A
Automatic vehicle door assembling method, device and equipment based on hole feature recognition and medium
CN118478205A
Visual measurement guiding device, method and system for cylinder nested assembly centering
WO2023185550A1