This paper introduces a robust method for automatically matching features in images corresponding to the same physical point on an object captured from two arbitrary viewpoints. Starting from detected line segments in two or more images using phase congruency, the pairs of line segments are characterized by indices that encode the relative positions and orientations of those segments. The encoding indices are invariant with respect to viewpoint changes and the corresponding line segments between the images can be found by them. The feature matching is optimized for image warping where we wish to ignore unreliable matches at the expense of reducing the number of feature matches. This approach can be applied to the image warping to realize its automatism. Results are presented on real images.