Occlusion Detection by Height Gradient for True Orthophoto Generation, Using Lidar Data

Nowadays, the use of orthophoto in urban areas has become common. It is known that in most parts of urban areas there are a great number of tall buildings which can cause occlusion regions during image acquisition. These occlusions appear both in aerial images and in the orthophotos generated from these images. It happens due to perspective projection of the imaging sensor, and also if digital models that represent only relief is used in the orthorectification process, instead of the Digital Surface Model (DSM) that takes into account the relief and all objects on the surface. Considering this context, the aim of this article is to introduce an alternative procedure for occlusion detection in aerial images, using LiDAR (Light Detection And Ranging) data, aiming at the generation of true orthophotos. The presented method for occlusion detection is based on height gradient computation applied to a DSM of the region, instead of the building model that is considered in some approaches. These height gradients computed in radial directions are important for the identification of the beginning of the occlusions in these directions. The final limits of the occlusions are obtained from the projection of these initial points in the DSM. To evaluate the proposed method, both simulated and real data were considered. The simulated data correspond to an ideal urban area, without noise, and this experiment was only used to validate the implementation method. The real data set is composite by digital aerial images and LiDAR data. The LiDAR data available has the average density of 8 points/m 2. As preliminary results, the occlusion areas were detected and highlighted in the orthorectified images. To accomplish the evaluation of the proposed method, besides a visual analysis, a numerical evaluation based on index of completeness was computed, using as reference a manual detection of occlusion. It is possible to observe the potential of the proposed occlusion detection method, although improvements are necessary in the proposed method.


INTRODUCTION
The great use of orthophoto is a result of the current advance of GIS (Geographic Information Systems) technology, together with the development of new sensors, methods and systems, as the available Digital Photogrammetric Workstations (DPW) in which some automatic techniques are available.There are several applications that need this kind of product, such as projects in urban areas (urban planning, boundary maps, etc).
It is well known that in large urban areas there are a great number of tall buildings.These buildings occlude some features at the surface, such as streets, man-made feature boundaries, parks, etc during the image acquisition in a photogrammetric flight mission.This occlusion happens due to the perspective projection in which the aerial images are taken.So, the taller the buildings are, and the farther from the centre of the image, the higher is its influence in appearing the occlusion areas.
A product obtained from the images and which has no such effect is the true orthophoto.This product, besides correcting the distortion caused by the relief displacement, also considers the elements/objects above the surface, using a DSM and to produce it an occlusion treatment is necessary.As a result the true orthophoto represents all buildings in the orthogonal projection.
A recent research (Gim, 2011) shows a comparison of several DPW in use by companies worldwide.Of the 11 DPW evaluated at that time, only 5 have a true orthophoto generation module.This indicates that true orthophoto generation is still a process in development and improvements and researches are necessary.
The main step for its generation is occlusion detection.First of all, this identification is essential to find the occluded areas in all images of the block.If the occlusion area is identified, the absent radiometric information can be obtained from some images of the block, aiming to fill these areas and generate the orthorectified image (true orthophoto).
Considering this context, the aim of this paper is to introduce one alternative methodology for occlusion detection, using LiDAR data as a planialtimetric information source of the Earth's surface.

Occlusion detection methods
For true orthophoto generation, the occlusion detection is essential.As a result, an image is created with all buildings in an orthogonal projection.Some ways to identify these regions can be found in the literature.Independently of the method in use, since the occlusion areas are found, these areas must be filled with radiometric information from other images, in which these areas appear as visible.
Using a DSM in the orthorectification process, an effect called double mapping is created if no additional treatment is performed.This effect appears due to a competition of different International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-1/W1, ISPRS Hannover Workshop 2013, 21 -24 May 2013, Hannover, Germany cells in the DSM for the same image pixel.This duplication contains: a correct rectified area and a wrong portion, as a ghost of the correct portion.The wrong area coincides with the occlusion portionwhose detection is the main aim of this article.

