Name

getangle — gradient direction of edges

Calling Sequence

theta = getangle(DeltaX, DeltaY)

Parameters

DeltaX, DeltaY
M x N intensity images, resulting from convolution with gradient masks in two orthogonal directions
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.sf.net>

Availability

The latest version of SIP can be found at

http://siptoolbox.sf.net

See Also

edge