opencv调用摄像头并减去背景,背景差分法

int main()  
{  

int times =0;  
while(1)  
{  
    src = camera.QueryFrame();  
    if(times ==0)  
    {  
        cvCvtColor(src,pFrame_gray,CV_BGR2GRAY);  
        cvShowImage("pFrame_gray",pFrame_gray);  
        if( 13 == cvWaitKey() )  //回车键确定背景,进行下一步运算  
            times = 1;  
        continue;  
    }  

//your code;  

//..........................  

return 0;

你可能感兴趣的:(opencv,C/C++)