title: iOS OpenCV 3.0 SVM save/load issue
body: <p>I can't save a trained SVM to a xml-file. This is my error: </p>
  
  <p>OpenCV Error: Parsing error (Missing of invalid SVM type) in read_params, file /Users/build/test/opencv/modules/ml/src/svm.cpp, line 2050
  libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/build/test/opencv/modules/ml/src/svm.cpp:2050: error: (-212) Missing of invalid SVM type in function read_params</p>
  
  <p>What do I do...</p>
  
  <pre><code>- (void)saveSVM {
      string oFileName = "NormParameters.xml";
      svm-&gt;save(oFileName);
  }
  
  - (BOOL)loadSVM {
      string oFileName = "NormParameters.xml";
      svm = StatModel::load&lt;SVM&gt;(oFileName);
      NSLog(@"COUNT: %d", svm-&gt;getVarCount());
      if (svm-&gt;getVarCount() &gt; 0) {
          return YES;
      }
      return NO;
  }
  </code></pre>
  
  <p>SVM will be saved every time, if I get a new sample for it. The Loading of trained SVM happen in an initWithParams(). </p>
  
  <pre><code>- (id)initWithParams {
      self = [super init];
      if (self) {
          // create and set SVM parameters
          SVM::Params param = SVM::Params();
  
          param.svmType = SVM::EPS_SVR; // Support Vector Regression. The distance between feature vectors from the training set and the fitting hyper-plane must be less than p. For outliers the penalty multiplier C is used.
          param.kernelType = SVM::RBF; //Polynomial kernel
          param.degree = 3.0; // for poly
          param.gamma = 1.0; // for poly/rbf/sigmoid
          param.coef0 = 0.0; // for poly/sigmoid
  
          param.C = 256.0; // for CV_SVM_C_SVC, CV_SVM_EPS_SVR and CV_SVM_NU_SVR
          param.nu = 0.1; // for CV_SVM_NU_SVC, CV_SVM_ONE_CLASS, and CV_SVM_NU_SVR
          param.p = 0.00390625; // for CV_SVM_EPS_SVR
  
          param.classWeights = NULL; // for CV_SVM_C_SVC
          param.termCrit.type =  CV_TERMCRIT_EPS | CV_TERMCRIT_ITER; // CV_TERMCRIT_EPS + CV_TERMCRIT_ITER
          param.termCrit.maxCount = 1000;
          param.termCrit.epsilon = 0.00390625; //1e-6;
  
          // create SVM
          svm = SVM::create(param);
          // load svm
          [self loadSVM];
  
          // create trained data
          trainedDataMat = [[MLDataMatrix alloc] init];
          [trainedDataMat removeDataRow];
      }
      return self;
  }
  </code></pre>
  
  <p>I am new in OpenCV may be I set wrong parameters (I played with all of them) or StatModel::load don't work unter iOS 8.3? 
  If you know another way to save SVM to a file, please let me know too...
  Thank you for each answer!</p>