Keywords

1 Introduction

Every now and then telluric events of different magnitudes take place around the world, causing minor or severe damage to the structures of buildings. Over time, several forms, methodologies and procedures have appeared to approach the reconstruction of these structures and respond satisfactorily in the presence of possible future seismic events [1,2,3].

Among the different issues that this kind of natural phenomenon can cause there exists: presence of cracks, crevices or the complete collapse of the building. For this reason, damages originated in the structures are considered one of the main problems that a building can suffer; this is due to the great impact that an earthquake has worldwide.

This research aims to contribute to the knowledge and evaluation of the damages caused by the magnitude 7.8 earthquake that occurred in the coastal zone of Ecuador, in terms of loss of life, housing and especially the structural damage suffered by the different buildings of the University of Guayaquil (UG). The results arise from the integration of information sources of different nature and are presented in disaggregated form with the purpose of complementing existing information as a support to the decision making for the experts [6,7,8,9]. It is important to note that this type of records are useful to identify the vulnerabilities of the buildings and the degree of risk that they represent to the human resource who work in the educational institution (authorities, administrative personnel, service personnel, teachers and students), to efficiently plan the use of contingency measures in the advent of this type of natural phenomenon [6, 10, 11].

The purpose of this document is to study the seismic vulnerability of the buildings of the UG through image segmentation; a technique that has managed to characterize a series of problems caused by natural phenomena. This paper, as well as it related work, has allowed the study of the different segmentation techniques which provide measurable results to enhance decision making. Among the techniques to be tested, the following are proposed: Prewitt Operator, Sobel Operator, Canny Edge Detection, Mean Filter, and the Gaussian filter.

Based on the foregoing, a curve of maximum accelerations is identified for the earthquake under study and then compared to a curve resulting from the prediction of 13 attenuation curves with respect to distance. The attenuation laws which are closer to the recorded accelerations are identified, as well as the most conservative curves, the relative error and the ranges in which they are more efficient. To fulfill the project’s objective, a study of the image segmentation techniques is carried out through the use of the MATLAB tool as a computer support for decision making.

2 General Earthquake Information

2.1 Seismic History of the Region

The 2016 Ecuador earthquake was a seismic movement that occurred at 6:58 p.m. PT on April 16, 2016, with the epicenter between the Pedernales and Cojimíes parishes of the Pedernales district, in the Ecuadorian province of Manabí. With a magnitude of 7.8. Mw, it constitutes the strongest earthquake felt in the country. The most affected areas are the provinces of Manabí, Esmeraldas, Santa Elena, Guayas, Santo Domingo and Los Ríos, which were declared by the Government in an “emergency state”. The most affected province was Manabí; one of its cantons, Pedernales (55,000 inhabitants), has been declared a “disaster zone”, with limited access.

An earthquake is considered by experts as a shaking of the ground that occurs due to the collision of tectonic plates and the release of energy in the course of a sudden reorganization of materials of the earth’s crust to overcome the state of mechanical equilibrium [1], these have a place of underground origin called hypocenter which is that zone to the interior of the Earth where the fracture or rupture of the rocks begins, those that propagate by means of seismic waves (Table 1).

Table 1. Types of seismic waves

In Fig. 1 it is possible to observe that, the trajectory described by the particles in the medium as the wave propagates is retrograde elliptical and occurs in the propagation plane of the wave. An analogy to these waves are those which occur on the surface of water.

Fig. 1.
figure 1

Graph representing the trajectory that particles in the medium describe when the wave propagates.

Currently, an earthquake can be measured according to its magnitude and intensity. The magnitude is the term used to refer to the power of the earthquake and is expressed in the Richter seismological scale which is an arbitrary logarithmic scale that assigns a number to quantify the energy released in an earthquake, as shown in the Table 2. The effects of the earthquake are classified according to the magnitude of the earthquake.

Table 2. Magnitudes on the Richter scale

2.2 Rapid Damage Assessment and General Building Characteristics

The assessment of structural damage is an essential part of the recovery process. Expert staff, such as engineers and architects, must examine all the buildings within the affected area to assess damage, safety and usability. They also need to identify buildings that require emergency strengthening to provide reliable data to the authorities, and plan new relief, rehabilitation and safety measures.

As a consequence of the seismic crisis in Ecuador, which began on April 16, 2016 with an earthquake of 7.8 Mw, the National Secretariat of Higher Education, Science, Technology and Innovation (SENESCYT), together with the risk management secretariat, reported that After the examination of 59 universities, there is one in Ecuador that has had medium impact: the “Eloy Alfaro de Manabí” Lay University (ULEAM) and two low impact: the Technical University of Manabí and the Luis Vargas University Torres de Esmeraldas, these institutions of higher education present affectations in their facilities, it is worth noting that the University of Guayaquil, some of their buildings have cracks in the walls of their faculties.

