SIP Toolbox
getangle - gradient direction of edges
Calling Sequence
- theta = getangle(DeltaX, DeltaY)
Input Parameters
-
DeltaX and
DeltaY:M x N intensity images, resulting from convolution
with gradient masks in two orthogonal directions
Output Parameters
-
theta:
Intensity image. Each pixel has the getangle of the approximated
gradient, in radians. Where DeltaX is zero,
theta is taken as PI/2.
Description
The function getangle obtains the gradient direction theta from images yielded from convolution with gradient masks in direction x and y (DeltaX and DeltaY, respectively).
Examples
initial_dir = PWD;
chdir (SIPDIR + 'images');
Img = imread('disks.bmp');
xbasc()
imshow(Img,2);
Dx = edge(Img,thresh=-1, direction='horizontal');
Dy = edge(Img,thresh=-1, direction='vertical');
t = getangle(Dx,Dy);
imshow(t,[])
chdir(initial_dir);
Authors
-
Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>
Availability
The latest version of the Scilab Image Processing toolbox can be found at
http://siptoolbox.sourceforge.net
See Also
edge,