Accurate measurement method of cabin contour based on line laser
By installing line laser vision sensor units and laser trackers on both sides of the rail vehicle compartment, and combining them with image processing technology, the problems of ghosting and noise interference in multi-line laser measurement were solved, and high-precision non-contact compartment contour measurement was achieved.
Patent Information
- Application Number
- CN202010326367.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-23
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-04-23
AI Technical Summary
Existing technologies struggle to effectively overcome ghosting and noise interference during multi-line laser measurement, making it impossible to achieve high-precision non-contact measurement of the contours of rail vehicle compartments.
Two pairs of linear laser vision sensor units are placed on one side, and a base coordinate system is established in conjunction with a laser tracker. Through camera parameter calibration and global calibration, image noise and ghosting are eliminated. Three-dimensional point cloud data is obtained using the principle of laser triangulation, so as to achieve accurate measurement of the cabin profile.
It achieves high-precision, automated compartment contour measurement, and can quickly obtain parameters such as compartment coaxiality. The device has a simple structure, is easy to operate, and is highly adaptable.
Smart Images

Figure CN113554697B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of visual measurement, in particular to a method for accurately measuring cabin section contours based on line laser. Background Art
[0002] In order to ensure the safety of railway transportation, dynamic limit detection is required before rail vehicles leave the factory to ensure that the outline dimensions of the equipment are within the specified absolute safety space. At present, domestic detection equipment is relatively backward, and limit plate devices are mostly used to detect the outline cross section. However, this method seriously restricts the rapid development of railways, making the challenges faced by railway transportation increasingly severe. How to improve the transportation safety of vehicles, improve the level of technical equipment and management methods has become an important issue in my country's current railway transportation.
[0003] Zhang Xiang et al. in their paper “Rail Vehicle Compartment Dimension Measurement System” and Li Lun et al. in their paper “Rail Vehicle Static Limit Three-Dimensional Visual Measurement System” proposed installing multiple sets of visual sensor units on the gantry bracket, adjusting the line lasers so that all laser line planes are coplanar, performing non-contact measurement on each section of the rail vehicle, and obtaining point cloud data for each section. However, these methods are very idealistic. It is difficult to ensure that two line lasers are in the same plane, not to mention that it is almost impossible to ensure that multiple line lasers are in the same plane. Moreover, these methods do not consider the ghosting phenomenon of multiple laser bars and the influence of interference factors such as reflection. Therefore, these methods cannot be applied to actual industrial measurement. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is to provide a method for accurately measuring the cabin contour based on line laser, which can overcome the influence of ghosting and other noise factors in the multi-line laser measurement process, does not need to adjust the laser plane to be coplanar, and can achieve high-precision measurement of the cabin contour, replacing the traditional mechanical limit plate device.
[0005] The device of the present invention places two pairs of line laser vision sensor units on one side, a total of four pairs of vision sensor units, to ensure that there is no missed detection area in the cabin section. At the same time, in order to prevent missed detection of the cabin section, it is also necessary to ensure that the line lasers have a certain overlap and are within the camera field of view. However, when adjusting the lasers, it is not necessary to ensure that all lasers must be coplanar, only that the lasers are roughly in the adjacent area.
[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose is: a method for accurately measuring the cabin section contour based on line laser, comprising the following steps:
[0007] Step 1: vertically arrange multiple visual sensor units on both sides of the cabin to be inspected, and the connecting line of the visual sensor units on the same side is perpendicular to the central axis of the cabin;
[0008] Step 2: Use the laser tracker to establish a base coordinate system, with the Z axis of the base coordinate system established on the centerline of the cabin, and obtain the conversion matrix between the laser tracker and the base coordinate system;
[0009] Step 3: Process each visual sensor unit to achieve camera parameter calibration, light plane parameter equation calibration and global calibration, so as to obtain the transformation matrix between the camera coordinate system and the laser tracker coordinate system:
[0010] Step 4: Synchronously trigger all cameras to collect the laser light strip image on the surface of the current compartment, perform image processing to eliminate noise and ghosting, and use the principle of laser triangulation to obtain the three-dimensional coordinates of the current laser light strip center in each camera coordinate system, and then obtain the three-dimensional point cloud data in the base coordinates.
[0011] Step 5: Move the cabin to be inspected, and repeat step 4 from one side to the other through the measurement area to obtain the 3D point cloud data of the entire cabin;
[0012] Step 6: Set one side of the cabin as the starting position and "cut" along the Z-axis direction of the base coordinate system to obtain the point cloud data of the current section of the cabin.
[0013] The multiple visual sensor units on the same side are vertically mounted on the same mounting frame; the visual sensor unit includes a CMOS camera and a laser.
[0014] The camera parameter calibration, light plane parameter equation calibration and global calibration include:
[0015] Use the target to transform all camera coordinate systems into the laser tracker coordinate system for global calibration;
[0016] Use the plane calibration plate to calibrate the intrinsic parameters of the camera and the plane equation of the line laser light plane in the camera coordinate system;
[0017] With the help of global calibration, the plane equation of the line laser in the camera coordinate system is transformed into the base coordinate system, and the plane equation of the laser plane in the base coordinate system is obtained.
[0018] The intermediate medium for global calibration is a spatial target with a plurality of circular holes, and the coordinates of the holes on the target have been calibrated in advance by a three-coordinate measuring instrument.
[0019] The acquisition of the conversion matrix between the camera coordinate system and the laser tracker coordinate system includes:
[0020] 1) Assume that the point P on the calibration plate is measured in the camera coordinate system as P c =(x c ,y c ,z c ), the measured value in the laser tracker coordinate system is P g =(x g ,y g ,z g );
[0021] 2) Determine the unconstrained optimal objective function
[0022] Among them, n is the number of points involved in the calibration, P gi =(x gi ,y gi ,z gi , 1) is the homogeneous coordinate of the i-th point in the global coordinate system, P ci =(x ci ,y ci ,z ci ,1) is the homogeneous coordinate of the i-th point in the camera coordinate system; H j is the transformation matrix between the jth camera coordinate system and the base coordinate system, The optimal objective function needs to satisfy orthogonal constraints;
[0023] 3) Using a laser tracker to collect the centers of multiple holes on the spatial target, the multiple holes are not in the same plane; the camera collects the image of the spatial target, obtains the three-dimensional coordinates of the corresponding hole center points in the camera coordinate system, and obtains the transformation matrix between any camera coordinate system and the laser tracker coordinate system after minimizing the objective function
[0024] The image processing to remove noise and ghosting to obtain the center position of the laser light strip on the cabin surface in the camera coordinate system includes:
[0025] 1) Decompose the collected image into three channels and enhance the red component to obtain an enhanced image;
[0026] 2) Perform clustering and grayscale center method processing on each column of the image to obtain the candidate center point position of the laser stripe on the cabin surface;
[0027] 3) Use the flood filling algorithm and the 8-connected region method to connect the candidate center points of the laser strips so that the discontinuous light strips are connected;
[0028] 4) Since the brightness of the ghost of the light strip is darker than that of the normal light strip, the area with the longest connected area of the light strip is taken as the final cabin surface laser light strip, and its center point is located.
[0029] The acquisition of the candidate center point position of the laser strip on the cabin surface includes:
[0030] Get the pixel set S whose gray value is greater than m in the jth column of the image I(x,y) j ,
[0031] The obtained pixel point set S j The pixel points in the image are clustered, and the adjacent pixel points are divided into a group to obtain m groups of clustered pixel points. The center point position of the laser bar is obtained by the grayscale centroid method for each group of clustered pixel points, which is recorded as
[0032] The above processing is performed on each column in the image to obtain all laser center lines that meet the conditions as candidate center points of the light strip.
[0033] The present invention has the following advantages and beneficial effects:
[0034] 1. The method for accurately measuring cabin contours based on line lasers of the present invention adopts a non-contact measurement method and utilizes a specific image processing method to eliminate the influence of ghosting and other noises existing in multiple lasers during the measurement process. It has high measurement accuracy and efficiency and can meet the measurement requirements of various cabins.
[0035] 2. The method for accurately measuring cabin contour based on line laser described in the present invention does not require human intervention, has a high degree of automation, and can quickly obtain measurement parameters such as cabin coaxiality.
[0036] 3. The method for accurately measuring the cabin section contour based on line laser described in the present invention does not require adjusting multiple line lasers into one plane, and the device has a simple structure and is easy to operate. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of the method of the present invention;
[0038] Figure 2 It is a system structure diagram of the present invention;
[0039] Figure 3 This is an implementation of the global calibration method of the present invention. DETAILED DESCRIPTION
[0040] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0041] The method adopts a visual sensor measurement technology composed of multiple CMOS cameras and line lasers, establishes a base coordinate system on the center axis of the cabin with the help of a laser tracker, and then converts all camera coordinate systems to the base coordinate system in combination with a self-made stereo calibration plate, and uses a plane calibration plate to calibrate the parameters of the camera internal parameters and the light plane of the line structured light. After the calibration is completed, the cabin moves along the center axis of the cabin, and the visual processing unit collects images in real time. A series of image processing technologies are performed on the collected images to detect the center point of the laser bar. The three-dimensional data point cloud of the laser bar is obtained by the triangulation principle, and converted to the base coordinate system to obtain the measurement data of all point clouds in the base coordinate system. The point cloud data of any section of the cabin can be determined by "cutting" in the Z-axis direction of the base coordinate system. The coaxiality and other parameters of the cabin can be obtained by analyzing the point cloud. The invention method has fast detection speed, high detection accuracy, and strong adaptability to the environment.
[0042] See attached Figure 1 , attached Figure 2 , attached Figure 3 The specific steps of the method for accurately measuring the cabin section profile based on line laser of the present invention are as follows:
[0043] Step 1: Place four sets of visual sensor units vertically on both sides of the cabin, perpendicular to the central axis of the cabin, and install them on the columns on both sides of the cabin;
[0044] Two sets of visual sensor units are placed on the columns on one side of the cabin, and the other two sets of visual sensor units are placed on the columns on the other side of the cabin.
[0045] The vision sensor unit includes a CMOS camera and a laser.
[0046] Step 2: Use the laser tracker to establish a base coordinate system. The Z axis of the base coordinate system is established on the centerline of the cabin. At the same time, the transformation matrix between the laser tracker and the base coordinate system is obtained.
[0047] Step 3: Perform the following preprocessing on each visual sensor unit to achieve camera parameter calibration, light plane parameter equation calibration and global calibration:
[0048] A spatial target with multiple circular holes (the hole coordinates of the target have been calibrated using a three-coordinate measuring machine) is designed as an intermediate medium for global calibration. The target is used to transform all camera coordinate systems into the laser tracker coordinate system for global calibration. The conversion matrix is calculated as follows:
[0049] 1) The point P on the calibration plate is measured at P in the camera coordinate system. c =(x c ,y c ,z c ), the measured value in the laser tracker coordinate system is Pg =(x g ,y g ,z g ),
[0050] 2) Determine the unconstrained optimal objective function F:
[0051]
[0052] Among them, n is the number of points involved in the calibration, P gi =(x gi ,y gi ,z gi , 1) is the homogeneous coordinate of the i-th point in the global coordinate system, P ci =(x ci ,y ci ,z ci ,1) is the homogeneous coordinate of the i-th point in the camera coordinate system. j is the transformation matrix between the jth camera coordinate system and the base coordinate system, This function needs to satisfy the orthogonal constraint, that is, R T R=I, where R is the rotation matrix of the coordinate system transformation matrix, and I is a 3×3 unit vector.
[0053] 3) Use the laser tracker to collect the hole centers of multiple points (n>4) on the spatial target, and it is necessary to ensure that these points are not in the same plane. The camera collects the spatial target image and obtains the three-dimensional coordinates of the corresponding hole center points in the camera coordinate system. By minimizing the objective function, the transformation matrix between any camera coordinate system and the laser tracker coordinate system can be obtained.
[0054] Use the plane calibration plate to calibrate the camera's intrinsic parameters and the plane equation of the line laser light plane in the camera coordinate system; including:
[0055] Since the camera lens is distorted during the image acquisition process, it is necessary to calibrate the camera's internal parameters. With the help of a flat circular calibration plate, the camera's principal point, focal ratio, and distortion coefficient are calibrated using the calibration method proposed by Zhang Zhengyou et al. in "A camera calibration method based on flexible stereo targets."
[0056] The laser plane is calibrated using a circular calibration plate. The equation of the light plane in the camera coordinate system is:
[0057] a c x c +b c y c +c c z c +d c =0
[0058] Among them, (a c ,b c ,c c ,d c ) is the coefficient of the plane equation, (x c ,y c ,z c ) are the camera coordinates.
[0059] With the help of global calibration, the plane equation of the line laser in the camera coordinate system is transformed into the base coordinate system, and the plane equation of the laser plane in the base coordinate system is obtained.
[0060] Step 4: Strictly control all cameras to collect data synchronously, process the collected images, eliminate the noise and laser ghosting in the collection process, and use the principle of laser triangulation to obtain the three-dimensional coordinates of the center of the laser light bar in each camera coordinate system, and then obtain the three-dimensional point cloud data in the base coordinates.
[0061] The details are as follows:
[0062] 1) Decompose the three-channel color image captured by the camera into three single-channel images: R(x, y), G(x, y), and B(x, y), and then enhance the red component of the image to obtain the enhanced image I(x, y):
[0063] I(x,y)=R(x,y)-G(x,y)-B(x,y)
[0064] Among them, x and y represent the pixel position.
[0065] 2) Find the pixels (r0,j), (r1,j),…, (r n ,j), these pixels belong to the set S j , The obtained pixel point set S j Clustering is performed, and the adjacent pixels are divided into a group; find 1, 2, ... m groups in the same way. For each set, the center point position of the laser bar is obtained by the grayscale centroid method and recorded as
[0066] The above processing is performed on each column in the image to obtain all laser center lines that meet the conditions as candidate approximate center points of the light strip.
[0067] 3) Use the flood filling algorithm to connect the center points of the laser strips using 8-connected regions to connect the discontinuous light strips.
[0068] 4) Then use the length as the threshold. Since the ghost brightness of the light bar is darker than the normal light bar brightness, although the ambient light is sometimes strong, it affects the local area. Therefore, the area with the longest connected area of the light bar is used as the final light bar center point to obtain the final accurate light bar center point. Using the light plane calibration data obtained in step 3, the three-dimensional point cloud data of all light bar center points in the base coordinates can be reconstructed.
[0069] Step 5: Move the cabin from the front to the rear of the vehicle through the measurement area, and repeat step 4 to obtain the 3D point cloud data of the entire cabin;
[0070] Step 6: By "cutting" from the starting position of the cabin along the Z-axis direction of the base coordinate system, the point cloud data of the current section of the cabin can be obtained, and then a series of parameters such as the coaxiality of the cabin can be obtained.
[0071] To verify the effectiveness of the method of the present invention, a Basler camera with a resolution of 300W pixels and a 12mm lens from Computar was used. The simulation experiment was implemented in VS2013 software with the OpenCV algorithm library to obtain the cabin point cloud data. The measurement data was compared with the laser tracker measurement data, and the measurement error was within 0.3mm, which met the requirements for cabin measurement.
[0072] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should be regarded as within the scope of protection of the present invention.
Claims
1. A method for accurately measuring cabin section contour based on line laser, characterized in that: The following steps are involved: Step 1: vertically arrange multiple visual sensor units on both sides of the cabin to be inspected, and the connecting line of the visual sensor units on the same side is perpendicular to the central axis of the cabin; Step 2: Use the laser tracker to establish a base coordinate system, with the Z axis of the base coordinate system established on the centerline of the cabin, and obtain the conversion matrix between the laser tracker and the base coordinate system; Step 3: Process each visual sensor unit to achieve camera parameter calibration, light plane parameter equation calibration and global calibration, so as to obtain the transformation matrix between the camera coordinate system and the laser tracker coordinate system: Step 4: Synchronously trigger all cameras to collect the laser light strip image on the surface of the current compartment, perform image processing to remove noise and ghosting, and use the principle of laser triangulation to obtain the three-dimensional coordinates of the current laser light strip center in each camera coordinate system, and then obtain the three-dimensional point cloud data in the base coordinate system; Step 5: Move the cabin to be inspected, and repeat step 4 from one side to the other through the measurement area to obtain the 3D point cloud data of the entire cabin; Step 6: For the three-dimensional point cloud data, set one side of the cabin as the starting position, cut along the Z-axis direction of the base coordinate system, and obtain the point cloud data of the current section of the cabin.
2. The method for accurately measuring cabin section contour based on line laser according to claim 1 is characterized in that: The multiple visual sensor units on the same side are vertically mounted on the same mounting frame; the visual sensor unit includes a CMOS camera and a laser.
3. The method for accurately measuring cabin section contour based on line laser according to claim 1 is characterized in that: The camera parameter calibration, light plane parameter equation calibration and global calibration include: Use the target to transform all camera coordinate systems into the laser tracker coordinate system for global calibration; Use the plane calibration plate to calibrate the intrinsic parameters of the camera and the plane equation of the line laser light plane in the camera coordinate system; With the help of global calibration, the plane equation of the line laser in the camera coordinate system is transformed into the base coordinate system, and the plane equation of the laser plane in the base coordinate system is obtained.
4. The method for accurately measuring cabin section contour based on line laser according to claim 3 is characterized in that: The intermediate medium for global calibration is a spatial target with a plurality of circular holes, and the coordinates of the holes on the target have been calibrated in advance by a three-coordinate measuring instrument.
5. The method for accurately measuring cabin section contour based on line laser according to claim 3 is characterized in that: The acquisition of the conversion matrix between the camera coordinate system and the laser tracker coordinate system includes: 1) Assume that the point P on the calibration plate is measured in the camera coordinate system as P c =(x c ,y c ,z c ), the measured value in the laser tracker coordinate system is P g =(x g ,y g ,z g ); 2) Determine the unconstrained optimal objective function Among them, n is the number of points involved in the calibration, P gi =(x gi ,y gi ,z gi , 1) is the homogeneous coordinate of the i-th point in the global coordinate system, P ci =(x ci ,y ci ,z ci ,1) is the homogeneous coordinate of the i-th point in the camera coordinate system; H j is the transformation matrix between the jth camera coordinate system and the base coordinate system, The optimal objective function needs to satisfy orthogonal constraints; 3) Using a laser tracker to collect the centers of multiple holes on the spatial target, the multiple holes are not in the same plane; the camera collects the image of the spatial target, obtains the three-dimensional coordinates of the corresponding hole center points in the camera coordinate system, and obtains the transformation matrix between any camera coordinate system and the laser tracker coordinate system after minimizing the objective function 6. The method for accurately measuring cabin section contour based on line laser according to claim 1 is characterized in that: The image processing to remove noise and ghosting to obtain the center position of the laser light strip on the cabin surface in the camera coordinate system includes: 1) Decompose the collected image into three channels and enhance the red component to obtain an enhanced image; 2) Perform clustering and grayscale center method processing on each column of the image to obtain the candidate center point position of the laser stripe on the cabin surface; 3) Use the flood filling algorithm and the 8-connected region method to connect the candidate center points of the laser strips so that the discontinuous light strips are connected; 4) Since the brightness of the ghost of the light strip is darker than that of the normal light strip, the area with the longest connected area of the light strip is taken as the final cabin surface laser light strip, and its center point is located.
7. The method for accurately measuring cabin section contour based on line laser according to claim 6 is characterized in that: The acquisition of the candidate center point position of the laser strip on the cabin surface includes: Get the pixel set S whose gray value is greater than m in the jth column of the image I(x,y) j , The obtained pixel point set S j The pixel points in the image are clustered, and the adjacent pixel points are divided into a group to obtain m groups of clustered pixel points. The center point position of the laser bar is obtained by the grayscale centroid method for each group of clustered pixel points, which is recorded as The above processing is performed on each column in the image to obtain all laser center lines that meet the conditions as candidate center points of the light strip.
Citation Information
Patent Citations
Space coordinate system calibration method for spacecraft cabin ground docking
CN105091746A
A method of 3D contour measurement of a workpiece on a conveyor belt based on line laser scanning
CN107578464A