ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Apparatus > Video sources > Setting up a Video Source > Barrel distortion correction

Barrel distortion correction

Introduction

Barrel distortion is a type of image distortion that occurs when straight lines near the edges of an image appear to bow outward, giving the image a shape similar to that of a barrel. It is a common type of distortion found in wide-angle lenses, especially those with a short focal length.

In ANY-maze, if there is a slight barrel distortion, it will not have a significant impact on the results. Hence, there is no need to correct it as it would only involve additional processing without any benefits. However, if the distortion is more noticeable, it can affect the accuracy of measurements like distance travelled. In such cases, the distortion can be corrected under the following conditions:

 •The distortion is not too severe 
 •The lens is mounted perpendicular to the apparatus, typically looking straight down at it and not at an angle.  

Details

To correct barrel distortion you should click the Distortion correction button shown in the tool bar when a video source is selected in the protocol. This will cause the Barrel distortion correction window, shown below, to open.

  

  

Figure 1. This barrel distortion correction window

As you adjust the slider to the right, you will notice that curved lines near the edges of the image, which should ideally be straight, become straighter. The higher the intensity, the more the lines will straighten until they eventually start curving in the opposite direction. Your goal is to adjust the intensity until the lines appear as close to straight as possible.

As you increase the intensity, you will observe that the image also zooms in. This is a normal behaviour because the distortion correction process will actually cause the image to resemble something like the one shown in figure 2.

  

  

Figure 2. The corrected image contains additional areas shown in purple that are not present in the original image. To avoid these areas from appearing, ANY-maze zooms-in.

In this corrected image, the purple areas represent parts that are not present in the original image. To prevent displaying these areas, ANY-maze zooms in.

It's important to note that the barrel correction performed by ANY-maze is not perfect, and it may only reduce, rather than completely eliminate, the distortion in your image. However, minor distortion will only have a negligible effect on test results, so you can generally ignore it.

See also:

 •Setting up a video source 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T1397