Boundary detection by constrained optimization | Synapse