| The rapid development of domestic rail transit requires for higher safety guarantee during transportation.As the primary infrastructure of railways,rails tend to be bent and deformed after they are put into operation,which greatly reduces the service life of rail and introduces the insecurity and instability of the train.Therefore,it is necessary to carry out effective flaw detection to the steel rail to prevent danger.The 3D vision technology can acquire profile of rail noninvasively,which favors the automatic inspection of railway surface damage.Considering the rough material of the rail and the partial reflection,this thesis adopts the theory of line structured light to build a 3D scanning system with constant focus optical path while choosing the appropriate camera,laser and controllable motion machine.The research of the thesis is as follows:(1)Due to the wide range of measuring rails,this thesis uses a Scheimpflug lens to change the optical path of the camera,and determines the Scheimpflug angle according to the system structure to achieve full focus on the l ight plane and enlarge the measuring depth of field.Aiming at the calibration problem of the Scheimpflug camera,a two-dimensional tilt angle is added on the basis of the pinhole model,and mutual conversion between vertical image plane and tilted image plane is set up.Then,the initial value of the camera internal parameter by traditional calibration and the objective function of the model optimization are corrected.The experiment proves the method can accurately describe how the camera captures the world.(2)In the line structured light measurement system,the laser plane is the auxiliary constraint condition to calculate the 3D points,and the controllable motion machine is used for the complete scan of the measured object.Therefore,it is necessary to calibrate the accurate light plane equation and the scanning path of the controllable motion machine.This thesis uses the free plane target to obtain a series of the light plane control points and scanning path control points which are fitted and optimized to ensure general equation of the light plane and the movement vector of the platform.The scheme cost lowly and is highly flexible,etl.(3)After the system calibration,the 3D coordinates of the corresponding points can be recovered from the complex light strip.Aiming at accurately extracting rail light strip,an robust algorithm is proposed.First,through double thresholding of the gradient image,geometric constraints and other measures,filter out most of the environmental noise to accurately extract the light stripe area in the image,and secondly use the Steger algorithm to find the normal direction of the light core skeleton and use gray barycentric method to determine the sub-pixel coordinates of the optical center.(4)There is a random vibration of six degrees of freedom when the system is running.If the trajectory of the controllable motion machine is directly used to splice the point clouds,there will be delamination and fluctuation of the point clouds.For this,a two-step compensation algorithm is proposed.The first is to correct the contour deformation of a single frame point cloud,and the second is to use the ICP algorithm to align the track waist part on the curve th at has not been worn.The results prove effectiveness of reducing the vibration error by the method.After two_step deal,the compensated three-dimensional space points are projected into the selected color reference image through the position constraint r elationship of frames of the camera,and the color information of the point cloud can be gained.The three-dimensional reconstruction system in this article has performed multiple measurements on the geometric dimensions of the standard block,and the errors are essentially all within 1%.At the same time,the rail scanning test was completed,and the high-precision,clear-detailed rail contour and color texture were reconstructed. |