kornia / kornia-rs

Low-level Computer Vision library in Rust

Home Page:https://docs.rs/kornia-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] support different types of padding in warp_affine to solve antialiasing

edgarriba opened this issue · comments

          There is one problem with my implementation that I forgot to mention. As you can see, the edges are jagged. This is because I skip pixels if they are outside of the original image, which will create aliasing effect. To make smooth edges, we need add different modes of handling the border (1) clamp to edge of the image (as right now) is suitable for resizing, and (2) return zero so that we can still interpolate the few pixels outside the image.

I think for now we can just open an issue to keep track of the problem.
It will be good to also look into OpenCV implementation.

Originally posted by @gau-nernst in #69 (comment)