## 3 Methodology
### Fuzzy Image Classification
#### Building Classification  
The specification for buildings in VHRSI is that buildings are typically rectangular shaped (mostly square shaped) objects with an elevation above the ground. These specifications are going to be used for building detection in this part. In this study 4 parameters are used for building detection: Rectangular Fit, Elliptic Fit, Area, and Shadow Neighborhood, which are explained in this section. **Rectangular Fit and Elliptic Fit:** Rectangular Fit parameter describes how well an image object fits into a rectangle of similar size and proportions, while The Elliptic Fit feature describes how well an image object fits into an ellipse of similar size and proportions. They both range from 0 to 1, 0 meaning no fit and 1 meaning perfect fit [28]. Having assessed the different building related image segments in this project, it is inferred that buildings have high similarities to rectangular shapes (Figure 10a shows some typical buildings). Typically, buildings are square shaped which have a quite high Rectangular Fit and fairly high Elliptic Fit (not as high as circles). Therefore, Rectangular Fit and Elliptic Fit parameters can assist in building identification. If elliptic fit is omitted from the process, then elongated features which have rectangular shapes will also be miss-classified as buildings. Thus, both of the parameters must be used for building detection, simultaneously. Figure 7 shows _high_ fuzzy membership for Rectangular Fit as well as _fairly high_ fuzzy membership of Elliptic Fit; high elliptic fit is used for round about detection in Section 3.2.5. The fuzzy set equations related to the _high_ lingual value for rectangular fit are presented in Equation (12). \[\mu_{R}(x)= \begin{cases}1-\dfrac{1-x}{1-T},&\text{ for }0\leq x-T\leq 1-T\\ 0,&\text{ otherwise}\end{cases}  \tag{12}\]  
In addition, 2 fuzzy sets of elliptic fit for high and fairly high lingual values are presented in Equation (13) and (14). _fairly high_ elliptic fit:  
\[\mu_{EF}(x)= \begin{cases}1-\dfrac{T_{2}-x}{T_{2}-T_{1}},&\text{ for }0\leq T_{2}-x\leq T_{2}-T_{1}\\ 1-\dfrac{x-T_{2}}{1-T_{2}},&\text{ for }0\leq x-T_{2}\leq 1-T_{2}\\ 0,&\text{ otherwise}\end{cases}  \tag{13}\]  
_high_ elliptic fit:  
\[\mu_{EF}(x)= \begin{cases}1-\dfrac{1-x}{1-T_{2}},&\text{ }for \ 0\leq x-T_{2}\leq 1-T_{2}\\ 0,&\text{ }otherwise\end{cases}  \tag{14}\]  
**Shadow Neighborhood**: Using just Rectangular Fit and Elliptic fit for building detection, still, there might be parcels of bare land or any other classes which have approximately square shapes to be miss-classified as building reducing the classification accuracy. Therefore, there must be another parameter to extract buildings out of them. Here, shadows are of great importance. Considering the height of the building and Azimuth angle of sun at the time of exposure, a shadow with specific length and direction should be visible beside buildings. Figure 7: Fuzzy function for: (**a**) Rectangular Fit; (**b**) Elliptic Fit. The direction of the shadow depends on the azimuth angle of sun at the time of image capturing. Figure 8 shows how azimuth angle of sun specifies the direction of shadow. Depending on the orientation of building, shadow is formed in the side A (in Figure 8, western side), side B (in Figure 8, southern side) or both. Therefore, whatever the sun azimuth angle is, the shadow of the building is formed in the opposite direction (in this research southern and/or western direction). **Area:** Other than shape and shadow neighborhood in proper direction, buildings have another specification which is their area. In order to not misclassify other rectangular shaped features, such as vehicles, as building, the area limitation must also be considered.