[][src]Function opencv::xphoto::inpaint

pub fn inpaint(
    src: &Mat,
    mask: &Mat,
    dst: &mut Mat,
    algorithm_type: i32
) -> Result<()>

The function implements different single-image inpainting algorithms.

See the original papers He2012 (Shiftmap) or GenserPCS2018 and SeilerTIP2015 (FSR) for details.

Parameters

  • src: source 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.
  • mask: mask (#CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels indicate area to be inpainted
  • dst: destination image
  • algorithmType: see xphoto::InpaintTypes