The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ApplyCompassKernel


Unit: SDL_math2
Class: none
Declaration: function ApplyCompassKernel (Kernel, InData: TDouble2DArray; var OutData: TDouble2DArray; Feedback: TOnPercentDoneEvent): integer;

ApplyCompassKernel calculates the convolution of the data matrix InData with one of the eight directional compass kernels (Kernel parameter 0 to 7, see figure below). The kernel has to be quadratic with an odd number of pixels along the egde. The results are written to the array OutData which is automatically resized to match the size of InData. The feedback parameter is a pointer to an event handler. Set it to nil in order to suppress any progress feedback.

The function returns the following error codes:

 0 ... everything is OK, OutData has been filled by the convolution results
-1 ... invalid Kernel


Last Update: 2019-Jan-24