我正在尝试从 BackgroundSubtractorMOG2 获取背景图像:
bg->getBackgroundImage(back);
但我得到一个Thread 1 SIGABRT
(作为 c++ n00b 让我感到困惑)和这个错误:
OpenCV Error: Assertion failed (nchannels == 3) in getBackgroundImage, file /Users/hm/Downloads/OpenCV-2.4.4/modules/video/src/bgfg_gaussmix2.cpp, line 579
libc++abi.dylib: terminate called throwing an exception
(lldb)
我不确定问题是什么,怀疑它与 nmixtures 参数有关,但我将其保留为默认值(3)。有什么提示吗?