Hello dear community! I can’t find the way how to dynamically create or copy FaceRecognizer model. I have a function like this:
cv::Mat reconstructFace(const cv::Ptr<cv::face::FaceRecognizer> model, const cv::Mat preprocessedFace, const std::string facerecAlgorithm)
{
if(facerecAlgorithm=="Eigen")
cv::Ptr<cv::face::EigenFaceRecognizer> _efmodel = model;
if(facerecAlgorithm=="Fisher")
cv::Ptr<cv::face::FisherFaceRecognizer> _ffmodel = model;
}
How to pass and get the model from function parameter? Copy constructor doesn’t work for me and show a compiler error:
|Error|C2665|'std::shared_ptr<T>::shared_ptr': no overloaded function could convert all the argument types
Thank you!!!