COMPARISON OF OPERATORS IN DETECTING AND / OR EXTRACTING ROADS USING MATLAB SOFTWARE AND CARTOMORPH SOFTWARE

FCT / UNESP has been developing CARTOMORPH to be a public domain software which can be operated by users needing to extract and / or detect features from digital images. In this work, two methods were applied for the extraction and / or detection of the contours of the feature of interest (the highway) using a digital image containing part of a highway. One method was applied through the use of operators contained in the Mathematical Morphology toolbox, which is a private domain, SDC Information Systems, and the other was applied using the routine contained in the CARTOMORPH software. In the toolbox, the operators used were mmreadgray, responsible for opening the original image, mmhisteq, which softens the image, mmneg which can reverse the grayscale of pixels, and mmareaclose, which aims to remove image segmentation. This set of operators has resulted in a routine capable of extracting and / or detecting the contour of a road. The Blur and Minimum (Gblur) operator was used in the process using the CARTOMORPH software. This can detect the edges of objects present in the original blurred image, and transform them into an ideal edge ramp. Results from both methods were compared and the conclusion is that the blur and minimum (GBlur) operator gave a better performance. This finding indicates that the set of operators implemented in CARTOMORPH will be able to be operated by users in the field of cartography and related fields, thus enabling the use of a public domain software with efficient results.


INTRODUCTION 1.1 General Instructions
In Remote Sensing area, Digital Image Processing (DIP) stands out for its ability to manipulate satellite images, being able to extract, detect or apply desired operations for which alcanse the expected result.
In PDI, the linear approach may often not be adequate to extract an image of geometric structures, limiting the application of the approach area.Therefore, this paper applies Mathematical Morphology techniques (MM), with PDI and Remote Sensing, to remedy the problem of structure extraction using linear analysis.
MM efficiently addresses information extraction problems from the analysis of the geometric structure of the targets contained in the images, as it is able to detect objects according to their shape and size.
The biggest problem for applications using MM, is that a new structure, a new type of variable and new routines need to be implemented for each type of picture.However, when research is directed to one type of image only, highways, this problem will not hinder its development.
The main objective is to draw a highway from a given satellite image using the Mathematical Morphology toolbox, which is in the private domain software of SDC Information Systems, and CARTOMORPH, developed by students and researchers at FCT / UNESP, which is in the public domain.A comparison of the two systems will be made, comparing extractions, verifying efficiency and indicating any significant flaws.This extraction can assist in fault detection on roads, detours or excerpts presenting unwanted aspects.
In order to achieve these objectives, this research presents a brief literature review of the mathematical formulations using MM, and a brief theory of PDI.We then present the methodology used in the work, results and conclusions.

Mathematical Morphology
Morphology builds on the form of the matter.Its origin stems from the composition of the Greek words: morphos (forms) and logy (study) (FACON, 1996).FACON (1996) defines a structuring element (SE) as a completely definite and known assembly (shape and size), which is compared to the unknown image from a processing set.

Structuring Element:
To select the most appropriate structuring element, it is necessary to consider the form of objects, or set a specific size and, in some cases, a specific orientation (SOILLE, 2003).
There are several types and sizes of SE, the most common are cross, box, horizontal and vertical line.These are shown in Figure 1.The illustration is given in the matrix form that is used to implement road image extraction and position of each structural element of the array corresponding to a pixel SE.When we choose a structural element, we have to consider the shape or size of objects.In the case of road images, the EE line is best suited to their extraction.However, the best thing to do is rotate the line element, so it can fit the highway's position in the image.Figure 2 illustrates the SE rotated 0 °, 45 °, 90 ° and 135 °.Tests were carried out during the research, and it can be seen that the best performances for the analysis and extraction of images of types of road were those using the line element, the fact that its structure is modified by rotating enabling more significant results.The erosion of image I, applied with a structuring element B, is denoted as ɛ B (X) and defined as the position of points x, so that B is included with X when one source is located at x (SOILLE, 1999): (1) The overlap of the structural element in image I enables cover pixel I to be compared with pixel SE, to detect whether it belongs in the neighborhood of x and has the same value as SE, preserved in the same position.An example of the operator is shown in Figure 3.

