menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

EthoVision XT 19 - Configure Detection Settings - How the Reference Image Is Updated in Dynamic Subt

Last updated: Jul 28, 2026

How the Reference Image Is Updated in Dynamic Subtraction

A video stream is composed of a number of video images (frames). During data acquisition, EthoVision XT analyzes one every x images according to the sample rate specified. When analyzing the sample (image) n, the reference image is obtained by summing up the gray scale values of each pixel from two images:

  • The reference image made of pixels which have an average value of previous images.
  • The current image, where a square area around the subject detected in the previous sample has been removed. This provides a rough estimate of the current background.

The gray scale values are summed up according to the formula:

Referencei,n = (1-α) * Referencei,n-1 + α * Currenti,n

for each pixel i, where:

  • Referencei,n = Gray scale value of pixel i in the reference image of sample n.
  • Referencei,n-1 = Gray scale value of pixel i in the reference image of sample n–1.
  • Currenti,n = Gray scale value of pixel i in sample n where a square area around the subject previously detected has been removed.
  • α = Current Frame weight.

The Current Frame weight determines the relative weight of the two components of the new reference image.

Because the above formula is recursive, that is, each value of Referencei,n is also a function of the previous sample, the value of α determines the number of past images that contribute to the reference image for the sample n. The lower α, the more past images contribute at least partially to the current reference image.

The extent to which each past image contributes to the current reference image is a power function of 1-α. The older an image relative to the current one, the smaller its contribution to the reference image.

If α=20%, then 1-α =80%. The first video image contributes by 80% to the second sample, by 80%2 =64% to the third sample, then by 80%3 =51% to the fourth sample, etc. At the 21st sample, the contribution by the first image gets below 1%.

In the Dynamic Subtraction detection method, the reference image is updated at each sample. The starting reference image is the one you specify by clicking one of the buttons in the Reference Image window, otherwise it is the first frame analyzed. For the general sample n, the reference image is obtained by summing the reference image of the previous sample n–1 and the current image n where the area around the subject estimated from the previous sample has been removed. The current image with subject removed is given the weight α that you specify, while the previous reference image is given the weight (1-α). Because of the way it is determined, each reference contains information on a number of past images, depending on the value of α.

How the Reference Image Is Updated in Differencing

The Differencing method uses a Gaussian distribution of all pixels in a frame. EthoVision XT keeps a running average of the mean μ and the variance σ2 of the gray value of each pixel to detect unlikely pixels. These pixels are considered to be the subject.

The mean of the gray values is summed up according to the same formula as for Dynamic Subtraction.

The variance of the gray values is summed up according to the following formula:

Variancei,n = (1-α) * Variancei,n-1 + α * (Currenti,n. Referencei,n)2

for each pixel i, where:

  • Variancei,n = Variance of gray scale value of pixel i in the reference image of sample n.
  • Currenti,n = Mean gray scale value of pixel i in sample n where a square area around the subject previously detected has been removed.
  • Referencei,n-1 = Mean gray scale value of pixel i in the reference image of sample n–1.
  • α = Frame weight, which depends on the Background changes option. The higher the value set (from Very Slow to Very Fast), the higher α.

The Frame weight determines the relative weight of the two components of the new reference image (see the example in How the Reference Image Is Updated in Dynamic Subtraction).

Customize the Detection Settings Screen

To achieve optimal subject detection, you need proper feedback about the effect of your settings on the quality of detection. EthoVision offers you a number of statistics for this purpose.

What Do You Want to Do?

  • View the detection features on the video window
  • View the detection statistics

Training and onboarding

Ask about our training packages to get your team up and running quickly with Noldus software.

Noldus is here to assist you throughout the whole process.

shopping_bag
check_circle

Thank you!

We'll get back to you shortly.

error

Please correct the following errors:

error

error

error

error

By clicking Submit, you consent to Noldus processing your data as described in our privacy policy.