0
Good morning guys, I have the following code:
var faceImage = new Image<Gray, byte>(new Bitmap(bm));
imagensFace[i] = faceImage.Resize(100, 100, Inter.Cubic);
faceLabels[i] = todasFaces[i].ID;
}
faceRecognizer.Train(imagensFace, faceLabels);
faceRecognizer.Save("C:/Temp");
however when passing the part that saves the faceRecognizer is pointed out the following error: Emgu.CV.Util.Cvexception: 'Opencv: File can’t be opened for writing!'
Below is the faceRecognizer statement:
FaceRecognizer faceRecognizer = new EigenFaceRecognizer(80, double.PositiveInfinity);
If anyone can help me I’d appreciate it.
I am saving in "C: Users User Documents Emgu" but the error persists, I tried to run as administrator and also not solved :/
– Brayan
the same error ? by chance, you open the file for reading another snippet of the code ? if yes, post the snippet as well. @Brayan
– Rovann Linhalis
I don’t really open it anywhere, because I need to make it be saved first so that later I open it
– Brayan
I changed the answer, try to do the second way, and in case of error, put the stacktrace here @Brayan
– Rovann Linhalis
Rovan got it, in fact it was missing by the file extension name for example "C: Temp Teste.xml" even so, thank you very much for the attention :D
– Brayan
Ops didn’t see, it’s exactly the answer you changed, only with extension . xml
– Brayan