对极几何--基本矩阵F

来源:互联网 发布:web服务器 并发 java 编辑:程序博客网 时间:2024/04/30 10:20

基本矩阵F

基本矩阵F求解(8点算法)

基本矩阵方程
图片名称
图片名称

实现代码matlab

function F = EstimateFundamentalMatrix(x1, x2)%% EstimateFundamentalMatrix% Estimate the fundamental matrix from two image point correspondences% Inputs:%     x1 - size (N x 2) matrix of points in image 1%     x2 - size (N x 2) matrix of points in image 2, each row corresponding%       to x1% Output:%    F - size (3 x 3) fundamental matrix with rank 2A = zeros(size(x1,1),9);for i = 1:size(x1,1)    A(i,:) = [x1(i,1)*[x2(i,1),x2(i,2),1],x1(i,2)*[x2(i,1),x2(i,2),1],[x2(i,1),x2(i,2),1]];end[~,~,v] = svd(A);x = reshape(v(:,9),[3,3])';[u2,s2,v2] = svd(x);F = u2*diag([1,1,0])*s2*v2';
0 0
原创粉丝点击