pyrUp
import { pyrUp } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Upsamples an image and then blurs it.
By default, size of the output image is computed as Size(src.cols\*2, (src.rows\*2), but in any
case, the following conditions should be satisfied:
\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq ( \texttt{dstsize.width} \mod 2) \\ | \texttt{dstsize.height} -src.rows*2| \leq ( \texttt{dstsize.height} \mod 2) \end{array}
The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown multiplied by 4.
pyrUp(src: Mat, dst: Mat, dstsize: Size, borderType: number): void;3 available overloads
pyrUp(src: Mat, dst: Mat): void;pyrUp(src: Mat, dst: Mat, dstsize: Size): void;pyrUp(src: Mat, dst: Mat, dstsize: Size, borderType: number): void;srcinput image.
dstOutput destination, filled by the native operation. output image. It has the specified size and the same type as src .
dstsizesize of the output image.
borderTypePixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)
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.