ABSTRACT. In image registration of medical data a common and challenging problem is handling intensity-inhomogeneities. These inhomogeneities appear for instance in images of serially sectioned brains caused by the histological staining process or in medical imaging with contrast agents. Beneath this, natural outliers (for instance cells or vessels) produced by the underlying material itself may be mistaken as noise. Both image registration applications have in common that the well known sum of squared diﬀerences (SSD) measure would detect false diﬀerences. To deal with these kinds of problems, we supplement the common SSD-measure with image derivatives of higher order. Additionally we introduce a non-quadratic penalizer function to the distance measure leading to robust energy. The concepts are well known in optical ﬂow. Overall, we present a variational model which combines all of these properties. This formulation leads to a fast and eﬃcient algorithm. We demonstrate its applicability at the problems described above.