OpenCVForUnity
OpenCVForUnity copied to clipboard
Load .xml file failed
When I open the FaceDetectionWebCamTextureExample, it occurred an error "cascade file is not loaded. Please copy from “OpenCVForUnity/StreamingAssets/” to “Assets/StreamingAssets/” folder. ". But I have copy the file to “Assets/StreamingAssets/” folder. I don't know how to fix it. Unity version: 2019.2.12f OpenCVForUnity version: 2.2.6, and also find this bug in version: 2.3.5
Does the file path contain non-ASCII characters? Currently, OpenCV does not support non-ASCII character file paths. https://github.com/opencv/opencv/issues/4292
You can set the relative file path from the project folder.
//cascade.load (Utils.getFilePath (LBP_CASCADE_FILENAME));
cascade.load ("./Assets/StreamingAssets/" + LBP_CASCADE_FILENAME);