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
28
29
|
function xyzrefinedPoints = bundleAdjustment(_3dpoints, imagepoints, visibility, cameramatrix, rotation, translation, distcoeffs)
// Refine camera poses and 3-d points
//
// Calling Sequence
// xyzrefinedPoints = bundleAdjustment(_3dpoints, imagepoints, visibility, cameramatrix, rotation, translation, distcoeffs)
//
// Parameters
// _3dpoints : N * 3 object points
// imagepoints : M * N * 2 image points for each camera and each points
// visibility : M * N * 1 visibility matrix, element[i][j] = 1 when object point i is visible from camera j and 0 if not
// cameramatrix : M * 3 * 3 camera matrix(intrinsic parameters) 3 * 3 camera matrix for each image
// rotation : M * 3 * 3 rotation matrix for each image
// translation : M * 3 * 1 translation matrix for each image
// distcoeffs : M * (4 * 5 * 8) * 1 distortion coefficient for each image
// xyzrefinedPoints : Refined N * 3 object points
//
// Description
// The function returns the refined 3-D points. The refinement procedure uses Levenberg-Marquardt algorithm.
//
// Examples
// xyzrefinedPoints = bundleAdjustment(_3dpoints, imagepoints, visibility, cameramatrix, rotation, translation, distcoeffs)
//
// Authors
// Suraj Prakash
xyzrefinedPoints = opencv_bundleAdjustment(_3dpoints, imagepoints, visibility, cameramatrix, rotation, translation, distcoeffs)
endfunction
|