ROBERTS_ED_CVIP
roberts_ed_cvip() - performs a Roberts edge detection.
Contents
SYNTAX
edge_mag = roberts_ed_cvip( input_image, Type )
Input Parameters include :
- input_image - input image.
- Type - The operator type.It can be either 1 or 2.
Type 1- Regular gradient
G[I(r,c)] = ( (I(r,c) - I(r+1,c+1)).^2 + (I(r+1,c) - I(r,c+1)).^2 )^1/2
Type 2- Roberts gradient
G[I(r,c)] = |I(r,c) - I(r+1,c+1)| + | I(r+1,c) - I(r,c+1)|
output Parameters include:
- edge_mag - corresponding magnitude image.
DESCRIPTION
This function applies the Roberts edge detection operator to the input_image. It is a simple approximation to the first derivative. It will work best with binary images. There are two forms of Roberts operator.
- Type 1:
- Type 2:
The edge points are marked in the output image edge_mag.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
% read image input_image = imread('butterfly.tif'); % Type Type = 2; % Calling function edge_mag = roberts_ed_cvip(input_image, Type); % Display input image figure;imshow(input_image);title('Input Image'); % Display output image figure; imshow(hist_stretch_cvip(edge_mag,0,1,0,0));title('Output Image');
CREDITS
Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website