Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Android saving enormous Mat object (Java)

I'm writting andorid app where I use KNearest. I wrote code to train model, but every restart app, I must train data again, so I would like to save train data - Mat(1000, 40 000, CvType.CV_32FC1); I try to convert this Mat to byte[] and save it to SharedPreferences but I got outOfMemory exception...

Have you any suggestion to speed up or save data? Thx for help.