# The Legendre Transform for Hamiltonians?

1. Sep 11, 2007

### lupine

I'm trying to implement and extend the work of Emmanuel Prados (http://www-sop.inria.fr/odyssee/research/prados-faugeras:04b/thesis.htm). I'm trying to follow how Appendix A, "How to transform a convex Hamiltonian into a HJB Hamiltonian; Legendre Transform", works for the provided example. I've contacted the author, but thought I might try here and see if anybody else could help me out in the meantime/

Given a Hamiltonian of the form

$$H_{R/T}^{orth}(x,p) = I(x) \sqrt{1+|p|^{2}} + p \cdot l - \gamma$$

we can apparently use the Legendre transform to obtain

$$H_{R/T}^{orth*} = -\sqrt{I(x)^2 - |a-l|^2}+\gamma \qquad x\in\overline{B}(1,I(x))$$

The process given for this transform is:
1. Find the gradient $$\nabla_p H$$
2. Solve the equation $$\nabla_p H(p_0)=0$$ ($$p_0$$ depends on x)
3. Calculate $$H(x,p_0)$$

Here, p is a two-element vector (corresponding to the gradient of the surface $$p = \nabla u(x)$$, I(x) is the image intensity at pixel x, l is a two-element vector corresponding to the light source direction (constant), and gamma is a further light constant.

Finding the gradient seems pretty simple -- plug in the equation into any CAS package gives:

$$\frac{dH}{dp}=\dot{H}(p) = \left[ \left( \frac{I(x) p_x}{\sqrt{1+p_{x}^{2}+p_{y}^{2}}} + l_x \right), \left( \frac{I(x) p_y}{\sqrt{1+p_{x}^{2}+p_{y}^{2}}} + l_y \right)\right]$$

The next step, solving $$\nabla_p H(p_0)=0$$, is where I start coming undone. Since we now effectively have two unknowns, if we then substitute $$p_0=\left(p_{0_x},p_{0_y}\right)$$ for p, when solving for $$p_0$$, the variables will not be independent between the two components.

This is really confusing me, and I hope I've made it straight-forward enough for others to read and understand.

Thanks

Lupine