Skip to content

Missing haarcascades xml files #48

Closed
@a-aitken

Description

@a-aitken

First thanks for putting this package together!

I'm trying to perform face detection by following this tutorial: http://docs.opencv.org/trunk/d7/d8b/tutorial_py_face_detection.html, however this leads to an error as the haarcascade xml files appear to be missing from the wheel:

import cv2
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
print(face_cascade.empty())
img = cv2.imread(<path/to/an/image/file>)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)

This should print False and then perform face detection. However, it prints True and then leads to an error:

opencv-python/opencv/modules/objdetect/src/cascadedetect.cpp:1698: error: (-215) !empty() in function detectMultiScale

It looks as though the files under https://github.com/opencv/opencv/tree/master/data are missing from the wheels so I guess that adding them should fix this.

(This works as expected using the conda package).

  • macOS Sierra 10.12.6
  • x86-64
  • opencv-python v3.3.0.10

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions