We address the robust matching of lines between two views, when camera motion is unknown and dominant planar structures are viewed. The use of viewpoint noninvariant measures gives a lot of nonmatched or wrong matched features. The inclusion of projective transformations gives much better results with short computing overload. We use line features that can usually be extracted more accurately than points, and they can be used in cases where there are partial occlusions. In the first stage, the lines are matched to the weighted nearest neighbor using brightness and geometric-based image parameters. From them, robust homographies can be computed, which allows us to reject wrong matches and to add new good matches. When two or more planes are observed, the corresponding homographies can be computed and they can be used to obtain also the fundamental matrix, which gives constraints for the whole scene. The simultaneous computation of matches and projective transformations is extremely useful in many applications. It can be seen that the proposal works in different situations requiring only a simple and intuitive parameter tuning.