2014-04-21 20:35:36 -0600 | asked a question | BackgroundSubtrator samples are not working on iOS Hi, I have been playing with the samples out there using BackgroundSubtractorMOG on iOS but I keep getting errors like; Only 1- and 3-channel 8-bit images are supported in BackgroundSubtractorMOG Any help is much appreciated. |
2014-04-16 14:30:54 -0600 | asked a question | Is there a good sample for BackgroudSubstract on iOS? I am trying to use Background subtract samples on Ios and I keep getting errors. Here is my current code; bool SuppressBackgroundSample::processFrame(const cv::Mat& inputFrame, cv::Mat& outputFrame) { try { Ptr<backgroundsubtractor> pMOG = new BackgroundSubtractorMOG(); //MOG approach Ptr<backgroundsubtractor> pMOG2 = new BackgroundSubtractorMOG2(); //MOG2 approach Mat fgMaskMOG; //fg mask generated by MOG method Mat fgMaskMOG2; //fg mask fg mask generated by MOG2 method pMOG->operator()(inputFrame, fgMaskMOG); pMOG2->operator()(inputFrame, fgMaskMOG2); } catch (Exception e) { printf("Exception: %s\n", e.err.c_str()); } outputFrame = inputFrame; } The exception I get is Exception: Only 1- and 3-channel 8-bit images are supported in BackgroundSubtractorMOG Thanks |