亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sfm_projective.m

?? 包括計算機科學和工程、信號處理、物理學、應用數學和統計學
?? M
字號:
% Algorithm 11.6. 
% The projective reconstruction algorithm from two views
% as described in Chapter 5, "An introduction to 3-D Vision"
% by Y. Ma, S. Soatto, J. Kosecka, S. Sastry (MASKS)
% Code distributed free for non-commercial use
% Copyright (c) MASKS, 2003
%
% Last modified 5/5/2005

% Following shell generates synthetic views of point features
% under motion, with hypothetical calibration matrix and 
% computes projective structure of the scene
% Jana Kosecka, George Mason University, 2002
% ==================================================================

 

close all; clear;
affine = 0;

NPOINTS = 20;
FRAMES = 2;
PLOTS  = FRAMES + 1;
% transformation is expressed wrt to the camera frame
actual_trans(1,:) = [0 1 -1];
ax = [1 1 1];
rot_axis = ax/norm(ax);
theta = 0*pi/180;
fov = 60;

% image size in focal lengths units
im_size = 2*tan(fov*pi/180/2);

% image in pixels
im_pixels = 60;
Z_min = 10;			% minimum depth in focal lengths
Z_max = 15;			% maximum depth in focal lengths
Zinit = Z_max-(Z_max-Z_min)/2;
Zinit = 5;

% cube in the object frame
 XW = [0 1 1 0 0 1 1 0 0.2 0.8 0.2 0.8 ;
       0 0 1 1 0 0 1 1 1.5 1.5 1.5 1.5;
       1 1 1 1 0 0 0 0 0.8 0.8 0.2 0.2 ;
       1 1 1 1 1 1 1 1 1   1   1   1];

 XWX = [ 2  4  2  4  2  4  2  4;
         1  1  1  1  0  0  0  0;
         0  0  2  2  0  0  2  2;
         1  1  1  1  1  1  1  1];

% XW = [XW, XWX];

NPOINTS = 12; 


figure
plot3(XW(1,1:8,1),XW(3,1:8,1),XW(2,1:8,1),'*r');
hold on
plot3(XW(1,9:12,1),XW(3,9:12,1),XW(2,9:12,1),'*b');
plot3_struct(XW(1,:,1),XW(3,:,1),XW(2,:,1));
xlabel('x'); ylabel('z'); zlabel('y');
view(220,20);
grid off; 
axis off;

pause;


XC = zeros(4,NPOINTS,FRAMES);

% initial displacement
Rinit = rot_matrix([1 1 1],0); 
if affine 
Rinit = rot_matrix([1 1 1],pi/8); 
end

Tinit = [ Rinit(1,:) -0.5 ;
          Rinit(2,:) -0.5 ;
          Rinit(3,:) Zinit;
         0 0 0 1];
XC(:,:,1) = Tinit*XW;

subplot(1,PLOTS,1);
plot3_struct(XC(1,:),XC(3,:),-XC(2,:));
hold on;
plot3(XC(1,:),XC(3,:), -XC(2,:),'.');
xlabel('x'); ylabel('z'); zlabel('y');
view(20,20);
grid on
axis equal;

XC(2,:,1) = -XC(2,:,1);
x1 = XC(1,:,1)./XC(3,:,1);
y1 = XC(2,:,1)./XC(3,:,1);

im_scale = im_pixels/im_size;
f = 3;
% intrinsic parameter matrix
A = [im_scale*f  0      im_pixels/2;
       0     im_scale*f im_pixels/2;
       0       0           1          ]

% A = diag([1,1,1]);
% pick a vector v and generate points on the plane v^T.Ax = -1;
NPLANE_POINTS = 20;
v = [1 1 1];
[q1,s,q2] = svd(v);
coeff = randn(2,NPLANE_POINTS);
% shortest solution
qbar = pinv(v)*-1; 
% shortest solution + anyting which is in null space of v
% generates points on the plane
for i = 1:NPLANE_POINTS
q_plane(:,i) = qbar + coeff(1,i)*q2(:,2) + coeff(2,i)*q2(:,3);
end

frame1_n = [x1; y1; ones(1,NPOINTS)];

frame1_im = A*frame1_n;
x1_im = frame1_im(1,:);
y1_im = frame1_im(2,:);
%x1_im  = im_pixels/2 +  x1 * im_scale;
%y1_im  = im_pixels/2 +  y1 * im_scale;

subplot(1,PLOTS,2);
hold on;
plot(x1,y1,'.');
plot_struct(x1,y1);
grid on;
axis equal; 
% axis([-0.2 0.2 -0.2 0.2]);
pause

