# The Average Image

The tool calculates the average image as the sum of the numerical pixel values for each pixel position in a set of images, divided by the number of images. The tool uses a 16-bit accumulator to calculate the average image, which can cause the tool to produce unpredictable results if you try to average more than 256 images. In practice, an overflow on the 256th image would occur when each acquired image had a grey value of 255 for the same pixel in all images, so the actual limit for the number of images you can average depends on the images themselves.

The tool does not store the individual images that generate the average image, so previously added images cannot be accessed.

Finally, the Run method of the ImageAverageTool generates an average image (and standard deviation image, if enabledfor each new input image. The ImageAverage operator, meanwhile, supports an Add method to add images but does not generate the average image until you call the ExecuteAverage method. An Image Average operator, therefore, can offer substantial performance improvements over a Image Average tool in your Visual Studio vision application.