Find optimal x(t) such that L(t) = R(x(t)) as close as possible.

55 Views Asked by At

Say I am given two continuous, differentiable functions $L(t)$ and $R(t)$ defined on the interval $0 \leq t \leq 1.$ The goal is to find a function $x(t)$ $(0 \leq t \leq 1)$ that alters the domain of $R$ such that $L(t)$ and $R(x(t))$ are as close to each other as possible. For example, from the graphs in the figure below, it appears that I can horizontally stretch and translate $R$ so that it matches $L$:

enter image description here

More formally, I am looking for the function $x(t)$ such that the following integral is minimal: $$ I_{simple} = \int_o^1 \left( L(t) - R(x(t))\right)^2\ dt $$ We will probably want $x(t)$ to be "well-behaved" (e.g., mostly monotonically non-decreasing, but not too steep or too shallow) so we can add an extra term and weighting parameter $\alpha$ that keeps the slope of $x$ close to 1: $$ I = \int_0^1 \left( L(t) - R(x(t))\right)^2 + \alpha\cdot(x'(t) - 1)^2\ dt $$

According to the Calculus of Variations, the solution $x$ should obey the Euler-Lagrange Differential Equation. Let $$ F(t,x,\dot{x}) = \left(L(t) - R(x)\right)^2 + \alpha\cdot(\dot{x} - 1)^2 $$ then according Euler we have the following differential equation $$ \frac{\partial F}{\partial x} - \frac{d}{dt}\frac{\partial F}{\partial \dot{x}} = 0. $$ Thus in our case we have $$ (L(t) - R(x)) \frac{\partial}{\partial x} R(x) - \alpha \cdot \ddot{x} = 0. $$ First of all, is that last differential equation correct ($t$ is the dependent variable)? Second of all, is this useful for finding a solution for $x$? Numerical approaches are fine too.

Side Note: this is just a small step toward an algorithm for warping images so that they match. I am approaching the problem similar to the Horn-Schunk Method for optical flow.

1

There are 1 best solutions below

5
On

You seemingly need to solve an eq. $L(t)=R(t_1)$, and find an appropriate $t_1$. If you can numerically or analytically invert your functions you will solve your problem, I think.