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 を使用しています