transfer [@Aubry2014] assumes a Laplacian pyramidal representation with multiple levels. On each level the style transfer is implemented as gradient transfer. Nominally, at each pixel, $\mathbf{p}$, in each level of the pyramid, given a neighborhood $\mathbf{q}$, the set of gradients in the two images is $\nabla
S_{\mathbf{p},\mathbf{q}}$ (for the subject image) and $\nabla R_{\mathbf{p},\mathbf{q}}$ (for the reference image). The transfer is implemented by iteratively correcting the local point $S(\mathbf{p})$:

$$\begin{array}{cl}
        \mathbf{S}_n(\mathbf{p}) &= r(\mathbf{S}_{n-1}(\mathbf{p})); \enspace
            r(i) = g + sign(i-g)t(|i - g|); \\
            t(i) &= CDF^{-1}_{[\nabla \mathbf{R}(\mathbf{p})]}\left( CDF_{[\nabla \mathbf{S}(\mathbf{p})]}(\mathbf{p}) \right)
    \end{array}$$

where CDF is the cumulative density function computed on the image, $r(\cdot)$ is the transfer function, while $\mathbf{S}_1(\mathbf{p})$ is the initial local pixel of the subject image and $\mathbf{S}_n(\mathbf{p})$ is the same value at iteration $n$. The mapping needs to be done iteratively, as in practice the CDF is approximated by the local cumulative histogram on a discrete support of values. Typically, 10 iterations suffice.

### Neural style transfer algorithm {#Sect:NeuralStyle}

The algorithm proposed by Gatys et al. [-@Gatys:2015] aims to transpose the style by representing an image into a space where content and style are separable. This is achieved by using the feature representation offered by the layers of 