Nonlinear separation in the image space with applications to penalty methods