xphoto_inpaint
import { xphoto_inpaint } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSsrc, mask, dst, algorithmType
FUNCTIONxphoto_inpaint
RETURN TYPEvoid
The function implements different single-image inpainting algorithms.
See the original papers [He2012] (Shiftmap) or [GenserPCS2018] and [SeilerTIP2015] (FSR) for details.
xphoto_inpaint(src: Mat, mask: Mat, dst: Mat, algorithmType: number): void;srcsource image
- #INPAINT_SHIFTMAP: it could be of any type and any number of channels from 1 to 4. In case of
3- and 4-channels images the function expect them in CIELab colorspace or similar one, where first color component shows intensity, while second and third shows colors. Nonetheless you can try any colorspaces.
- #INPAINT_FSR_BEST or #INPAINT_FSR_FAST: 1-channel grayscale or 3-channel BGR image.
maskmask (#CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels indicate area to be inpainted
dstdestination image
algorithmTypesee xphoto::InpaintTypes
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.