Skip to content

Commit e6338e0

Browse files
committed
Correct use update factor
1 parent d97460c commit e6338e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

VIBE/src/vibe.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void VIBE::update(const cv::Mat& img)
111111
if (flag)
112112
{
113113
mask_.data[size_.width * i + j] = 0;
114-
if(rng_[ rng_idx_ = ( rng_idx_ + 1 ) % RANDOM_BUFFER_SIZE] % update_factor_)
114+
if(0 == rng_[ rng_idx_ = ( rng_idx_ + 1 ) % RANDOM_BUFFER_SIZE] % update_factor_)
115115
{
116116
int sample = rng_[ rng_idx_ = ( rng_idx_ + 1 ) % RANDOM_BUFFER_SIZE] % samples_;
117117
int model_idx = channels_ * samples_ * size_.width * i + channels_ * samples_ * j + channels_ * sample;

0 commit comments

Comments
 (0)