Laplacian

Laplacian edge detector. User defined 4-connected or 8-connected neighbourhood.

 

function call:

[out_img1]=vsg('Laplacian',in_img1,connected);

 

Arguments:

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

connected – an integer specifying whether a 4 or 8 connected scheme should be used.

 

Description:

The Laplacian function performs  second-order derivative on the image. The out_img1 - An image which has dimensions the same as the input image. The output image displays the result of using a laplacian kernel on the input image.

 

Example:

img = openimage('lake.jpg');

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

[out_img1]=vsg('Laplacian',img,8);

h=figure;imagesc(out_img1(:,:,1));colormap(gray);set(h,'Name','Laplacian');

Notes:

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

Home       Functions       Back