Open imagejan opened 7 years ago
Wouldn't adding the "Out of Bounds Strategy" (Zero-Value) to the Distance Map node actually solve this issue?
Yes, allowing the user to specify the out-of-bounds strategy would definitely solve this. Also, defaulting to an extendBorder
strategy would lead to a less surprising behavior for most use cases, I assume.
The Distance Map node, when fed an entirely white (foreground-only) image, produces a gradient image with intensities I(y) = (w+h) + y, which can lead to misleading results.
Of course, when ignoring image borders, a foreground-only image is a pretty much undefined case, but I'd expect to get a flat image rather than an image that suggests any kind of directionality.
Here's an example workflow reproducing the issue: Distance Map Issue.zip