Get histogram matrix per class