Type-2 Fuzzy Logic for Edge Detection of Gray Scale Images

Image processing is characterized by a procedure of information processing for which both the input and output are images, such as photographs or frames of video [Jain’86]. Most image processing techniques involve treating the image as a two-dimensional signal and applying standard signal processing techniques to it.[webpage1] Fuzzy Image Processing (FIP) is a collection of different fuzzy approaches to image processing. Nevertheless, the following definition can be regarded as an attempt to determine the boundaries. Fuzzy image processing includes all approaches that understand, represent and process the images, their segments and features as fuzzy sets. [webpage2]The representation and processing of the images depend on the selected fuzzy technique and on the problem to be solved [Jang’95]. Here is a list of general observations about fuzzy logic:  Fuzzy logic is conceptually easy to understand.

In many image-processing applications, expert knowledge is used to overcome the difficulties in object recognition, scene analysis, etc. Fuzzy set theory and fuzzy logic offer us powerful tools to represent and process human knowledge in the form of fuzzy IF-THEN rules.On the other side, many difficulties in image processing arise because of the uncertain nature of the data, tasks, and results.This uncertainty, however, is not always due to the randomness but to the ambiguity and vagueness.Beside randomness which can be managed by probability theory, FIP can distinguish between three other kinds of imperfection in the image processing.


Grayness ambiguity  Geometrical fuzziness  Vague (complex/ill-defined) knowledge These problems are fuzzy in the nature.The question whether a pixel should become darker or brighter after processing than it is before?Where is the boundary between two image segments?What is a tree in a scene analysis problem?All of these and other similar questions are examples for situations that a fuzzy approach can be applied in a more suitable way to manage the imperfection.
FIP is an amalgamation of different areas of fuzzy set theory, fuzzy logic and fuzzy measure theory.The most important theoretical components of fuzzy image processing:

