NivaarExam PrepOfficial exam papers ↗

20-Bio-B4 Robotics · May 2015

Question 6 of 6: Application — Rooftop Area from Aerial Imagery

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format: National Exams, May 2015 — 04-Bio-B4 Image Processing. Three hours, open book (any paper notes or textbooks permitted, but no calculator or computer). Six questions of equal value (20 marks each); five constitute a complete paper and only the first five appearing in the answer book are marked. All six are solved here, because this set is a study resource rather than an examination script. Every question is essay/descriptive (definitions, algorithm design, system design); the only quantitative content is the computational-complexity discussion in Question 3(f)/(g).

Reference texts (the books a candidate should have reviewed for this subject):

Question 6: Application — Rooftop Area from Aerial Imagery (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

The imagery gives only true-colour RGB at 10 cm ground sample distance (no near-infrared band), acquired near noon in summer specifically to minimize shadow and keep lawns visibly green — both facts are exploited directly below. The strategy proceeds by successively removing what is not roof, then extracting what remains.

1. Pre-processing

Radiometrically normalize/mosaic the tiled imagery (correcting seam brightness differences between flight strips) and convert to HSV, since colour-based masking in the following steps is more robust in a space that separates brightness from hue than in raw RGB.

2. Vegetation masking

Because the scene is summer daytime with green lawns and no NIR band is available, compute an RGB-only vegetation index such as excess-green $\text{ExG} = 2G - R - B$ and threshold it to mask out lawns, trees, and other green vegetation. Doing this first removes the largest single source of false positives before any roof-specific processing runs.

3. Shadow masking

Even with shadows minimized by the noon/summer acquisition, some residual shadow remains near taller structures and trees. Flag likely shadow pixels via a low-intensity + low-saturation heuristic (or a shadow-specific hue/intensity ratio) and exclude them from direct classification; a small amount of shadow falling across the edge of an otherwise-classified roof polygon is recovered later by the morphological closing in step 5, rather than by trying to classify the dark pixels themselves.

4. Impervious-surface classification

Classify the remaining (non-vegetation, non-shadow) pixels into roofing-material classes using colour and local-texture features — asphalt shingle (dark grey, low texture variance), metal roof (bright, specular highlights), clay tile (reddish hue) — via unsupervised clustering (k-means in a colour+texture feature space) or a classifier trained on a small set of labelled roof/road/parking-lot samples, since roads and parking lots share intensity and colour statistics with some roofing materials and cannot be separated by colour alone.

5. Road/pavement removal and building extraction

Roads and driveways form long, thin, low-curvature connected networks, quite unlike the compact, roughly rectilinear footprint of a building; detect and subtract them using a linear structuring-element/Hough-based shape test (or, more practically for a city geography department, by overlaying an existing municipal road-network GIS layer if one is available). Run connected-component labelling on what remains of the impervious mask, keep components above a minimum area with a compact aspect ratio, and apply a morphological closing to merge a roof fragmented by rooftop equipment, skylights, or the small shadow gaps from step 3.

6. Boundary refinement (optional)

Because real roof edges are straight, an edge-detection or Hough-line pass on each retained blob's boundary — or a polygon-fitting/corner-regularization step — can snap the raw connected-component mask to a cleaner rectilinear footprint, improving the area estimate over the raw pixel-count boundary.

7. Area computation and validation

Convert each retained connected component's pixel count to area using the known ground sample distance, $0.1\,\text{m} \times 0.1\,\text{m} = 0.01\,\text{m}^2$ per pixel, and sum over every detected building footprint city-wide for the total rooftop area (and, per-building, for the photovoltaic-potential assessment the mayor asked for). Finally, validate a random sample of extracted footprints against any existing GIS building-footprint layer or a small ground-truth survey subset, and report the resulting accuracy/error estimate alongside the total — presenting an automated estimate without a validated error bound would not give the mayor's office a defensible number.

Block-diagram summary: RGB tiles → radiometric normalize + HSV convert → vegetation mask (ExG) → shadow mask → roofing-material classification → road/pavement removal (shape or GIS overlay) → connected-component + shape/size filter → morphological closing → (optional) boundary regularization → area = pixel count × GSD$^2$ → validate against ground truth/GIS → report total + accuracy estimate.

Check: assumes only true-colour RGB imagery is available (no NIR band), so vegetation masking relies on an RGB-only index (ExG) rather than the more standard NDVI; also assumes the noon/summer/minimal-shadow condition holds reasonably uniformly across the whole city mosaic, though large-area flights can still have local cloud-shadow or self-shadow variation that would need locally adaptive (not one global) shadow and vegetation thresholds.
Back to the paper →