Color sensing. See documentation on the wiki.
vector<double>
normalize(vector<double> input) {
double magnitude = 0.0;
for (int i = 0; i < input.size(); i++) magnitude += (input[i] * input[i]);
magnitude = sqrt(magnitude);
for (int i = 0; i < input.size(); i++) input[i] /= magnitude;
return input;
}
pipeline.getClassifier()->enableNullRejection(!new_val);
}
pipeline.getClassifier()->setNullRejectionCoeff(new_val);
pipeline.getClassifier()->recomputeNullRejectionThresholds();
}
pipeline.addPreProcessingModule(MovingAverageFilter(5, 3));
"Whether to always pick (predict) one of the classes of training data, "
"even if it's not a very good match. If selected, 'Color Variability' "
"How different from the training data a new color reading can be and "
"still be considered the same color. The higher the number, the more "
}