menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

Track3D - 4 Calibration

Last updated: Jul 25, 2026

4 Calibration

4 Calibration

Why Calibration?

The aim of Calibration is to provide Track3D with a system of reference

parameters (Dynamic Linear Transformation parameters) that it uses to

reconstruct the 3D position of the subject from the two sets of 2D coordinates obtained from the EthoVision XT video-tracking software. DLT parameters are calculated by the software CentroidFinder, using a number of calibration markers in each camera view. The output of calibration is the Calibration file, which you load in Track3D (see Figure 18 on page 59). Note - You do calibration once, provided that the cameras do not move relative to the tracking chamber.

Overview Of The Procedure

important Before you carry out calibration, make sure you mark

the cameras "Camera 1" and "Camera 2". Always be consistent with this labeling when doing calibration and when recording the subjects. The procedure differs depending on whether you use MediaRecorder or EthoVision XT to record video. If you use MediaRecorder, see below. If you use EthoVision XT, go to step 2. 5. With EthoVision XT, create the calibration images. - If you make video with EthoVision XT, you create one image from the mixed camera view. See page 28. - If you make video with MediaRecorder, you create two images, one for each camera view. 6. Open CentroidFinder, load the calibration images and carry out calibration. See page 31. 4 Calibration

Object With Mediarecorder

Skip this section if you use EthoVision XT to make video. 1. Place the calibration object in the middle of the test chamber, and make sure that the cameras are switched on and connected to the PC. 2. Start MediaRecorder. 3. Click the folder button next to File location and specify where to save the video files. If your hard disk is partitioned, save the video on the D: drive. 4. In the File base name field, type the base name you want to give to the files (for example, Calibration; see the note below). 5. Make sure that Video 1 and Video 2 are selected. 6. Click the Start Recording button. 7. A couple of seconds later, click Stop Recording. Result - Two short calibration video files are created, one for camera 1 and one for camera 2. Proceed with page 29. 4 Calibration

Notes

The origin of the 3D coordinates in your results depends on the coordinates of the markers in your calibration reference file. The location of the origin does not influence statistics of speed and heading. However, if you want the coordinates to originate from a specific point, for example the odour release point, then you must edit the calibration reference file to adjust the coordinates of the markers relative to this point. The name of the video file consists of the File base name followed by the video input name (you can change this in the Settings window), the date and the time the videos were recorded, and the number of the video camera. For instance, if your File base name is Calibration, the date is 11 May 2011, the time 10:54:43 and you create 2 videos simultaneously, the video from the second camera is named: Calibration Video 2 11-5-2011 105443 2.avi.

If you make video with EthoVision XT

If you use MediaRecorder to make video, see page 29. 1. Place the calibration object in the test chamber, and make sure that the cameras are switched on and connected to the PC. For calibration in water tanks - Remove the infrared filter from the camera lens. Increase the lens aperture to obtain a bright image. 2. Start EthoVision XT and open your experiment. Make sure that in

the Experiment Settings, Video source is set to Live tracking with

Number of sources = 2. 3. Choose Setup > Arena Settings > New and rename it to Calibration. 4. Click Grab. If you do not see this button click the Grab background image button, then click Grab.

Note - When you click Grab, EthoVision XT saves the background

to a file, background.bmp (see the next step). 4 Calibration 5. With Windows Explorer, browse to the Bitmap Files folder in your

EthoVision experiment folder and copy the newest background.bmp

file to the location of your choice (e.g. D:\calibrations). 6. Rename this file, for example Calibration image.bmp. 7. important If you work with fish tanks and backlight units, the calibration image will be predominantly white with black markers. You must invert the colors of the image to get white markers on a black background. The final image should be like this: To do so, see edit the calibration images on page 119. 8. Load this image two times in CentroidFinder. See 3 - carry out calibration on page 31.

If you make video with MediaRecorder

We assume that you have made two video file with MediaRecorder. Do the following: 1. Start EthoVision XT. If you have not yet done so, create an

experiment (File menu). Make sure that in the Experiment Settings,

the Video Source is From video file. 2. Choose Setup > Arena Settings > New and rename it to CalibrationCamera1. 3. Click Browse and select the video file for that camera. 4. Click the Grab button. The image from the video file of that camera is pasted on the EthoVision screen.

tip If you do not see this button click the Grab

background image button, then click Grab.

Before clicking Grab, make sure that the camera view displayed in

the video file corresponds to the name of the Arena Settings profile that you have just created. If you realize that you have grabbed the 4 Calibration

image from the wrong file, click the Grab Background Image

