Buildings Extraction from Imagery based on Contextual Information and Mathematical Morphology

Buildings Extraction from Imagery based on Contextual Information and Mathematical Morphology

Z. Nougrara K. Hachemi

Department of Mathematics, University of Science and Technology, U.S.T.O-MB, BP 1505, El M’naouer, 31000 Oran, Algeria

LGP, CNRS Bellevue, Meudon, University Paris-Est, University Paris1-Panthéon-Sorbonne. UMR CNRS 8591- Laboratory of Physical Geography. 1 Place Aristide Briand, 92195 Meudon Cedex, France

Corresponding Author Email:
6 June 2019
| |
25 September 2019
| | Citation



Buildings extraction is an important task for various applications such as update of geodata, management of industrial and natural risks, management of urban and territorial projects, etc. This paper presents a new method for extraction of buildings from different types of imagery. Our methodology is based on three steps: The first one is the use of image contextual information; it concerns the definition of a building like as homogeneous building elements which form a set of linear segments; these segments give a polygon characterized by a surface and a perimeter. The second one is the integration of an optimization process for the extraction of buildings; it is used to formulate the buildings extraction problem as a problem of optimization of an objective function, and the use of mathematical morphology to obtain the final results. The last step is to improve the reliability of the obtained results by the use of registration principle and the surface and the perimeter calculations; they permit quality and quantitative evaluations. The experimental results acquired are generally competitive compared to some existing methods.


building extraction, imagery, contextual information, mathematical morphology

1. Introduction

Given the importance and interest of building extraction in many applications (management of natural and industrial risks, etc.), several works with several methods have emerged for several years. For instance, an automated building extraction strategy has been proposed which uses structural, contextual and spectral information and applied to high resolution satellite imagery [1]. An approach that has been presented is developed to deal with the evolution of an active contour model initialization algorithm [2] and [3]. A new method for buildings extraction based on binary mathematical morphology operators has been introduced for very high resolution remotely sensed images [4]. A novel framework for reliable and accurate building extraction from high-resolution color imagery focusing on building boundary delineation and building roof compositional polygon segmentation has been proposed [5]. A study that has been presented compares different methods for the evaluation of building detection algorithms [6]. A comparison of the evaluation techniques shows that they highlight different properties of the building detection results. As a consequence, a comprehensive evaluation strategy involving quality metrics derived by different methods is proposed. Another study has been proposed for the automatic extraction of the rectangular and circular shaped buildings from high resolution satellite imagery using Hough transform [7]. Another research work has been presented that its main objective is to develop a complete semi-automatic processing chain, able to provide a simple and reliable reconstruction of buildings on the scene, from a specific configuration of the input data, composed of an optical image and a SAR image, and from a digital terrain model DTM [8]. The morphological building index MBI is a recently developed approach for automatic indication of buildings in high-resolution imagery. In fact, a systematic framework for building extraction from high-resolution imagery which is aiming to alleviate both commission and omission errors for the original MBI algorithm has been proposed [9]. An automatic building extraction approach using object-based classification and shadow information in very high resolution multispectral images applied to Tetuan city Morocco has been developed [10]. A method that concerns an automatic and threshold-free evaluation system and offers robust object-based evaluation of building extraction techniques has been introduced [11]. Another method has been developed for automatic building extraction uses a rule-based classification method with a multi-sensor system that includes light detection and ranging (LiDAR), a digital camera, and a GPS/IMU positioned on the same platform [12]. The LiDAR data (elevation and intensity) and ortho-image are used to develop a rule set defined by parameter analyses during the segmentation and fuzzy classification processes to improve the building extraction results. A study that has been presented is based on distinctive image primitives such as lines and line intersections to conduct building extraction [13]. Another study uses the integration of support vector machine classification, Hough transformation and perceptual grouping to extract building from high resolution optical space borne images [14]. A research work has been proposed to present a parameter mining approach to mine parameter information for building extraction and detect changes of buildings between very high resolution imagery and GIS data [15]. The building extraction post processing Framework has been presented to describe the characteristics of buildings by simultaneously considering the spectral, geometrical, and contextual information and can be successfully applied to large high-spatial-resolution images [16]. Building maps has been generated for the United States by a proposed CNN Convolutional Neural Network model which fits the need of building extraction at scale [17]. A dense-attention network has been presented for 2D building extraction in Very High Resolution images [18]. The dense-attention network contained an encoder part and a decoder part, which can guide message passing between high-and low-feature maps. Another work has been proposed which presents a method combining Mask R-CNN with building boundary regularization to produce regularized polygons useful in numerous cartographic and engineering applications [19]. Finally a generative adversarial network has been proposed with spatial and channel attention mechanisms (GAN-SCA) for the robust segmentation of buildings in remote sensing images [20].   

