c++ - Which algorithm is used to train/predict Opencv LBPH face recognizer? -
i couldn't understand how training stage , predition stage working.İs using algorithm svm or k-nearestneighbour after finding lbph features?
if check: https://github.com/itseez/opencv_contrib/blob/master/modules/face/src/lbph_faces.cpp see use 1-nearest neighbour, excerpt detect function:
// find 1-nearest neighbor collector->init((int)_histograms.size(), state); (size_t sampleidx = 0; sampleidx < _histograms.size(); sampleidx++) { double dist = comparehist(_histograms[sampleidx], query, histcmp_chisqr_alt); int label = _labels.at<int>((int)sampleidx); if (!collector->collect(label, dist, state))return; }
a 1-nearest neighbour classifier used since local binary pattern descriptor simple enough. see more in depth explanation paper: "face recognition local binary patterns"
on side note. not implementation/practical question , not belong on forum. suggest using opencv forum.
Comments
Post a Comment