The answer to this depends on the camera that you are using (specifically, the camera lens) and the size of the apparatus. Generally speaking, you shouldn’t need to worry too much unless you have limited space or a particularly large apparatus (or you’re going to use one camera to view multiple apparatus). For example, a camera supplied by Stoelting, mounted on a standard 2.75m (9ft) ceiling, with your apparatus sitting on an 80cm high desk, would work well with any apparatus with dimensions between about 40x40cm and 250x250cm.

If you already have your camera, you can simply try mounting it above the apparatus (either on a stand, or on the ceiling) and use ANY-maze’s Video page to check how much of the apparatus you can see. There are a couple of things to bear in mind here:

- The camera needs to be mounted high enough to frame the apparatus nicely with a small border around it (this is used by ANY-maze to allow it to automatically start tests in the apparatus). If in doubt, the camera should show a little too
*much*space around the apparatus rather than too little. - The camera needs to be positioned to minimize any ‘dead’ space at the edges of the apparatus, where the camera would be unable to see the animal. This can happen if you’re looking at multiple apparatus with the same camera, or even a single apparatus with multiple chambers, as in the following image:

Here, the dead space is shown by the green shading – you could improve things by raising the camera to be further away from the apparatus.

### Calculation

If you *do* need to calculate where your camera can be mounted (perhaps you’ve got very high ceilings, or your apparatus is in a cupboard, or you have a particularly large apparatus) then you can do this quite easily using the following instructions.

Calculating the mounting distance for the camera depends on the camera lens. All camera lenses have a *lens angle* (sometimes called an *angular field of view*) which determines how wide the camera’s view is:

Lenses have different angles in the horizontal and vertical plane, and in fact there are three lens angles you might encounter – horizontal, vertical and diagonal. The horizontal angle is the most commonly quoted, and if you know one of them you can approximate the others:

Horizontal = Vertical / 0.75

Horizontal = Diagonal * 0.75

We’re going to use the Horizontal lens angle in our calculations.

Once you know this figure, you need to determine the dimensions of the apparatus and perform some simple calculations in order to determine how high above the apparatus the camera needs to be. Note that if you have a fixed-focus lens, your calculations will give you the *minimum* distance from the apparatus that the camera must be mounted; if you have a zoom lens, there will be a range of lens angles and you should use the minimum and maximum angle to calculate the range of distances between which you can mount the camera.

To calculate the mounting distance above the apparatus (**a**), you need to do the following

- Determine an approximation for half the longest dimension of your apparatus:
- Take the length and width of your apparatus,
**b**and**c** - If
**c**is greater than**b**then swap**b**and**c** - If
**c**÷ 0.75 is greater than**b**then make**b**=**c**÷ 0.75 - Multiply
**b**by 1.1 - Divide
**b**by 2 to give the**Half Apparatus Width**

- Take the length and width of your apparatus,

- Take the horizontal lens angle of the camera and divide by 2 to give the
**Half Lens Angle** - Calculating the required height of the camera above the apparatus is then a simple calculation:

**Height above apparatus = Half Apparatus Width ÷ tan (Half Lens Angle)**

You can use the calculator that’s part of Windows to calculate the tan. Open the calculator, which can usually be found on the Start menu under*Programs – Accessories*. Select the*View*menu, and if*Scientific*isn’t selected then select it. Next ensure that the*Degrees*option is selected, enter the half-lens-angle in degrees, then click the*tan*button. - Add a small amount to account for the height of the animal when rearing – around 15cm should be fine.

Note that the value you’ve just calculated is the distance between the front of the camera’s lens and the apparatus floor – so if your apparatus is elevated, such as an EPM, then you must take the height of the apparatus into account (assuming you’re calculating the height above the floor of your lab). If you’re using a water-maze, then the camera must be this distance above the *water level* in the apparatus.

### Worked example

- If your apparatus is 80cm x 50cm, then
**b**= 80 and**c**= 50.

Using the calculations from step 1,**b**is larger than**c**(and also larger than**c**÷ 0.75)

So multiply**b**by 1.1 and then divide by 2 to give 44. - Divide the horizontal lens angle of your camera by 2.

At time of writing, the standard ANY-maze USB camera varifocal lens has a horizontal lens angle of between 28.4° and 101.3° – so we’ll perform this calculation twice, once using a half-angle of 14.2° and once using a half-angle of 50.65°. - The minimum height above the apparatus is 44 ÷ tan(50.65) = ~36cm.

The maximum height above the apparatus is 44 ÷ tan(14.20) = ~176cm. - Finally, add a value for the animal rearing of ~15cm.

So a camera using this lens must be mounted such that the distance between the front of the lens and the ‘floor’ of the apparatus is between around 51cm and 201cm. If the camera is closer than 51cm then the apparatus won’t fit in the picture; if the camera is further away than 201cm then the apparatus will appear smaller than would be ideal.