In: Wagner W., Székely, B. (eds.): ISPRS TC VII Symposium - 100 Years ISPRS, Vienna, Austria, July 5-7, 2010, IAPRS, Vol. XXXVIII, Part 7B
543
out of this window to deal only with candidate building edges
and to decrease the number of unnecessary edges. From these
edges, the rectangle that represents the building is reconstructed.
For each possible building location, we put an initial virtual box
on (xb, Vb) coordinate with 9 = 0 angle. Here, 9 is the slope of
the rectangle. Then, the edges belonging to the virtual box are
swept outwards, until they hit to building edges. After our vir
tual box stops growing, we calculate the energy Eq. The energy
of the detected box shape is defined as the sum of minimum dis
tance between virtual building edge pixels and real building edge
pixels in perpendicular direction as given below;
Ee = 'Y^min(sqrt((x v {i)-x e (j)) 2 -(y v {i)-y e (j)) 2 )) (1)
i= 1
Here, Ee is the calculated energy in 9 direction. (x v (i),y v (i))
represent coordinates for ith pixel on the edges of the virtual box
shape. (x e (j),y e (j)) represents the yth pixel on the real build
ing edges. For same seed-point, we put an initial virtual box and
start growing again for all 9 e [0,7r/6,7r/3, tt/2, 27t/3, 27r]
angles. As we increase step sizes here, we can obtain more ac
curate approximations, however we need more computation time.
After calculating Ee for 9 & [0,7r/6, n/3, 7t/2, 27t/3, ..., 2-7t] an
gles, we pick the estimated box which has smallest Ee energy as
detected building shape. Since buildings are generally in rect
angular shapes, it makes sense to extract rectangular shapes on
buildings. Main advantage of using Box-Fitting approach is that
approximate building shape still can be found even the building
edges are not well-determined, or even if there is not a closed
shape. However, other region growing algorithms fail to extract
an object shape in these cases.
In Fig. 2, we represent our original Jeddai sample image, and
B(x,y) binary image which holds detected approximate build
ing shapes. As one outcome of using the Box-Fitting approach,
we can reject some false seed-points if the virtual box can not
converge to a shape in this region. We also reject the detected
box-shape if its area is very small (less than 100 pixels), or if its
area is very large (more than 5000 pixels) since it can not repre
sent a real building considering image resolutions. As a result,
we also verify building appearance using Box-Fitting algorithm.
In the next part, we use detected approximate building shapes to
refine the DEM.
(a) (b)
Figure 2: (a) Original Jeddai test image, (b) Detected approxi
mate shapes using box-fitting approach (B{x, y) binary image).
4 ENHANCING BUILDING SHAPES IN DEM
After finding approximate building shapes from the panchromatic
satellite image, we try to enhance DEM data using this informa
tion. For this purpose, we first calculate gradient magnitudes in
DEM to investigate discontinuities. To find gradient magnitudes,
we use smoothed gradient filters in x and y directions as below,
9x{x,y) = ~exp(- X 2 ^2~~) (2)
2 I 2
, \ ~y , x +y ^
9y\ x i V) = 2~ ex P( 20*—' 3
where a is the smoothing parameter and equal to 0.5. Although
our method is fairly robust to this parameter, one may need to
adjust it according to the resolution of DEM. We calculate the
smoothed gradients for the DEM data E(x, y) as,
E x (x, y) = g x (x,y) * E(x,y)
(4)
E y {x, y) = g y (x, y) * E(x, y)
(5)
where * stands for a two-dimensional convolution operation. We
calculate gradient magnitudes of image as,
G(x, y) = \f E x (x,y) 2 + E y (x, y) 2 (6)
If a pixel in G(x, y) has a higher value than td, we assume there
is a significant discontinuity. Here, td threshold value is obtained
by Otsu’s automatic thresholding approach (Otsu, 1979). After
detecting significant discontinuities in the DEM, we pick each
rectangle and investigate the corresponding region. If there are
discontinuities in the DEM pixels where rectangle have edges,
we assume the inside of this rectangle as a building rooftop. In
order to eliminate noise that appears on building rooftops, we cal
culate only one height for each rectangular building. To calculate
an approximate building heights, we pick DEM values which are
inside of the detected rectangular region and calculate their mean
value. Then we set each pixel, which exists inside of the rectan
gular region, to the calculated mean value. As a result, we have
only one height value for each detected building. In the Experi
mental Results section, we analyze effects of choosing mean and
median of DEM values as a building height.
We assume that there may be buildings in the DEM which are
missed in previous building detection and shape approximation
steps. Therefore, after removing reconstructed building pixels
from DEM we make a post-analysis on it. If there are regions
with high values for a large area, we assume that they can be
missed buildings and insert them to our final result after smooth
ing their DEM values with a [9 x 9] size median filter to remove
the noise on DEM. We picked this median filter window size af
ter extensive tests on our test image dataset. If window size is
chosen larger, this post-processed buildings will have smoother
edges. On the other hand, if window size is chosen smaller, me
dian filtering process can not be adequate to remove noise within
DEM. In this post-analysis, if a region has very high value (more
than 40 meters) we remove this region from DEM since it can not
represent a building. In this way, we also eliminate errors in the
DEM which occur because of stereo image matching errors in the
DEM generation process.
5 EXPERIMENTAL RESULTS
To test the performance of our proposed method, we use a test im
age data set of Jedda city. We use DEM which is generated from