OpenCVForUnity icon indicating copy to clipboard operation
OpenCVForUnity copied to clipboard

Load .xml file failed

Open LudoArt opened this issue 6 years ago • 1 comments

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

LudoArt avatar Nov 25 '19 12:11 LudoArt

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);

EnoxSoftware avatar Nov 26 '19 07:11 EnoxSoftware