diff options
author | shamikam | 2017-01-16 02:56:17 +0530 |
---|---|---|
committer | shamikam | 2017-01-16 02:56:17 +0530 |
commit | a6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch) | |
tree | e806e966b06a53388fb300d89534354b222c2cad /macros/cameraMatrix.sci | |
download | FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.gz FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.bz2 FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.zip |
Diffstat (limited to 'macros/cameraMatrix.sci')
-rw-r--r-- | macros/cameraMatrix.sci | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/macros/cameraMatrix.sci b/macros/cameraMatrix.sci new file mode 100644 index 0000000..de177c9 --- /dev/null +++ b/macros/cameraMatrix.sci @@ -0,0 +1,28 @@ +function [ camMatrix ] = cameraMatrix(instrinsicMatrix,rotationMatrix,translationVector) +// Returns camera projection matrix. +// +// Calling Sequence +// camMatrix = cameraMatrix(instrinsicMatrix,rotationMatrix,translationVector); +// +// Parameters +// camMatrix: A 4x3 camera projection matrix, which can be used to project 3-D world points in homogenous co-ordinates into an image. +// instrinsicMatrix: Projection matrix of size 3x3. +// rotationMatrix: A 3x3 matrix which specifies the rotation of a camera. +// translationVector: A 1x3 vector which specifies the translation of a camera. +// +// Description +// Return a matrix of size 4-by-3, which can be used to project 3-D world points in homogenous co-ordinates into an image. +// +// Examples +// instrinsicMatrix = [1 0 0; 1 2 0; 3 4 0]; +// rotationMatrix = [ 0.1417 -0.7409 0.6565; 0.9661 -0.0410 -0.2548; 0.2157 0.6703 0.7100]; +// translationVector = [ -29.2584 35.7824 725.5824]; +// camMatrix = cameraMatrix(instrinsicMatrix,rotationMatrix,translationVector) +// +// Authors +// Tanmay Chaudhari + + a=opencv_cameraMatrix(instrinsicMatrix,rotationMatrix,translationVector); + camMatrix(:,:,1)=a(1); + +endfunction |