Background color selection in warp_perspective() function
See original GitHub issue🚀 Feature
Possibility to select the color (RGB) for the background pixels in the warp_perspective()
function (pixels whose color des not come from the original warped image).
Motivation
OpenCV’s warpPerspective()
function has a borderValue
parameter allowing to select the color of the background pixels when the borderMode
is set to BORDER_CONSTANT
. This is very useful when the desired background color is not black (default). Currently Kornia’s warp_perspective()
only supports black (zeros
option for border_mode
).
Pitch
I’d like to have a parameter similar to OpenCV’s borderValue
to select the color of the background when the border_mode
of the warp_perspective
function in Kornia is set to zeros
(and in that case, probably this name should change from zeros
to something like constant
, being black the default color).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (9 by maintainers)
Top GitHub Comments
Hi @ducha-aiki - and sorry - I was just being cheeky and letting you know I still had my eye on this one! I think kornia is amazing thanks to the active dev team behind it and I will try to get you a PR and with any luck we’ll see this in the next release instead.
It’s not a priority right now - but I’ll mark it as future future.