Ask Your Question

Revision history [back]

How to store and load train data of KNearest with Java API

I use the java impl of opencv 3.1.0 on windows.

I use KNearest with my sample image to train. After training i like to store the train result. But always i get a exception on the knearest.save() call:

Exception in thread "main" java.lang.Exception: unknown exception at org.opencv.core.Algorithm.save_0(Native Method) at org.opencv.core.Algorithm.save(Algorithm.java:53) at omrtest.omr.KMeansOMRReader.train(KMeansOMRReader.java:96)

And not enough - if saving works, how can i load the train data? I do not see any load method.

Thanks in advance.