Edge Detection Algorithms VS-active Contour for Sketch Matching : Comparative Study

Sketch based image retrieval method is still a new filed under development process in the research area. The main idea of image retrieval by sketch is to detect or bound the object in images which stored in the database and match it with a query which inserted as a sketch. This study displays the edge detection algorithms like (Sobel, Canny) and compare the results with contour active (Snakes) boundary methods. The results of those methods prepared to match with the query sketch. The experimental results show that Snakes algorithms registered as the best in matching process which fabricate a differentiated boundary detection of image objects. For more validity of this method used, the annotation of each matched image has been checked and approved that the contour (Snakes) boundary method is more precise in image retrieval.


INTRODUCTION
Over 200 billion images can be viewed on the internet.This number is daily increasing by the modern systems like Mobil phones, digital cameras, I pad.This results big challenge in retrieving designated images which are recognized by a unique number on the Internet like the URI (Unique Resource Identifier), which is the tool used to access the images on the internet (Cai et al., 2008).
Sketch Based Image Retrieval (SBIR) is another method to use spontaneous stimulation between computer and human for showing their purpose.This kind is an emerging worldwide spread schedule due to the fast expanding use of smart systems and other touch screens.This idea is an attempt of creating a technical way to watch (SBIR) in looking for image repositories and re-edit the images that are satisfying the desires (Saavedra and Bustos, 2013).The query by sketch still challenges to build a real time sketch based image search engine and the problem still hold to match the sketch without color with the image have complete feature.The main two shape characteristics are boundbased and region-based (Abdulbaqi et al., 2014).Many of researchers deals with filters and edge detections like Canny, Sobel and Snakes to detect the objects and bounders to make image represents like the sketch, then used this detection to retrieve image based on the sketch.In this study, we test and used the suitable filter in the first step in a retrieval process because of the image represented like the sketch the matching methods between (query and image) easy and accuracy computed for every object specified in the database.The (SBIR) are classified as globally and Local technique.One of the important global techniques is Edge Histogram Descriptors (EHD), (Eitz et al., 2009a) Proposed methods deal with in a part of the MPEG-7 and get a local distribution of edges type like (vertical line, Horizontal line, diagonal 45 ○ , diagonal 135 ○ and no direction).
Other methods proposed by Saavedra and Bustos (2010) Histogram of Edge Local Orientation (HELO) to calculate a K-bin histogram based on local edge Orientation, this method works to get the feature vector a sketch divided into w*w grids and estimated for each cell grid edge orientation is computed, finally used to measure dissimilarity between histogram Manhattan distance.While the local technique always represents a sketch by a set of feature vector and use structure of information that lead to high accuracy retrieval images, (Rui et al., 2010) using Gradient Fled image (GF) above which local descriptor to compute.
Key shape a method was proposed by Saavedra and Bustos (2013) to detect a simple shape from image and linked with a Bag of Feature (BOF) to a chive effect of retrieving images.They used the structure of shapes property of objects by means for detecting simple geometric shapes.Chen et al. (2009) proposed to make high quality images.His endeavors fruited well, by means of a freehand sketch annotated with text labeled after filtering the undesired picture features, the sketch to photorealistic.The researcher found out two basic methods to get the goal.
The first one is filtering then selecting pure, simple backgrounds as far as possible to get rid of any possible undesired features.The second step is using a novel hybrid blending approach, in order to get well better picture quality composes.Finally, the whole process was targeting to transform the sketch to photorealistic

