mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
Fixed BackgroundSubstractorMOG2 ocl implementation.
This commit is contained in:
parent
78de75397e
commit
2717ba735a
@ -369,7 +369,6 @@ __kernel void mog2_kernel(__global T_FRAME * frame, __global int* fgmask, __glob
|
||||
bool fitsPDF = false; //if it remains zero a new GMM mode will be added
|
||||
|
||||
int nmodes = modesUsed[y * modesUsed_step + x];
|
||||
int nNewModes = nmodes; //current number of modes in GMM
|
||||
|
||||
float totalWeight = 0.0f;
|
||||
|
||||
@ -430,8 +429,6 @@ __kernel void mog2_kernel(__global T_FRAME * frame, __global int* fgmask, __glob
|
||||
for (int mode = 0; mode < nmodes; ++mode)
|
||||
weight[(mode * frame_row + y) * weight_step + x] *= totalWeight;
|
||||
|
||||
nmodes = nNewModes;
|
||||
|
||||
if (!fitsPDF)
|
||||
{
|
||||
int mode = nmodes == (NMIXTURES) ? (NMIXTURES) - 1 : nmodes++;
|
||||
|
Loading…
Reference in New Issue
Block a user