Sobel edge detector.


function call:




in_img1 input image, 3 channel RGB, 1 channel greyscale or binary image, or DICOM image.



The Sobel edge detector uses a 3×3 mask to determine the gradient. The derivatives are calculated using the two convolution masks which are than summed. These have an inherent smoothing effect, which makes the very effective in the presence of noise.

out_img1 - An image which has dimensions the same as the input image. The output image displays the Sobel filtered input image, which highlights edges.



img = openimage('lake.jpg');

h=figure;image(img); set(h,'Name','Input');


h=figure; image(uint8(out_img1));set(h,'Name','Sobel Edge Detection');


For DICOM and RGB images, the function operates on each channel/slice separately.

Home       Functions       Back