Mathematical Morphology Application to Features Extraction in Digital Images
Total Page:16
File Type:pdf, Size:1020Kb
MATHEMATICAL MORPHOLOGY APPLICATION TO FEATURES EXTRACTION IN DIGITAL IMAGES Rodrigo Frigato Erivaldo Silva Universidade Estadual Paulista Faculdade de Ciências e Tecnologia Campus de Presidente Prudente [email protected] [email protected] ABSTRACT Image segmentation needs efficient procedures for the feature detection process. Feature extraction, in Cartography, can be used in cartographic updating. The extraction process is a complex task, mainly for the existing types of objects in the images. In this work, Remote Sensing data and Mathematical Morphological techniques are integrated.. In order to test the proposed approach, some morphological operators related to pre-process, were applied to the original images. The features of interest chosen were roads. Routines were implemented in the MATLAB environment. Results indicated good performances by the operators. The integration of the technologies aimed to carry out the semi-automatic extraction of linear features with the purpose to use them in processes of cartographic updating. Keywords - Mathematical Morphological, Remote Sensing, Erosion and Dilation, Semi-automatic extraction of features INTRODUCTION In Brazil there are still many problems related to cartography due to the existing mapping base which is outdated. Surveys conducted for the purpose of mapping date back from decades of the 60’s and 70’s, meaning the maps are outdated by more than 3 decades. It is imperative that a country with territorial size and population like Brazil needs a solid and updated mapping base. It is of fundamental importance to urban planning and consequently for the management of the entire national territory. Conducting conventional surveys in order to reduce the outdated mapping depends on processes which are complicated and expensive task, due to the vast territorial extension of the country. This study aimed to use Mathematical Morphology - MM in detection of the cartographic features of interest in high-resolution digital images through the application of morphological operators. THEORETICAL BASE Brazil needs fast and inexpensive methods that can be used in cases of extraction and / or detection of relevant cartographic features, for the purpose that they be used in conventional processes to upgrade the basic mapping. One way to minimize the outdating mapping is the use of all products of Remote Sensing and techniques for Digital Image Processing - PDI. Due to the large number of satellites in orbit it is possible to be continuously watching all changes over time in land surface, which then can detect the features of interest through techniques of Remote Sensing. The images of Remote Sensing have contributed a lot in different areas of knowledge such as Cartography, Precision Agriculture, Meteorology and others. Currently there are various techniques for PDI that can be used together with images of Remote Sensing for cartographic purposes. In this work, the chosen one is Mathematical Morphology. Pecora 17 – The Future of Land Imaging…Going Operational November 18 – 20, 2008 Denver, Colorado According to Soille (1999), Mathematical Morphological (MM) can be defined such as a theory for analysis of the spatial structures. It is called Morphological because it examines the form of objects. It is mathematical in the sense that the analysis is based on an adjusted theory, geometry and algebra. However, the MM is not just a theory, but is also a powerful technique for the analysis of images. The Mathematical Morphology is considered a non-linear approach in digital image processing of images that have made excellent results in the detection of cartographic features of interest in digital images. The Mathematical Morphology has two basic operators, the erosion and dilation, from which all others morphological operations are derived. Here is the definition of those two operators according to FACON (1996): Binary Erosion Erosion of a binary image in a series X by structuring element B is defined by FACON (1996) as: ero B (X) = X ero B = { x ∈ ε : Bx ⊂ X } (2.1) This definition indicates that the structuring element B slides in the image and compares the surrounding area of each pixel in the vicinity of the central point (which, in most cases correspond to the physical center of structuring element) and preserve the pixels neighborhoods where it matches. Binary Dilation The expansion of a binary image in a series X by structuring element B is (FACON, 1996): dil B (X) = X dil B = { x ∈ X : Bx ∩ X ≠ ∅ } (2.2) This definition indicates that when the structuring element is examining the image, the vicinity of the central point should be a possible intersection with the relevant points of the image, making it so that more pixels are captured. The images were used in levels of gray. However the theoretical principle applied to binary images remain the same for the images in levels of gray. A new concept for such use is to consider a job as a topographic relief where standards are seen as dark valleys and peaks as clear patterns. Erosion in Tone of Gray Erosion in tone of gray of a signal (function) f by a structural element g is defined as (FACON, 1996): ero g (f (x)) = Min {f (y) – g (x- y) : y ∈ E } (2.3) The erosion in levels of gray of f to g is to verify that the structuring element is centered at x below the function f, since it will not be defined at a point where the structuring element is above the signal f. The effects of erosion in levels of gray are: • darken the image; • expand and widen the valleys (dark standards); • connect nearby valleys; • reduce and sometimes eliminate peaks (clear standards); • separate nearby peaks ; The visual result of the eroding image in levels of gray presents itself with a reduction of the peaks and extend the dark regions, as illustrated in Figure 1. Pecora 17 – The Future of Land Imaging…Going Operational November 18 – 20, 2008 Denver, Colorado Figure 1. Result of erosion in levels of gray with a structural element. Source: Silva (1995). Dilation in Tone of Gray The dilation in tone of gray of a signal f by a structural element g is (FACON, 1996): dil g (f (x)) = Max{ f (y) + g (x – y) : y ∈ E } (2.4) In which the dilation in levels of gray of f to g is to verify if the structuring element centered at x is above the function f, not being defined at a point where the structuring element is below the signal f. The effects of expansion in levels of gray are: • lighten the image; • extend the peaks (light standards); • connect nearby peaks; • reduce and sometimes eliminate valleys (dark standards); • separate nearby valleys; The visual result of the dilated image in levels of gray present itself with decreases in valleys and expanding in light regions, and the idea of the effect of applying the operator is illustrated in Figure 2. Figure 2. Result of dilation in levels of gray with a structural element. Source: Silva (1995). As mentioned, the operators’ erosion and dilation provide basic conditions for the construction of other morphological operators such as targeting; detection of features, pattern recognition etc. Pecora 17 – The Future of Land Imaging…Going Operational November 18 – 20, 2008 Denver, Colorado DEVELOPMENT The methodology is based on the use of morphological operators contained in toolbox of Mathematical Morphology developed by SDC Information Systems, which operates coupled to software MATLAB. The application of routines in image processing is aimed initially to improve the visual quality of the features of interest in digital images, which will then afterwards be extracted. The image used in the morphological processing is in the region of Presidente Prudente in São Paulo state and contains an excerpt from the Raposo Tavares highway-SP-280. This image was obtained from the sensor on board the satellite QUICKBIRD, which has spatial resolution of 0.61 meters. This image was chosen because it contains features of interest in the area of cartography, such as roads. Figure 3 illustrates the original image. Figure 3. Original Image. From the Figure 3 image initiated the procedure of pre-processing to facilitate the extraction of the feature. This aimed to increase the contrast of the feature of interest and reduce the prominence of noise, the operator openrec was applied in the image together with the structuring element sebox, this is designed to create a new image through the infer-reconstruction of the original image. Operator addm followed with a threshold value 130, this operator creates a new image showing the difference in pixel value in the image of the runway in relation to the neighborhood "pixelwise." Increasingly seeking to get improvement in quality of the extracted feature, the image was binarized through the binary operator with threshold 230. The operator turned all the pixels under 230 to the value "0" (black) and those who were even higher, at "1" (white). The choice of threshold was based in analysis of the histogram of the image. Figure 4 represents the result of the application of this operator. Pecora 17 – The Future of Land Imaging…Going Operational November 18 – 20, 2008 Denver, Colorado Figure 4. – Binarized Image. Figure 4 shows the image with only two shades of gray (black or white) and is now possible to implement other operators with the aim to eliminate the noise surrounding the feature of interest. The operator areaclose (threshold 5000) was applied to remove the maximum quantity of noise possible. The result of this application is illustrated in Figure 5. Figure 5. Noise Elimination. Subtracting Figure 4 and 5 resulted in Figure 6 shown below. Pecora 17 – The Future of Land Imaging…Going Operational November 18 – 20, 2008 Denver, Colorado Figure 6. Subtraction. For the analysis of Figure 6 shows that there was a huge improvement in the extraction feature of interest, even though noises are still visual in the bottom of the image.