The Euler-Lagrange equation for Euler’s Elastica inpainting

For a gray-scale image u\in BV on a domain \Omega\subset\mathbb{R}^2 and an inpainting domain K\subset\Omega, Euler’s elastica energy is given by

    \begin{equation*} J_2^\lambda (u) = \int_{\Omega} (a+b\kappa^2) |\nabla u| dx + \frac{\lambda}{2} \int_{\Omega \backslash K} (u- u^0)^2 dx, \end{equation*}

where \kappa = \nabla \cdot \frac{\nabla u}{|\nabla u|} denotes curvature.

Minimizing the functional by the Euler-Lagrange equation leads to the following nonlinear 4th order PDE

    \begin{equation*} \frac{\partial u}{\partial t} = \sigma \Div \left((a + b\kappa^2)\vec{n} - \frac{2b}{ |\nabla u|}\frac{\partial (\kappa |\nabla u|)}{\partial \vec{t}}\vec{t} \right) - \sigma \lambda \ 1_{\Omega \backslash K} \ (u- u^0), \end{equation*}

together with appropriate boundary conditions.