Gradient-based methods for orientation estimation involve two essential steps: (1) finite differences in the x and y directions and (2) smoothing. Smoothing of the image prior to computing the gradient is generally a must, for purposes of preventing large spikes in the derivative due to sharp edges and spurious noise. Smoothing of the gradient vectors (in their doubled-phase representation) is also commonly employed either as a prefiltering step for subsampling or simply for purposes of locally homogenising the flow of the orientation vectors.
As an example of a gradient-based method for orientation estimation, we will focus on the method of Kass & Witkin. The first step in this method is to smooth the image with an isotropic filter such as a Gaussian or a difference of Gaussians. They recommend a filter of the form
where
, and the ratio of
to
is
chosen to be in the range from 2 to 10. The smoothed image
C(x,y) is then differentiated (via finite differences) in the x
and y directions to obtain the directional images
and
. Next, the vector field J(x,y) is formed by combining
and
as follows:
The arguments of the elements of J(x,y) are then doubled by means of
squaring J(x,y), the real and imaginary parts of which are
denoted by
and
:
In addition, the gradient magnitude
is computed as
The next step is to convolve each of
,
and
with a
smoothing function W(x,y):
A Gaussian smoothing function is recommended for this step for computational efficiency. The orientation direction is then computed from the formula
while the coherence of the orientation is computed from the formula
The coherence is a special ratio which conveniently ranges between 0 and 1, where 0 indicates a region with no dominant orientation and 1 indicates a region with a strong dominant orientation.