From point clouds to 3D isovists in indoor environments

: Visibility is a common measure to describe the spatial properties of an environment related to the spatial behaviour. Isovists represent the space that can be seen from one observation point, and they are used to analyse the existence of obstacles affecting or blocking intervisibility in an area. Although point clouds depict the as-built reality in a very detailed and accurate way, literature addressing the analysis of visibility in 3D, and more specifically the usage of point clouds to visibility analysis, is rather limited. In this paper, a methodology to evaluate visibility from point clouds in indoor environments is proposed, resulting in the creation of 3D isovists. Point cloud is firstly discretized in a voxel-based structure and voxels are labelled into ‘exterior’, ‘occupied’, ‘visible’ and ‘occluded’ based on an occupancy followed by a visibility analysis performed from a ray-tracing algorithm. 3D Isovists are created from the boundary of visible voxels from an observer position and considering as input parameters the visual angle, maximum line of sight, and eye gaze direction.


INTRODUCTION
People spend most of their time in indoors.Consequently, path planning in indoor environments have become a research of interest in the recent years.Most of the works are focused on finding the shortest paths to reach a certain destination (Wang and Zlatanova 2013).Some of these works consider obstacles to navigation (Díaz-Vilariño et al. 2016).Other conceptualization of indoor paths is the path with the least chance of getting lost (Vanclooser et al, 2014) or the least complex path based on visibility (Grasso et al. 2017).
Visibility is a common measure to describe the spatial properties of an environment related to the spatial behaviour.The isovist theory has been proposed several decades ago in the field of cognitive science and it defines an isovist as a polygon representing the space that can be seen from one observation point (Benedikt 1979).In most of studies, isovist analysis are limited to the two-dimensional space.Although the creation of 3D isovists from point clouds has been previously discussed (Grasso et al. 2017), no implementation has been proposed.
In this work, a methodology to evaluate visibility from point clouds in indoor environments is provided.As a result, 3D visibility is measured as the volume of empty space taking into account the visual angle, the maximum line of sight and eye gaze direction.3D Isovists are also obtained from extracting the boundary of the space view.

RELATED WORK
The visibility problem arises as an important part of numerous studies, such as computer graphics and visualization, computational geometry and path generation.For its investigation, a visibility analysis is performed using elements from the space syntax methodology; the convex space, the axial line and the isovist field.These elements are selected for use based on the dimensionality of the environment, in where the visibility analysis is performed (van Nes 2012).For example, isovists are strongly connected to a 2.5D visibility analysis for the exploration of orientation and path finding in indoors and outdoors (Dalton et al. 2015).
Benedikt defines isovists as "the set of all points visible from a specific vantage point in space and with respect to the environment" (Benedikt 1979).As a method, it is used to analyse both the degree of visibility for a location of urban artifacts and the degree that existing obstacles affect or block the intervisibility in an area.The shape and size of isovist fields change according to the position of the moving agent and they can be 180 (i.e.first view when an agent enters a location) or 360 degrees (i.e. the view when the agent is rotating in the standing point), meaning that the applicability of isovists is manifold (Dalton et al. 2015;van Nes 2012).The isovist fields can be represented in different ways, where visibility graphs and polyhedral volumes (or polygons for 2D isovists) are the most preferred due to their simplicity for understanding (Dalton et al. 2015).In (Emo, 2015) the egocentric isovist is considered, which is based on what can actually be seen as opposed to what would be visible in a scene form a theoretical point of view.Three measures have been defined: floor areas, sky area, and depth of view, which should be measured from a representation eg. a photograph, or in situ.Here, in this paper, we suggest to use a point cloud in situ representation.

