Hi, I am currently trying to use the bregman barycenter algorithm to interpolate between 2D floating point arrays. I am getting some odds results and was hoping to better understand what's happening. The example I've attached illustrates the main issue. In this example, I'm trying to interpolate between two 2D arrays, one with 1s in the upper-right quadrant, and 0s elsewhere, the other with 1s in the lower left quadrant, and 0s elsewhere. I'm then using barycenter with different weights ([1-t, t] for t in {0, 0.25, 0.5, 0.75, 1}). What I would have expected is that each output would have the same number of 1s, just in different locations. for t = 0, I'd expect to get my first input, for t = 1, my second input. For t=0.5, one quadrant's-worth of 1s at the center of the output image. Instead, the output I'm getting is fuzzy, and also significantly offset from where I'd expect for all t other than 0.5. At the very least, I can't imaging why I would get anything other than my original input for t = 0 or 1. Do I misunderstand the function, or have I made an error somewhere? If anyone could help me to better understand what's happening here, I would appreciate it.
Here the code I'm using: https://pastebin.com/EuW2sAUM
And here's the output of the above code: https://imgur.com/a/H9AK9