diff --git a/modules/video/src/bgfg_KNN.cpp b/modules/video/src/bgfg_KNN.cpp index c551ce4c9..cddd62c15 100755 --- a/modules/video/src/bgfg_KNN.cpp +++ b/modules/video/src/bgfg_KNN.cpp @@ -458,10 +458,8 @@ CV_INLINE void uchar nShadowDetection ) { - int size=_src.rows*_src.cols; int nchannels = CV_MAT_CN(_src.type()); - const uchar* pDataCurrent=_src.ptr(0); - uchar* pDataOutput=_dst.ptr(0); + //model uchar* m_aModel=_bgmodel.ptr(0); uchar* m_nNextLongUpdate=_nNextLongUpdate.ptr(0); @@ -509,48 +507,51 @@ CV_INLINE void if (_nLongCounter >= m_nLongUpdate) _nLongCounter = 0; //go through the image - for (long i=0;i