Optimal transport as a metric between two color images I am trying to characterize a distance between two images in relation to the colors present in these images.
Therefore I would like to solve Earth mover's distance/1-st Wasserstein distance with entropic regularization (for a quick approximate solution) between the 3D histograms (RGB) of the two images.
We resolve $\min_P \langle P,C \rangle - \epsilon H(P)$ s.t $P1=a, P^T1=b$ where $P$ is the optimal transport plan, $H$ is the entropy, $a$ and $b$ are the histograms of the two images and $\epsilon$ is the regularization term.
Each entry $C_{ij}$ in this matrix contains the cost of moving point $i$ in the support of $a$ to point $j$ in the support of $b$. It is said that the 1-st Wasserstein distance is given by the solution of the optimisation problem above if $C_{ij}=||X_i-Y_j||_2$. So I understand this as the distance between two pixels of the two images in RGB space. Only since in dimension > 1 there is no more order relation, can I order my points $X_i$ and $Y_j$ anyhow?
 A: Maybe I have misunderstood what the problem is?
The way I read it you have two images (say the colour is just the black to white scale) and to $\textbf{describe an image}$ you assign to it a probability measure $\mu$ which measures the amount of colour in each pixel, so if there are $m\times m$ pixels then the probability measures are discrete measures, which of course can be described by vectors of length $m^2$. E.g consider some pixel $x_{i,j}$ for  some $i,j \in 1,\ldots,m$ if this pixel is white in a picture then $\mu(x_{i,j})=0$ and if the pixel is black $\mu(x_{i,j})=1$ and if it is grey or `somewhere in between' then $\mu(x_{i,j})\in(0,1)$. You will probably need to then normalize these measures to make them probability measure.
Now to compare the distance between two images it is equivalent to calculating the distance between their associated probability measures.
Notice your cost matrix $C$ should describe how far away pixels are, and since pictures are two dimensional your pixels $x_{i,j}\in \mathbb{R}^2$. Hence a natural cost to take would be Euclidean 2-norm $C_{(i,j),(k,l)}=C(x_{i,j},x_{k,l})=\|x_{i,j}-x_{j,l}\|^2$.
$\textit{Edit : I didn't realise you wanted to use the earth movers distance, in this case use the Euclidean}$ $\textit{1-norm for } C$.
More colours will complicate things but you should be able to adapt the above premise.
