## 1 Introduction  
Regional seismic vulnerability assessment of school buildings can provide civil-protection agencies with information crucial to optimal emergency planning and mitigation, including projections of the scale and distribution of building damages. Semi-empirical methods, which evaluate the seismic vulnerability of buildings based on a small range of building attributes selected by experts coupled with data-mining techniques, have proved its efficiency in rapidly assessing the seismic vulnerabilities of buildings at a large scale [1,2]. These building attributes include the number and sizes of structural elements (e.g., columns and walls), building heights, structural deficiencies (e.g., short columns and soft-stories), and so forth. However, existing data on building attributes at a regional scale are often incomplete or dispersed (e.g., available only as paper records spanning a number of bureaucratic departments), imposing limits on the effectiveness of vulnerability assessment [3]. Collecting such data anew, meanwhile, is costly, time-consuming, and expert-dependent because the traditional visual-screening approach to do so involves paper-based field surveys carried out by structural experts or certified engineers [4]. Moreover, human errors like mistaking the number of structural elements during field survey are commonplace, and such errors can reduce the reliability and accuracy of assessment results.  
To overcome the limitations of field survey, computer vision technologies have been applied to data collection on building characteristics [5; 6; 7; 8; 9; 10]. As columns and walls are basic load-bearing elements relevant to buildings' seismic vulnerability, automatic recognition of columns and walls could provide important information for seismic vulnerability assessment of buildings. Previous research on the automated detection of columns commonly uses color/texture and shape features to recognize concrete columns because such columns are considered to be rectangular in shape with familiar color and texture on surfaces [11; 12; 13]. However, the color/texture-based detection techniques are unable to cope with the structural elements covered in unknown types of paint, tiling, or other surface treatments, which is common for school building columns, and the shape-based detection methods fail to work if structural elements deflect in images resulting from camera tilting or perspective illusion. Meanwhile, automated detection of walls using computer version technologies is still a lack of study.  
This article reports on an innovative study that utilizes the gray-level histogram (GLH) statistical features and shape features, without relying on detecting familiar colors and surface materials or fixed shapes, to overcome the drawbacks of present automatic detection methods for columns and walls. Moreover, in the view of the practical application of the proposed method, every single person who can take images by their smartphones, cameras, or other devices should be able to collect information of columns and walls, with the images processed on personal computers, local devices, or cloud computing. With this in mind, the proposed method is based on a single image, without any technical requirements for image acquisition. Although this paper focuses on detecting and counting columns and walls in images, the proposed automatic detection method can be further extended to the detection of a wide range of structural elements' characteristics (e.g., sizes and surface defects) and structural deficiencies (e.g., short columns and soft stories), promoting the automation in building data collection.