Search
Start typing to search...

Basic Calibrator

Author:
Please note that this is a BETA version of the document. All information presented is correct but we are working on improving the details.

00:05

Hello! In this tutorial we are going to show you a basic PTZ camera calibration using Aximmetry Basic Calibrator with the help of a Sony PTZ camera.    

00:16

Let’s open Aximmetry Basic Calibrator. The first window to pop-up is the Startup Configurator. Here we can set up the Video output devices for our calibration. We will use SDI as SDI is the most reliable way to watch the result, but you can use any other option available to you. Specify the resolution and the frame rates - in our case, it’ll be 1080p50. We make it our 2nd output channel and we Sync the video signal. 

00:53

Next, we set up the Tracking Data. Click on Manage Devices, then scroll down to the Camera Tracking section. Note that PTZ cameras may vary in terms of their capabilities and settings, so make sure you’re familiar with your camera. The Sony PTZ camera we have uses FreeD protocol to send its Tracking data, so we choose FreeD. Specify the Data rate, then add a new device. Here we type in the UDP port number and the Camera ID of our PTZ camera. Click okay. Check the settings again, then click OK and start the Basic Calibrator. 

01:38

In the Basic Calibrator start by choosing the Video Input. In our case, it’s on the Blackmagic Decklink 8K Pro capture card’s 2nd port. Once we click on it, our video input should appear on the screen. We don’t need to set the Video Mode, as Aximmetry can identify the video input automatically. 

01:59

Next is the Tracking Device. Here we choose the tracking device we just set up in the Startup Configurator. We can immediately see that numbers appeared in the Basic Calibrator, namely our Zoom value and our Focus value. These indicate a numeric value that specifies the current state of our PTZ camera. Please note that the 0 zoom value indicates that we are currently at minimum zoom,  The F value indicates the focus value. 

02:28

Our next step is to add a new Camera definition and name it accordingly. Click add, then name the  new definition. We name it after the camera brand and the model number, Sony BRC X1000. Hit okay. We can see that the camera profile’s name appeared in the small window in the upper-right corner.  

02:51

Before we start the Calibration process, we still have to make some adjustments.  

02:56

First, open Properties. Here we need to specify the Sensor width. The sensor width is one of the main parameters of our camera’s sensor. We probably need to google our PTZ camera’s specification for this, but keep in mind that some manufacturers don’t share this data at all, or only give you an estimate. We can still work with such data, but the more precise data we have, the better. We found that our camera’s sensor width is 13.305 mm. 

03:25

Also, we need to specify the PTZ rotation center height from the floor. For this, it is important to ensure that the camera is precisely in level. After this, we actually need to measure the distance between our studio floor and the PTZ’s rotation center. If there’s no marking on our PTZ, then a good estimate is the center height of the lens when the lens is in level. Let’s type in our measured value here. We can additionally adjust other parameters as well, but usually we don’t need to. Let’s click okay. During final edit it will be corrected.

03:58

A virtual grid just appeared on our screen superimposed on our studio floor. We’ll need it for the calibration. 

04:06

First let’s pan the PTZ. When panning the camera, we can see that the virtual grid is gliding relative to the studio floor. This is because our camera is not yet calibrated. We can also see with sudden movements that the tracking data and the video signal are not in sync. Let’s fix this first. Scroll down the menu, until you see the Video delay, Tracking delay, and Zoom delay parameters. They are all meant in frames and they can all be fractional values, since there’s no guarantee that the delay value equals a whole frame. Do not adjust the Video delay parameter. Let’s start to increase the Tracking Delay’s value while we keep on testing the sync with sudden panning movements. Once we are done, we are good to continue the calibration. 

05:21

The last possible issue that we need to address before the main part is the autofocus. In an optimal case, we need to calibrate two features of a lens, its zoom and its focus, since both of them change the position of the lens elements relative to each other, thus changing the Field Of View and the distortion values. To avoid the autofocus having an unwanted effect on the calibration it is best to turn it off. In our case, we turned off the autofocus. At this point you may manually adjust the focus value one last time if you only want to calibrate for the zoom, like we do. 

05:59

