Skip to content

gapi_medianBlur

gapifunctionOpenCV 5.0.0
import { gapi_medianBlur } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSsrc, ksize
FUNCTIONgapi_medianBlur
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Blurs an image using the median filter.

The function smoothes an image using the median filter with the \texttt{ksize} \times \texttt{ksize} aperture. Each channel of a multi-channel image is processed independently. Output image must have the same type, size, and number of channels as the input image.

Note: - Rounding to nearest even is procedeed if hardware supports it, if not - to nearest. The median filter uses cv::BORDER_REPLICATE internally to cope with border pixels, see cv::BorderTypes

  • Function textual ID is "org.opencv.imgproc.filters.medianBlur"

See: boxFilter, gaussianBlur

gapi_medianBlur(src: GMat, ksize: number): GMat;
src

input matrix (image)

ksize

aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...

Returns

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.