Roberts edge detector.
function call:
[out_img1]=vsg('Roberts',in_img1);
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 simplest gradient edge detector, the Robert cross operator, computes
the first derivatives in two orthogonal directions. This is calculated
from cross differences, implemented using two 2×2 convolution kernels.
out_img1 - An image which
has dimensions the same as the input image. The output image displays
the result of using a roberts kernel on the input image, which
highlights edges.
Example:
img = openimage('lake.jpg');
h=figure;image(img); set(h,'Name','Input');
[out_img1]=vsg('Roberts',img);
h=figure; image(uint8(out_img1));set(h,'Name','Roberts Edge
Detection');
Notes:
For DICOM and RGB images, the function operates on each channel/slice
separately.