Click or drag to resize

MatWarpPerspective Method

Applies a perspective transformation to an image.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public Mat WarpPerspective(
	Mat m,
	Size dsize,
	InterpolationFlags flags = InterpolationFlags.Linear,
	BorderTypes borderMode = BorderTypes.Constant,
	Nullable<Scalar> borderValue = null
)

Parameters

m
Type: OpenCvSharpMat
3x3 transformation matrix.
dsize
Type: OpenCvSharpSize
size of the output image.
flags (Optional)
Type: OpenCvSharpInterpolationFlags
combination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation (dst -> src).
borderMode (Optional)
Type: OpenCvSharpBorderTypes
pixel extrapolation method (BORDER_CONSTANT or BORDER_REPLICATE).
borderValue (Optional)
Type: SystemNullableScalar
value used in case of a constant border; by default, it equals 0.

Return Value

Type: Mat
output image that has the size dsize and the same type as src.
See Also