Generating a Sketch from an Image
(Using New and Efficient Edge Detectors)
Yumnam Kirani Singh
Center for Developement of Advanced Computing, Kolkata.
Generating a sketch from an image requires detection of the informative edges in the image which will be required for the generation of the sketch. There are commonly used edge detectors, Sobel, Canny and Laplacian of Gaussian ( also known as LoG). Tutorial on sobel and Laplacian edge detectors is available in in website http://www.pages.drexel.edu/~weg22/edge.html. Also, tutorial on Canny's edge detector is available in the website http://www.pages.drexel.edu/~weg22/can_tut.html. Of these, Canny's edge detector is widely accepted as the most effective edge detector. An overview of several edge detection techniques is also provided in the paper by Djemel Ziou and Salvator Tabbone. One of the most recent paper which suggests statistical approcah for the improvement of performance of classical edge detectors is Thresholding in edge detection: A statistical approach. Some researchers, also use wavelet transform for edge detection. There are several pointer on this topic. A master thesis by Jun Li titled A wavelet approach to edge detection may be mentioned. Even if the complexity of edge detection algorithm increases in the case of wavelet based edge detection but the increase in performance is not very significant. The performance of all these edge detetors are depedent on the types of images to be detected. We develope a new edge detector which is simple and better in performance as compared with the existing algorithms as seen images shown below.
The basic principles behind all edge detectors are the same. Every edge detector tries to detect the region of the image where abrupt change in the intensity of the pixels occurs. To detect such a change in the whole region of the image, several types of high pass filters are used. These filters are also commonly known as edge detector masks. Some of the masks are specially design for detecting vertical or horzontal or slant lines. But for faithful generation of an sketch, a detector which can detect edges in all directions is preferred.
The next step after applying the filter is to extract those edge regions from the rest of the image. This is usually done by thresholding the filtered image at an appropriate threshold level, ecxept in case od Canny's method where two threshold levels are used. Here, the selection of threshold level is crucial to obtain a good sketch. We should choose such a threshold level that would provide us not only the edge portion but also reduce the noise significantly.
Usually, a smoothing filter precdes the edge detector to help reducing the noise during the threshold operation to extract the edges. But applying a smoothing filter before applying a high pass filter shifts the edge position in the image. As a result, in some images the extracted edges appears to be distorted. This can be avoided if we apply a edge detecting mask formed by combination of highpass and lowpass filters. We developed new edge detectors which preserve the edge information of an image enabling the generation of faithful sketch of the image.
There are several uses of edge detectors ranging from computer or robotic, object recognition, face recognition to object classification, image analysis etc. But a few which can be immidiatly applied in our day to day life are listed beolow.
-
In the glass printing.
-
In newspaper and megazine to provide a meaningful sketch than a blurry binary image.
-
In Embroidary or Sari designing.
-
In saving memory space in image archives.
Let us see the some of the sketches generated using our newly developed filters. First an sketch of Lord Ganesh generated from our program after removing noise is shown below. The sketch resembles the original idol, that is the sketch itself is the informative representative of the image.
Sketches obtained by using sobel, Canny and Laoplacian of Gaussian edge detectors and our newly developed edge detectors are shown below for comparison. These sketches are generated by using the programs written in MATLAB. The sketches of the Sobel, Canny and LOG edge detectors are generated using the built-in function in MATLAB. These sketches have black background and our sketches generated by our program have white background. Another distinguishing feature is that sketches generated by using our edge detection method preserves the natural edge information. Several images of interests are also provided in the later part of the webpage.
Sketch generated using Sobel's edge detector, Threshold=0.045
Sketch generated using Canny's edge detector, Threshold= [0.025 0.175], standard deviation=1.25
Sketch generated using Laplacian of Gaussian edge detector, Threshold=0.0025
Sketch generated using our new edge detector, Threshold=125
Sketch generated using Sobel's edge detector, Threshold=0.055
Sketch generated using Canny's edge detector, Threshold= [0.0350 0.125], standard deviation=1.75
Sketch generated using Laplacian of Gaussian edge detector, Threshold=0.0035
Sketch generated using our new edge detector, Threshold=85
Sketch generated using Sobel's edge detector, Threshold=0.065
Sketch generated using Canny's edge detector, Threshold= [0.015 0.045], standard deviation=1.25
Sketch generated using Laplacian of Gaussian edge detector, Threshold=0.0055
Sketch generated using our new edge detector, Threshold =105
Sketch generated using Sobel's edge detector, Threshold=0.85
Sketch generated using Canny's edge detector, Threshold= [0.075 0.155], standard deviation=1.75
Sketch generated using Laplacian of Gaussian edge detector, Threshold=0.0115
Sketch generated using our new edge detector, Threshold=125
Sketch generated using Sobel edge detector, Threshold=18
Sketch generated using Canny's edge detector, Threshold=[0.0375 0.125], Standard Deviation=1.35
Skecth generated using LOG, Threshold=1.05
Sketch generated using our new edge detctor, Threshold=110.
From the above sketches, we see that our new edge detector gives less distorted sketch of an image. Also, the sketches generated from our edge detectors are more natural than those prouced by the existing edge detectors. With a little post processing or cleaning process of the generated sketch we can produce nice sketches of images of interests. Some Interesting Sketches after smoothing are provided below.
WATER COLORED
Some Well Known figures
APJ Abdul Kalam, Albert Einstein, Aung Sang Suu Kyi, George Bush, Jyoti Basu, Dalai Lama, Mahatma Gandhi and Indira Nehru, Lalu Prasad Yadav, Lata Mangeshkar,Manmohan Singh, Th. Meinya, Laishram Mema and Pandit Jasraj, Osama Bin Laden, Rabindranath Tagore, Rajiv Gandhi