The intensity is directly related to the visible effects left by the earthquake and to express it we use the Modified Mercalli Intensity Scale which is a scale of 12 points, written in Roman numerals, developed to assess the intensity of earthquakes through of the effects and damages caused to different structures as described in Table 3.

Table 3. Modified Mercalli intensity scale

3 Digital Images Analysis

The digital analysis of images is composed of five phases, for the purpose of this study the first three stages are selected and are explained below:

The first phase is image acquisition. This phase includes the use of instruments such as digital cameras or scanners which have an image sensor that converts the light beams into electrical pulses that subsequently, depending on the given treatment, will become a digital image.

The next stage is preprocessing. In this phase algorithms dedicated to image adjustment are applied to decrease the noise present in the image and enhance features of interest such as edges.

Following preprocessing is the segmentation phase, considered as one of the most fundamental processes, which aims to divide an image into parts that have a strong correlation with objects or areas of the real world contained in the image [6] this phase is usually used to identify objects or other relevant information in digital images.

3.1 Methodology Development

The process begins with the capture of the image using a camera of 18.1 MP controlled manually by a person, which will have to take into account the following rules at the moment of taking the photo:

  • The camera must be horizontal. The use of a tripod is recommended.

  • The distance of the camera with respect to the anomaly must be given by the full view of a 30 cm ruler arranged vertically.

  • The image should not be overexposed or very bleak. The values of the histogram should be centered within the range 0.52–0.70.

  • Seek a uniform illumination of the area to photograph, to avoid the use of flash, depending on the surface, it may act as a mirror reflecting much of the light emitted by the camera back to the goal. The pictures stored on the camera’s SD memory are transferred to the computer which requires the Matlab program installed and the function developed in this research preloaded.

  • The FisuCrackMeter function in its first lines of code verifies the installation of the toolbox that is dedicated to the analysis of images. due to the fact that part of the functions used in the present investigation are associated with it, then we proceed to specify the Directory automatically taking into account the location of the function FisuCrackMeter, once that task the following code instruction set will allow the user to display a pop-up window where you must choose the captured image.

  • The first box that will be displayed is the representation of the original photograph, the second will contain the histogram of the picture so the original image was converted to HSV color space (Hue = Hue Saturation = Saturation Value = Brightness) using the rgb2hsv function, the resulting conversion was it stored in a variable called ““ which was obtained the values of channel 3 equivalent to lighting to then be used as a parameter in the function histogram() which will show the histogram generated by the obtained values.

  • In the next step a pre-installed Matlab app named color threshold is used. This app allows the identification of the range of values with the greatest number of pixels. To suit the development of this research, the focus is set on the lighting in the HSV color space. A series of 12 photographs of fissures and cracks were under observation in order to reach the conclusion of defining the range of 0.52–0.70. A pattern in their lighting histogram was found, which directly responds to the recommendations mentioned earlier in this document, at the moment of the capture (Fig. 2).

    Fig. 2.
    figure 2

    GUI color threshold (Color figure online)

4 Image Pre-processing Techniques

4.1 Mean Filter

The operation of the median filter lies in inspecting each of the pixels for which the image is formed and replace it with the average of neighboring pixels. It can be implemented to perform anti-aliasing image since it is considered one of simpler filters. Easy and intuitive, it can operate using convolution through a mask determined support the reduction of variations in intensity between the neighboring pixels (Fig. 3).

Fig. 3.
figure 3

Mean filter

Analysis

Change is barely noticeable, however using this filter allows noise reduction through moderate image fading. By itself, the filter does not constitute an advantage to the improvement of rift segmentation; nevertheless accompanied by other filters, it improves the definition of the line prior to the segmentation.

4.2 Gaussian Filter

The Gaussian filter is similar to the mean filter, the difference is that is uses a different mask for its application, its objective is to reduce the distortion of an image. This filter allows reduction of the noise level of an input signal (Fig. 4).

Fig. 4.
figure 4

Gaussian filter

Analysis

The Gaussian filter in the preprocessing phase aims to enhance the horizontal lines in the image, in the N graphic. It is possible to observe the slight improvement of the line reflected in a small increase in its extension, keeping the direction and thickness of the original image. The presence of this feature is very important especially when analyzing images containing fissures in the horizontal direction, resulting in a more refined image segmentation phase.

4.3 Median Filter

This filter is used when you have an image with a random noise, applying this filter aims to standardize the pixels that have different intensities within a neighborhood of pixels. The median filter allows the assignment of the median value to each point in the image. This is, it generates a new image, in which pixels have been generated after the median calculation of the total set of pixels that compose the original image.

Analysis

As seen in Fig. 5, at a first glance the variation is hard to detect. However the application of this filter, significantly improves the union of pixels that form a line which translates into a better input for the segmentation process of segmenting avoiding dashed lines.

Fig. 5.
figure 5

Median filter

5 Image Segmentation Techniques