button in the Arena Settings window, select the correct video file, and click Grab.

note When you click Grab, EthoVision XT saves the background to

a file, background.bmp (see the next step). 5. Using the File Explorer, browse to the Bitmap Files folder in your

EthoVision experiment folder and copy the newest background.bmp

file to the location of your choice (e.g. D:\calibrations). 6. Rename this file, for example CalibrationCamera1.bmp. 7. Repeat the steps from 2 to 4, this time choose the other video and name the bitmap CalibrationCamera2.bmp. 8. If you work with water tanks, you must invert the colors of the

images to get white markers on a black background. See edit the

calibration images page 119.

Notes

For obtaining calibration images, you do not need to draw an arena and set pixel calibration in the Arena Settings. For more information on how to make an experiment and an arena profile, see the EthoVision XT Help. Check that the markers in both calibration images are well defined, with sharp margins and well contrasting with the background. To edit the images, see edit the calibration images page 119. 4 Calibration At this point you should have two calibration bitmap files. See the previous section for how to obtain such files. 1. Insert the EthoVision XT hardware key in your computer. 2. Start CentroidFinder. The CentroidFinder window appears on the screen. 3. Click Select Images. In the window that appears, select the Calibration image file(s). - If you make video with EthoVision, load the same image two times. - If you make video with MediaRecorder, load first CalibrationCamera1.bmp, then CalibrationCamera1.bmp. 4. Click Indicate Markers below the first image. As a result, that button turns green. 4 Calibration

tip To get a larger image of the calibration object, click the Zoom in

button, then click and drag the mouse to select a box around the calibration object. For details see page 37. 5. Click the markers in the order pre-defined in your calibration reference file. The reference file is an Excel file containing the markers' real world coordinates, listed in a specific order. Follow that order when clicking markers in both images. When the mouse pointer hovers on the image, it turns into a black circle. Click inside the white marker. Note: - If a marker is not fully visible in that image, and visible in the other, do not click it. Rather, enter the value of the next visible marker before clicking the next visible marker. This way you tell the program that one or more markers in the sequence must be skipped for that image. See page 34 for details. 4 Calibration - If a marker is visible in that image, not in the other, click that marker as usual. - Do not click markers that are partly hidden by the calibration object, or that are too close (less than 10 pixels) to white objects in the image. When clicked, the marker is labeled with a progressive number. If you click a marker twice, take note of the number of that marker.

Type this number in the field under next marker in the middle of

the screen, and click that marker again. If you want to restart

clicking markers on an image, click the Indicate markers button

below that image. 6. After clicking a marker, the Label for next marker increases by 1. 7. Click now the following marker according to the predefined order. 8. Once you have clicked the last marker for the first calibration image,

click the Indicate markers button below the other image. Repeat the

procedure described at step 4. Make sure that you click the markers exactly in the same order as for the first image (see the example below). 9. After you have clicked the very last marker, click the Calculate and save button. 4 Calibration 10.A message appears: 11. An Excel Calibration file has been created in the folder where the

calibration images are stored. The file is named as [name of the first

image]+[Date]+[Time]. See below for information about this file. 12. Open the Calibration reference file containing the real-world 3D coordinates of the markers. This file has been provided by Noldus. Copy the values of the columns B, C, D. 13. In Excel, open the Calibration file saved in step 9 and paste the

values to the columns F, G, H. This will replace the zeros with the 3D

coordinates.

If Excel is not installed on that PC, see also complete the

calibration without excel on page 40. 14. Save the Calibration file. You will load this file in Track3D (page 60).

Hidden Markers: What To Do?

Marker hidden in one image

If a marker is not visible in one image, and is visible in the other, enter the number of the next visible marker before clicking it.

example Consider the following calibration images:

4 Calibration Each image is the top view of the calibration object from two cameras. The object is made of two horizontal frames one on top of the other (markers of the upper frame look bigger than those on the lower frame). Four markers in the left image (indicated by the arrows) are hidden by the upper frame when viewed from the other camera (right image, indicated by the brackets). Note that the image on the right is upside down - The marker number 1 has been marked with a circle). 1. If a marker is visible in one image, not the other, click it as usual. In this example, 27 and 28 are visible in image 1, not in image 2. 2. When the next marker to click is hidden, look at Label for next marker. For example, marker number 27 in the other image is hidden (see the bracket in the figure below). 4 Calibration 3. Click the number under Label for next marker and enter the number of the next visible marker. In this example, enter 29 (this is the next visible marker after 27 and 28). 4. Click the markers as usual (29, 30, 31...).

Markers hidden in both images

If a marker is hidden in both images, skip that marker in both images.

