Discriminative Dictionary Learning With Spatial Constraints