void EnsembleClassifier::classifyWindow(int windowIdx)
{
    int *featureVector = detectionResult->featureVectors + numTrees * windowIdx; //numTrees = 10
    calcFeatureVector(windowIdx, featureVector); // Fern Feature Calculation

    detectionResult->posteriors[windowIdx] = calcConfidence(featureVector); // confidence calculation
}
void EnsembleClassifier::classifyWindow(int windowIdx)
{
    int *featureVector = detectionResult->featureVectors + numTrees * windowIdx;
    calcFeatureVector(windowIdx, featureVector);

    detectionResult->posteriors[windowIdx] = calcConfidence(featureVector);
}
void EnsembleClassifier::learn(Mat img, int * boundary, int positive, int * featureVector) {
    if(!enabled) return;

	float conf = calcConfidence(featureVector);

    //Update if positive patch and confidence < 0.5 or negative and conf > 0.5
    if((positive && conf < 0.5) || (!positive && conf > 0.5)) {
    	updatePosteriors(featureVector, positive,1);
    }

}