if affine 
   subplot(1,PLOTS,3);   % plot in the image coordinate frame
   hold on;
   plot(x1_im,y1_im,'.');
   plot_struct(x1_im,y1_im);
   grid on;
   axis equal;
   axis([0 im_pixels 0 im_pixels])
   points = [x1_im;y1_im];
   % plot vanishing points 
   van_point1(:,1) = vanishing_point([points(:,1), points(:,5)], ...
                                      [points(:,2), points(:,6)]);
   van_point1(:,2) = vanishing_point([points(:,1), points(:,2)], ...
                                       [points(:,5), points(:,6)]);
   van_point1(:,3) = vanishing_point([points(:,2), points(:,3)], ...
                                      [points(:,6), points(:,7)]);
   drawnow;
end


% transformation is expressed wrt to the camera frame
ax = [0 1 0];
rot_axis = ax/norm(ax);
theta = 0*pi/180;
actual_trans = [1,0,1];
angle = 20;
im_size = 4;
theta = (angle)*pi/180;
%   represents rotation about world frame 
R0 = rot_matrix(rot_axis,theta)
%   translation represents origin of the camera frame
%   in the world frame 
R = R0';     % transpose
trans = R*actual_trans'
     T = [R(1,:) trans(1);
          R(2,:) trans(2);
          R(3,:) trans(3);
          0   0   0     1         ]
XC(:,:,2) = T*XC(:,:,1);

% perspective projection
x1 = XC(1,:,1)./XC(3,:,1);
y1 = XC(2,:,1)./XC(3,:,1);
x2 = XC(1,:,2)./XC(3,:,2);
y2 = XC(2,:,2)./XC(3,:,2);
frame2_n = [x2; y2; ones(1,NPOINTS)];
frame2_im = A*frame2_n;
x2_im = frame2_im(1,:);
y2_im = frame2_im(2,:);

subplot(1,PLOTS,2);
hold on;
plot(x2,y2,'.');
plot_struct(x2,y2);
grid on;
axis equal;

 subplot(1,PLOTS,3);
 hold on;
 plot(x2_im,y2_im,'.');
 plot_struct(x2_im,y2_im);
 points = [x2_im;y2_im];

if affine
   van_point2(:,1) = vanishing_point([points(:,1), points(:,5)], ...
                                          [points(:,2), points(:,6)]);
  van_point2(:,2) = vanishing_point([points(:,1), points(:,2)], ...
                                          [points(:,5), points(:,6)]);
  van_point2(:,3) = vanishing_point([points(:,2), points(:,3)], ...
                                          [points(:,6), points(:,7)]);
end

F = dfundamental([x1_im;y1_im;ones(1,NPOINTS)], [x2_im;y2_im;ones(1,NPOINTS)])

% projective reconstruction 
% epipole computation, F factorization
[U, S, V] = svd(F);
p = V(:,3)/V(3,3)
plot(p(1),p(2),'*r'); axis equal

% an example of the epipolar line computation
ll = F*[x1_im(1), y1_im(1), 1]'
% to get another point on the epipolar line
p2 = skew(ll)*p;
p2 = p2/p2(3)

% direction of the line in the image
ld = p - p2;
ld = ld/norm(ld);
% ploting the line ... here you may need to fix something 
% to make sure it will be in the image
line([p(1) p(1) + 10*ld(1)], [p(2) p(1) + 10*ld(2)])

pause



check = A*actual_trans'/(norm(actual_trans'))
M = skew(p)*F'/(norm(p))^2;
rank(M);
pause;
 
% solve for projective structure
P1 = [M p]
P2 = [diag([1 1 1]) zeros(3,1)]

[vec,val] = eig(M);

for i=1:NPOINTS
 C = [P1(1,:)- x1_im(i)*P1(3,:);
       P1(2,:)- y1_im(i)*P1(3,:);
       P2(1,:)- x2_im(i)*P2(3,:);
       P2(2,:)- y2_im(i)*P2(3,:)];
 [U,S,V] = svd(C);
 XP(:,i,1) = V(:,4);
 XP(:,i,1) = XP(:,i,1)/XP(4,i,1);
end

pause;
figure;  % plot projective reconstruction
%subplot(1,PLOTS,1);
plot3(XP(1,1:8,1),XP(3,1:8,1),XP(2,1:8,1),'*r');
hold on
plot3(XP(1,9:12,1),XP(3,9:12,1),XP(2,9:12,1),'*b');
plot3_struct(XP(1,:,1),XP(3,:,1),XP(2,:,1));
xlabel('x'); ylabel('z'); zlabel('y');
view(220,20);
%view(200,20);
grid off;
%axis equal;
axis off;

