in the process of using OpenCV on ROS to realize face detection, the following problems are encountered:
: p>
OpenCV Error: Assertion failed (! Empty ()) in detectMultiScale, the file/TMP/binarydeb/ros – kinetic – opencv3-3.3.1/modules/objdetect/SRC/cascadedetect CPP, Line 1698
the terminate called after throwing an instance of ‘CV: : Exception’
I () :/TMP/binarydeb/ros – kinetic – opencv3-3.3.1/modules/objdetect/SRC/cascadedetect CPP: 1698: error: (215). empty() in function detectMultiScale
Aborted (core dumped) p>
OpenCV cascade detector, Cascadedetect error, XML path reading error, found in the original code face_cascade did not read. XML file. As follows:
cv::CascadeClassifier face_cascade;
solution:
Find the location of the XML file related to face recognition and add the XML file to face_cascade. As follows: p>
cv::CascadeClassifier face_cascade = cv::CascadeClassifier("/home/opencv/opencv-3.4.4/data/haarcascades/haarcascade_frontalface_default.xml");
after modification, code debugging passed, problem solved.
The XML file here is also optional, with haarcascade_eye.xml for eye recognition, and so on.
Read More:
- cv2.error: OpenCV(3.4.2) error: (-215:Assertion failed) !empty() in function ‘detectMultiScale‘
- OpenCV error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor‘
- error(-215) !empty() in function detectMultiScale solution
- Successfully solved opencv error: assertion failed (SCN = = 3 | SCN = = 4) in CV:: cvtcolor
- Project files may be invalid appears when cmake compiles opencv3.1, and the debug additional dependency of the compiled opencv3.1 is at the end
- Opencv perfect configuration strategy 2015 (win7 + opencv 2.4.9 + vs 2013)
- [opencv + openvino] opencv-vino4.5.1 + opencv contrib installation
- Installing opencv and Linux Makefile:160 : recipe for target ‘all’ failed problem resolution
- error: (-215:Assertion failed) !ssize.empty() in function ‘resize‘
- To solve the problem in Windows opencv installation: error configuration process, project files may be invalid
- Opencv2.4.9 + ffmpeg1.2.12 installation configuration and problem solution under Ubuntu 14.04
- Solve the problem of “error empty block statement no empty” in the console (Vue project)
- Installing opencv Python in docker container
- Undeclared identifier CV in opencv4.2.0_ WINDOW_ AUTOSIZE
- Solution to error reporting in opencv4.0 compilation of logo-logo
- Solution of OpenCV library import error in Python 3
- Error: undefined reference to ‘CV:: xxx’ encountered in using OpenCV in QT
- OpenCV3.1 + Python2.7 error “DLL load failed: The specified module could not be found”
- Opencv opencvsharpexternal compilation and recording process