CANNY EDGE DETECTION
It checks the pupil and iris boundaries from image being captured. It shows the efficient eye edges. Therefore, the accurate pupil edge is produced for detecting the image.
The algorithm consists of five different steps, namely, Finding, Smoothing, maximum suppression, gradients, Edge tracking by hysteresis and Non- Double thresholding. The steps are explained below:
It is expected that the images may take from camera that has a little amount of noise. To remove that noise may get mistaken by means of edges, noise should be reduced. Therefore, in the initial stage, the image got smoothed with a Gaussian filter. The main objective for smoothing is the removal of noise from blur images.
With the change of the image of grayscale intensity, the edges being find out on the basis of canny algorithm. The areas are detected for determining the image gradients. As of the smoothed images, the points of gradient are determined for every pixel with Sobel-operator. The initial step is to estimate the gradient in the x direction as well as y-direction with kernels.
The magnitude of gradient is also known as edge strengths that can be determined with Euclidean distance calculated by Pythagoras Law as depicted in below equation (1). It is occasionally can be simplified with Manhattan distance as depicted in Equation (2) for reducing the complexity of computation. The measure of Euclidean distance measure can be applied for the test image.
being the gradients into the x- and y-direction correspondingly. An image of gradient magnitudes shows the edges clearly. The edges are basically broad and does not depicts where the edges are staying. For making it possible for determining this, the edges direction should be stored and calculated as depicted in equation below.
It is used for converting blurred edges into image with the gradient magnitudes for making sharp edges and this is executed by the preservation of local maxima into gradient image with removing the left. This algorithm is intended for every pixel existed in gradient image:
- To round the gradient direction θ to adjacent coordinate, for using 8-connected neighborhood.
- To compare the edge strength of current pixel by pixel edge strength into negative and positive radiant direction.
- If the strength of edges for current pixel is more; protect the edge strength value. If not, then remove the value.
The edge-pixels left even after the marking of non-maximum suppression step by the strength pixel-by-pixel. Few of them would have true edges presented in image, but few might cause color or noise variability for instance because of rough surfaces. The easy way for distinguishing among them will be used as a threshold and later simply strongest edge value will be conserved. The edge pixels are stronger as compare to high threshold and are considered as strong but the edge pixels are weaker as compare to low threshold. The edge pixels among the two thresholds are considered as weak.
Edge tracking by hysteresis
The strong edges are known as certain edges and could instantly include the images of final edge. The weak edges are incorporated if they have a connection with strong edges. The logic is the noises with another little variation are improbable to strong edge result. Therefore, strong edges would be the true edges existed in original image. The final type would probably be dispersed separately of edges in the entire image. Only a less amount would be located adjoining to the strong edges. The weak edges are because of the true edges that are more likely to be linked straight to strong edges.