Skip to content
Advertisement

opencv cascade.detectMultiScale creates error: (-215) !empty()

I am following this tutorial to understand haar features. While writing following code:

JavaScript

getting following error:

JavaScript

(Sachin is the image i downloaded from google, of size (237,237,3) and after converting gray it is (237,237) with min=23, max=210. I am using opencv 3.1.0 with python 3.6, installed using command conda install -c menpo opencv3. i am trying for this solution but unable to find xml file in my desktop. How to solve problem.

Advertisement

Answer

You need to specify the full paths to the XML files for Haar Cascade.

On Ubuntu 16.04, these files can be found in /usr/share/opencv/haarcascades.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement