Vocabulary Creation

this part is responsible for creating the vocab to be used for training the classifier 
how did you choose the termination criteria? like epsilon.

also the type parameter is an enumeration not a magic number.
http://docs.opencv.org/modules/core/doc/basic_structures.html?highlight=termcriteria#TermCriteria