Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Background substraction MOG2 apply gets stuck

$
0
0
Hi, I am using a background substraction with the following code in a class: void process(const cv::Mat &inputFrame) { // class members: //cv::Ptr pMOG2; //cv::Mat foregroundMaskMOG2; //bool backgroundSubstractorCreated=false; //creates one background subtractor object per instance if( backgroundSubstractorCreated==false) { pMOG2 = cv::createBackgroundSubtractorMOG2(10,250,false); backgroundSubstractorCreated=true; } //update the background model std::cout <<"here" <apply(inputFrame, foregroundMaskMOG2,0); //Background not updated = 0 std::cout <<"it hangs" <

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>