We use simple finite difference operators to perform edge detection on the cameraman image. Specifically, we convolve the filters Dx = [-1 1] and Dy = [1 -1]T with the image to get the partial derivatives in x and y directions. The gradient magnitude is computed as res(i,j) = sqrt(cameraman_dx(i,j)2 + cameraman_dy(i,j)2), which accounts for edges in all directions. Finally, we binarize the image by setting pixels above 50 to 255 and others to 0. As we can see, the thresholds for this is 0.2.
First of all, I used a Gaussian filter to blur the original image:
As we can see the iamges below, the images show that applying finite difference filters after blurring with a Gaussian filter yields smoother edges compared to applying the filters directly, as in part 1.1. The resulting edge-detected images have continuous, less jagged edges. By combining blurring and derivative filters into a single Derivative of Gaussian (DoG) filter, we achieve smooth edge detection with just one convolution. The DoG filter results match those seen previously, demonstrating the effectiveness of this approach.
In this part, we will first blur the images and then sharpen them. Here are the images:
Derek&Nutmeg
Lion&Cat
Frequency
Gaussian Stack of Apple and Orange:
Laplacian Stack of Apple and Orange:
Results in each levels:
Oraple
Chick&Desert