Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

answer question 6 and 7 (image processing using matlab (edge detection)) Display

ID: 3813001 • Letter: A

Question

answer question 6 and 7 (image processing using matlab (edge detection))

Display the horizontal and vertical convolution results from the Sobel operator. [I_sob4, t, I_sobv, I_sobh] = edge(I, 'sobel'); figure subplot(2, 2, 1), imshow(I), title('Original Image'); subplot(2, 2, 2), imshow(I_sob4), title('Complete Sobel'); subplot(2, 2, 3), imshow(abs(I_sobv), []), title('Sobel Vertical'); subplot(2, 2, 4), imshow(abs(I_sobh), []), title('Sobel Horizontal'); Why do we display the absolute value of the vertical and horizontal Images? Change the code In step 7 to display thresholded (binarized), not thinned, versions of all images. As you may have noticed, the edge function returns the vertical and horizontal images before any thresholding takes place.

Explanation / Answer

In sobel operator, there is a 3x3 kernal ,which is applied on particular image,In Vertical kernal the 2nd column is filled with all zeros.And in horizontal kernal the 2nd row is filled with all zeros.

Horizontal mask Vertical Mask

-1 -2 -1   -1 0 1
0 0 0 -2 0 2
1 2 1 -1 0 1

when we apply these mask on original edge then it calculate the difference between right and left pixel values around that zero's edge for vertical mask.In horizonatal mask  it calculate the difference between upper pixel value and lower pixel values.That time we can get some negative values also which doesn't show the intensity value of edges.So to increase the edge intensity and it become enhanced comparatively to the original image. We use absolute function,which gives the magnitude of calculated value,It gives positive values of edge detection.So the edges can be seen with high intensity in both vertical direction and horizontal direction.This absolute function is used to get the magnitude of complex numbers also.