请问各路大佬,在透视变换中,世界坐标系与图像坐标系的坐标原点的选择是任意的吗,还是说是固定的捏。另外,在算出矫正映射(矩阵)后怎样操作呢?- %%首先测量四组物理坐标xy值,生成M矩阵
- x1=-23;
- y1=41;
- u1=109;
- v1=89;
-
- x2=23;
- y2=41;
- u2=54;
- v2=89;
-
- x3=-23;
- y3=0;
- u3=134;
- v3=102;
-
- x4=23;
- y4=0;
- u4=29;
- v4=102;
-
- A=[u1,v1,1,0,0,0,-u1*x1,-v1*x1;0,0,0,u1,v1,1,-u1*y1,-v1*y1;u2,v2,1,0,0,0,-u2*x2,-v2*x2;0,0,0,u2,v2,1,-u2*y2,-v2*y2;
- u3,v3,1,0,0,0,-u3*x3,-v3*x3;0,0,0,u3,v3,1,-u3*y3,-v3*y3;u4,v4,1,0,0,0,-u4*x4,-v4*x4;0,0,0,u4,v4,1,-u4*y4,-v4*y4];
- B=[x1;y1;x2;y2;x3;y3;x4;y4];
- M=A\B
复制代码
|