This paper addresses the localization problem. The extended Kalman filter (EKF) is employed to localize a unicyclelike mobile robot equipped with a laser range finder (LRF) sensor and an omni-directional camera. The LRF is used to scan the environment which is described with line segments. The segments are extracted by a modified least square quadratic method in which a dynamic threshold is injected. The camera is employed to determine the robot's orientation. The prediction step of the EKF is performed by extracting parameters from the kinematic model and input signal of the robot. The correction step is conducted with the implementation of a line matching algorithm and the comparison between line's parameters of the local and global maps. In the line matching algorithm, a conversion matrix is introduced to reduce the computation cost. Experiments have been carried out in a real mobile robot system and the results prove the applicability of the method for the purpose of localization.