  An optimization method used in image-processing (metamorphosis) is found to
imply Euler's equations for incompressible flow of an inviscid fluid, without
requiring that the Lagrangian particle labels exactly follow the flow lines of
the Eulerian velocity vector field. Thus, an optimal control problem and an
optimization problem for incompressible ideal fluid flow both yield the \emph
{same} Euler fluid equations, although their Lagrangian parcel dynamics are
\emph{different}. This is a result of the \emph{gauge freedom} in the
definition of the fluid pressure for an incompressible flow, in combination
with the symmetry of fluid dynamics under relabeling of their Lagrangian
coordinates. Similar ideas are also illustrated for SO(N) rigid body motion.
