# How to construct a histogram representation suitable for SVM classification

Hello everyone!,

I have been working recently with the BRISK algorithm. It generates descriptors of 64 bytes length for each keypoint. After implementing an algorithm based on K-medoids algorithm, I could assign each descriptor to its corresponding VISUAL WORD (centroid or medoid) based on the minimum Hamming distance when comparing with a set of randomly generated centroids.

Now that I have Identify each descriptor with its corresponding "Visual Word", I want to create a histogram where the bins correspond to those VISUAL WORDS and the values they can take correspond to the amount of descriptors contained in each cluster.

From this point, I need to generate the corresponding histogram to be used by a classification method such as SVM, for object recognition and detection purposes. I am currently using OpenCV 3.1, and for building a histogram I am not sure how to proceed.