use of org.bytedeco.opencv.opencv_ml.KNearest in project qupath by qupath.
the class KNearestClassifier method createClassifier.
@Override
protected KNearest createClassifier() {
KNearest classifier = KNearest.create();
// System.out.println("Default K: " + classifier.getDefaultK());
ParameterList params = getParameterList();
if (params != null) {
classifier.setIsClassifier(true);
classifier.setDefaultK(params.getIntParameterValue("k"));
}
return classifier;
}
Aggregations