CHARACTERIZATION AND DETECTION OF BUILDING PATTERNS