【发布时间】:2013-01-29 11:33:46
【问题描述】:
我正在使用BackgroundsubtractorMOG() 基本上提取一个蒙版以分离出前景。然后我在遮罩上使用convexHull() 来定位移动物体的位置。
但我收到以下错误:
openCV Error: Assertion failed (nelems >= 0 && (depth == CV_32F || depth == CV_32S)) in convexHull, file /home/ameya/OpenCV2.4.2/modules/imgproc/src/contours.cpp, line 1947
terminate called after throwing an instance of 'cv::Exception'
what(): /home/ameya/OpenCV2.4.2/modules/imgproc/src/contours.cpp:1947: error: (-215) nelems >= 0 && (depth == CV_32F || depth == CV_32S) in function convexHull
我已经检查了号码。元素以及类型转换的掩码矩阵。但错误仍然存在。 有没有人遇到过类似的问题。我正在使用 OpenCV 2.4.2
【问题讨论】:
-
这要么是传递给函数的元素数量错误,要么是错误类型(不是 32F 浮点数或 32S 有符号整数),因为错误显示了它
标签: opencv convex-hull background-subtraction