Barycentric Coordinates 2D Interpolation Problem

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

Hello, What you see is normal because the current barycenter implemented in POT (a new one is coming) is using entropic regularized OT as discussed in the paper below: https://arxiv.org/pdf/1412.5154.pdf If you look into Figure 2 you will see that they also get a smoothing except in the corners where i believe they did not use the algorithm but return directly the original image. Regularization has this unfortunate effect of smoothing the barycenter but allows for quicker resolution of the problem. The barycenter examples in the notebook is not very honest here because since we use Gaussian everything is already smooth but the same effect applies Also note that if you want to perform barycenter in 2D images as in you example you should look at: https://people.csail.mit.edu/jsolomon/assets/convolutional_w2.compressed.pdf that also does regularization but which can be very quick on 2D/3D images. It has not been implemented in POT yet but it's also in the work. Rémi Le 29/03/2018 à 23:05, Aruther5@gmu.edu a écrit :
-- Rémi Flamary Web: http://remi.flamary.com Tel: +33 (0)4 92 07 63 80 Laboratoire Lagrange, UMR CNRS 7293 Observatoire de la Côte d'Azur Université de Nice Sophia-Antipolis

Hi. In the first line you mention that there is a new implementation of barycenter coming in POT .What paper would that be based on and when might you release that?

Hello, What you see is normal because the current barycenter implemented in POT (a new one is coming) is using entropic regularized OT as discussed in the paper below: https://arxiv.org/pdf/1412.5154.pdf If you look into Figure 2 you will see that they also get a smoothing except in the corners where i believe they did not use the algorithm but return directly the original image. Regularization has this unfortunate effect of smoothing the barycenter but allows for quicker resolution of the problem. The barycenter examples in the notebook is not very honest here because since we use Gaussian everything is already smooth but the same effect applies Also note that if you want to perform barycenter in 2D images as in you example you should look at: https://people.csail.mit.edu/jsolomon/assets/convolutional_w2.compressed.pdf that also does regularization but which can be very quick on 2D/3D images. It has not been implemented in POT yet but it's also in the work. Rémi Le 29/03/2018 à 23:05, Aruther5@gmu.edu a écrit :
-- Rémi Flamary Web: http://remi.flamary.com Tel: +33 (0)4 92 07 63 80 Laboratoire Lagrange, UMR CNRS 7293 Observatoire de la Côte d'Azur Université de Nice Sophia-Antipolis

Hi. In the first line you mention that there is a new implementation of barycenter coming in POT .What paper would that be based on and when might you release that?
participants (3)
-
Aruther5@gmu.edu
-
Kowshik Thopalli
-
Rémi Flamary