Problem loading haar cascade file in opencv.js

asked 2018-07-20 06:08:50 -0500

updated 2018-07-20 06:22:08 -0500

I am able to run the basic opencv.js code. But when I am trying with Face detection opencv.js code, getting the following error.

6410592 - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch. Catch Errors

I think the issue is Haar Cascade xml file is not loading using the below script classifier.load('haarcascade_frontalface_default.xml'); It is returning 'false'.

edit retag flag offensive close merge delete

Comments

It all depends on which xml you are using and which OpenCV version. Furthermore enable the exception catching as described, because we need it to locate the actual error.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-07-24 05:04:14 -0500 )edit

Where exactly do that?

jinu.kuruvilla@brillio.com gravatar imagejinu.kuruvilla@brillio.com ( 2018-08-05 05:02:26 -0500 )edit

You need to pass that with your compiler as an option Compile with -s DISABLE_EXCEPTION_CATCHING=0

StevenPuttemans gravatar imageStevenPuttemans ( 2018-08-06 07:23:57 -0500 )edit