It is recommended to adjust the virtual grid’s angle to match our studio floor’s. For this we can adjust the Pan Virtual value in the menu. You don’t need to be very precise here, since it is only a helper in the Calibrator, and it does not affect the results of the calibration. 

06:22

We also need points of reference for the calibration. We can use a chair, a small table or any similar object. Here we use a chair. Let’s turn the PTZ camera towards our point of reference and set it to minimum zoom value. The chair is our real-world point of reference, but we also need virtual points of reference we call markers. Scroll down to see Show Marker 1. Turn this feature on. Don’t worry if you don’t see it immediately, it is because the marker now is in the center of the virtual grid, right under the camera. Place the marker next to our chair’s leg. You don’t have to be precise here. Note that the markers’ parameters such as Position and Height are all meant in meters, so their values should be proportional to the position and scale of our chair. When adjusting the Marker 1 Pos parameter make sure you don’t adjust the value of the y axis, which is the second box out of the three.

07:27

In the bottom right corner of the Calibration Points window click Add… Now we have added our first calibration point, but we still need to calibrate it. First, we need to adjust either the Focal length or the Horizontal Field of View value. Since they are linked together, we can adjust the one we prefer. Please note that the focal length values given by the manufacturers might differ from the value you have to set here for various reasons. Nevertheless they can be good starting points. Let's adjust the Focal length while doing some testing, similar to what we did when adjusting the tracking delay.  Pan the camera left and right at a constant speed, and check the gliding effect of the virtual grid relative to the studio floor. Don’t use the edge of the image as a reference zone, as lens distortion can interfere with the calibration. 

08:19

For better precision you can watch the marker and see how now it is drifting around next to the chair. At the same time keep on adjusting the Focal length. If the virtual grid and the marker are turning faster than our studio floor, then our Focal length is too short, thus we need to increase its value. If they are turning slower than the studio floor, then our Focal length is too long and we need to decrease it. Our settings should be right when the virtual grid, the marker and the studio floor turn in sync with each other.  

09:12

This seems good now. 

09:15

Once we finish calibrating the first point, we can start with the zoom calibration. For this, we should place the marker precisely onto the chair’s leg. Again, do not adjust the value of the markers’ y axis. Additionally, let’s place a second marker as well on the other leg of the chair.  

09:43

We can check the result of the first calibration point with two markers as well. 

09:52

After that let's move onto the next step. 

09:54

A basic zoom calibration requires at least 5 calibration points. These are usually at the minimum, first quarter, middle, third quarter and at the maximum zoom values. After calibrating the minimum zoom value, we usually continue with the maximum zoom value. Before we add the second calibration point, zoom all the way out to find out the maximum zoom value of the camera. In our case it’s 4. Add a second Calibration Point. Set again the Focal length or the Horizontal Field Of View and test it using the same method as before. Don’t worry if the markers do not fit precisely their real-world point of reference, we’ll take care of that later. Again, the right value is when the virtual grid and the studio floor are turning in sync.  

11:12

After finding the right Focal length value we can still find that our markers are not covering exactly their real-world reference point. This can happen for one of two reasons. First, let’s suppose that when setting the position of the markers at the minimum zoom value we weren’t precise enough. By checking their position at maximum value now we have a good opportunity to make one final fine adjustment of the markers’ position. Once we finish making the fine adjustment, check again the position of the markers at the first calibration point by adjusting the zoom to its minimum value. If the problem was indeed us not being precise enough at the beginning, then the markers should be positioned perfectly on top of their respective reference points both at the minimum and maximum zoom values. In our example, this is clearly not the case. Let’s readjust the markers’ position at minimum zoom value, then set the zoom to its maximum value again. 

12:35

We can see that even though the Focal length is calibrated, in our case the markers still shifted towards the left. The second possible reason for this is that the optical center of the lens may differ from the center of the sensor. In Aximmetry we refer to this by the name Center Shift. We can correct it by adjusting the Center Shift parameter. It has two numeric values; one represents the x and the other the y axis. Adjust these values carefully, if needed, until the markers are on top of their real-world reference points. 

13:12

