【问题标题】:Going from camera-centric coordinates to pattern-centric coordinates从以相机为中心的坐标到以图案为中心的坐标
【发布时间】:2016-09-09 22:08:58
【问题描述】:

我目前在相机中设置了一个相机对齐模型作为原点坐标:

http://i.imgur.com/UnSCAvG.png

而且,由于相机是固定的,我正在尝试将系统转换为固定模式的模型

http://i.imgur.com/OKunxwA.png

Matlab 可以很好地向我展示它,但是我发现没有办法提取数据,除非它位于固定相机模型上。应用平移和旋转的逆来在系统之间进行更改应该是一件简单的事情,但不幸的是,这不起作用,我不明白为什么。

oldpoint = [0 0 0 1]';

translation = ([1 0  0 18.1043121043; 0 1 0 31.092351038; 0 0 1 -80.0610295707; 0 0 0 1]);
rotation = [eul2rotm([0.0957937074  -0.0234017529   -0.037084526]) zeros(3,1); 0 0 0 1];


newpoint = translation * point;

newpoint = rotation * newpoint;

我已经尝试了几种不同的替代方案,但到目前为止没有一个接近我想要获得的坐标。

【问题讨论】:

    标签: matlab computer-vision camera-calibration


    【解决方案1】:

    两件事出了问题,matlab 没有使用欧拉角,Z 需要倒置。

    clc;
    clear;
    %%
    oldpoint = [0 0 0 1]';
    
    newpoints = zeros(13,4);
    
    i = 1;
    while( i<= length(translations) )
        trans = translations(i,:);
        rota = rotations(i,:);
    
        display(trans);
        display(rota);
    
        translation = ([1 0  0 -trans(1); 0 1 0 -trans(2); 0 0 1 trans(3); 0 0 0 1]);
        rotation = [rotationVectorToMatrix([-rota(1) -rota(2) -rota(3)]) zeros(3,1); 0 0 0 1];
    
        newpoint = translation  * oldpoint;
        newpoint = rotation * newpoint;
    
        newpoints(i,:) = newpoint;
        i = i + 1;
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-08
      • 2016-01-29
      • 1970-01-01
      • 2012-09-13
      • 2019-06-29
      • 1970-01-01
      相关资源
      最近更新 更多