Using dynamic programming for solving variational problems in vision | Synapse