Let’s zoom back and forth between our 2 calibration points to check the result so far. We can see that at the two calibration points both the markers and the virtual grid seem to be correct, but between the two points the calibration is still off by a large margin. The values between two calibration points are calculated by Aximmetry using interpolation. There are two interpolation modes we can choose from. Let’s open Properties, go to Zoom interpolation mode, and switch from mode 1 to mode 2. When zooming between the two calibration points, we can immediately see that for this particular camera, mode 2 produces better results, but we still need to make further adjustments. 

13:56

It is recommended to have the third calibration point halfway between the 1st and 2nd calibration points. In our case the 2nd calibration point has a zoom value of 4, so our third calibration point will have a zoom value of 2. Let’s set the zoom value, then click add calibration point. The calibration process is exactly the same as in case of the 1st and 2nd calibration points. After we set the Focal length, we can check whether we need to adjust the Center Shift again. Here we need to make adjustments along both the X and Y axes. Let’s check the result again. We can already see nice progress.  

15:05

We should continue our calibration process until we have the 5 basic calibration points. After that, we can decide to add additional calibration points if needed. 

15:18

Let’s see our final calibration. For this camera, we used 10 calibration points in total, most of them at higher zoom values where the center shift became more emphasized by the zoom. We can switch back to Zoom interpolation mode 1 to see the effect of it, which is a quite visible oscillation of the markers between the calibration points. With mode 2 the results are much better.  An important note is that if you’ll often change the PTZ camera’s height, then here in the Properties you can set the PTZ rotation height’s value for 0 and adjust for it later in Aximmetry Composer. If we are satisfied with our calibration, then we can simply hit close in the bottom right corner. Don’t worry about saving, Aximmetry does it automatically.  

16:13

Let’s open Aximmetry Composer to test our calibration.  

16:16

In the Startup Configurator we are setting up our video outputs according to our needs. If you'd like to know more about this step, then we recommend you refer to our tutorials on the basics of Aximmetry, available on our website. 

16:30

We already set up the tracking system in the Manage Devices menu, so this time we don’t need to do that again. However, for the purpose of this tutorial video we will check it. It seems okay. Hit okay and start the Composer. 

16:53

Open a virtual studio with tracked cameras. We will use one of the studio scenes from the Studio: Demo Sets content package available on our website. In the File Browser, go to Studio, News Room, then open the News Room - TrackedCam_3-Cam compound by double clicking on it. For demonstrative purposes I’m going to enlarge this Preview window to see what’s happening in the studio. Go to the Inputs control board, click on Input 1 and specify your Camera Device, in our case the Blackmagic card’s 2nd port, then your Tracing Device, to us it’s the FreeD: 40000, Camera1. Finally, let’s specify the Tracking mode, which is the camera profile Sony BRC X1000 we just created in the Camera Calibrator. We can see that our PTZ camera and its Tracking system works almost perfectly in Aximmetry. The problem is a delay issue, again. Since in our case this camera is genlocked, the delay time remains the same value while the camera and the genlock device are turned on . In the Pin Values, look for Tracking Delay, and adjust the value until the delay is gone. Now it seems okay. We can check the setup by panning, tilting and zooming the camera.

18:41

In some rare cases a PTZ cameras’ tracking data and zoom, focus data might have different delay values. This means that the two type of data does not arrive to Aximmetry at the same time. We can adjust for such differences by separately adjusting the Tracking Delay and the Zoom Delay parameters. To be able to separately adjust the tracking and zoom delay of a single tracking device, we need to add our Tracking Device as a Zoom Device as well. In the menu bar let’s go to Edit, then open Manage Devices… by clicking on it. Scroll down on the left side of Manage Devices window until you see the Zoom Encoder section. Here select FreeD, then add the same device we are already using. Once we finish, hit okay to close the window. Go back to the Pin Values of the INPUT 1 panel, and specify your Zoom Device. After that, scroll down to see the Zoom Delay parameter to adjust the Zoom Delay value. Now we can see that even our Zoom data is in sync with the virtual scene.  

20:03

With this, we have finished the tutorial. 

Article content

Loading
Close
Loading spinner icon
1/10