Camera Calibration¶
Class: CameraCalibrationBlockV1
Source: inference.core.workflows.core_steps.transformations.camera_calibration.v1.CameraCalibrationBlockV1
This block uses the OpenCV calibrateCamera
function to remove lens distortions from an image.
Please refer to OpenCV documentation where camera calibration methodology is described:
https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html
This block requires following parameters in order to perform the calibration: Lens focal length along the x-axis and y-axis (fx, fy) Lens optical centers along the x-axis and y-axis (cx, cy) Radial distortion coefficients (k1, k2, k3) Tangential distortion coefficients (p1, p2)
Based on above parameters, camera matrix will be built as follows: [[fx 0 cx][ 0 fy cy] [ 0 0 1 ]]
Distortions coefficient will be passed as 5-tuple (k1, k2, p1, p2, k3)
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/camera-calibration@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
fx |
float |
Focal length along the x-axis. | ✅ |
fy |
float |
Focal length along the y-axis. | ✅ |
cx |
float |
Optical center along the x-axis. | ✅ |
cy |
float |
Optical center along the y-axis. | ✅ |
k1 |
float |
Radial distortion coefficient k1. | ✅ |
k2 |
float |
Radial distortion coefficient k2. | ✅ |
k3 |
float |
Radial distortion coefficient k3. | ✅ |
p1 |
float |
Distortion coefficient p1. | ✅ |
p2 |
float |
Distortion coefficient p2. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Camera Calibration
in version v1
.
- inputs:
Bounding Box Visualization
,Pixelate Visualization
,Circle Visualization
,SIFT
,Absolute Static Crop
,Crop Visualization
,Image Threshold
,Image Slicer
,Image Blur
,Triangle Visualization
,Stability AI Image Generation
,Image Preprocessing
,Label Visualization
,Polygon Zone Visualization
,Stability AI Inpainting
,Cosine Similarity
,Keypoint Visualization
,Line Counter Visualization
,Reference Path Visualization
,Corner Visualization
,Stitch Images
,Image Convert Grayscale
,Dynamic Crop
,Halo Visualization
,Perspective Correction
,Camera Focus
,Identify Changes
,Model Comparison Visualization
,Grid Visualization
,Color Visualization
,Dot Visualization
,Polygon Visualization
,Background Color Visualization
,Camera Calibration
,Image Slicer
,Relative Static Crop
,Image Contours
,Gaze Detection
,Blur Visualization
,Classification Label Visualization
,Trace Visualization
,Mask Visualization
,Ellipse Visualization
,SIFT Comparison
- outputs:
Pixelate Visualization
,Segment Anything 2 Model
,Bounding Box Visualization
,SIFT
,Absolute Static Crop
,Barcode Detection
,OpenAI
,Instance Segmentation Model
,Florence-2 Model
,VLM as Classifier
,Image Threshold
,Google Vision OCR
,Image Blur
,Triangle Visualization
,Time in Zone
,CLIP Embedding Model
,Image Preprocessing
,Label Visualization
,Polygon Zone Visualization
,Multi-Label Classification Model
,Keypoint Detection Model
,Byte Tracker
,Anthropic Claude
,Keypoint Visualization
,Roboflow Dataset Upload
,Reference Path Visualization
,SmolVLM2
,Camera Focus
,Perspective Correction
,Template Matching
,QR Code Detection
,Single-Label Classification Model
,Model Comparison Visualization
,Detections Stitch
,Camera Calibration
,Qwen2.5-VL
,VLM as Detector
,VLM as Classifier
,Gaze Detection
,Blur Visualization
,Trace Visualization
,Keypoint Detection Model
,Object Detection Model
,Google Gemini
,SIFT Comparison
,Clip Comparison
,Circle Visualization
,Roboflow Dataset Upload
,Single-Label Classification Model
,Crop Visualization
,Image Slicer
,Stability AI Image Generation
,OpenAI
,VLM as Detector
,Clip Comparison
,LMM For Classification
,Stability AI Inpainting
,Multi-Label Classification Model
,OCR Model
,Line Counter Visualization
,Llama 3.2 Vision
,Corner Visualization
,Instance Segmentation Model
,Stitch Images
,Halo Visualization
,Dynamic Crop
,Image Convert Grayscale
,Object Detection Model
,Florence-2 Model
,Pixel Color Count
,Color Visualization
,Dot Visualization
,YOLO-World Model
,Background Color Visualization
,Polygon Visualization
,Image Slicer
,CogVLM
,Relative Static Crop
,LMM
,Buffer
,Image Contours
,Dominant Color
,Classification Label Visualization
,Mask Visualization
,Ellipse Visualization
,Detections Stabilizer
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Camera Calibration
in version v1
has.
Bindings
-
input
image
(image
): Image to remove distortions from.fx
(float
): Focal length along the x-axis.fy
(float
): Focal length along the y-axis.cx
(float
): Optical center along the x-axis.cy
(float
): Optical center along the y-axis.k1
(float
): Radial distortion coefficient k1.k2
(float
): Radial distortion coefficient k2.k3
(float
): Radial distortion coefficient k3.p1
(float
): Distortion coefficient p1.p2
(float
): Distortion coefficient p2.
-
output
calibrated_image
(image
): Image in workflows.
Example JSON definition of step Camera Calibration
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/camera-calibration@v1",
"image": "$inputs.image",
"fx": 0.123,
"fy": 0.123,
"cx": 0.123,
"cy": 0.123,
"k1": 0.123,
"k2": 0.123,
"k3": 0.123,
"p1": 0.123,
"p2": 0.123
}