Z-buffer Method
The Z-buffer method has its origin in computer graphics and it is also used for occlusion detection in Photogrammetry.Solving the ambiguity between DSM cells and identifying which portion is related with the occlusion areas is the general aim of this method.This solution is done by comparing the distance between the perspective centre (PC) of the camera and the DSM cell.Therefore, the metric used in the Z-buffer method is based on Euclidian distance analysis.
This method uses three matrices and one visibility map (Habib et al., 2007).These structures have the same dimension as the input image and are called "Z-buffer matrices".Two matrices store the X and Y components of a DSM cell projected in the image pixel.The Euclidian distance between each DSM cell and the perspective centre is stored in the third matrix.The visibility map indicates the DSM cells that are occluded or visible, in other words, belonging or not to an occlusion area, respectively.
By analysing Figure 1 it is possible to understand how the occlusion areas are identified by the Z-buffer method.The DSM scan is started in radial direction.At the moment cell B is found it is projected in the input image and its coordinates (X B ,Y B ), as well as the distance between B and the PC (d B ) are stored at the Z-buffer matrices.As cell B is the first cell to be related to this image pixel, the visibility map is set as visible.
During the scan, the algorithm arrives at cell A. The projection of this cell A in the image shows that the pixel already has one cell (B) assigned to it.Thus, the distances d B and d A must be analysed to identify which of them is occluded.From Figure 1 it can be seen that d A is smaller than d B , so the values X B , Y B and d B stored at the Z-buffer matrices are replaced by X A , Y A and d A .And also, in the visibility map, the pixel related to A is labelled as visible and cell B is changed to occluded.This procedure is done for all DSM.Finishing the scan, the values stored at the Z-buffer matrices help in the radiometric tone transfer between input image and orthophoto.The visibility map makes possible the identification of occlusion areas (Habib et al., 2007).
Figure 1.Principle of visibility map generation using Z-buffer method.Adapted from (Habib et al., 2007).
Some tests (Habib et al., 2007) show two problems with the Zbuffer method in the occlusion detection process.One is in the relation between the ground sample distance (GSD) and the size of the DSM cells.In some situations, where the size of the DSM cells is smaller than the GSD of the image, false occlusions are identified in the results.This occurs due to a competition of more than one DSM cell for one single pixel in the image.In this competition just one DSM cell is used to label the pixel (occluded / visible).Therefore, the others are not considered, and in some situations false occlusions may occur.
In urban areas, however, even if the ratio (cell size / GSD) is near 1, the effect of scale variation between points on the roof of buildings and the ground may affect the results.
Another point to be considered is the labelling of false visibility for areas with tall narrow buildings.This problem happens because the distance, between PC and a DSM cell, does not find competition cells in some situations (building x terrain), as shown in the left wall in Figure 2. Some visible pixels were labelled in the wrong way, because there is not sufficient information about the walls.
Figure 2. False visibility caused by tall narrow buildings in the Z-buffer method.

Angle Based Method
A method based on angles (Habib et al., 2007) uses the comparison of angles, obtained by the vertical passing through the PC and the segment that joins the PC to each DSM cell as the metric.
Considering a perspective projectionas soon we move away from the image centre, i. e., the projection of the PC in the image plane, it is possible to identify the altitude variation of the objects above the surface using these angles.In a plane surface, the main characteristic of theses angles is that, from the image centre to the boundary, they always keep growing.In this way it is possible to verify altitude variation when this behaviour is not maintained.
As mentioned, it is possible to compare the angles (α) obtained from consecutive DSM cells, in a radial direction during the scanning process as shown in Figure 3. Observing this figure and considering the scan sequence at points A, B, C, D, E and F, the first point (A) is labelled initially as visible (yellow in visibility map at Figure 3).Continuing the sequence, point B is observed and it is clear that α B is higher than α A , then point B is also assigned as visible.The same analysis must be performed for all points.However, for point D, its angle (α D ) has a decreasing value when compared with α C where α D < α C .It shows that the angle characteristic is not preserved, so this is a non-visible cell (occluded).Looking at point E, in the same sequence, its angle (α E ) is compared with the last visible (α C ) and in this case it is greater than α C , so the visible label is assigned to point E.This process is repeated for all points in this line and for all DSM and image domain.
International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-1/W1, ISPRS Hannover Workshop 2013, 21 -24 May 2013, Hannover, Germany Figure 3. Usage of α angle for visibility map creation.Adapted from (Habib et al., 2007).This is the principle for occlusion detection using the anglebased method.There are different variations for DSM scan, as can be seen in (Habib et al., 2007): Adaptive Radial Sweep Method and Spiral Sweep Method.The utilization of this metric (angles comparison) eliminates the problems from Z-buffer method.

