This paper presents a real-time and autonomous algorithm for generating low-complexity multi-planar 3D models of indoor environments with a mobile robot equipped with range finders and a panoramic camera. In contrast with previous studies, our algorithm relies on neither iterative computations nor manual processing but, instead, is incremental online. At each time step, a line of range finder measurements is linearly segmented, and the data line segments extract planar surfaces of indoor environments. The structuralization procedure does not use polygon models for the measurements. Our algorithm can build a compact 3D map without requiring dense point clouds. The visualization through the graph is simple and quick, and experimental results verify the feasibility and power of our algorithm.