LiDAR-based 3D visibility analysis
The literature regarding the usage of the direct use of a point cloud for a visibility analysis and the creation of isovists is rather limited.The majority of the studies were focusing on exploring the use of point cloud in indoor or outdoor environments by calculating the visibility after transforming the 3D data to 2.5D representation (DSMs).
Alsadik et al. categorized the different techniques for visibility analysis with point clouds into three different groups that correspond to the triangulation approaches, the Hidden Point Removal (HPR) approaches and the voxel approaches respectively (Alsadik et al. 2014).The former is related to the study of the normal direction of the triangles of models, while the HPR technique consists in the projection of a convex hull of the object, visible from one point.Finally, the voxel methods investigate whether the voxels that represent the space, intersect LoS (Line of Sight) from different angles of the observer.The advantage of this group of methods is the avoidance of creating a surface of the model, since the points can be represented as 3D pixels (Alsadik et al. 2014).Different techniques of voxelization are the voxelray intersection, the voxel distance buffering and ray casting methods.
In an outdoor environment, Peters et al. used medial axis transform for visibility analysis in a built environment that included both trees and buildings.The medial balls were inside buildings.They concluded that the computation of a point's normal is the most important part of the research and that defining the normal of vegetation points is a difficult process (Peters, Ledoux, & Biljecki, 2015).Bator et al. transformed LiDAR vegetation points into spherical multipatch objects for the creation of rapid and more accurate 3D visibility modelling in order to pick the most visible location for advertising exposure (Bator, Chmielewski, & Orlowski 2015).
Fisher-Gewirtzman &Wagner 2003.proposed the Spatial-Openness Index in order to further develop the quantitative descriptions and evaluation of the buildings shapes.In addition, they aimed to explore the visibility and permeability of different spatial configurations that were related to the open space observed from inside the buildings (Fisher-Gewirtzman, Burt, and Tzamir 2003).An extension of this work comes from Morello and Ratti who created a 3D model of buildings in the urban context, that were concerned with the properties of interbuilding visibility and 'openness' or measures of the proportion of visible sky (Morello & Ratti 2009).The latest work comes from Schmid et al. who proposed an approach of generating highly accurate isovists from LiDAR scans in order to quantify a location's spatial configuration.They aimed to link the subjective risk perception (coming from opinion-based VGI) to the spatial configuration of a cyclist's vista space, with the reasoning that spatially complex or constantly changing situations are experienced by cyclists as more dangerous (Schmid et al. 2018).
In an indoor environment.Grasso et al. improved the idea of isovists by proposing a method to evaluate in a quantitative way the complexity of a certain path within a 3-Dimensional point cloud environment.The proposed method was taken into consideration the space visible from a certain point of view, depending on the moving agent (Grasso et al. 2017)

METHODOLOGY
The general workflow of the proposed approach is summarized in Figure 1.The creation of 3D Isovists is designed for a voxelbased structure.Point cloud is initially voxelized, and voxels are initially classified into 'Occupied', 'Empty' and 'Exterior'.Since the purpose of the methodology is to create 3D isovists from indoor environments, exterior voxels need to be discarded to not constitute false positives, and this is carried out from a ceiling identification.Once voxels are classified, 'Empty' voxels are submitted to a visibility analysis based on a ray-tracing algorithm and split into 'Visible'and 'Occluded'.Finally, the area of study is classified into: 'Occupied', 'Visible' and 'Occluded'.3D Isovists are delimited from the two first classes.
Figure 1.Workflow of the proposed methodology.

