Obtained from http://www.robots.ox.ac.uk/~vgg/hzbook/code/.
Please report any bugs to Andrew Zisserman.
These functions are written by: David Capel, Andrew Fitzgibbon, Peter Kovesi, Tomas Werner, Yoni Wexler, and Andrew Zisserman
vgg_KR_from_P.mextract K, R from P such that P = KR[eye(3) -t]vgg_F_from_P.mfundamental matrix from 2 camerasvgg_P_from_F.m2 camera matrices from fundamental matrixvgg_T_from_P.mtrifocal tensor from 3 camerasvgg_H_from_2P_plane.minter-image homography from 2 cameras and 3D planevgg_H_from_P_plane.mprojection matrix from image onto 3D planevgg_plane_from_2P_H.m3D plane from 2 cameras and inter-image homography
vgg_H_from_x_lin.mhomography from points in 2 images, linear methodvgg_H_from_x_nonlin.mMLE of the above, by nonlinear methodvgg_Haffine_from_x_MLE.mMLE of affine transformation from points in 2 images, linearvgg_F_from_7pts_2img.mfundamental matrix from 7 points in 2 imagesvgg_PX_from_6pts_3img.mcameras and world points from 6 points in 3 images
vgg_conditioner_from_image.mconditioning shift+scaling from image dimensionsvgg_conditioner_from_pts.mconditioning shift+scaling from image points
vgg_signsPX_from_x.mswaps signs of P and X so that projection scales are positivevgg_selfcalib_qaffine.mquasi-affine from projective reconstructionvgg_selfcalib_metric_vansq.mmetric from projective and 3 orthogonal principal directions and square pixels
vgg_X_from_xP_lin.m3D point from image projections and cameras, linearvgg_X_from_xP_nonlin.mMLE of that, non-linear methodvgg_line3d_from_lP_lin.m3D line segment from image line segments and cameras, linearvgg_line3d_from_lP_nonlin.mMLE of that, non-linear method
vgg_gui_F.mVisualizes epipolar geometry between two viewsvgg_gui_H.mVisualizes a homography between two views
These examples use images and matrices included in the directory vgg_examples. Change to that directory before running the example functions.
view_homog_ex.mExample of usingvgg_gui_Hview_fund_ex.mExample of usingvgg_gui_FHaffine_from_x_MLE_ex.mExample of usingvgg_Haffine_from_x_MLEF_from_Ps_ex.mExample on computing F from two camera matrices usingvgg_F_from_PH_from_image_corr_ex.mExample on computing H from points usingvgg_H_from_x_lintesthomog_vgg.mExample of computing H from two images from a rotating camera. This example also requiresransacfithomography_vgg.mand Peter Kovesi's functions (such asmatchbycorrelation.mandransac.m). See link below.
- Peter Kovesi's Matlab Functions for Computer Vision and Image Analysis
- Jean-Yves Bouguet's Matlab Calibration Software
November 2012 updates to
ransacfithomography_vgg.mtesthomog_vgg.mvgg_H_from_x_nonlin.m
To maintain compatibility with Peter Kovesi's functions and for Matlab R2012a compatibility.
Thanks to: Relja Arandjelovic, Peter Corke and Alexander Khanin.