1. A method, comprising: detecting, using a processor, a plurality of edges in a plurality of images; determining, using the processor, a set of edges from the plurality of edges that are matched across the plurality of images; determining, using the processor, three orthogonal axes according to the set of edges by grouping edges of the set of edges into a plurality of buckets according to orientation, wherein each of a first axis and a second axis of the three orthogonal axes is determined according to one of the plurality of buckets based upon a number of edges in the plurality of buckets; estimating camera poses of the plurality of images using a cost function that depends upon the set of edges; generating planes for a 3-dimensional model according to the camera poses and the set of edges, wherein the 3-dimensional model is generated from the plurality of images; identifying false planes from among the planes; and removing the false planes.