OpenCV 2.4.2

org.opencv.ml
Class CvStatModel

java.lang.Object
  extended by org.opencv.ml.CvStatModel
Direct Known Subclasses:
CvANN_MLP, CvBoost, CvDTree, CvGBTrees, CvKNearest, CvNormalBayesClassifier, CvRTrees, CvSVM

public class CvStatModel
extends java.lang.Object

Base class for statistical models in ML.

In this declaration, some methods are commented off. These are methods for which there is no unified API (with the exception of the default constructor). However, there are many similarities in the syntax and semantics that are briefly described below in this section, as if they are part of the base class.

See Also:
org.opencv.ml.CvStatModel

Field Summary
protected  long nativeObj
           
 
Constructor Summary
protected CvStatModel(long addr)
           
 
Method Summary
protected  void finalize()
           
 void load(java.lang.String filename)
          Loads the model from a file.
 void load(java.lang.String filename, java.lang.String name)
          Loads the model from a file.
 void save(java.lang.String filename)
          Saves the model to a file.
 void save(java.lang.String filename, java.lang.String name)
          Saves the model to a file.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nativeObj

protected final long nativeObj
Constructor Detail

CvStatModel

protected CvStatModel(long addr)
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

load

public void load(java.lang.String filename)

Loads the model from a file.

The method load loads the complete model state with the specified name (or default model-dependent name) from the specified XML or YAML file. The previous model state is cleared by "CvStatModel.clear".

Parameters:
filename - a filename
See Also:
org.opencv.ml.CvStatModel.load

load

public void load(java.lang.String filename,
                 java.lang.String name)

Loads the model from a file.

The method load loads the complete model state with the specified name (or default model-dependent name) from the specified XML or YAML file. The previous model state is cleared by "CvStatModel.clear".

Parameters:
filename - a filename
name - a name
See Also:
org.opencv.ml.CvStatModel.load

save

public void save(java.lang.String filename)

Saves the model to a file.

The method save saves the complete model state to the specified XML or YAML file with the specified name or default name (which depends on a particular class). *Data persistence* functionality from CxCore is used.

Parameters:
filename - a filename
See Also:
org.opencv.ml.CvStatModel.save

save

public void save(java.lang.String filename,
                 java.lang.String name)

Saves the model to a file.

The method save saves the complete model state to the specified XML or YAML file with the specified name or default name (which depends on a particular class). *Data persistence* functionality from CxCore is used.

Parameters:
filename - a filename
name - a name
See Also:
org.opencv.ml.CvStatModel.save

Official OpenCV 2.4 Documentation