1. A method for reconstructing a scene as a three-dimensional (3D) model, comprising steps of: acquiring a sequence of images of the scene with a camera; using a processor configured for: extracting feature point matches or line matches from the acquired sequence of images of the scene; initializing variables for camera optical centers and 3D points using random values making n copies of the variables depending on an availability of n constraints, wherein n is a positive integer number; projecting the n copies by moving each copy of the n copies by a minimal distance to satisfy each constraint of the n constraints; replacing the projected n copies with averages of the projected n copies; and repeating the projecting and the replacing until convergence to provide the 3D model.