EDGE DETECTION ALGORITHMS
The first steps to matched the image in a by sketch as a query to be achieve high accuracy of retrieval, image based on sketch, its need to convert the image to be like sketch as query in representation, In specific things transformation the image with color and texture to be like sketch (query), they used the edge detection methods to detect the main object in an image and become more stable to matching ( Bustos, 2013).
For computer vision problem the boundary detection is important, well-it would be good to have algorithms which know all objective that image includes.Determining boundaries could require object specific inference (e.g., I know this object's boundary because I recognize this as a swan or a girl or flower, ...act) making boundary detection "vision, hard" (ElAlami, 2014).In our works the classical edge detection algorithms, including the Canny, Sobel and snakes baselines we will compare each of them against the sketch to show which one be nearest the sketch in representation.

Sobel edge detector:
The Sobel edge detector performs a 2-D spatial gradient measurement on an image and so confirms regions of high spatial frequency that corresponds to edges.This operator used to find the absolute gradient magnitude of the input grayscale image at each point.The operator include of a pair of (3×3) convolution kernel, shown in Fig. 1 ( et al., 2000).These kernels are designed to respond maximally to edges running vertically and horizontally relative to the pixel grid, one kernel for each of the two perpendicular orientations (8).The Sobel operator is slower to compute than the Roberts Cross operator, but its larger convolution kernel smooths the input image to a greater extent and so makes the operator less sensitive to noise.Generally the operator also produces considerably higher output values for similar edges compared with the Roberts Cross (Li et al The magnitude of the gradient is then calculated using the formula: An approximate magnitude can be calculated using: Res. J. Appl. Sci. Eng. Technol., 11(7): 759-764, 2015 760 to make high quality images.His endeavors fruited well, by means of a freehand sketch annotated with text picture features, the sketch to photorealistic.The researcher found out two The first one is filtering then selecting pure, simple backgrounds as far as possible to get rid of any possible p is using a novel hybrid blending approach, in order to get well better picture quality composes.Finally, the whole process was targeting to transform the sketch to photorealistic.

DGE DETECTION ALGORITHMS
The first steps to matched the image in a database by sketch as a query to be achieve high accuracy of retrieval, image based on sketch, its need to convert the image to be like sketch as query in representation, In specific things transformation the image with color and (query), they used the edge detection methods to detect the main object in an image and become more stable to matching (Saavedra and For computer vision problem the boundary it would be good to have ich know all objective that image includes.Determining boundaries could require objectspecific inference (e.g., I know this object's boundary because I recognize this as a swan or a girl or flower, ...act) making boundary detection "vision, hard" ).In our works the classical edge detection algorithms, including the Canny, Sobel and snakes baselines we will compare each of them against the sketch to show which one be nearest the sketch in Sobel edge detector D spatial gradient measurement on an image and so confirms regions of high spatial frequency that corresponds to edges.This operator used to find the absolute gradient magnitude of the input grayscale The operator include of a pair of in Fig. 1 (Principe , 2000).These kernels are designed to respond maximally to edges running vertically and horizontally relative to the pixel grid, one kernel for each of the two perpendicular orientations (8).The Sobel operator is slower to compute than the Roberts Cross operator, but its larger convolution kernel smooths the input image to a greater extent and so makes the operator less sensitive r also produces considerably higher output values for similar edges et al., 2009).The magnitude of the gradient is then calculated (1) be calculated using: To fulfill these objectives, the edge detection process may include: • Image smoothing by the 2-D Gaussian function of the width parameter (σ) Eq. ( 3): • Different derivative operator and Edges give ridges in the gradient magnitude image.(Pitas 95 • Non-maximum suppression the maximum suppression is done for each edge in an image say (p), such that the edge intensities of its side neighbors (in the direction of its gradient) a computed.If one of these two neighbors has its intensity greater than (p) intensity, the (p) is removed from edge map.This process removes weak edges and actually, few edges will be removed.• Edge Threshold, in the modified threshold used with Canny operator is called "hysteresis".Most operators utilize a single threshold limit, which means that if the edge values fluctuate above and below this value the line will operate broken.Hysteresis threshold is done by setting an upper and lower edge value limit.Considering a line gradient, if a value lies above the upper threshold limit it is immediately accepted.If the value lies below the low threshold, it is immediately rejected (Price 96, Marcal 97).A point, which lies between the two limits, is accepted if it is connected to pixels, which exhibit strong response.This method helps to ensure that a noisy edge does not break up into multiple edge fragments.In this study depict a map image and its edge computed using a Canny with σ = 0. 3.

SNAKES ACTIVE CONTOUR MODEL
Snakes active contours are computer generated curve that move within images to find object (2) Canny defined a set of goals for an edge detector and described an optimal method for achieving them.Canny specified three issues that an edge detector must address, these are Error rate, Localization and Response).objectives, the edge detection D Gaussian function of the width parameter (σ) Eq. ( 3): (3) Different derivative operator and Edges give rise to ridges in the gradient magnitude image.(Pitas 95).
the process of nonmaximum suppression is done for each edge in an image say (p), such that the edge intensities of its side neighbors (in the direction of its gradient) are computed.If one of these two neighbors has its intensity greater than (p) intensity, the (p) is removed from edge map.This process removes weak edges and actually, few edges will be the modified threshold used erator is called "hysteresis".Most operators utilize a single threshold limit, which means that if the edge values fluctuate above and below this value the line will operate broken.Hysteresis threshold is done by setting an upper it.Considering a line gradient, if a value lies above the upper threshold limit it is immediately accepted.If the value lies below the low threshold, it is immediately rejected (Price 96, Marcal 97).A point, which lies between d if it is connected to pixels, which exhibit strong response.This method helps to ensure that a noisy edge does not break up into multiple edge fragments.In this study depict a map image and its edge computed using a Canny

CONTOUR MODEL
Snakes active contours are computer generated curve that move within images to find object boundaries (Serdar and Burak, Year).The real image with (color, texture, ..., etc) cannot matched with sketch (no sound of any color, texture, ..., etc), to make the image representation like the sketch, we used a snakes operator to boundary the shape with edge detection for three reasons: • Snakes can go into connectives • Can be initialized anywhere, even across boundaries • Active contour models provide a unified solution to several image processing problems such as the detection of light and dark lines and edges; they are often used to segment spatial and temporal image sequences.
Gradient Vector Flow (GVF): Gradient Vector Flow (GVF) snakes are "an extension of the well-known method snakes or active contours (Lim et al., 2013) The difference between traditional snakes and GVF snakes consists in that the latter converge to boundary concavities and they do not need to be initialized close to the boundary.The benefit of (GVT) its can go into concavities and can be initialized anywhere, even across boundaries show equation (1, 2, 3) (Xu and Prince, 1998): where, α and β are weighting parameters that control the snake's tension and rigidity, respectively and x'(s) and x " (s) denote the first and second derivatives of x (s) with respect to s.The external energy function E ex is derived from the image so that it takes on its smaller values of the features of interest, such as boundaries (Wu et al., 2010).

EXPERIMENTAL RESULTS
In this study used Dataset of (EITZ) images and sketches, our test data set includes images from (EITZ) are (swans, girl, mugs, flowers, bridge) and also the data set includes a sketch on Eitz et al. (2009b).The purpose of this study is to choose watch operators of edge detection gives result nearly of sketch looks.
We apply three famous operators of edge detection to boundary the objects and make the image be used in matching with sketch and used it later as a first step in image retrieval based on the sketch.Now we describe our approach to detecting objects using a two edge detector (Sobel, Canny) and active contour boundary.
After applying the mask (1) of Sobel on the image and calculate the magnitude of the gradient by Eq. ( 1) and Eq. ( 2) calculate approximate magnitude we obtained the result of Sobel, also canny detection by using Eq. ( 3) notice that generated an indistinct edge image because of this chaotic the method gives a result with low effectively in matching with query (sketch).This problem can solve by applying the canny operator in each scale (Saavedra and Bustos, 2013) in this study we apply canny operator for each scale after the image resize by factor 0.5 this process iterates until the image becomes less than 150 pixels in two dimensions the result become clearer in there'd iteration as show in Fig. 2. Finally, applying the snakes active contort on the image and using (GVF) concavities it be initialized anywhere, even across boundaries used Eq.(4,5,6).
Sketch that comparison with images, select from (ETHZ images and models) dataset such as mugs and swans,..., etc.), that we used it in this study as show in Fig. 3.
We applied the descriptor (edge map) on four groups of image and covert the result to be comparable between the edge detectors methods and sketch.The experimental result shows in Fig. 4.

DISCUSSION
The present work proposes the results of the edge detectors (Sobel, canny) and the active contour application, as shown in (Fig. 4) On the images taken from the dataset that contain images of four diverse shapes-based classes, collected from Flickr and Google Images (ETIZ dataset).We noted in the result of Sobel detector gives a good result of edge detected, but they have multi unwanted elements represent abarrierin the matching process.In ourcase study, even if passes a filter on it still not affected in the matching process with sketches, because make confuse in retrieving images.On the other hand it is useful if compared with sketches that have been drawn by the artist to detect facial images in the field of criminology.
As show in Fig. 4 we found the Canny edge detector has good results when makeover the canny downsampling until we reach there'd iteration, the third iteration get good result, but still have noise in the result and unwanted details in the images after applied the edge detection (Canny), while Snake active contour boundary gives a good result without noise and unwanted details to make active matching process.The edge detection algorithm and active contour was applied on 200 images from ETHZ dataset and these images were classified into four groups.The result of this work include the top 10 images that give good result in matching with sketch (by objects and conform this matching with annotation attendant with these images).Figure 5 shows the four groups of images.Each group contains 50 images applied with edge detector (Soubel and Canny) and active contour.We also take the average of similarity (visually by eye) (objects and annotations) with the sketch by each group.

CONCLUSION
In this study we have presented the edge detection vs. active contour algorithm to detect objects by the application of Sobel, Canny, and Snakes boundary active contour in real images in the database, then matched the result with the sketch.We have applied this works in the 200 images classified into 4 groups with each group containing 50 images.The results of applied Sobel operator was unsuitable because they display details that make the match with a sketch not accurse.On the other hand the Sobel edge detector is useful if compared with sketches drawn by experts to detect criminals because the details are very important in this field.Also, Canny gives the unwanted result of noise appearing in the map image, and for that we have improved this algorithm by applying downsampling over the Canny.This process is repeated until we remove the noisy and unwanted details until reaching iteration 3 but still have a weak result when matching with the sketch.Finally the snake boundary active contour produces encouraging results after increasing the number of removed small edges by using suitable thresholding.The boundaries of an object give very accurate matching of both objects and annotations with a sketch which makes us dependent on the future works for progress of image retrieval based sketch by recognizing the content of the context of an object and using it to describe the shape semantically as a base of sketch image retrieval.
Fig. 1: Sobel operator convolution masks 2000) |G| = |Gx |+| Gy| Canny edge detector: John Canny defined a set of goals for an edge detector and described an optimal method for achieving them.Canny specified three issues that an edge detector must ad (Parker 97) (Error rate, Localization and Response)To fulfill these objectives, the edge detection process may include: masks(Principe et al.,