Function opencv::gapi::warp_perspective_def
source · pub fn warp_perspective_def(
src: &impl GMatTraitConst,
m: &impl MatTraitConst,
dsize: Size
) -> Result<GMat>
Expand description
Applies a perspective transformation to an image.
The function warpPerspective transforms the source image using the specified matrix:
when the flag [WARP_INVERSE_MAP] is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.
§Parameters
- src: input image.
- M:
transformation matrix.
- dsize: size of the output image.
- flags: combination of interpolation methods ([INTER_LINEAR] or #INTER_NEAREST) and the
optional flag #WARP_INVERSE_MAP, that sets M as the inverse transformation (
).
- borderMode: pixel extrapolation method ([BORDER_CONSTANT] or #BORDER_REPLICATE).
- borderValue: value used in case of a constant border; by default, it equals 0.
§See also
warpAffine, resize, remap, getRectSubPix, perspectiveTransform
§Note
This alternative version of warp_perspective function uses the following default values for its arguments:
- flags: cv::INTER_LINEAR
- border_mode: cv::BORDER_CONSTANT
- border_value: Scalar()