1. A system for automatically generating a two-dimensional (2D) floor plan of a building being studied, said system comprising: a camera that is employed to obtain a series of images over time as the camera is moved about a floor of the building being studied, each obtained image being represented by image data including a first set of data representing one or more color values of points observed by the camera and a second set of three-dimensional (3D) data representative of distances from the camera to the points observed by the camera; and a processor provisioned to generate the 2D floor plan from the image data, said 2D floor plan being defined by one or more polylines that represent one or more structures of the building and one or more polygons that represent an area of the floor which has been observed by the camera; wherein to generate the 2D floor plan, said processor: performs a local matching sub-process which is operative to align two adjacent images with one another, said adjacent images being obtained by the camera one after another in time; performs a global matching sub-process in which one or more key images are identified from the series of image and two key images, obtained by the camera apart in time from one another but sharing similar image content, are registered to one another; finds, for each image of the series, a 2D subset of points from the image data associated with each image, said 2D subset of points corresponding to a plane defined through the image data; determines the polylines based on said 2D subset of points; and defines the polygons based on the determined polylines and a determined pose of the camera.