Problem loading haar cascade file in opencv.js

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

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

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


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 -0600 )edit

Where exactly do that? gravatar image[email protected] ( 2018-08-05 05:02:26 -0600 )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 -0600 )edit