At each pixel, the second-order derivarives (i.e., \(f''_{xx}\),
\(f''_{xy}\), and \(f''_{yy}\)) are estimated by
a local quadratic kernel smoothing procedure. Next, the local
neighborhood is first divided into two halves along the direction
perpendicular to (\(\widehat{f}''_{xx}\), \(\widehat{f}''_{xy}\)). Then the
one-sided estimates of \(f'_{x+}\) and \(f'_{x-}\) are obtained
respectively by local linear kernel smoothing. The estimates of
\(f'_{y+}\) and \(f'_{y-}\) are obtained by the same procedure
except that the neighborhood is divided along the direction
(\(\widehat{f}''_{xy}\), \(\widehat{f}''_{yy}\)).