Adding external knowledge improves the results for ill-posed problems. In this paper we present a new computational framework for image registration when adding constraints on the transformation. We demonstrate that unconstrained registration can lead to ambiguous and non-physical results. Adding appropriate constraints introduces prior knowledge and contributes to reliability and uniqueness of the registration. Particularly, we consider recently proposed locally rigid transformations and volume preserving constraints as examples.