For one-dimensional resampling, one can define a global continuous function $G(x)$ with the condition Display Formula
$G(i)=Pifor\u2009\u20090\u2264i\u2264N\u22121,$(1)
so that one can find the resampled line Display Formula$Pi\delta =G(i+\delta )for\u2009\u20090\u2264i\u2264N\u22121,$(2)
where $Pi$ is an one-dimensional array with the size $N$. To satisfy the condition in Eq. (1), one can use the reverse DFT Display Formula$G(x)=P0+\u2211k=0M\u22121g(k)sin(\pi kxM),$(3)
with Display Formula$g(k)=2M\u2211x=0M\u22121[G(x)\u2212P0]sin(\pi kxM),$(4)
where $P0$ is the first element of the input array $Pi$. Because the array $Pi$ from an image is real, the real sine or cosine function is used in the Fourier expansion, which ensures a real value for the resampled array. In addition to the condition in Eq. (1), the function $G(x)$ also needs to satisfy the condition $G(M)=P0$ with $M>N$. To meet the boundary conditions at $i=0$ and $i=M$, $G(x)$ can be constructed as Display Formula$G(i)={Pifor\u2009\u20090\u2264i<NP2N\u2212ifor\u2009\u2009N\u2264i<2N,$(5)
so that $M=2N$. The global function $G(x)$ in Eq. (5) has the property $G(x)=G(M\u2212x)$, which simplifies Eqs. (3) and (4) to Display Formula$G(x)=P0+\u2211k=0N\u22121g(k)sin[\pi xN(k+12)].$(6)
with Display Formula$g(k)=2N\u2211i=0N\u22121[G(i)\u2212P0]sin[\pi \xb7iN(k+12)].$(7)