Adding XML file to Win32 Project and Dynamically Load Data
-
Hello there, I have statically linked OpenCV libs to a Win32 console application in Visual Studio 2012. I got the webcam and face detection working awesome. I am using the "haarcascade_frontalface_alt.xml" for face detection purpose and this file is currently placed in the folder where the exe is present. I want to link in this xml to project i.e., compile into the project and then use it at run time. i.e., extract xml data from the compiled in xml file and load it to the corresponding OpenCV function. Does anyone has suggestions on how to do this? Any sample code will be helpful. Thanks in advance.
-
Hello there, I have statically linked OpenCV libs to a Win32 console application in Visual Studio 2012. I got the webcam and face detection working awesome. I am using the "haarcascade_frontalface_alt.xml" for face detection purpose and this file is currently placed in the folder where the exe is present. I want to link in this xml to project i.e., compile into the project and then use it at run time. i.e., extract xml data from the compiled in xml file and load it to the corresponding OpenCV function. Does anyone has suggestions on how to do this? Any sample code will be helpful. Thanks in advance.
You could create a custom resource inside the exe, and then read it at runtime. Check out: Creating a Resource[^]
The difficult we do right away... ...the impossible takes slightly longer.