
KALIBRATE
📘 Kalibrate User Manual
Version 1.73
Camera Calibration and Unreal Engine Lens Export Tool
🧭 Overview
Kalibrate is a camera calibration tool that tracks checkerboards from camera footage and exports lens parameters in a structured JSON format. A companion script then converts this JSON into a fully compatible Unreal Engine Lens File (.uasset).
🚀 Key Features:
✅ Automatic checkerboard tracking from camera footage
✅ JSON export of calibrated lens data
✅ Scripted conversion to Unreal Lens .uasset
✅ Supports both nodal and distortion parameters
✅ Compatible with Unreal Engine’s Lens Calibration System

🖥️ Interface Guide
1. Camera & Sensor Parameters
Camera Dropdown:
Select the camera source to use.
⚠️ Tip: Works with webcam, USB-HDMI, or any other camera input viewable in Windows. Image will scale to match camera resolution
Resolution:
Displays camera resolution (e.g., 640x360).

2. Image Acquisition
Select Folder:
Choose the directory on your computer where captured calibration images will be saved.
⚠️ Tip: You can RESUME from a previous folder where you have captured images. A dialog box will autodetect the previously captured images. They must be the same checkerboard size
Reset:
Clears the current calibration session. Also deletes images that don’t match the checkerboard settings
Images Taken:
Counter showing how many valid frames with detected checkerboards have been captured. Pictures are taken automatically once checkerboards are detected.

3. Checkerboard Settings
Board Width:
Number of inner corners across the checkerboard (e.g., 9 squares = 8 inner corners).
Board Height:
Number of inner corners vertically.
Images to Capture:
The system will keep capturing images until this number is reached.
⚠️ Tip: The default is 20, but feel free to increase it. It’s a balance between quality and speed that you must decide.

Square Size (mm):
Real-world size of each square (in millimeters).
This is important for scaling and focal length accuracy. Default is 20 but you can increase it to match your checkerboard
⚠️ Tip: Use a rigid checkerboard and capture it from multiple angles and distances.
Checkerboard not detected:
Live feedback indicating if a checkerboard pattern is visible in the frame.
Detected Checkerboard:
? x ?: Shows dimensions of the detected pattern (if found).
⚠️ Tip: There is a slight pause between photos to prevent duplicates. There is also a detection feature to ensure that you are moving the checkerboard sufficiently and that the pictures are distinct. Keep moving the checkerboard on the screen and watch the number increase.
🛠️ Tips for Best Results
-
Print your checkerboard on flat, non-reflective paper or rigid material.
-
Capture from varied angles, including edges and diagonals.
-
Ensure good lighting without glare.
-
Ensure that the sensor width and focal length are correct
-
Increase the number of images taken

3. Calibration
Sensor Width / Height (mm):
Physical size of your camera sensor (e.g., 36mm x 24mm for full-frame). Accurate sensor size ensures correct focal length output.
⚠️ Tip: Google your camera to find the correct settings ⚠️
Calibrate:
Starts the calibration process once the number of images in the folder is equal to or greater than the Images to Capture value
Focal Length:
This is the measurement of the lens being used.
Results:
Reprojection Error is shown.
⚠️ Tip: Lower reprojection error is better. Aim for less than <1. ⚠️

5. Export & Integration
Export JSON:
Saves the calibration results into a structured JSON file.
Lens Model:
Select between Spherical, Anamorphic or Polynomial
⚠️ Tip: Unreal Engine only supports Spherical or Anamorphic ⚠️
📂 Output Format
The JSON file includes:
Camera matrix
Distortion coefficients
Resolution
Sensor size
Image capture metadata
📤 Import to Unreal Engine
After generating your JSON file:
1) Open Unreal Engine and open a blank or pre-existing Unreal project.
2) Open Unreal plugins and enable Python

3) Open Unreal Plugins and Enable Camera Calibration

4) Restart Unreal Engine
5) Click File -> Execute Python Script

6) Select the Python script included in this project.
⚠️ Tip: This Python script is written for Unreal 5.4.4.
7) The script takes the JSON and generates an Unreal Lens File (.uasset).

8) This file also creates a Cine Camera in the current level with the correct Sensor Width, Sensor Height, and Focal Length
9) You can add a Lens Component as well, enable Distortion and setting Evaluation correctly