angle — gradient direction of edges
theta = angle(DeltaX, DeltaY)
M x N
intensity images, resulting from convolution
with gradient masks in two orthogonal directions
DeltaX
is zero,
theta
is taken as PI/2.
The function angle
obtains the gradient direction theta
from images yielded from convolution with gradient masks in direction x and y (DeltaX
and DeltaY
, respectively).
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 = angle(Dx,Dy); imshow(t,[]) chdir(initial_dir);