inpaint
import { inpaint } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Restores the selected region in an image using the region neighborhood.
Note: - An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp
- (Python) An example using the inpainting technique can be found at opencv_source_code/samples/python/inpaint.py
inpaint(src: Mat, inpaintMask: Mat, dst: Mat, inpaintRadius: number, flags: number): void;srcInput 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.
inpaintMaskInpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.
dstOutput destination, filled by the native operation. Output image with the same size and type as src .
inpaintRadiusRadius of a circular neighborhood of each point inpainted that is considered by the algorithm.
flagsInpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA
The function reconstructs the selected image area from the pixel near the area boundary. The function may be used to remove dust and scratches from a scanned photo, or to remove undesirable objects from still images or video. See http://en.wikipedia.org/wiki/Inpainting for more details.
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.