Regularizing Flows for Constrained Matrix-Valued Images