This paper addresses the computation of the fundamental matrix between two views, when camera motion and 3D structure are unknown, but planar surfaces can be assumed. We use line features which are automatically matched in two steps. Firstly, with image based parameters, a set of matches are obtained to secondly compute homographies, which allows to reject wrong ones, and to grow good matches in a final stage. The inclusion of projective transformations gives much better results to match features with short computing overload. When two or more planes are observed, different homographies can be computed, segmenting simultaneously the corresponding planar surfaces. These can be used to obtain the fundamental matrix, which gives constraints for the whole scene. The results show that the global process is robust enough, turning out stable and useful to obtain matches and epipolar geometry from lines in man made environments.