I am working on an application which uses Bag of Words model. I couldn't find a way to cluster binary features like ORB. BOWKMeansTrainer gives error if mat type is CV_8UC1. Can we cluster binary features like ORB? If yes, is there an efficient implementation available?