[][src]Function opencv::photo::texture_flattening

pub fn texture_flattening(
    src: &dyn ToInputArray,
    mask: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    low_threshold: f32,
    high_threshold: f32,
    kernel_size: i32
) -> Result<()>

By retaining only the gradients at edge locations, before integrating with the Poisson solver, one washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used.

Parameters

  • src: Input 8-bit 3-channel image.
  • mask: Input 8-bit 1 or 3-channel image.
  • dst: Output image with the same size and type as src.
  • low_threshold: %Range from 0 to 100.
  • high_threshold: Value > 100.
  • kernel_size: The size of the Sobel kernel to be used.

Note: The algorithm assumes that the color of the source image is close to that of the destination. This assumption means that when the colors don't match, the source image color gets tinted toward the color of the destination image.

C++ default parameters

  • low_threshold: 30
  • high_threshold: 45
  • kernel_size: 3