How to use xml file from Resources in VS [closed]
I'm trying to publish my program so i put xml file to Resources (using IDE Resources Manager ). I dont now how to use it to create CascadeClassifier . This doesn't work :
String xmlFile = WindowsFormsApplication1.Properties.Resources.haarcascade_frontalface_alt;
CascadeClassifier faceDetector = new CascadeClassifier(xmlFile );
just saying, opencv does not support c# at all (your problem is off-topic, if there's a forum for your 3rd party wrapper, please ask there)
ok sorry .
don't feel sorry.
the CascadeClassifier needs a real "File" to open, if your resources get compiled into the app, it probably won't work
Off-topic indeed, but I can confirm that if you copile the model into your app, that it does not work. When installing the app, you should let the installer export the model to the installation folder, which will be known on most systems, and then use that location to read it from inside your code.