<< Chapter < Page | Chapter >> Page > |
where Gx and Gy are the values of the partial derivatives along the x and y directions, respectively, at the pixel located at (i, j)of the image A.
A variety of different discrete differentiation operators exist to approximate the gradient of the image. The operator we choose in our implementation is the Sobel operator.
Like our Gaussian kernel, the Sobel operator (in both the x and y directions) is separable:
Thus, we perform two separable convolutions with the separated Sobel filter on the Gaussian-filtered image to obtaingradients in the horizontal and vertical directions, and determine the magnitude and angle matrices G and Theta fromequations (5) and (6).
Given the gradient magnitude and direction of the Gaussianfiltered image, the final step of the edge detection algorithm isto determine which pixels should be selected as edge pixels, and which should be rejected. We define two procedures, nonmaximumsuppression and selective thresholding, to gain a reasonably accurate edge map from the gradient.Non-maximum suppression selects and rejects edge pixels according to the following criteria:
The selective thresholding technique extends on the procedure of non-maximum suppression. For any pixel that passes crtiteria(2) (maximized, relative to the neighboring pixels, along the gradient direction), consider an a x a box around the pixel.If any pixel within the box exceeds the low threshold tl, then the pixel is accepted. This technique attempts to catch pixelsthat might “connect” ridge pixels identified by criteria (2) but fail to satify the criterion themselves, in order to create morecontinuous edge lines.
We begin with a parallelized implementation of separable convolution, since the same convolution operation is applied for both the initial Gaussian low pass filter and the edge detectingSobel filter. Our parallel implementation involves first independently computing the convolution with the horizontalfilter (h2 in Equation (2)), then convolving that result with the vertical filter h1. In computing the output y[m; n]at every index (i, j), we launch a kernel with 16 threads per block,where the total number of blocks along one dimension is equal to the size of that dimension divided by 16. For our5312 x 2988 test images, this corresponds to 332 blocks in the horizontal direction and 186 blocks in the vertical direction,each with 16 computational threads.
Notification Switch
Would you like to follow the 'Elec 301 projects fall 2015' conversation and receive update notifications?