gapi_warpAffine
import { gapi_warpAffine } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Applies an affine transformation to an image.
The function warpAffine transforms the source image using the specified matrix:
\texttt{dst} (x,y) = \texttt{src} ( \texttt{M} _{11} x + \texttt{M} _{12} y + \texttt{M} _{13}, \texttt{M} _{21} x + \texttt{M} _{22} y + \texttt{M} _{23})
when the flag #WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with #invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.
See: warpPerspective, resize, remap, getRectSubPix, transform
gapi_warpAffine(src: GMat, M: Mat, dsize: Size, flags: number, borderMode: number, borderValue: Scalar): GMat;4 available overloads
gapi_warpAffine(src: GMat, M: Mat, dsize: Size): GMat;gapi_warpAffine(src: GMat, M: Mat, dsize: Size, flags: number): GMat;gapi_warpAffine(src: GMat, M: Mat, dsize: Size, flags: number, borderMode: number): GMat;gapi_warpAffine(src: GMat, M: Mat, dsize: Size, flags: number, borderMode: number, borderValue: Scalar): GMat;srcinput image.
M2\times 3transformation matrix.dsizesize of the output image.
flagscombination of interpolation methods (see #InterpolationFlags) and the optional flag #WARP_INVERSE_MAP that means that M is the inverse transformation (
\texttt{dst}\rightarrow\texttt{src}).borderModepixel extrapolation method (see #BorderTypes); borderMode=#BORDER_TRANSPARENT isn't supported
borderValuevalue used in case of a constant border; by default, it is 0.
The GMat result. Release returned native handles with using or delete(), including handles nested in results.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.