if affine 
  for i=1:3
     C = [P1(1,:) - van_point1(1,i)*P1(3,:);
          P1(2,:) - van_point1(2,i)*P1(3,:);
          P2(1,:) - van_point2(1,i)*P2(3,:);
          P2(2,:) - van_point2(2,i)*P2(3,:)];
          [U,S,V] = svd(C);
          VXP(:,i,1) = V(:,4);
          VXP(:,i,1) = VXP(:,i,1)/VXP(4,i,1);
  end

  VXP % projective structure of vanishing points

  % compute the plane at infinity
  A = [VXP(1:3,1)';
       VXP(1:3,2)';
       VXP(1:3,3)'];
  % this is the plane at infinity
  v = inv(A)*[-1 -1 -1]'

  % this is the projective transformation for updating projective
  % structure to an affine one
  Ha = [diag([1,1,1]), zeros(3,1);
        v'          , 1];

  for i=1:NPOINTS
    XA(:,i,1) = Ha*XP(:,i,1);
    XA(:,i,1) = XA(:,i,1)/XA(4,i,1);
  end

  figure;
  plot3_struct(XA(1,:,1),XA(3,:,1),XA(2,:,1));
  view(200,20);
  grid off;

end % affine structure 


% set up the measurements matrix for two frames
% to compute the structure without the calibration
% some experiments for decomposing the fundamental matrix

if 0
  FRAMES = 2;
  M = zeros(2*FRAMES,NPOINTS);
  M(1,:) = x1_im;
  M(1+FRAMES,:) = y1_im;
  M(2,:) = x2_im;
  M(2+FRAMES,:) = y2_im;

  [vel, R, pos_depth] = robust_dessential([x1;y1;ones(1,NPOINTS)], ...
                        [x2;y2;ones(1,NPOINTS)],R0,actual_trans, 1)

  M(1,:) = x1;
  M(1+FRAMES,:) = y1;
  M(2,:) = x2;
  M(2+FRAMES,:) = y2;

  p = [x1_im;y1_im;ones(1,NPOINTS)];
  q = [x2_im;y2_im;ones(1,NPOINTS)];
  F = dfundamental(p, q)
  [vel, R, pos_depth] = robust_dessential(p, q, R0, actual_trans, 1)

  Rtilde = transpose(inv(A))*R0'*(A)'
  Fa = (F - F')/2;
  %pause
  E = R*skew(vel)
  [u,s,v] = svd(E)

  S = m_structure(M,vel,R);
  figure;
  plot3_struct(S(1,:),S(3,:),-S(2,:));
  hold on;
  plot3(S(1,:),S(3,:), -S(2,:),'.');
  xlabel('x'); ylabel('z'); zlabel('y');
  view(20,20);
  grid on;
  %axis equal;

end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞成人午夜伦在线观看| 蜜桃av一区二区三区| 91精品国产免费| 成人免费高清视频在线观看| 婷婷中文字幕综合| 国产精品久久久久久久久免费丝袜| 欧美日精品一区视频| 高清在线观看日韩| 精一区二区三区| 午夜日韩在线电影| 一区二区三区在线观看动漫 | 日韩一级视频免费观看在线| 97国产一区二区| 国产精品一区专区| 免费久久99精品国产| 亚洲成人三级小说| 一区二区三区中文字幕电影| 国产精品久久久久久户外露出 | 国产乱对白刺激视频不卡| 亚洲国产裸拍裸体视频在线观看乱了 | 97se亚洲国产综合在线| 国产一区二区三区四区五区入口| 午夜日韩在线电影| 亚洲一区二区三区四区在线免费观看 | 精品国精品自拍自在线| 欧美性xxxxx极品少妇| av在线一区二区三区| 懂色av一区二区三区免费看| 麻豆国产欧美一区二区三区| 日韩精品一卡二卡三卡四卡无卡| 亚洲自拍偷拍网站| 亚洲一区二区视频在线| 亚洲精品一卡二卡| 亚洲精品免费在线播放| 亚洲日穴在线视频| 亚洲乱码国产乱码精品精的特点| 中文字幕在线免费不卡| 欧美激情一区不卡| 18欧美乱大交hd1984| 国产精品人人做人人爽人人添| 国产午夜亚洲精品理论片色戒 | 精品一区二区三区免费毛片爱| 国产福利一区在线观看| 国产真实乱子伦精品视频| 国内成人免费视频| 国产a视频精品免费观看| 成人性视频免费网站| 成人毛片视频在线观看| 99精品偷自拍| 在线欧美日韩国产| 在线播放欧美女士性生活| 欧美一区二区精品久久911| 日韩小视频在线观看专区| 欧美成va人片在线观看| 久久你懂得1024| 中文字幕在线播放不卡一区| 亚洲麻豆国产自偷在线| 亚洲一区免费观看| 秋霞成人午夜伦在线观看| 国模少妇一区二区三区| 成人h版在线观看| 欧洲亚洲精品在线| 制服丝袜国产精品| 国产亚洲精品福利| 亚洲天堂中文字幕| 日韩中文欧美在线| 精品午夜一区二区三区在线观看| 国产成人精品免费| 欧美性感一区二区三区| 日韩欧美一级精品久久| 中文成人av在线| 亚洲成人www| 国产精品一区一区| 91久久一区二区| 精品剧情在线观看| 亚洲日本在线观看| 麻豆精品精品国产自在97香蕉| 成人午夜电影小说| 欧美人xxxx| 中文子幕无线码一区tr| 香蕉乱码成人久久天堂爱免费| 国产真实精品久久二三区| 一本久久a久久免费精品不卡| 欧美一区二区视频免费观看| 久久久蜜桃精品| 亚洲香肠在线观看| 国产精品亚洲一区二区三区在线 | 欧美日韩亚洲不卡| 国产午夜精品一区二区三区嫩草| 怡红院av一区二区三区| 色噜噜狠狠色综合中国| 精品国精品国产尤物美女| 一区二区三区四区高清精品免费观看 | 久久精品人人做人人爽97| 一区二区三区在线观看国产| 国产麻豆视频精品| 欧美福利视频导航| 最近中文字幕一区二区三区| 蜜桃av噜噜一区二区三区小说| 一本色道久久综合狠狠躁的推荐 | 国产精品传媒视频| 蜜桃视频第一区免费观看| 色诱亚洲精品久久久久久| 久久丝袜美腿综合| 人人狠狠综合久久亚洲| 欧美在线观看你懂的| 欧美激情一区三区| 狠狠狠色丁香婷婷综合久久五月| 欧美日韩一区二区欧美激情| 亚洲欧洲日产国产综合网| 国产成人免费在线观看| 欧美一区二区三区免费视频| 一区二区三区影院| 91在线无精精品入口| 国产日韩欧美麻豆| 国产资源在线一区| 日韩精品一区在线观看| 日韩av在线免费观看不卡| 欧美情侣在线播放| 亚洲成人在线免费| 色综合天天综合| 中文字幕亚洲综合久久菠萝蜜| 国产福利一区二区| 久久久久久久久久看片| 久久精品久久久精品美女| 91精品午夜视频| 日韩在线一区二区三区| 欧美色倩网站大全免费| 亚洲一区欧美一区| 欧美午夜电影一区| 亚洲gay无套男同| 欧美色视频在线观看| 国产伦精品一区二区三区免费| 日韩你懂的在线观看| 久久国产剧场电影| 日韩精品中文字幕一区| 精品一区二区综合| 精品av久久707| 国产一区二区成人久久免费影院 | 免费国产亚洲视频| 日韩欧美色电影| 精品一区二区免费视频| 精品乱人伦小说| 国产suv精品一区二区三区| 中文字幕不卡在线| www.亚洲国产| 亚洲综合一区在线| 3d动漫精品啪啪一区二区竹菊| 男男gaygay亚洲| 久久久亚洲精华液精华液精华液| 国产精品一区三区| 国产精品无人区| 91日韩精品一区| 午夜视黄欧洲亚洲| 精品福利二区三区| 99久久国产综合精品色伊 | 国产一区二区三区在线观看免费| 国产亚洲欧美日韩俺去了| av在线播放不卡| 怡红院av一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 蜜臀av一区二区三区| 国产丝袜在线精品| 91啪在线观看| 美日韩一区二区| 日韩一区日韩二区| 欧美美女网站色| 顶级嫩模精品视频在线看| 一区二区在线观看免费| 日韩欧美一卡二卡| 成人av在线电影| 日韩**一区毛片| 国产精品水嫩水嫩| 欧美精品 日韩| 国产成人av影院| 亚洲高清三级视频| 2024国产精品视频| 日本高清不卡在线观看| 狠狠狠色丁香婷婷综合激情| 亚洲男人的天堂在线观看| 日韩一区二区精品在线观看| 99亚偷拍自图区亚洲| 美腿丝袜亚洲综合| 日韩理论片中文av| www国产精品av| 在线亚洲一区二区| 韩国成人在线视频| 午夜欧美一区二区三区在线播放| 国产亚洲污的网站| 91精品国产综合久久久久久久| 懂色av一区二区三区蜜臀 | 青草国产精品久久久久久| 国产精品久久久久久亚洲毛片| 欧美一级夜夜爽| 91免费视频网| 国产.精品.日韩.另类.中文.在线.播放| 亚洲电影你懂得| 亚洲欧美偷拍卡通变态| 国产丝袜美腿一区二区三区| 91精品欧美福利在线观看 |