In this work, we introduce a new methodology to extract buildings from imagery. Our results show that the proposed method is beneficial in many applications especially in Geodata Update.

2. Methodology

The proposed methodology is inspired by our previous work [21]. To extract a building, the idea is based on the criterion that a building is defined by a polygon which is characterized by a surface and a perimeter. So, we want to reconstitute the shape of a closed curved object after its digitalization. To have this shape, we propose in this work a model to reconstruct linear structures taking account some parameters like radiometric, surface, state, textural component elements, etc. This model formulates the problem of building extraction as a problem of optimization of an objective function. To solve this problematic or difficult, we provide a new iterative optimization technique based on information theory and mathematical morphology.

Our extraction concept is to consider a building as a closed set of arcs; each arc is a set of lines; each line has a start and a final points; the final point becomes the start point of the following line. So, we start the extraction of a building by the detection of lines (delineate building edges). We have to calculate the probability of a line to be an element of the set of lines forming the polygon: if this probability is reasonably high the line is defined as a polygon segment. We need to obtain this probability value, information theory about local and global attributes (width, length, shape, etc.). Then all polygon segments are fused by morphology operator union. Finally the fusion of all extracted building images is supposed to correspond to the buildings in the test image. The obtained result depends on the image resolution and the applied algorithm.

The proposed algorithm is an iterative sequential process. It can better solve the problem of a building extraction in different cases of test images especially when these images are very blurred with many other objects like trees, water, vegetation, etc. This is due to the use of two concepts: (i) information theory and mathematical morphology and (ii) reasonable criterions. In order to carry out this work, we made the test on two images at different dates (2004 and 2006) of high resolution (1.01 x 0.99 meters) of the satellite OrbView3 of the region of Dar El Beïda in Morocco (Figure 1). Figure 2 represents main steps of the proposed algorithm to extract a set of buildings and figure 3 introduces major steps of an extracted building. 

Figure 1. Original images of the OrbView3 satellite in the Dar El Beïda region of Morocco, resolution (1.01 m x 0.99 m)

Top: image taken on 2004. Down: image taken on 2006

Figure 2. Main steps of the method

Figure 3. Work procedure of an extracted building

2.1 Algorithm of extraction

(1) To choose the region of interest of buildings that will be extracted; 

(2) To fix the number of these buildings; 

(3) For each building:

To select a start point of the building curve; 

To identify the set of pixel candidates (the homogeneous pixels); more details are provided in reference [21]; 

To partition the obtained image of homogeneous pixels in windows and compute the best line for each pair of windows that represents a linear segment [21];

To calculate the minimum of a cost function F that its parameters are two vectors X and Y representing the best configuration of windows and the likelihood of linear structure to guarantee a segment that is both homogeneous and piecewise linear [21]. This cost function $\mathbf{F}$ is: $F(X, Y)=$ $\sum_{c \in G} X_{c}\left(p-Y_{c}\right) \mathrm{p} \in[0,1]$;

c couple of windows and G is a graph of set of segments;

To minimize F is equivalent to maximize p; more details can be seen in reference [22]. 

To find the list of curve pixels that the two selected extremities are the selected start point, from the homogeneous pixels and belonging to the best configuration of windows. And to fit these points with a smooth curve; 

