I am trying to run OpenCV's Bag of Words example. So far, it works perfectly just with SIFT and SURF descriptors(which are non free). I am trying other descriptors such as BRIEF and FREAK, but the code breaks every single time. On further debugging, I found that calculateImageDescriptors function calls to kmeans cluster doesn't seem to accept non-SIFT or non-SURF descriptor.
Is there a way to work around this problem?