Voxelization and initial voxel classification
The point cloud is firstly submitted to a voxelization in order to discretize the indoor space in simple 3D units.The voxel model decomposes the indoor environment into a set of non-overlapping and equal-sized cells called voxels.This model is used due to its simplicity for the further steps of visibility analysis and evaluation.
Once points are structured into the 3D grid, the voxels are submitted to an initial classification according to their occupancy.'Empty' voxels represent the empty space, and 'Occupied' voxels depict voxels containing a minimum number of points, and therefore representing the physical elements in the indoor scene.A threshold estimating the minimum number of points to classify a voxel as 'Occupied' is established from voxel size and point cloud density based on empirical evidences.This is just important for discriminating noisy voxels or reflections that otherwise would generate false positives.
Voxelization is carried out independently of the orientation of the point cloud.For this reason, and because floor plane of buildings may be irregular, voxels belonging to outdoors have to be classified in order to discard them in the visibility analysis.If 'Exterior' voxels are not discarded, they could be considered as visible from an indoor point of view if there are windows (Figure 2).The methodology seeks simplicity.Consequently, rather than classifying voxels according to the element they are representing (González-deSantos et al, 2018), the classification is performed based on space occupancy since visibility will be evaluated in terms of empty space.
However, as previously manifested, the area of study has to be delimited.For this purpose, and assuming the building vertically oriented and the ceiling parallel to xy plane, ceiling and floor are identified by detecting the peaks in a histogram of z-coordinates (Khoshelham & Díaz-Vilariño, 2014).Afterwards, the projection of the voxels belonging to the ceiling is used to delimit the area of study (Adán et al, 2015).

Visibility analysis
Visibility analysis is performed for each position of an observer.
From each observer point of view, a ray-tracing algorithm is implemented to evaluate visibility and to classify previously labelled as 'Empty' voxels into 'Visible' and 'Occluded'.
Voxels will be updated from 'Empty' to 'Occluded' in case the Line of Sight (LOS) between the observer and the voxel is intersecting with an 'Occupied' voxel.Otherwise, the voxel will be classified as 'Visible' (Figure 3).
Figure 3.The principle of the ray-tracing algorithm.'Occupied' voxels are represented in dark grey, the 'observer' voxel in red, the 'target' voxel in green, the 'occluded' voxels in light grey and 'empty' voxels in white.

Creation of the 3D isovist
Once voxels are labelled, the space view from each observer position is evaluated.The space view is composed of the 'Empty' voxels taking into account a) the visual angle, b) the maximum line of sight and c) the eye gaze direction of the observer.
The visual angle is determined by the human visual field, which is defined as the spatial array of visual sensations available to observation (Smythies, 1996).The boundaries of human visual field are defined in several ways depending on the context and this parameter is configurable.In our approach, central vision corresponds to a circle with 2.5º radius centred at the point at which one's gaze is directed.Near-peripheral and mid-peripheral are conceived as bounded at the centre by a circle of 30º and 60º radius respectively (Sardegna et al, 104) (Figure 4).Maximum line of sight and eye gaze direction are also configurable parameters defined for each of the experiments.The eye gaze direction is a vector placed at the human head.
For each observer position, the 3D space view is calculated by analysing visibility to all 'empty' voxels within the visual angle delimited by previous boundaries and centred at the vector defined by the eye gaze direction.3D volumetric isovists are obtained by extracting the boundary centroids of 'visible' voxels conforming the space view.In this case, a triangulation is preformed, using a shrink factor of 0 to obtain a convex hull representation for defining well the shape of the space view when occlusions.
The volume of the space view can be used also as a quantitative measure of visibility from each observer point, and it can be obtained from adding the volume of all 'visible' voxels.

Case study
The methodology is tested in a real case study.The point cloud is provided by the ISPRS Benchmark on Indoor Modelling (Khoshelham et al, 2017) and it corresponds to an academic building indoor surveyed with the indoor Modelling System Viametris IMS3D.The technical characteristics of the laser scanner device are summarized in Table 1.Table 1.Technical characteristics of the Viametris IMS3D laser scanning device according to the manufacturer datasheet.

Viametris IMS3D specifications
The surveyed building is not furnished.Accordingly, points mostly belong to the elements constituting the building structure and clutter is due to the presence of people during the survey.The floor plan has an area of 304 m 2 and the number of points is of 33.6×10 6 with a mean point spacing of 0.005 m.

