forked from ZacharyTaylor/Camera-to-Arm-Calibration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Demo.m
27 lines (20 loc) · 813 Bytes
/
Demo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
%Simple script to quickly demo use of CalCamArm.m
%path to images of checkerboards
imageFolder = './Example Data/Images/';
%loading arm transformations
load('./Example Data/armMat.mat');
%checkerboard square widths in mm
squareSize = 13.6;
%run calibration
[TBase, TEnd, cameraParams, TBaseStd, TEndStd, pixelErr] = CalCamArm(imageFolder, armMat, squareSize,'maxBaseOffset',0.5);
%print results
fprintf('\nFinal camera to arm base transform is\n')
disp(TBase);
fprintf('Final end effector to checkerboard transform is\n')
disp(TEnd);
fprintf('Final camera matrix is\n')
disp(cameraParams.IntrinsicMatrix');
fprintf('Final camera radial distortion parameters are\n')
disp(cameraParams.RadialDistortion);
fprintf('Final camera tangential distortion parameters are\n')
disp(cameraParams.TangentialDistortion);