Аннотация:In this paper we propose a novel method for localization based on matching two stereo images. It is based on minimizing the sum of square distances between each 3D point and four corresponding 3D rays. The method shows good results for practical localization purposes. Moreover it is robust to the presence of feature point correspondences with zero disparity, which is usually a problem for classical methods. The algorithm is tested in comparison to the classical method. It has linear complexity with respect to feature point correspondence number.