Projective Method
Other methodology, discussed in Volotão (2001) and Wang and Xie (2012), for example, is based on the use of building roof edges projection to detect occlusion areas.To realize this, the use of a Digital Build Model (DBM) is necessary.This projection is obtained by using the collinearity equations (Equations 2 and 3, Section 2.2).
This methodology needs initially a DBM to detect the occlusion areas.This model is created by identifying and labelling each part of the building: wall, terrain and roof.After this labelling it is possible to determine which points or planes are occluded, aiming the occlusion area detection.
The use of a DBM guarantees a high data consistency, though it is a model that requires a certain work to create it in a preprocessing stage.A specific condition is necessary for the projection of DBM points into a plane: the point must be an intersection between wall and roof to be projected, in other words, this point must be a roof edge.This condition guarantees that all projected points are really a roof edge element.As examples of some works in which this method is considered we mention (Biasion et al, 2004;Zhou e Xie, 2006;and Chen et al., 2007).
The plane where the primitives are projected is not always the real relief.Considering this fact, it is essential to determine coordinates using the DSM, which can be done iteratively by using the same procedure that is used in the mono-plotting system (Radwan and Makarovic, 1980).

GRADIENT BASED METHOD FOR OCCLUSION DETECTION
The general idea of the proposed method is presented in this section.The method uses height gradients for each point in the surface (represented by the DSM) as the metric for occlusion detection.Preliminary results and analysis can be observed in Oliveira and Galo ( 2013)

Principle of the DSM scan
The DSM related to the area of interest was divided in 4 triangular portions.Each side of DSM is a triangle (Figure 5), and a group of cells is identified for each DSM cell of the four sides (yellow in Figure 5) that best represents a straight line between this cell and the cell that receives the projection of perspective centre -PC' (red in Figure 5).Thus, fixing PC' and scanning all side cells, all radial cells are obtained for this direction.A group of cells (grey in Figure 5) is selected for each direction and respective pixels in the image.This selection is done by using Bresenham's algorithm (Rogers, 1985).These selected elements in the straight line are used for the height gradient computation that can be used for the occlusion detection.Figure 5 shows one of these radial directions.The scan is done using the PC' (fixedred) as the initial point and a cell localized at the end of radial direction (yellow) as the last.It ensures that the algorithm is executable 2*(m+n-2) times, where m and n are the amount of cells in each side of the rectangular domain defined by the DSM.
From the fact that the LiDAR data set is composed by irregularly sampled points, the use of an interpolation process is necessary to create a regular grid (DSM).For this interpolation, the LAStools (Isenburg, 2012) library was used.This library is free and has a lot of functions for manipulation of LiDAR data in ".LAS" format.In the interpolation module, this library creates a triangular irregular network (TIN) with the LiDAR points using the Delaunay method.From this TIN structure, for each point of the domain space, i.e., for each cell centre of the GRID, one linear interpolation is done to obtain the height.

