Saving KNN classifier after learning in opencv

opencv

Solution

In k-NN, save and write is not implemented because there is no trainning. What does train method is only store all the samples. So no "model" is infered, then nothing must be saved but all the samples.

Problem

I used OpenCV KNN classifier and after training it I need to save the classifier to be able to use in testing stage. I found that `knn.save()` is not implemented in OpenCV. What should do?

Original source