(4) To repeat the step (3) until the fixed number of buildings is reached;

(5) To use for example the paint software to obtain the extracted building with curve and surface;

(6) Application of the morphology operator union to have the final result of extracted buildings:

To browse all images of extracted buildings in parallel;

To examine all pixels; if pixels are white then result is the white pixel; if pixels are black then result is the black pixel and if one of them is white then result is the white pixel.

2.2 Algorithm of perimeter and surface calculations

The building is characterized by a perimeter and a surface. The calculation of these metrics is used to compare quantitatively the extracted buildings to the original buildings.

The perimeter is defined by the set of curve pixels. 

The surface is defined by the set of curve pixels and all pixels inside the curve.

3. Experimental and Evaluation Results

The results were qualitatively evaluated by visual inspection; quantitative evaluation was performed by computing perimeters and surfaces of extracted buildings. As examples, the following figure 4 show original and subsets of satellite image Morocco and their extracted results.

Figure 4. Small region of interest of figure 1 and its extracted building

The results were qualitatively evaluated by visual inspection by superposition of the extracted buildings (curve of buildings) on the tested image with the use of the morphological operator union. The figure 5 shows that the buildings were extracted with satisfactory accuracy.

Figure 5. Superposition of the curves of extracted buildings of figure 4 on the tested image

Quantitative evaluation was performed by computing perimeter and surface of each extracted building and comparing their values with real values of the land. The main objective of this proposed method is to update a map, which Figure 6 shows using a small region taken on different dates. The figure 7 presents the final result.

Figure 6. Small Region of interest taken from images of figure 4: the left image is taken on 2004 and the right on 2006

Figure 7. Extracted buildings from the right image in figure 6

Table 1 shows perimeter and surface of each building of figure 7.

Table 1. Values of perimeter an surface

Number of building

Perimeter (m)

Surface (m2)



















In discussion, by comparison to some existing methods concerning extraction of buildings from satellite images, our method can give satisfactory results due to the use of two criteria of evaluation: qualitative evaluation by application of the principle of visual inspection [22] and quantitative evaluation by calculation of perimeter and surface of each extracted building. The main drawback of our methodology is the use of some parameters which make it semi-automated approach; they must be changed in function of resolution of image.
4. Conclusion

We have proposed an approach for buildings extraction from satellite images based on information theory, mathematical morphology and qualitative and quantitative evaluations by visual inspection and by two main metrics, perimeter and surface calculation. The experimental results were generally competitive compared to some existing methods. On the other hand, we found difficulties to treat all the big images without segmenting them. So we plan in the future to develop the proposed algorithm to treat this case and other cases such as parameters which required some manual adjustments, with a combination of our approach with others in literature.

It is interesting to transform the images defined by digital coordinates into geographical coordinates to solve the update building map problem. In this paper we have treated the problem of extraction of buildings and we have calculated their morphomitrical parameters. We suggest in another work to treat geographical problem of buildings.


[1] Jin, X.Y., Curt, H.D. (2005). Automated building extraction from high-resolution satellite imagery in urban areas using structural, contextual, and spectral information. EURASIP Journal on Applied Signal Processing, 2196-2206.

[2] Mayunga, S.D., Zhang, Y.,Coleman, D. J. (2005, August). Semi-automatic building extraction utilizing Quickbird imagery. In Proc. ISPRS Workshop CMRT, 13: 1-136.

[3] Lau, B.T. (2006). Automatic building extraction from satellite imagery. Engineering Letters, pp. 1-5,

[4] Lefevre, S., Weber, J., Sheeren, D. (2007). Automatic building extraction in VHR images using advanced morphological operators. IEEE/ISPRS Joint Workshop on Remote Sensing and Data Fusion over Urban Areas (URBAN), Paris, pp. 1-5.

[5] Song, Y., Shan, J. (2008). Building extraction from high resolution color imagery based on edge flow driven active contour and JSEG. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 37: 185-190.