Simply type the number of the next visible marker in the Label for next

marker field.

tip For easy identification of markers, make a printout of the

calibration images, and write down the marker numbers. 4 Calibration

Zoom In/out The Calibration Image

To make the markers more visible and calibration more accurate, you can zoom in the calibration image. We recommend that you do this only before you click the Indicate markers button. 1. Click the zoom in button. 2. The mouse cursor turns into a cross. Drag the mouse to draw a rectangle around the calibration object. Pay attention to include all markers. 3. Release the mouse button. CentroidFinder only shows the portion of the image selected. 4 Calibration 4. You can now begin with clicking the markers. 5. To return to the original image, click the Zoom out button.

Use Multiple Calibration Objects

When using multiple calibration objects (see Figure 12 on page 19), the calibration procedure does not change. The only difference is that you have more markers to click. You can choose to click them all, or some of them (for instance, click one every two). In any case, it is handy to make a scheme of the marker numbers, like in this example: If you click a subset of markers, make sure that your calibration reference file only contains the coordinates of those markers, so you can copy those values directly to your calibration file. 4 Calibration

The Calibration File

The calibration file is an Excel sheet with eight columns: Note that the calibration file does not have headers.

The Calibration Reference File

Noldus Information Technology provides you with a Calibration reference file that matches your calibration object.

Column

Value

Marker number B,C X and Y coordinates of the marker in the first image (in pixels) D,E X and Y coordinates of the marker in the second image (in pixels) F,G,H X, Y, Z coordinates of the marker in the real world relative to an arbitrary origin, respectively. 4 Calibration A Calibration reference file is an Excel file that contains the real-world coordinates of the markers of your calibration frame. Markers are listed in a certain order, which must match the order of clicking in CentroidFinder.

Make your own calibration reference file

If you like, you can create your own Calibration reference file with the markers listed in a different order. If you use two or more calibration objects combined, you can create a reference file with a sub-sample of markers to reduce the number of markers to click. To make a Calibration reference file, create an Excel file with the following columns: Column A - Marker number. Column B, C, D - Values (in mm) of the X, Y, Z coordinates of the markers, respectively. Each line corresponds to a marker. The markers must be listed in the same order as they are clicked. Do not insert headers.

Complete The Calibration Without Excel

If the computer where Track3D is installed does not have Microsoft Excel, CentroidFinder exports the calibration file to text (tab- delimited). You can now add the 3D real-world coordinates of the calibration markers in the following way: 4 Calibration

Using Excel on another computer

  1. Copy the calibration file to the computer with Excel.
  2. Open the file in Excel.
  3. Copy the 3D real-world coordinates from the calibration reference file to the last three columns of the calibration file. Those values must replace the zeroes.
  4. Save the file as Tab-delimited text (.txt).
  5. Load this file in Track3D.

Using only text files

  1. Open the calibration file in Windows Notepad.
  2. Copy the values of the 3D real-world coordinates from the calibration reference file, one row at a time.
  3. Paste them in the calibration file to the left of the first "0.000".
  4. Remove the remaining zeroes.
  5. Repeat the steps 2-4 above for each row.
  6. In Notepad, choose Edit > Replace and in the Find field enter a space

(press the spacebar) and leave the Replace field empty. Next, click

Replace all. This will remove all the spaces. 4 Calibration 7. Save the calibration file. You can now load it in Track3D.

Do Calibration Manually

If for any reason CentroidFinder fails to detect the markers, you can still enter the 2D coordinates of the calibration marker.

tip You can also try editing the calibration images to remove objects

that interfere with marker detection. Open the images in Paint.net, and after editing save them to bitmap (with bit depth 24). 1. Open a calibration file or create one like that on page 39. Alternatively, create a new calibration file with 8 columns and as may rows as markers. 2. Enter the marker numbers in the first column and the the markers' 3D coordinates in the last three columns. 3. Open the first calibration image in an image editor that shows the pixel coordinates of images. For example, Microsoft Paint or Paint.NET. 4. Move the mouse over the center of a marker. 4 Calibration 5. Take note of the coordinates. In most cases these are reported on the status bar at the bottom of the screen. 6. Enter the X and Y coordinates in the second and third column (for the calibration image 1) or the 4th and fifth column (for the calibration image 2) of the calibration file, respectively. Fill in the row that corresponds to that marker number! 7. Repeat the steps 4 to 6 for all markers and both the calibration images. 8. Save the file (Excel or text). Next, load this file in Track3D as the calibration file (see page 60).


Source: Track3D 2 - Reference Manual (March 2025)

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.