pub fn reverse_sparse(
    img_src: &RgbImage,
    controls_src: &[(f32, f32)],
    controls_dst: &[(f32, f32)],
    subresolution_factor: u32,
    deform_function: fn(_: &[(f32, f32)], _: &[(f32, f32)], _: (f32, f32)) -> (f32, f32)
) -> RgbImage
Expand description

Compute the warped image with an MLS algorithm. The last argument is the MLS version you choose.

The new image is back projected as if the source and destination control points were reversed.

Only a sparse grid subset of the pixels are reprojected with the actual MLS function. The other pixels locations are interpolated bilinearly. For example, a subresolution factor of 3 means that only 1 in 3 pixels per row and per column is actually projected with MLS. In the case of a big number of control points (> 100), this can produce a significant speedup (roughly 16x for a subresolution factor of 4), with a minimal impact on the produced image.

Pixels interpolation is done with bilinear interpolation.