Method WarpAffine
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
WarpAffine(InputArray, OutputArray, InputArray, Size, InterpolationFlags, BorderTypes, Scalar?, AlgorithmHint)
Applies an affine transformation to an image.
public static void WarpAffine(InputArray src, OutputArray dst, InputArray m, Size dsize, InterpolationFlags flags = InterpolationFlags.Linear, BorderTypes borderMode = BorderTypes.Constant, Scalar? borderValue = null, AlgorithmHint hint = AlgorithmHint.Default)
Parameters
srcInputArrayinput image.
dstOutputArrayoutput image that has the size dsize and the same type as src.
mInputArray2x3 transformation matrix.
dsizeSizesize of the output image.
flagsInterpolationFlagscombination of interpolation methods and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation (dst -> src) .
borderModeBorderTypespixel extrapolation method; when borderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValueScalar?value used in case of a constant border; by default, it is 0.
hintAlgorithmHintHint that selects between alternative algorithm implementations (OpenCV 5).