2014-01-26 108 views

回答

1

您可以通过从网络摄像头捕捉帧而不是从视频捕捉帧。因此,使用下面的代码从您的网络摄像头得到的帧:

using namespace cv; 

VideoCapture cap; 
cap.open(0); 
Mat frame; 

for(;;) 
{ 
    cap >> frame; // This frame will contain the current webcam frame 

} 

waitKey(0); 

我希望现在你就可以这个“摄像头帧”上应用BG算法。

相关问题