Uncertainties in a recognition system and relevance of fuzzy set theory
A gray scale image possesses some ambiguity within the pixels due to the possible multivalued levels of brightness.This pattern uncertainty is due to inherent vagueness rather than randomness.The conventional approach to image analysis and recognition consists of segmenting (hard partitioning) the image space into meaningful regions, extracting its different features (e.g.edges, skeletons, centroid of an object), computing the various properties of and relationships among the regions, and interpreting and/or classifying the image.Since the regions in an image are not always clearly defined, uncertainty can arise at every phase of the job.Any decision taken at a particular level will have an impact on all higher level activities.In defining image regions, its features and relations in a recognition system (or vision system) should have sufficient provision for representing the uncertainties involved at every level.[Lindeberg'1998] The system should retains as much as possible the information content of the original input image for making a decision at the highest level.The final output image will then be associated with least uncertainty (and unlike conventional systems it will not be biased or affected very much by the lower level decisions).
Consider the problem of determining the boundary or shape of a class from its sampled points or prototypes.There are various approaches [Murfhy'88,Edelsbrunner'83,Tousant'80] described in the literature which attempt to provide an exact shape of the pattern class by determining the boundary such that it contains (passes through) some of the sample points.This need not be true.It is necessary to extend the boundaries to some extent to represent the possible uncovered portions by the sampled points.The extended portion should have lower possibility to be in the class than the portions explicitly highlighted by the sample points.The size of the extended regions should also decrease with the increase of the number of sample points.This leads one to define a multi-valued or fuzzy (with continuum grade of belonging) boundary of a pattern class [Mandal'92 & 97].Similarly, the uncertainty in classification or clustering of image points or patterns may arise from the overlapping nature of the various classes or image properties.This overlapping may result from fuzziness or randomness.In the conventional classification technique, it is usually assumed that a pattern may belong to only one class, which is not necessarily true.A pattern may have degrees of membership in more than one class.It is, therefore, necessary to convey this information while classifying a pattern or clustering a data set.

Grayness ambiguity measures
In an image I with dimension MxN and levels L (based on individual pixel as well as a collection of pixels) are listed below.r th Order Fuzzy Entropy : where s i r denotes the i th combination (sequence) of r pixels in I; k is the number of such sequences; and µ(s i r ) denotes the degree to which the combination -s i r , as a whole, possesses some image property µ.

Hybrid entropy
with where µ mn denotes the degree of "whiteness" of the (m,n) th pixel.P w and P b denote probability of occurrences of white (µ mn =1) and black (µ mn =0) pixels respectively; and E w and E b denote the average likeliness (possibility) of interpreting a pixel as white and black respectively.

www.intechopen.com
Type-2 Fuzzy Logic for Edge Detection of Gray Scale Images 283

Spatial ambiguity measures based on fuzzy geometry of image
The basic geometric properties of and relationships among regions are generalized to fuzzy subsets.Such an extension, called fuzzy geometry [Rosefeld'84, Pal'90 & 99], includes the topological concept of connectedness, adjacency and surroundedness, convexity, area, perimeter, compactness, height, width, length, breadth, index of area coverage, major axis, minor axis, diameter, extent, elongatedness, adjacency and degree of adjacency.Some of these geometrical properties of a fuzzy digital image subset (characterized by piecewise constant membership function μ I (I mn ) or simply μ.These may be viewed as providing measures of ambiguity in the geometry (spatial domain) of an image.

Type-2 fuzzy system
The original fuzzy logic (FL), Type-1 FL, cannot handle (that is, model and minimize the effects of) uncertainties sounds paradoxical because the word fuzzy has the connotation of uncertainty.A user believes that Type-1 FL captures the uncertainties and vagueness.But, in reality Type-1 FL handles only the vagueness, not uncertainties, by using precise membership functions (MFs).When the Type-1 MFs have been chosen, all uncertainty disappears because Type-1 MFs are totally precise.Type-2 FL, on the other hand, handles uncertainties hidden in the information/data as well as vagueness by modeling these using Type-2 MFs.All set theoretic operations, such as union, intersection, and complement for Type-1 fuzzy sets, can be performed in the same for Type-2 fuzzy sets.Procedures for how to do this have been worked out and are especially simple for Type-2 fuzzy sets [Karnik'2001].
First, let's recall that FL is all about IF-THEN rules (i.e., IF the sky is blue and the temperature is between 60 and 75° Fahrenheit, THEN it is a lovely day).The IF and THEN parts of a rule are called its antecedent and consequent, and they are modeled as fuzzy sets.
Rules are described by the MFs of these fuzzy sets.In Type-1 FL, the antecedents and consequents are all described by the MFs of Type-1 fuzzy sets.In Type-2 FL, some or all of the antecedents and consequents are described by the MFs of Type-2 fuzzy sets.The Type-2 fuzzy sets are three-dimensional, so they can be visualized as three-dimensional plots.Unfortunately, it is not as easy to sketch such plots as it is to sketch the two-

Type-Reducer
Rules Inference Fuzzifier www.intechopen.comdimensional plots of a Type-1 MFs.Another way to visualize Type-2 fuzzy sets is to plot their so-called Footprint Of Uncertainty (FOU).The Type-2 MFs, MF(x, w), sits atop a twodimensional x-w plane.It sits only on the permissible (sometimes called "admissible") values of x and w.This means that x is defined over a range of values (its domain)-say, X.In addition, w is defined over its range of values (its domain)-say, W.
From the Figure 2, the measured (crisp) inputs are first transformed into fuzzy sets in the fuzzifier block because it is fuzzy set, not the number, that activates the rules which are described in terms of fuzzy sets.Three types of fuzzifiers are possible in an interval Type-2 FLS.When measurements are:


Perfect, they are modeled as a crisp set;  Noisy, but the noise is stationary, they are modeled as a Type-1 fuzzy set; and,  Noisy, but the noise is non-stationary, they are modeled as an interval Type-2 fuzzy set (this latter kind of fuzzification cannot be done in a Type-1 FLS).
after fuzzification of measurements (inputs), the resulting input fuzzy sets are mapped into fuzzy output sets by the Inference block.This is accomplished by first quantifying each rule using fuzzy set theory, and by then using the mathematics of fuzzy sets to establish the output of each rule, with the help of an inference mechanism.If there are M rules, the fuzzy input sets to the Inference block will activate only a subset of those rules usually fewer than M rules.So, at the output of the Inference block, there will be one or more fired-rule fuzzy output sets.
The fired-rule output fuzzy sets have to be converted into a number by Output Processing block as shown in the Figure 2. Conversion of an interval Type-2 fuzzy set to a number (usually) requires two steps.In the first step, an interval Type-2 fuzzy set is reduced to an interval-valued Type-1 fuzzy set called type-reduction.There are many type-reduction methods available [Karnik'2001].Karnik and Mendel have developed an algorithm, known as the KM Algorithm, used for type-reduction.It is very fast algorithm but iterative.The second step of output processing, after type-reduction, is defuzzification.Since a typereduced set of an interval Type-1 fuzzy set is a finite interval of numbers, the defuzzified value is just the average of the two end-points of this interval.If a type-reduced set of an interval Type-2 fuzzy set is a Type-1 fuzzy set, the defuzzified value can be obtain by any of the defuzzification method applied to Type-1 FL.

Image pre-processing
Image acquisition is a highly important step for the automatic quality control because it provides the input data for the whole process.The acquisition is performed by an optical sensor which is always a video camera with one line or a matrix of CCD, which provide accurate and noiseless image.Local illumination is directly linked with the quality of image acquisition because it is straight forward to demonstrate that its variations can heavily affect the patterns visibility in the image.Consequently the natural sources of light which are nonconstant must not be employed and their influence should be carefully eliminated.Thus the use of a strictly controlled illumination provides good illumination control.Exclusively, one or more artificial light sources are the reasonable alternative.
Pre-processing: Before a computer vision method can be applied to image data in order to extract some specific piece of information, it is usually necessary to process the data in order to assure that it satisfies certain assumptions implied by the method.Examples are a.Re-sampling in order to assure that the image coordinate system is correct.b.Noise reduction in order to assure that sensor noise does not introduce false information.c.Contrast enhancement to assure that relevant information can be detected.d.Morphological Operation The identification of objects within an image can be a very difficult task.One way to simplify the problem is to change the grayscale image into a binary image, in which each pixel is restricted to a value of either "0" or "1".The techniques used on these binary images go by such names as: blob analysis, connectivity analysis, and morphological image processing (from the Greek word morphē, meaning shape or form).The foundation of morphological processing is in the mathematically rigorous field of set theory.However, this level of sophistication is seldom needed.Most morphological algorithms are simple logic operations and very ad hoc.Each application requires a custom solution developed by trial-and-error.Every texture image taken has been implemented with morphological reconstruction using Extended Maxima Transformation (EMT) with thresholding technique.The EMT is the regional maxima computation of the corresponding Horizontal Maxima Transformation (HMT).As a result, it produces a binary image.A connected-component labeling operation is performed, in order to evaluate the characteristics and the location of every object.The extended maxima transform computes the regional maxima of the H-Transform.Here H refers to nonnegative scalar [Karnik'2001].Regional maxima are connected components of pixels with a constant intensity value, and whose external boundary pixels will have a lower value.
There are many techniques for preprocessing available in the literature.In the presented work, images are pre-processed using low pass filter whose mask is given as in eq. ( 5).This preprocessing is applied to remove the noise from the image.Later Image is normalized by taking account of mean and standard deviation.* (5)

Edge detection
Edge detection is a fundamental tool used in most image processing applications to obtain information from the frames as a precursor step to feature extraction and object segmentation.This process detects outlines of an object and boundaries between objects and the background in the image.An edge-detection filter can also be used to improve the appearance of blurred or anti-aliased video streams. [webpage4] The basic edge-detection operator is a matrix-area gradient operation that determines the level of variance between different pixels.The edge-detection operator is calculated by forming a matrix centered on a pixel chosen as the center of the matrix area.If the value of this matrix area is more than a given threshold, then the middle pixel is classified as an edge.Recent techniques have characterized edge detection as a fuzzy reasoning problem [Boskovitz'2002], [Hanmandlu'2004], [Liang'2001&2003], [Miosso'2001].These techniques have presented good and promising results in the areas of image processing and computational vision.Fuzzy techniques allow a new perspective to model uncertainties due to the uncertainty of gray-values present in the images.Thus, instead of assigning gray-values to the pixels in the image, fuzzy membership values may be assigned.Miosso and Bauchspiess [Miosso'01] have evaluated the performance of a fuzzy inference system in edge detection.It was concluded that despite the much superior computational effort, when compared to the Sobel operator, the implemented FIS system presents greater robustness to contrast and lighting variations besides avoiding obtaining double edges.Further tuning of the parameters associated with the fuzzy inference rules is still necessary to further reducing the membership values for the non-edge pixels.The proposed study is the beginning of an effort for the design of new edge detection techniques, using Fuzzy Inference Systems (FIS).

Calculation of the gradients
The prewitt operator measures two components. and Where G x and G y are the prewitt mask convolved with original image, "*" is the convolution operator.The prewitt masks are shown as follows: Prewitt operator is applied on a digital image in gray scale.It calculates the gradient of the intensity of brightness of each pixel giving the direction of the greater possible increase of black to white.In addition, it also calculates the amount of change of the direction.Notion for G x as DH and G y as DV is used for FIS implementation.
The prewitt operator performs a 2-D spatial gradient measurement on an image.Typically it is used to find the approximate absolute gradient magnitude at each point in an input grayscale image.The prewitt edges detector uses a pair of 3x3 convolution masks, one estimating the gradient in the x-direction (columns) and the other estimating the gradient in the y-direction (rows).A convolution mask is usually much smaller than the actual image.As a result, the mask slides over the image, manipulating a square of pixels at a time.
For the purpose of finding out the performance of edge detection, the image is taken from the ORL face database [webpage6].The original image is shown in Figure 3 The gray scale intensity of each pixel of preprocessed image in Figure 3(b) is a value between 0 and 255.The maximum and minimum element values of the matrices given by DH, DV and G for the image shown in Figure 3(b) are listed in Table 1.These values can be used for defining the Type-1 and Type-2 Fuzzy set for antecedent variables.

Edges detection by type-1 FIS
The system implementation was carried out considering that both, the input image and the output image obtained after defuzzification, are 8-bit quantized.The Mamdani method was chosen as the defuzzification procedure, which means that the output fuzzy sets obtained by applying each inference rule to the input data were joined through the add function; the output of the system was then computed as the centroid of the resulting membership function [Jang'95].Block Diagram of Type-1 Fuzzy Logic, with two inputs, one output and 10rules, using the Matlab Fuzzy Logic Tool Box [WebPage 7] is shown in Figure 6.Since the image is preprocessed hence we use the horizontal gradient and Vertical gradient as inputs to Type-1 FIS with Gaussian member ship function For the Type-1 FIS, these two inputs are the gradients with respect to x-axis and y-axis and calculated by equations ( 6) and (7) which are denoted by DH and DV respectively.The ten fuzzy rules that allow to evaluate the input variables, so that the output image displays the edges of the image in color near white (255 gray scale), whereas the background was in near black (0 gray value).The result obtained from Type-1 FIS is outperform the prewitt operator edges as shown in Figure 10.

Edges Detection by Type-2 FIS
Edge detection problems are fuzzy in the nature.The question whether a pixel should become darker or brighter after processing than it is before?Where is the boundary between two image segments?All these questions can be answered in the form of linguistic expressions known as rules.As far as rules are concern the rules do not change."A rule is a rule is a rule…."What does change is the way in which one is going to model and process the fuzzy sets for antecedent and consequent of rules.In Type-1 FL, they are all modeled as Type-1 fuzzy sets, whereas in Type-2 FL, some or all are modeled as Type-2 fuzzy sets.In this implementation the range of pixels intensities are selected as edge pixels.This range can be obtained by Type-2 fuzzy outputs.
Type-2 FIS is implemented using mamdani model with Gaussian type membership function defined over the range of antecedent variables given in Table 1 and is shown in the figure 11 and Figure 12.The same set of rules are used for Type-2 FIS as of Type-1 FIS. Figure 6

Experimentation and simulation results
Figure 15 shows a flow chart representation of implementation procedure for acquiring the edges.A step by step implementation procedure for acquiring the edges is mentioned below.
Step 1. Transform the image into Gray scale pass is through low pass filter and normalize.
Step 3. Apply Type-1 FIS or Type-2 FIS to find the edges.
Step 4. Apply the procedure to high light the pixels which forms the edge pixels and for non edge pixels reduce the intensity value.
Experimentation of above mentioned procedure for obtaining the edges is carried on three different types of image given in Table 2.The image name are mentioned in the first column of table, while second column contains original image, third, fourth and fifth shows the acquired edges of the images by gradient magnitude, Type-1 FIS, and Type-2 FIS respectively.The result shows that Type-2 FIS outperform Prewitt gradient and Type-1 FIS method.

Name
Original Image Gradient Magnitude

Conclusion
The problem of image processing and edge detection under fuzziness and uncertainty has been considered.The role of fuzzy logic in representing and managing the uncertainties in these tasks was explained.Various fuzzy set theoretic tools for measuring information on grayness ambiguity and spatial ambiguity in an image were discussed along with their characteristics.Some examples of edge detection, whose outputs are responsible for the overall performance of a recognition (vision) system, were considered in order to demonstrate the effectiveness of these tools in providing both soft and hard decisions.Gray information is expensive and informative.Once it is thrown away, there is no way to get it back.Therefore one should try to retain this information as long as possible throughout the decision making tasks for its full use.When it is required to make a crisp decision at the highest level one can always throw away or ignore this information.The significance of retaining the gray information in the form of class membership for soft decision is evident.Uncertainty in determining a membership function in this regard and the tools for its management were also stated.Finally a few real life applications of these methodologies are described.
The proposed technique used fuzzy if then rules are a sophisticated bridge between human knowledge on the one side and the numerical framework of the computers on the other side, simple and easy to understand.To achieve a higher level of image quality considering the subjective perception and opinion of the human observers.


The proposed technique is able to overcome the draw backs of spatial domain methods like thresholding and frequency domain methods like Gaussian low pass filter.The proposed technique is able to improve the contrast of the image.


The proposed technique is tested on different type of images, like degraded, low contrasted images.


In this chapter we introduce the Type-2 FIS to detect edges.Type-2 FIS edge detector includes appropriately defined membership function using expert knowledge and decides about pixel classification as edge or non edge.Experimental results shown that, the proposed method extract more integrity of edges and avoid more noise than prewitt operator and Type-2 FIS.
Fuzzy Geometry (Metric, topology,)  Measures of Fuzziness and Image Information (entropy, correlation, divergence, expected values,)  Fuzzy Inference Systems (FIS) (image fuzzification, inference, image defuzzification)  Fuzzy Clustering (Fuzzy c-means, possibility c-means,)  Fuzzy Mathematical Morphology (Fuzzy erosion, fuzzy dilation,) Applications of Edge Detection: Some of the practical applications of edge detection are:-1.Medical Imaging  Locate tumors and other pathologies  Measure tissue volumes  Computer guided surgery www.intechopen.comType-2 Fuzzy Logic for Edge Detection of Gray Scale Images 281  Diagnosis  Treatment planning  Study of anatomical structures 2. Locate objects in satellite images (roads, forests, etc.) 3. Face recognition 4. Fingerprint recognition 5. Automatic traffic controlling systems 6.Machine vision This chapter spread over seven sections.Section 2 briefly describes uncertainties in recognition system.Brief description of Type-2 FIS is given in Section 3, while Section 4 deals with image pre-processing.Edge detection methods are elaborated in Section 5. Section 6 present experimentation and simulation results.Finally, conclusions are relegated to Section 7.

Fig. 2 .
Fig. 2. Block Diagram of Type-2 FIS d. Scale space representation to enhance image structures at locally appropriate scales The following are the generally applied preprocessing methods.a. Contrast adjustment b.Intensity adjustment c.Histogram equalization d.Morphological operation a. Contrast adjustment:The contrast of an image is the distribution of its dark and light pixels.A low-contrast image exhibits small differences between its light and dark pixel values.The histogram of a low-contrast image is narrow.Since the human eye is sensitive to contrast rather than absolute pixel intensities, a perceptually better image could be obtained by stretching the histogram of an image so that the full dynamic range of the image.After stripping away the color from an image (done by setting the saturation control to zero) the grayscale image that remains, represents the Luma component of the image.Luma is the portion of the image that controls the lightness of the image and is derived from a weighted ratio of the red, green, and blue channels of the image which corresponds to the eye's sensitivity to each color.The Luma component of images can be manipulated using the contrast controls in color image.Extreme adjustments to the image contrast will affect image saturation.b.Intensity adjustment: Image enhancement techniques are used to improve an image, where "improve" is sometimes defined objectively (i.e., increase the signal-to-noise ratio), and sometimes subjectively (i.e., making certain features easier to see by modifying the colors or intensities).Intensity adjustment is an image enhancement technique that maps the image intensity values to a new range.The low-contrast images have its intensity range in the centre of the histogram.Mapping the intensity values in grayscale image I to new values, such that 1% of data is saturated at low and high intensities of I.This increases the contrast of the output image.c.Histogram Equalization: The purpose of a histogram is to graphically summarize the distribution of a uni-variate data set.In an image processing context, the histogram of an image normally refers to a histogram of the pixel intensity values.This histogram is a graph showing the number of pixels in an image at each different intensity value found in that image.For an 8-bit grayscale image there are 256 different possible intensities, and so the histogram will graphically display 256 numbers showing the distribution of pixels amongst those grayscale values.Histograms can also be taken of color images.Either individual histogram of red, green and blue channels can be taken, or a 3-D histogram can be produced with the three axes representing the red, blue and green channels.The brightness at each point representing the pixel count.The exact output from the operation depends upon the implementation.It may simply be a picture of the required histogram in a suitable image format, or it may be a data file of www.intechopen.comFuzzy Inference System -Theory and Applications 286 some sort representing the histogram statistics.The histogram graphically shows the following: 1. Center (i.e., the location) of the data; 2. Spread (i.e., the scale) of the data; 3. Skewness of the data; 4. Presence of outliers; and 5. Presence of multiple modes in the data.The Histogram Equalization [wang'95] evenly distributes the occurrence of pixel intensities so that the entire range of intensities is covered.This method usually increases the global contrast of images, especially when the usable data of the image is represented by close contrast values.Through this adjustment, the intensities can be better distributed on the histogram.It allows the areas of lower local contrast to gain a higher global contrast.Histogram equalization accomplishes this by effectively spreading out the most frequent intensity values.Then probability density function (pdf) is calculated for the histogram.
(a) while Figure 3(b) shows the preprocessed and normalized image.The Prewitt mask given by Prewitt_x is convolved with the normalized image shown in Figure 3(b) in the horizontal direction and the obtained edges are as shown in Figure 4(a).Similarly The Prewitt_y is convolved with the image shown in Figure 3(b) in the vertical direction and the obtained edges are as shown in Figure 4(b) .Figure 4(c) shows the edges which are obtained from gradient magnitude, .Figures 5 (a)-(c) show the histogram of the corresponding Images in Figures 4(a)-(c).

Fig. 6 .
Fig. 6.Block Diagram for Type-1 Darken the lines between blocks Inference System

1 .
If (DH is LOW) and (DV is LOW) then (EDGES is LOW) 2. If (DH is MEDIUM) and (DV is MEDIUM) then (EDGES is HIGH) 3. If (DH is HIGH) and (DV is MEDIUM) then (EDGES is HIGH) 4. If (DH is HIGH) and (DV is MEDIUM) then (EDGES is HIGH) 5.If (DH is MEDIUM) and (DV is LOW) then (EDGES is MEDIUM) (DH is LOW) and (DV is LOW) then (EDGES is LOW) 7. If (DH is LOW) and (DV is HIGH) then (EDGES is HIGH) 8.If (DH is LOW) and (DV is MEDIUM) then (EDGES is MEDIUM) 9.If (DH is MEDIUM) and (DV is HIGH) then (EDGES is HIGH) 10.If (DH is HIGH) and (DV is HIGH) then (EDGES is HIGH)
also shows the block diagram for Type-2 FIS.The only difference between Type-1 and Type-2 FIS is the way the fuzzy sets are defined and processed for antecedent and consequent variables in this implementation.Type-2 FIS has been implemented in MATLAB using "Toolbox for Type-2 Fuzzy Logic" developed by prof(Dr)Oscar castillo [WebPage8].The edges acquired by Type-2 FIS is shown in Figure14.Comparing the Fig.14with Fig.4and Fig.10, it shows that Type-2 FIS provide enhanced flexibility in choosing the pixel values.Hence, the result obtained from Type-2 FIS outperforms the prewitt operator and Type-1 FIS results.

Type 2 .
Original Images, their name, and obtained edges by GM, Type-1, and Type-2 FIS www.intechopen.comFuzzy Inference System -Theory and Applications 296 [Heath'1996]dges detection techniques normally methods like Canny, Narwa, Iverson, Bergholm y Rothwell[Heath'1996]are applied.Others methods can group in two categories: Gradient and Laplacian.The gradient methods like Roberts, Prewitt and Sobel detect edges, looking for maximum and minimum in first derivative of the image like the Laplacian methods find the zeros of second order derivative from the image [webpage5]Edges are extracted from the enhanced image by a two-stage edge detection operator that identifies the edge candidates based on the local characteristics of the image.Examples of gradientbased edge detectors are Roberts, Prewitt, and Sobel operators.All the gradient-based algorithms have kernel operators that calculate the strength of the slope in the directions which are orthogonal to each other, commonly vertical and horizontal.Later, the contributions of the different components of the slopes are combined to give the total value of the edge strength.
The vertical edge component is calculated with kernel prewitt_y and the horizontal edge component is calculated with kernel prewitt_x.The operator uses two 3×3 kernels [Green'02] and they are smaller than image size.These kernels are convolved with the original image.Convolution is a mathematical way of combining two signals to form a third signal.It is the most important technique in Digital Signal Processing.Using the strategy of impulse decomposition, systems are described by a signal called the impulse response.Convolution is important because it relates the three signals of interest: the input signal, the output signal, and the impulse response.These kernels are convolved with the original image to calculate approximations of the derivatives, one for horizontal changes, and one for vertical.If we define I as the source image, and G x and G y are two images which at each point contain the horizontal and vertical derivative approximations, they are computed as:

Table 1 .
Minimum and Maximum element value of the matrices for Preprocessed Image, DH, DV and G www.intechopen.comType-2Fuzzy Logic for Edge Detection of Gray Scale Images