Segmentation fault: 11 in detectMultiScale

Stack Overflow Asked on October 23, 2020

I’m trying to using cv2 for face recognition. When I use haarcascade_frontalcatface.xml to recognize face, everything is ok (the same with haarcascade_eye.xml), but haarcascade_mcs_nose.xml gives me this error:

The code is below:

import cv2
image = cv2.imread('face.jpeg')
print image.shape
gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
nose_detector = cv2.CascadeClassifier('haarcascade_mcs_nose.xml')
nose_zone = nose_detector.detectMultiScale(gray,1.3,3,minSize=(10,10))

I’m working on MacOS Mojave and the opencv-python version is 4.1.2. I tried to change the parameters in detectMultiScale, but it didn’t work. This problem confuses me a lot, can anyone help me resolve it please ?

Add your own answers!

Related Questions

How to print a column using awk command line and add header

3  Asked on November 4, 2020 by maskiin


Create repeated declaration

5  Asked on November 3, 2020 by ferenc-deak


Why is synchronizing a method not advisable?

3  Asked on November 2, 2020 by linus-jame


How to filter array of objecs with an object

3  Asked on October 31, 2020 by zkk


Trying to have c++ program quit by inputting a letter

2  Asked on October 29, 2020 by elizabethcampbell441


reload page from express using setInterval

2  Asked on October 24, 2020 by dwayne-jackson


Jquery .last() equivalence to Javascript

1  Asked on October 23, 2020 by divja-afsa


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP