question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
dribnetcommented, Oct 25, 2021

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.

1reaction
edgarribacommented, Mar 10, 2021

It’s not a priority right now - but I’ll mark it as future future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set background of Python OpenCV warpPerspective
If you look at the documentation for the warpPerspective function from the online ... Should change the border to a constant white color....
Read more >
Color and border properties in Power Apps - Microsoft Learn
ColorValue function: Specify text strings such as color names from ... SelectionFill – The background color of a selected item or items in...
Read more >
Set Background Of Python Opencv Warpperspective - ADocLib
Altclick in the Image>Colors>Color Picker window to change the background In this case the object defined by the line selection is rotated to...
Read more >
warp opencv - Caseificio de Nicola
May 30, 2019 · Specify background color when rotating an image using OpenCV in Python. Parameters See also warpPerspective warpPerspective () [2/3] ...
Read more >
perspective() - CSS: Cascading Style Sheets - MDN Web Docs
The perspective() CSS function defines a transformation that sets the ... .left { background-color: pink; transform: rotateY(-90deg) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found