Ask Your Question

Revision history [back]

Assuming you also loaded util.js, "create" the .xml file before loading it:

let utils = new Utils('errorMessage');
let faceCascadeFile = 'haarcascade_frontalface_default.xml';
utils.createFileFromUrl(faceCascadeFile, faceCascadeFile, () => {
    console.log('cascade ready to load.');
});