A linear gradient filter
#include "dip_linear.h"
dip_Error dip_FiniteDifferenceEx ( in, out, boundary, process, parOrder, smoothflag )
binary, integer, float, complex
The FiniteDifferenceEx filter implements several basic one dimensional FIR convolution filters. The difference between this function and FiniteDifference is that this one has an interface more similar to Gauss and Derivative: it can process different derivatives along different dimensions at the same time. The first derivative is a convolution with (1 0 -1)/2, and the second derivative is a convolution with (1 -2 1). When parOrder is 0 for a dimension, either the triangular smoothing filter (1 2 1)/4 is applied (smoothflag set to DIP_TRUE), or the dimension is not processed at all (smoothflag set to DIP_FALSE).
Setting all process to DIP_TRUE, all parOrder to 0 except 1 dimension to 1, and smoothflag to DIP_TRUE yields the SobelGradient.
Data type | Name | Description |
dip_Image | in | Input image |
dip_Image | out | Output image |
dip_BoundaryArray | boundary | Boundary conditions |
dip_BooleanArray | process | Dimensions to process |
dip_IntegerArray | parOrder | Order of Derivative along each dimension |
dip_Boolean | smoothflag | Wether or not to smooth in the non-derivative directions |
General information about convolution
FiniteDifference, SobelGradient, Uniform, Gauss, Derivative
DIPlib on-line documentation | Function reference | Global function index