Digital Image Processing, features techniques which facilitate the identification of patterns that help improve the quality of the images among them are those considered in points 4.1, 4.2 and 4.3. Prior to the application of these techniques, a binary mask should be generated to highlight anomalies present in the wall. To do so, a range of values was established based on the image lighting in the histograms; the range covers values from 0.520 to 0.700. These values were established based on the pattern of the histogram of 15 different images captured on the premises of the Faculty of Mathematics and Physical Sciences at the University of Guayaquil (UG) (Fig. 6).

Fig. 6.
figure 6

Mask generated based on values established for the thresholding

5.1 Sobel Operator

This technique applies a 3 × 3 dimensional mask in its operation; this mask is applied to every pixel in the image in order to get the value of the gradient of each of them, the value obtained for each pixel will be evaluated on the basis of the threshold preset to the in service of process. The Edge function should be used for the application of different segmentation techniques in Matlab (Fig. 7).

Fig. 7.
figure 7

Segmentation using the Sobel operator

The parameters required to start up function are listed below:

  1. 1.

    The first parameter is dedicated to the entrance of the variable that stores the image in grayscale.

  2. 2.

    The second parameter allows the user to specify through a string type variable the technique to apply for the image segmentation, in this case should the word ‘sobel’ should be input.

  3. 3.

    The third parameter is optional; it allows the user to specify the threshold for the chosen technique. Edges with a lower value than the minimum value set in the threshold are ignored.

5.2 Prewitt Transform

This technique works similarly to the Sobel technique with the difference that the coefficients in this technique does not focus on pixels that are found near the center of the mask. It is characterized by having a better detection of horizontal and vertical edges. The edge function should be used to apply this technique. The parameters used to start up function are (Fig. 8):

Fig. 8.
figure 8

Segmentation using Prewitt transform

  1. 1.

    The first parameter is dedicated to input of the variable that stores the image’s grayscale.

  2. 2.

    The second parameter allows the user to specify through a string variable the technique to apply for the segmentation of the image in this case the word ‘prewitt’ should be typed.

  3. 3.

    The third parameter is optional; it allows the user to specify the threshold for the chosen technique. Edges with a lower value than the minimum value set in the threshold are ignored.

Analysis

Although the result at first sight may seem very similar; when zooming in to a specific area of the image, it is easy to detect dashed lines on outgoing edges of the corners, altering the original morphology of the fissure, thus avoiding later correct measurement.

5.3 Canny Edge Detection

This works by applying a convolution using a Gaussian Filter aiming to soften the image, on the result of the previous operation is undone - identify pixels where there is greater variation product of the transition from pixels belonging to an object on a background, as final step is a double moral standards to eliminate false edges. The edge function should be used to apply this technique. The parameters to use to start up function are (Fig. 9):

Fig. 9.
figure 9

Segmentation through Canny Edge detection

  1. 1.

    The first parameter is used to specify the variable that stores the images in which the technique will be applied.

  2. 2.

    The second parameter allows the user to specify through a string variable the technique to apply for the segmentation of the image in this case the word ‘canny’ should be typed.

Analysis

The Canny Edge Detection, similarly to the Sobel Transform, generates a segmentation of great quality by the continuity of the lines marked on the edge with the only difference that the Canny transform delimits the edge with a distance I knew-inside which generates Sobel in tr subsequent attachments leads to the disappearance of certain regions of the rift for the low accuracy of the location of the edge.

6 Results of the Structural Damage Level

After the analysis of each image with each algorithm applied to it, the level of damage that the structure has undergone is identified. Depending on whether the structure presents a fissure or a crack, the level damage is determined based on Table 4, which describes the evaluation of post-seismic structural damage in buildings.

figure a
Table 4. Damage level – in between floors

Once the code is executed and the image to be processed is selected, the last step is to select the area for the respective assessment as described below:

Once the area has been selected and the type of material is chosen, it is possible to visualize the crack distance, as well as its equivalence in pixels and finally the evaluation of the structure, as shown in the Fig. 10, according to the results of the Table 5.

Fig. 10.
figure 10

Selection of affected area for assessment

Table 5. Assesment of affected area

7 Conclusions

The use of image segmentation techniques, as a tool for decision-making, will serve as a support to the work made by experts in this case, civil engineers. However, this digital image analysis, is also very useful for those who wish to know the status of the different buildings, through evaluation of the digital measurement of the fissures or cracks.

Having compared the different segmentation techniques applied in this research which were: Sobel Operator, Canny Edge Detection and the Prewitt Transform, allowed us to conclude based on results, the technique that provided the best assessment is the Canny Edge Detection, since its application in MATLAB, allowed us to present a better performance when connecting the pixels that form part of the cracks and crevices, this aids at the time of applying the function to fill enclosed areas, enhancing in a much better way the line formed by the crevice and the fissure.

MATLAB is a very versatile tool that helps the segmentation process of through the application of different techniques or methods of image segmentation such as: watershed transform, canny edge detection, sobel operator, k-means and top-hat. This is the reason we used this tool since its versatility helped to achieve the expected results for each of the techniques described during the investigation.