Principle of the method
The occlusion detection is based on the height gradients, as mentioned above.Considering that the radial direction and its elements had already been identified (called "line").Each element of this group of points, or in this line, has planialtimetric coordinates from a DSM stored in a matrix structure.Figure 6 shows one of these lines for certain radial direction, where the first is the central element (PC' -red) and the final is the yellow point.The grey elements complete the dataset necessary to apply the method.All cells of a certain radial direction to be analysed have their "Z" component stored, so a profile of this direction is used.
Assuming that this profile is composed of n cells where each has an altitude Z i , with i = {1, 2, ...., n-1, n}, it is possible to determine the height gradient ∂Z/∂r in the radial direction, using the following equations: where r i is the cell position at the vector obtained by Bresenham's algorithm.
Figure 7 shows a hypothetical profile and the respective gradient vector, where there is only one building at the radial direction.The height gradient signal is shown at the same figure.The positive and negative signals are represented by the blue and red colours, respectively.It is important to notice, from Figure 7, that the negative gradients (in red) correspond to the beginning of occlusion areas, as discussed in the following.
Areas whose density of buildings is high can generate some undesirable effects due to different factors: the density of points of DSM, interpolation method, and noises inherent to the DSM acquisition method, for example.All of these effects may induce error in the height gradients.One of these effects, for example, is near the walls of tall buildings, i.e., in the case of interpolation to generate a regular grid, if the immediate neighbours are at one point on the top of one building while the other is on the ground, the interpolate point will be one false point representing the wall of the buildings.The creation of false points may affect the quality of the height gradients that is the metric for occlusion detection in this method.Therefore, for this application, the use of an interpolator that keeps the original values is ideal.
Once the vector containing the gradient signals has been created, it is possible to determine the occlusion areas, bearing in mind that negative gradients indicate the beginning of these areas (red cells in Figure 7 and 8).If the position of these points is known, as well as the exterior orientation parameters (EOP) and also the inner orientation parameters (IOP) of the camera, it is possible to find the position of the corresponding point in the image space (x a , y a ) that represent the point in the DSM cell where the occlusion begins for a given radial direction.With this image location defined, the height gradient value is subtracted from the "Z" component of DSM cell (A in Figure 8), being possible to locate the end of the occlusion area (cell B'), considering a plane surface by using the inverse of collinearity equation.Figure 8 presents the essential elements for this development.
Figure 8. Geometry of the treated problem showing the camera, DSM, visibility map and occlusion limits for one radial direction.
Initially, the coordinates of the image point 'a' are determined using direct collinearity equation (Equation 2), where the rotation matrix M is obtained by the attitude angles determined from the triangulation process or directed determined by one IMU (Inertial Measurement Unit) during the image acquisition.
where f -focal length of the camera; -image coordinates of the point A; -elements of the rotation matrix M; -three-dimensional coordinates on DSM; -three-dimensional coordinates of PC.
The coordinates (X B ', Y B ') of the point B' are determined by the image coordinate obtained previously, using the inverse International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-1/W1, ISPRS Hannover Workshop 2013, 21 -24 May 2013, Hannover, Germany collinearity equation (Equation 3).The initial altitude applied is Z C .This altitude is obtained by: , where Z A is the altitude related to the beginning of occlusion point (A) and the height gradient at point A. In this way the planimetric coordinates of point B' are calculated, in the same radial line as point A, but with altitude (Z B ') different than the real end of the occlusion (Z B ).The calculation of the Z coordinate of the end of occlusion is done using an iterative process, as well as in the mono-plotting system, as mentioned before.As a result, the planimetric coordinates of point B (correct end of occlusion line) are obtained by inverse collinearity equation.
Once the convergence of the iterative process has been achieved, the beginning and end of the occlusion line are stored.
Basically, the pixels located between these two stored points for each radial direction are labelled as belonging to the occluded areas, so the occlusion line is defined at the visibility map.

EXPERIMENTS AND DISCUSSION
The analysis of the proposed method was done considering simulated and real data.First, to validate the proposed method, a simulated data set was used.A grid with 1.000.000(one million) points was created, considering a GSD (Ground Sample Distance) of around 1m.This grid contains the representation of 9 simple buildings, above a plane area, as done in (Habib et al., 2007) and shown in Figure1.In this case, the PC' is located at the middle of the central building.Applying the proposed method for this simulated data, the following results (Figure 10) were obtained.The red pixels represent the negative gradients (beginning of occlusion) and the blues ones are related to positive gradients, both always in radial direction.In Figure 10  The results achieved using a simulated data set was useful to validate the proposed method.This dataset was created as an ideal scene, where the "LiDAR" points represent just roof and terrain.The functionality of the method can be seen by the coherence of the results.The indicator of the quality can be obtained from the completeness (Wiedemann et al., 1998).In this case a completeness of 100% was achieved that indicates complete occlusion detection.
For the experiments with real data, a pair of digital images with an average scale of 1/10.000 and GDS (Ground Sample Distance) of around 7cm were used.The LiDAR data has an average density of 8 points/m 2 .
The real data (LiDAR) has geometric inconsistencies mainly at edge of the buildings, different from the simulated data.It causes some false height gradients and the roof edge rectification is not perfect.The use of false positive gradients does not allow the labelling of real occluded areas; consequently this portion is not projected at the terrain or in the image, for example.So, the expected completeness of the occlusion estimated for the experiments with real data is not 100%.
Due to this false labelling of gradients, three parameters were introduced to refine the results of the method.The first was the gap restricting the usage of only gradients higher than a certain threshold (gap) in the projection process.This allows just the consideration of roof tops, unlike low structures, such as cars, walls, floor houses, etc.
To avoid false gradient identification, a filtering of these elements was realized.This was done by a process of smoothing LiDAR data representing roof edges.For each gradient identified, where , the altitude of NV neighbour cells, before and after this point, in radial direction, is verified.This verification is done by σ NV (the standard deviation) of these two groups of NV cells (before and after the height gradient cell).If both values are between a threshold σ NV defined a priori, the consideration of a real gradient is done for this cell, otherwise not.

CONCLUSION
A fundamental aspect for true orthophoto generation is occlusion detection.This article proposes an alternative method based on height gradients from LiDAR data, for occlusion detection that can be used for true orthophoto generation.The mean value of completeness for both buildings shown in the experiments with real data was around 85%. Analysing this, besides a visual analysis of the results, the potential of the proposed method is notable, although some improvements must be done, such as multiple occlusion detection, for example.

Figure 5 .
Figure 5. Example of one radial scan generated by Bresenham's algorithm.

Figure 7 .
Figure 7. Profile of a radial direction, including altitude elements and height gradients.

Figure 9 .
Figure 9. Simulated LiDAR dataset representation for the tests.
Figure 10.(a) Gradient map with primitives projected.(b)Visibility map with occlusion areas.

Figures
Figures 11 and 12 present some results obtained for two buildings.These buildings were located in different image positions and also in different images.In both figures the sequence of the results, for each building, are: (a) original image of the building; (b) double mapping due to the use of a DSM in the orthoretification process; (c) gradient mapalready filtered as described before, where gap=30m, NV=20pixels and σ NV =0.2m;(d) end occlusion point (black pixels) projected using the proposed method; (e) filling the occlusion lines, for each radial direction; and (f) the automatic

Figure 11 .
Figure 11.Sequence for occlusion detection considering building A.

Figure 12 .
Figure 12.Sequence for occlusion detection considering building B.It is possible to observe in Figures11(e) and 12(e) that some occlusion areas were not detected due to some problem in the previous step.Despite this problem, after filling the gaps between successive radial lines, the final results are show in (f).Although some problems are observed, the results shown in Figures11(f) and 12(f) are visually coherent, aiming an average completeness of around 85% for these two buildings.