You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > Filter2D Method > Matrix.Filter2D Method (TMtx, TMtx, TVecInt)
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.Filter2D Method (TMtx, TMtx, TVecInt)

Applies 2D filtering.

Pascal
function Filter2D(const Src: TMtx; const Kernel: TMtx; const Buffer: TVecInt = nil): TMtx; overload;

The function will assume that Src has a border which is (Kernel.Cols div 2+1) wide on left and right and border which is (Kernel.Rows div 2 + 1) high on top and bottom. Kernel will be applied with its center element as the anchor. The filtered result will be stored in to the calling object without the extra borders. The size of the calling object is set automatically. 

It is the users responsability to initialize the border elements in the Src.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!