Morphological Image Processing GUI using MATLAB

The term morphology means form and structure of an object. Sometimes it refers to the arrangements and inter-relationships between the parts of an object. Morphology is related to the shapes and digital morphology is a way to describe and analyse the shape of a digital object. In biology, morphology relates more directly to shape of an organism such as bacteria. Morphological image processing (or morphology) describes a range of image processing techniques that deal with the shape (or morphology) of features in an image morphological and edge detection operations are typically applied to remove imperfections introduced during segmentation [7]. The stages of Digital Image Processing in Morphological Processing is discussed in figure 1.


INTRODUCTION
A digital image is a representation of twodimensional images as a finite set of digital values, called picture elements or pixels [1].Digital Image Processing (DIP) involves the modification of digital data for improving the image qualities with the aid of computer [2].
Digital image processing is a broad subject and often involves procedures which can be mathematically complex, but central idea behind digital image processing is quite simple.These results form a new digital image that may be displayed or recorded in pictorial format or may it be further manipulated by additional computer programs [2].The term morphology means form and structure of an object.Sometimes it refers to the arrangements and inter-relationships between the parts of an object.Morphology is related to the shapes and digital morphology is a way to describe and analyse the shape of a digital object.In biology, morphology relates more directly to shape of an organism such as bacteria.Morphological image processing (or morphology) describes a range of image processing techniques that deal with the shape (or morphology) of features in an image morphological and edge detection operations are typically applied to remove imperfections introduced during segmentation [7].The stages of Digital Image Processing in Morphological Processing is discussed in figure 1.

GUI Tool Box
GUIs (also known as Graphical User Interfaces or UIs) provide point-and-click control of software applications, eliminating the need to learn a language or type commands in order to run the application.MATLAB apps are self-contained MATLAB programs with GUI front ends that automate a task or calculation.The GUI typically contains controls such as menus, toolbars, buttons, and sliders.You can also create your own custom apps, including their corresponding UIs, for others to use [5].The principles of good GUI design are, for the most part, timeless and universal.
The Guide Tools include the already-mentioned Property Editor, the Callback Editor, the Alignment Tool, and the Menu Editor etc.The blank GUI using GUIDE is shown in figure 2 It falls naturally into two parts:  GUI design, or how to make something that's useful  GUI implementation, or how to make something that works

Edge Detection Operators
An image gradient is a directional change in the intensity or colour in an image.Image gradients may be used to extract information from images.An example of small image neighbourhood is shown: The sobel edge detector computes the gradient by using the discrete differences between rows and columns of a 3X3 neighbourhood.The sobel operator is based on convolving the image with a small, separable, and integer valued filter.In below a sobel edge detection mask is given which is used to compute the gradient in the x (vertical) and y (horizontal) directions [6].

Robert:
Robert's model is still susceptible to fluctuations in the image even though the edges can be properly positioned.Roberts's operator performs an accurate edge positioning, but is sensitive to the noise [2].So it is suitable for image segmentation when the images have obvious edges and less noise such as the binary image.The Roberts edge detector uses the masks to approximate digitally the first derivatives Gx and Gy

Canny:
The Canny Edge Detector is one of the most commonly used image processing tools, detecting edges in a very forceful manner.The Canny edge detector is widely considered to be the standard edge detection method in the industry.Canny saw the edge detection problem as a signal processing optimization problem, so an objective function is developed to be optimized [4].The solution to this problem was a rather difficult exponential function, but Canny found numerous ways to approximate and optimize the edgesearching problem.

Boundaries extraction:
This operation is very important, because the border is complete, and at the same time very compact description of the object.It is easy to see that the boundary points have at least one background pixel in its neighbourhood.Thus, applying the operator of canny with a structural element that contains all possible neighbouring elements, we will remove all the boundary points.Then the boundary obtained by the operation of the difference between the sets of the original image and obtained as a result of erosion [7].

Output of Edge Detection Operations:
The figure 3 shows the various operators of Edge Detection Technique in which Boundary Extraction is done by using Canny Operator.[7].By choosing the size and shape of the neighbour, you can construct a morphological operation that is sensitive to specific shapes in the input image [5].

Morphological Operations:
Morphological operations such as erosion, dilation, opening, and closing etc. Often combinations of these operations are used to perform morphological image analysis.There are many useful operators defined in mathematical morphology.They are dilation, erosion, opening and closing.Morphological operations apply structuring elements to an input image, creating an output image of the same size.
Irrespective of the size of the structuring element, the origin is located at its Centre [5].

