Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv::Algorithm read/write in API 3?

Hi

I am using cv::ml::RTrees to train a Random Forest model and predict some values. I'd like to store the final trained model in some custom structure and also to write ToString and FromString methods. I have seen that API version 2 has read/write methods and a FileStorage structure which would help to read/write from string but I have read that these are deprecated in API 3. Is this true? And if so, are there any alternative methods provided to replace those (save/load are not valid answers here, as these store and read from file which I don't want to do)? Also, does OpenCV provide any class or set of classes to access the final trained model (e.g. trees, nodes, values) so that I can safely store the model in code without any need to train again?

Thanks in advance for your help.