Using The Calibration Window
The interface is made up of 3 main windows:
This displays the view from the main camera and allows the user to accurately work with the calibration chart
It contains the following options:
- Overlay - Offers a number of different graphical overlays to aid the user with lens calibration Appendices contains details about the different options present
- Distance - A value to modify the size of some of the available overlays
- Vignetting Reduction - Toggles between different modes of vignette reduction Appendices has more information about this tool
A tabbed window allowing the user to choose between the settings tab and a view of the lens curve.
Profiler contains the following options:
- Chart - Selects which chart will be used for the calibration
- Focal Length Initial Guess - Defines how the initial focal length values will be determined, Default will take into account the values from the Lens parameters and encoder mapping. Vanishing Lines will primarily use the calibration chart
- Encoder Noise Reduction - Some encoders have noise in the values they provide, this can make working in the lens profiler difficult, adjusting this value upwards will gradually minimize the amount of noise detected by the encoders
- Distance of the Chart - This is used for the anamorphic calibration, leave unchecked for spherical lenses
- H focal = V focal - This is always enabled when using spherical lenses
- Start - Starts the calibration process, the calibration charts will not be detected until this has been pressed
- Calibrate - Takes all the pictures that have been collected and generates a calibration point.
- Reset - Sets the image count back to zero
- Use Image - Takes a picture of the calibration chart if it can be detected in the frame
The 3D view has a dropdown to change the currently viewed parameter, additionally the following controls are used in the 3D view:
- Ctrl + Left click - select point
- LMB + Drag - Orbit
- RMB + Drag - Zoom
- MMB + Drag - Translate
Two green lines are shown on the 3D view, these represent the positions of the zoom and focus encoders.
The calculated lens information, either from a specific calibration point, or inferred values when the lens is in-between two calibration points
- Lens - Contains the details of the lens
- Camera - Contains the details of the camera
- Parameters - The drop-down allows to select between all calibrated points, when Interpolated is selected it means no specific point has been chosen
- Calib Error - Displays the calibration error for the selected point, if the point has been manually created (not using the chart) then the value will always be -1. Chart calibrated values should ideally be below 0.3
- Zoom - Displays the normalized encoder value in the first field and the absolute value from the lens in the 2nd
- Focus - Displays the normalized encoder value in the first field and the absolute value from the lens in the 2nd
- H Focal - Displays the H focal value, this should be roughly equivalent to the corresponding value on the lens
- V Focal - Displays the V focal value, this should be roughly equivalent to the corresponding value on the lens
- H Image Center - Displays the calculated horizontal image center value
- V Image Center - Displays the calculated vertical image center value
- K1 - Displays the K1 distortion parameter
- K2 - Displays the K2 distortion parameter
- Adjust Column - Values that have the checkbox disabled will not be updated when subsequent calibration points are created.
- Paste column - When using the paste button, only values that have the paste checkbox checked will be updated
Along the lower edge of the panel are six buttons, they have the following functions:
- Add Point - Generates a new calibration point at the current position of the lens encoders, it does not use the calibration chart and assumes it's values from the calibration points surrounding it
- Delete Point - Deletes the currently selected calibration point
- Delete ALL Points - Deletes all calibration points
- Copy to Clipboard - Copies the parameters from the currently selected point to the clipboard
- Paste from Clipboard - Pastes the clipboard stored values to the selected point. Only pastes values that have the "Paste" Checkbox enabled
- Add Extrema - This is a shortcut button for creating calibration points at the Minimum and maximum focus points
There are a number of different charts that can be used for calibration
The 70mm mosaic chart is recommended for all spherical lenses
The lens profiling setup has been designed to be as flexible as possible, there are some steps that while not required will make the process easier though,
- Mount the main camera on a tripod or other platform that allows for easy panning and tilting
- Use a stand or clamp to hold the Ncam calibration chart
- Make sure the environment is well lit, or have additional lighting available
- If calibrating lenses with a long focal length, then having a larger space to calibrate in can be beneficial
- While not strictly necessary, we recommend mounting the camera bar onto the camera and face it forward so that it shares a similar field of view to the main camera, this will aid with checking the accuracy of the calibration. Once the calibration is completed the camera can be re-orientated back to it's original position
We refer to the first calibration point as the "golden point". This point could be anywhere on the lens' focus (or zoom if applicable) but we typically advise it to be at the widest focal length available and either at close focus or infinity depending on where the calibration chart is easiest to detect
Make sure the correct chart is chosen
Press start - from this point on do not change the zoom or focus of the lens at all until the point is calibrated. Iris can be adjusted if desired to help focus/expose the calibration chart
Display the calibration chart to the main camera, a coloured overlay will be rendered over the chart when it is successfully detected, press F12 or "Use image" to take a picture of the chart. An additional overlay in green will be displayed showing where the chart was in the frame. Continue taking images until every part of the frame has been covered by the chart
Press "Calibrate" to create the calibration point. This will calculate the FOV and distortion for this exact part of the lens, a point will be displayed in the 3D Graph.
At this point you can continue to create additional points, however it is recommended to actually leave the lens calibration window and to check the quality of the calibrated point before proceeding further, the section below describes how to do this
Close the lens calibration window, make sure the lens is still at the same focus/zoom point that was calibrated.
Conduct the camera bar to main calibration to work out the alignment between the main camera and camera bar, the Liveupdate method is typically the easiest method for this and is described in Witness to Main
Use the image modelling tab to place the zero point, ideally choose a point as far away as possible (this helps minimise any errors from alignment)
Switch to the augmented reality view where the Ncam cube should be displayed over the zero point, pan the camera so that the cube move from the centre of the frame to the edges. If the point is well calibrated then it should stay fixed to this point across the pan.
If the cube begins to drift as it approaches the edges of the frame then the calibration point will need adjusting, this is described in the next section
Return to the Lens profiling window, in the camera view select Ncam cube overlay, this will display a representation of the Ncam cube in the same position that it was viewed at in the previous step.
Pan the camera so that the origin point of the cube is near the edge of the frame, make a small adjustment to the H focal value (select the point in the 3D view first), scrolling the mouse wheel while the value is selected is typically the easiest method to make an adjustment.
Continue adjusting until the corner of the cube is back in the same position it was when in the center of the frame
Zoom Lens only
Centre shift only needs conducting when working on a zoom lens
Center shift is an important concept to understand and account for when dealing with lens calibration. It is when the optical center of the image changes as the lens zooms in and out. If it is not accounted for when calibrating it can cause CG elements to drift when zooming.
Some lenses will exhibit center shift far more than others. To see how much center shift is present, zoom the lens in all the way to a fixed feature in the environment, line the center mark of the camera up with this feature and then, without adjusting the pan or tilt at all, zoom out. the amount that this feature drifts from the center mark is the result of center shift
Once the initial (golden) point is completed and has been checked to make sure it is accurate, repeat the process for the rest of the lens.
Before proceeding however, as the center shift has now been calculated, disable the H and V image center parameters form being generated for subsequent points by un-checking the Adjust check-boxes next to each, as shown below
The number of calibration points required depends on the type of lens, a prime lens will typically only need 2, one at minimum and one at maximum. While a zoom may require upwards of 30
When creating new calibration points, always try and keep them in organized row's and columns, creating new points at random points on the lens will make it harder to achieve an accurate calibration
While creating new points, remember to constantly return back to the golden point while looking at the Ncam Cube overlay to ensure that the calibration is working well
When using the calibration charts there are a few factors to bear in mind
Some charts require the whole pattern to be seen at once, the A3-1 chart for instance. If you are having trouble getting the camera to detect the pattern, make sure nothing is occluding the chart pattern, shadows or uneven lighting can cause this issue too
70mm Mosaic
We recommend the 70mm mosaic chart for all spherical lens calibration
Being heavily out of focus can make certain patterns harder to detect, 70mm mosaic for example. Sometimes Adjusting the Iris of the lens to increase the depth of field can make it easier
Tilting the calibration chart will typically provide a better calibration result as demonstrated in the pictures below