Experiments and results
Point cloud is firstly submitted to a simple voxelization using a resolution of 0,2 m on all axes.The processing time is 1.08 s using MATLAB R2017b in an Intel Core i7 CPU 2.80 GHz with 16 GB RAM.Afterwards, ceiling and floor are identified by detecting peaks on a histogram of z coordinates (Figure 5).2018).
Figure 8 shows the results in terms of three-dimensional representation of space view accomplished for Test A (central visual angle, and mid-peripheral visual angle).The position of the observer is highlighted in red, while 'occupied' voxels are represented in blue, 'occluded' voxels in grey and 'visible' voxels in green.This colour code is used also for Figure 9 and Figure 10.As it can be observed in Figure 8, and then highlighted in Figure 9, 'occupied' voxels represent structural elements such as walls.People in the interior of the room cause also occlusion.

CONCLUSIONS
This paper proposes a methodology to automatically generate 3D isovists from point clouds in indoor environments.Point cloud is organized into a voxel-based structure, and voxels are initially labelled as 'occupied' or 'empty' according to their occupancy.Afterwards, 'empty' voxels are submitted to a visibility analysis based on a ray-tracing algorithm to evaluate if they are 'visible' or 'occluded'.Visibility is studied for all voxels contained in the space view defined by visual angle, maximum line of sight and eye gaze direction.Since the area of study is delimited by ceiling and floor extension, false positives due to visible voxels through windows are not obtained.Results show how obstacles interfere in the visibility from a three-dimensional point of views, and how visibility changes according to the eye gaze direction, helping to understand the perception and behaviour in indoor environments.

Figure 2
Figure 2. a) Rectangular floor plan rotated and b) Irregular floor plan.In blue the indoor space, in grey, the outdoor space.

Figure 5 .
Figure 5.The histogram of z coordinates showing distinct peaks corresponding to floor and two-height ceilings.Because the building used as case study has two ceilings at different heights, both ceilings and floor have been used to delimit the area of study.Figure6shows the results before (Figure6.a.) and after (Figure6.b.) initial voxel classification.The results are shown just for one horizontal section in order to improve visibility.

Figure 6 .
Figure 6.A horizontal section of the point cloud before (a) and after (b) initial voxel classification.Voxels are represented in blue (occupied), white (empty) and exterior (orange).In order to test the performance of the methodology, several tests have been made considering different contexts.The input parameters are the position of the observer, the visual angle, the maximum line of sight and the eye gaze direction of the observer.Position of the observer and eye gaze direction for each test are represented in Figure 7.The position of the observer is set at a height of 1,4 m approximately.Maximum line of sight is not delimited since building dimensions are smaller than the human sight range.

Figure 7 .
Figure 7. Positions of observer and eye gaze direction are represented in red in the building floor plane.
The three-dimensional representation of space view is accomplished from two perspectives: a voxel representation and a surface-based representation enclosing the volume of the space viewthe 3D volumetric isovist-.Ceiling and floor have been cut out in Figures8, 9and 10 for improving visibility.

Figure 8
Figure 8. a) Ceiling and floor have been cut out for improving visibility of figures.

Figure 9
Figure 9. a) Point cloud, b) voxel representation, c) 3D isovist of Test A for mid-peripheral visual angle.People in the interior of the room cause occlusion.In order to represent the complexity of visibility along an indoor path, Figure10shows three cases in which, with the same position, an observer could experiment different 3D volumetric isovists.3D isovists basically depend on the eye gaze direction which, in turn, is determined by subsequent positions along the path.If the user is going to continue along the corridor, it will experiment the visual space of Test C while if the intention is to turn right to enter in the room, the visual space will be determined by Test D or Test E. Processing time of visibility analysis is 0,64 s, 0,46 s, and 0,44 s, for Test C, D, and E, respectively.

Figure 10 .
Figure 10.Visual space, considering mid-peripheral human vision, for one observer position (in red) and three different eye gaze direction (Test C, Test D and Test E).

Table 2
summarizes the results of visibility in terms of volume of space view.Central and near-peripheral human visual field are considered for simulations.

Table 2 .
Results of visibility tests in terms of volume of the space view.
After the visibility analysis, voxels are classified into: 'visible' and 'occluded'.A voxel is considered 'occupied' if it contains a minimum number of 20 points as in (González-deSantos et al,