[ERROR:0@3.179] global persistence.cpp:505 open Can’t open file: ‘haarcascade_frontalface_default.xml’ in read mode
put_char @ opencv.js:30
opencv.js:30 [ERROR:0@3.184] global persistence.cpp:505 open Can’t open file: ‘haarcascade_eye.xml’ in read mode
Any clue why im getting these errors? The files are there
let faceCascade = new cv.CascadeClassifier()
let eyeCascade = new cv.CascadeClassifier()
// load pre-trained classifiers
faceCascade.load('haarcascade_frontalface_default.xml')
eyeCascade.load('haarcascade_eye.xml')
“same directory as script” means nothing. relative paths aren’t resolved relative to the source file, nor the directory containing the executable, but the Current Working Directory.
if you used an absolute path, you should show us this path. perhaps it’s broken.
and you really must test the validity of the path and the existence of the file like so:
File f = new File(filePathString);
if(f.exists()) {
// that would be sensible to check
}
no prob but i still have no idea what the problem is. I thought it was the fact that browser cant access client files so i put them in a server but error remains
So the server has the xml files and also serves the html. Then the html uses the xml files from the server but i get the same error
a “LEFT-TO-RIGHT EMBEDDING”… might happen to people with RTL languages set in their UI. it never happens to many people, and it probably happens a lot to some people. I am inclined to doubt that this is the case here.