Erosion:
Erosion shrinks or thins object in a binary image.The manner or extent of shrinking is controlled by structuring elements when using erosion structural element also passes through all pixels of the image [7].As a result of applying the erosion of all the objects smaller than the structural element will be erased, objects, connected by thin lines are disconnected and the sizes of all objects are reduced.The two main inputs for the erosion operator are the image which is to be eroded and a set of coordinate points known as a structuring element which define also as a kernel [5].The exact effect of the erosion on the input image is determined by this structuring element.It is used to reduce objects in the image and known that erosion reduces the peaks and enlarges the widths of minimum regions, so it can remove positive noises but affect negative impulsive noises little.The erosion of the grey image A by the structuring element B is defined by: Where Bz is the translation of B by the vector z, i.e.

{ }
The erosion of A by B is also given by the expression: ⋂

Dilation:
The process of the structuring element B on the image A and moving it across the image in a way like convolution is defined as dilation operation.The two main inputs for the dilation operator are the image which is to be dilated and a set of coordinate points known as a structuring element which define also as a kernel.
The exact effect of the dilation on the input image is determined by this structuring element [5].
Dilation is a transformation that produces an image that is the same shape as the original, but is a different size.Structural element of B is applied to all pixels of binary image.Every time the origin of the structural element is combined with a single binary pixel, the entire structural element is wrapped and subsequent alteration of the corresponding pixels of binary image.Dilation is used to increase the area of a component.It Adds pixels around the boundaries and fills interior holes.Let A be a set of pixels and let B be a structuring element.Let (B)z be the reflection of B about its origin and followed by a shift by z or we can say that the B is flipping about its origin and slides over set (image) A. Dilation, written A ⊕ B, is the set of all shifts that satisfy the following [7]: Where ( ̂) denotes the symmetric of B, that is, The dilation of A and B then is a set of all displacement.Dilation is used for repairing breaks and intrusions.Dilation stretches or shrinks the original figure.The dilation of A by the structuring element B is defined by: If B has a centred on the origin, as before, then the dilation of A by B can be understood as the locus of the points covered by B when the centred of B moves inside A.

Opening:
Opening generally smooth's the contour object, breaks narrow isthmuses, and eliminates thin protrusions [7].An opening operation is defined as erosion followed by a dilation using the same structuring element for both operations.The basic two inputs for opening operator are an image to be opened, and a structuring element.Grey level opening consists simply of grey level erosion followed by grey level dilation [5].Using the structure element B to do the open operation on the set A, expressed as , definite as So an opening consists of erosion followed by dilation.An equivalent definition is That is, is the union of all translations of B which fit inside A.

Closing:
Closing also tends to smooth sections of contours but, as opposed to opening, it generally fuses narrow breaks and long thin gulfs, eliminates small holes, and fills gaps in the contour [7].Closing is opening performed in reverse.Simply it is defined as dilation then erosion using the same structuring element for both operations.The main inputs of the closing operator are an image to be closed and a structuring element.The process of a grey level dilation followed by grey level erosion is defined as Grey level closing [5].

⊕
Analogous to opening we can define closing, which may be considered as dilation followed by erosion, and is denote .

Skeleton:
The skeleton of A can be expressed in terms of erosions and openings [2].

With
Where B is the structuring element and indicates k successive erosions of A.

The Hit or Miss Transformation:
The Hit-or-Miss transform is a basic tool for shape detection.
The objective is to find the location of one of the shapes in image.

[ ]
The small window W is assumed that have at least one-pixel thick than an object.Anyway, in some applications we may be interested in detecting certain patterns in which case a background is not required [7].

{ } ( )
The Structuring elements used for thickening have the same form as those in connection with thinning, but with all 1's and 0's interchanged [2].

Output of Morphological Operations:
The figure 4 shows various operations of Morphological Image Processing.

Conclusion
It has been concluded that mathematical morphology and edge detection is having a significant importance in digital image processing.In this Paper, the basic theory of morphological image processing and edge detection techniques of Gradient-based is introduced firstly; a brief introduction of edge detection and morphological processing methods and operators is completed.Finally, the results of image with different operators on the same image are given.Edge Detection Techniques are compared with a Hand image type while morphological image processing techniques are compared with an X-ray image type.The software was implemented GUI using MATLAB.The objective of the research paper was to study the use of gradient operators like Roberts, Prewitt, Sobel, boundary extraction and Canny for any Xray image edge detection and morphological operations like dilation, erosion, opening and closing, hit or miss etc.

Figure 1
Figure 1 Stages of Digital Image Processing: Morphological Processing

Figure 2
Figure 2 GUI Editor

Figure 3
Figure 3 Edge detection operations3.Morphological Image Processing3.1.Morphology: Morphology or mathematical morphology is a branch of image processing which is particularly useful for analysing shapes and form of objects in images.Morphological methods apply a structuring element to an input image, creating an output image at the same size.The value of each pixel in the input image is based on a comparison of the corresponding pixel in the input image with its neighbours[7].By choosing the size and shape of the neighbour, you can construct a morphological operation that is sensitive to specific shapes in the input image[5].

.1. Prewitt: Prewitt
Closing, boundary extraction and several edge detector operators are there for generating gradient images like Sobel, Prewitt, Robert etc.