ScriptHandler::LabelInfo ScriptHandler::lookupLabelNext(const pstring& label) { LabelInfo::iterator i = findLabel(label); if (++i != label_info.end()) { label_log.add(label); return *i; } return LabelInfo(); }
// See FaceRecognizer::save. void LBPH::save(FileStorage& fs) const { fs << "radius" << _radius; fs << "neighbors" << _neighbors; fs << "grid_x" << _grid_x; fs << "grid_y" << _grid_y; // write matrices writeFileNodeList(fs, "histograms", _histograms); fs << "labels" << _labels; fs << "labelsInfo" << "["; for (std::map<int, String>::const_iterator it = _labelsInfo.begin(); it != _labelsInfo.end(); it++) fs << LabelInfo(it->first, it->second); fs << "]"; }