summaryrefslogtreecommitdiff
path: root/macros/bundleAdjustment.sci
diff options
context:
space:
mode:
authorshamikam2017-01-16 02:56:17 +0530
committershamikam2017-01-16 02:56:17 +0530
commita6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch)
treee806e966b06a53388fb300d89534354b222c2cad /macros/bundleAdjustment.sci
downloadFOSSEE_Image_Processing_Toolbox-master.tar.gz
FOSSEE_Image_Processing_Toolbox-master.tar.bz2
FOSSEE_Image_Processing_Toolbox-master.zip
First CommitHEADmaster
Diffstat (limited to 'macros/bundleAdjustment.sci')
-rw-r--r--macros/bundleAdjustment.sci29
1 files changed, 29 insertions, 0 deletions
diff --git a/macros/bundleAdjustment.sci b/macros/bundleAdjustment.sci
new file mode 100644
index 0000000..73d0ca4
--- /dev/null
+++ b/macros/bundleAdjustment.sci
@@ -0,0 +1,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