OpenCV 3.0.0-rc1

org.opencv.ml
Class KNearest

java.lang.Object
  extended by org.opencv.core.Algorithm
      extended by org.opencv.ml.StatModel
          extended by org.opencv.ml.KNearest

public class KNearest
extends StatModel


Field Summary
static int BRUTE_FORCE
           
static int KDTREE
           
 
Fields inherited from class org.opencv.ml.StatModel
COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL
 
Method Summary
static KNearest create()
           
 float findNearest(Mat samples, int k, Mat results)
           
 float findNearest(Mat samples, int k, Mat results, Mat neighborResponses, Mat dist)
           
 int getAlgorithmType()
           
 int getDefaultK()
           
 int getEmax()
           
 boolean getIsClassifier()
           
 void setAlgorithmType(int val)
           
 void setDefaultK(int val)
           
 void setEmax(int val)
           
 void setIsClassifier(boolean val)
           
 
Methods inherited from class org.opencv.ml.StatModel
empty, getVarCount, isClassifier, isTrained, predict, predict, train
 
Methods inherited from class org.opencv.core.Algorithm
clear, getDefaultName, save
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BRUTE_FORCE

public static final int BRUTE_FORCE
See Also:
Constant Field Values

KDTREE

public static final int KDTREE
See Also:
Constant Field Values
Method Detail

create

public static KNearest create()

findNearest

public float findNearest(Mat samples,
                         int k,
                         Mat results)

findNearest

public float findNearest(Mat samples,
                         int k,
                         Mat results,
                         Mat neighborResponses,
                         Mat dist)

getAlgorithmType

public int getAlgorithmType()

getDefaultK

public int getDefaultK()

getEmax

public int getEmax()

getIsClassifier

public boolean getIsClassifier()

setAlgorithmType

public void setAlgorithmType(int val)

setDefaultK

public void setDefaultK(int val)

setEmax

public void setEmax(int val)

setIsClassifier

public void setIsClassifier(boolean val)

OpenCV 3.0.0-rc1 Documentation