Figure 3 -Erosion
The dilation of image I, applied with a structuring element B is denoted as a δ B (X) and is defined as the position of the points x, so that, when B touches its origin, X coincides with x (SOILLE, 1999 ): (2) The overlap of the structural element in image I, enables cover pixel I to be compared with pixel SE to detect whether it belongs to x and this neighborhood has the same value as SE, preserved in the same position, otherwise it will receive the most relevant value in its neighborhood.An example of the operator is shown in Figure 4.

Digital Image Processing
Digital Image Processing is defined as the processing of digital images by a digital computer in which an image is denoted as a two-dimensional function, f (x, y), where x and y are spatial (plane) coordinates, and intensity / gray level is called point f.When the images are composed of discrete and finite amounts of intensity values, they are called digital images.
There are three types of image processing, low, medium and high level.The low processing flush is a primitive operation which enables the reduction of noise in images, contrast enhancement and the thinning of the image.Edges or single objects can be detected in mid-level processing, which can perform image segmentation.Finally, the top level of processing is used for CONNECTION sets of recognized objects.This work will make use of three types of processing, low and medium, corresponding to the respective applications: smoothing and highway detection.

MATERIALS
Developing the research involved using some computational materials, mainly for image processing and analysis of results.
MatLab software, a private domain, was used along with the Mathematical Morphology SDC toolbox to process the satellite image.
CARTOMORPH software, a public domain developed by students of FCT / UNESP was also used for morphological operations.This was implemented in C ++ in the NeatBeans development platform.
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-7/W3, 2015 36th International Symposium on Remote Sensing of Environment, 11-15 May 2015, Berlin, Germany Satellite images of medium and high-level were used for the detection of roads.

METHODOLOGY
The extraction of the highway was initially undertaken using Matlab software.The commands: mmreadgray, histeq, mmneg and mmareaclose were applied, resulting in the detection of the highway.
After implementation of the SDC toolbox, the highway edges were extracted using CARTOMORPH software, applying the operator Gblur.
Images were made from both and the results compared and analyzed.

Toolbox SDC
The mmreadgray command, responsible for opening the highway image to grayscale, was initially introduced, resulting in Figure 5. Closing of the negative area was then applied to the highway extraction.Area close (closing) is when the expansion of operations is applied following erosion.To extract the highway the dilation and erosion of the image were realized, resulting in Figures 3 and 4. The close area is presented in Figure 6.

CARTOMORPH
The Gblur operator was applied in CARTOMORPH software, to make sure that it is able to detect the edge of the highway as well as the MM operators applied in the toolbox.
The Gblur operator was chosen because it has the best edge detection.Its result is illustrated in Figure 7.This operator is the result of the minimum values found between the dilated and the eroded image.

ANALYSIS OF RESULTS
To verify that the highway was extracted properly, the edge detected by Gblur operator in CARTOMORPH software was compared with the routine implemented in MATLAB software.This comparasion was possible with the overlay of Figures 6  and 7, resulting in Figure 8.
Figure 8 -Overlap The results detected the same stretches of highway.

CONCLUSIONS
It can be seen from the analysis of the results that both images have approximately the same shape of highway found after extraction.
We can therefore say that if you want to study sections of roads in detail, for repairing flaws, wear, deviation, bridges, objects, among other elements to be detected on the highway, the operations implemented in CARTOMORPH software gave a better performance giving detailed information about highway edges, allowing the user to verify even places where the highway is not continuous.
Finally, the research indicates that the CARTOMORPH software is ready for operation by users of mapping and related areas.allowing anyone to obtain efficient results as it is a public domain software.

Figure
Figure 1 -Structural Element

Figure 5 -
Figure 5 -Gray Highway A negative function was then applied to Figure 5, reversing the intensity of the pixels, each receiving the maximum intensity value (255) subtracted from the value of the pixel.

Figure 6 -
Figure 6 -Area Close negative highway Thanks for FAPESP and CAPES by financial supports.The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XL-7/W3, 2015 36th International Symposium on Remote Sensing of Environment, 11-15 May 2015, Berlin, Germany