Skip to Main Content
A catadioptric stereo vision system composed of a CCD sensor, a lens and two hexahedral prisms was developed for detecting the offset of railway vehicle relative to the track. In this way, two images of the same track can be gotten from the imaging plane of one camera. In order to obtain the parallax necessary for recovering the depth information from every frame image, the optimal evaluation function of the dynamic gray-scale threshold was constructed and the maximum correlation matching algorithm was employed. Combining some features of images, a gray threshold can be obtained through the function. A matching template can be intercepted from the gray curve of every frame image. By calculating correlation coefficients between the matching template and the whole gray curve, the authors get a correlation coefficient curve. The distance between the two points whose correlation coefficient respectively is the maximal and the second maximum is the parallax. The experimental result shows that the maximal correlation algorithm based the optimal dynamic gray threshold is robust and can be adaptive to environmental change.