Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
opencv错误断言失败_Opencv - Fatal编程技术网

opencv错误断言失败

opencv错误断言失败,opencv,Opencv,OpenCV错误: Assertion failed (scaleFactor > 1 && image.depth() == CV_8U) in detectMultiScale, file /build/buildd/opencv-2.4.9+dfsg/modules/objdetect/src/cascadedetect.cpp, line 1081 terminate called after throwing an instance of 'cv::Ex

OpenCV错误:

 Assertion failed (scaleFactor > 1 && image.depth() == CV_8U) in detectMultiScale, file /build/buildd/opencv-2.4.9+dfsg/modules/objdetect/src/cascadedetect.cpp, line 1081
    terminate called after throwing an instance of 'cv::Exception'
      what():  /build/buildd/opencv-2.4.9+dfsg/modules/objdetect/src/cascadedetect.cpp:1081: error: (-215) scaleFactor > 1 && image.depth() == CV_8U in function detectMultiScale.
为什么会发生此错误?

请查看


…返回“0”-因为我们使用的是布尔AND,这意味着一个或两个逻辑语句失败。。。(因此有三种可能性)

您的比例因子小于1或者您的输入图像不是8UC1类型(可能是彩色图像)?请发布函数调用代码和图像输入调用方RR:可能不需要单通道。。。但是deptj必须是8位的,所以没有浮点图像
void CascadeClassifier::detectMultiScale(const Mat& image, vector<Rect>& objects, double scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size(), Size maxSize=Size())
 (scaleFactor > 1 && image.depth() == CV_8U)