[6] Rutzinger, M., Rottensteiner, F., Pfeifer, N. (2009). A comparison of evaluation techniques for building extraction from airborne Laser scanning. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2(1): 11-20. https://doi.org10.1109/jstars.2009.2012488

[7] San, D.K., Turker, M. (2010). Building extraction from high resolution satellite images using hough transform. International Archives of the Photogrammetry, Remote Sensing and Spatial Information Science, Kyoto Japan, 1063-1068.

[8] Sportouche, H. (2011). Extraction and reconstruction of buildings in urban areas from high resolution optical and radar satellite images. Thesis, HAL Id: pastel-00564891, pp. 1-197.

[9] Huang, X., Zhang, L. (2012). Morphological building/shadow index for building extraction from high-resolution imagery over urban areas. Article, IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 5(1): 161-172.

[10] Benarchid, O., Raissouni, N., El Adib, S., Abbous, A., Azyat, A., Achhab, N. B., Chahboun, A. (2013). Building extraction using object-based classification and shadow information in very high resolution multispectral images, a case study: Tetuan, Morocco. Canadian Journal on Image Processing and Computer Vision, 4(1): 1-8.

[11] Uzar, M. (2014). Automatic building extraction with multi-sensor data using rule-based classification. Article, European Journal of Remote Sensing, 47(1): 1-18.

[12] Awrangjeb, M., Fraser, C.S. (2014). An automatic and threshold-free performance evaluation system for building extraction techniques from airborne LIDAR Data. Article, IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 1-15.

[13] Wang, J., Yang, X., Qin, X., Ye, X., Qin, Q. (2014). An efficient approach for automatic rectangular building extraction from very high resolution optical satellite imagery. IEEE Geoscience and Remote Sensing Letters, 12(3), 487-491.

[14] Turker, M., Koc-San, D. (2015). Building extraction from high-resolution optical space borne images using the integration of support vector machine SVM classification, hough transformation and perceptual grouping. Article, International Journal of Applied Earth Observation and Geoinformation, 34: 58-69.

[15] Guo, Z., Du, S. (2017). Mining parameter information for building extraction and change detection with very high-resolution imagery and GIS data. GIScience & Remote Sensing, 54(1): 38-63. 10.1080/15481603.2016.1250328

[16] Huang, X., Yuan, W., Li, J., Zhang, L. (2016). A new building extraction postprocessing framework for high-spatial-resolution remote-sensing imagery. IEEE Journal

of Selected Topics in Applied Earth Observations and Remote Sensing, 10(2), 654-668.

[17] Yang, H.L., Yuan, J., Lunga, D., Laverdiere, M., Rose, A., Bhaduri, B. (2018). Building extraction at scale using convolutional neural network: Mapping of the united states. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 11(8): 2600-2614.

[18] Yang, H., Wu, P., Yao, X., Wu, Y., Wang, B., Xu, Y. (2018). Building extraction in very high resolution imagery by dense-attention networks. Remote Sensing, 10(11), 1768.

[19] Zhao, K., Kang, J., Jung, J., Sohn, G. (2018). Building extraction from satellite images using mask R-CNN with building boundary regularization. CVPR workshop paper, CVF Computer Vision Foundation, pp. 247-251.

[20] Pan, X., Yang, F., Gao, L., Chen, Z., Zhang, B., Fan, H., Ren, J. (2019). Building extraction from high-resolution aerial imagery using a generative adversarial network with spatial and channel attention mechanisms. Remote Sensing, 11(8), 917.

[21] Nougrara, Z., Benyettou, A., Abdellaoui, A., Bachari, N. I. (2011). Development of georeferenced data base of an extracted road network and its nodes from satellite imagery over Algeria sites. J. Adv. Model. Simul. Tech. Enterp. Sig. Process. Pattern Recogn, 54: 1-13.

[22] Nougrara, Z. (2015). Towards robust analysis of satellite images of algeria: Application to road network and its nodes extraction. AMSE Journals-2015-Series: Advances B, 58(1): 53-66.