3

我想根据 Tomasi 和 Kanade [1992]从运动程序构建一个简单的结构。这篇文章可以在下面找到:

https://people.eecs.berkeley.edu/~yang/courses/cs294-6/papers/TomasiC_Shape%20and%20motion%20from%20image%20streams%20under%20orthography.pdf

这种方法看起来优雅而简单,但是,我在计算上述参考的公式 16 中概述的度量约束时遇到了麻烦。

我正在使用 R 并在下面概述了我的工作:

给定一组图像

在此处输入图像描述

我想跟踪三个柜门的角落和一张图片(图像上的黑点)。首先,我们将点读入矩阵 w 其中

w

最终,我们希望将 w 分解为描述 3 维点的旋转矩阵 R 和形状矩阵 S。我将尽可能多地省略细节,但可以从 Tomasi 和 Kanade [1992] 论文中收集到对数学的完整描述。

我在下面提供 w:

w.vector=c(0.2076,0.1369,0.1918,0.1862,0.1741,0.1434,0.176,0.1723,0.2047,0.233,0.3593,0.3668,0.3744,0.3593,0.3876,0.3574,0.3639,0.3062,0.3295,0.3267,0.3128,0.2811,0.2979,0.2876,0.2782,0.2876,0.3838,0.3819,0.3819,0.3649,0.3913,0.3555,0.3593,0.2997,0.3202,0.3137,0.31,0.2718,0.2895,0.2867,0.825,0.7703,0.742,0.7251,0.7232,0.7138,0.7345,0.6911,0.1937,0.1248,0.1723,0.1741,0.1657,0.1313,0.162,0.1657,0.8834,0.8118,0.7552,0.727,0.7364,0.7232,0.7288,0.6892,0.4309,0.3798,0.4021,0.3965,0.3844,0.3546,0.3695,0.3583,0.314,0.3065,0.3989,0.3876,0.3857,0.3781,0.3989,0.3593,0.5184,0.4849,0.5147,0.5193,0.5109,0.4812,0.4979,0.4849,0.3536,0.3517,0.4121,0.3951,0.3951,0.3781,0.397,0.348,0.5175,0.484,0.5091,0.5147,0.5128,0.4784,0.4905,0.4821,0.7722,0.7326,0.7326,0.7232,0.7232,0.7119,0.7402,0.7006,0.4281,0.3779,0.3918,0.3863,0.3825,0.3472,0.3611,0.3537,0.8043,0.7628,0.7458,0.7288,0.727,0.7213,0.7364,0.6949,0.5789,0.5491,0.5761,0.5817,0.5733,0.5444,0.5537,0.5379,0.3649,0.3536,0.4177,0.3951,0.3857,0.3819,0.397,0.3461,0.697,0.671,0.6821,0.6821,0.6719,0.6412,0.6468,0.6235,0.3744,0.3649,0.4159,0.3819,0.3781,0.3612,0.3763,0.314,0.7008,0.6691,0.6794,0.6812,0.6747,0.6393,0.6412,0.6235,0.7571,0.7345,0.7439,0.7496,0.7402,0.742,0.7647,0.7213,0.5817,0.5463,0.5696,0.5779,0.5761,0.5398,0.551,0.5398,0.7665,0.7326,0.7439,0.7345,0.7288,0.727,0.7515,0.7062,0.8301,0.818,0.8571,0.8878,0.8766,0.8561,0.858,0.8394,0.4121,0.3876,0.4347,0.397,0.38,0.3631,0.3668,0.2971,0.912,0.8962,0.9185,0.939,0.9259,0.898,0.8887,0.8571,0.3989,0.3781,0.4215,0.3725,0.3612,0.3461,0.3423,0.2782,0.9092,0.8952,0.9176,0.9399,0.925,0.8971,0.8887,0.8571,0.4743,0.4536,0.4894,0.4517,0.446,0.4328,0.4385,0.3706,0.8273,0.8171,0.8571,0.8878,0.8766,0.8543,0.8561,0.8394,0.4743,0.4554,0.4969,0.4668,0.4536,0.4404,0.4536,0.3857)

w=matrix(w.vector,ncol=16,nrow=16,byrow=FALSE)

wm然后根据等式 2创建注册测量矩阵

等式2

经过

wm = w - rowMeans(w)

我们可以通过使用奇异值分解将对角线“PxP”矩阵和“PxP”矩阵分解wm为“2FxP”矩阵。o1eo2

svdwm <- svd(wm)

o1 <- svdwm$u
e <-  diag(svdwm$d)
o2 <- t(svdwm$v) ## dont forget the transpose!

但是,因为有噪音,我们只关注 的前 3 列o1、 的前 3 个值e和 by 的前 3 行o2

o1p <- svdwm$u[,1:3]
ep <-  diag(svdwm$d[1:3])
o2p <- t(svdwm$v)[1:3,] ## dont forget the transpose!

现在我们可以求解方程 (14) 中的rhatshat

等式 14

经过

rhat <- o1p%*%ep^(1/2)
shat <- ep^(1/2) %*% o2p

然而,这些结果并不是唯一的,我们仍然需要通过方程 (15) 求解 R 和 S

等式 15

通过使用等式 (16) 的度量约束

等式 16

现在我需要找到 Q。我相信有两种可能的方法,但不清楚如何使用。

方法 1涉及求解 B whereB=Q%*%solve(Q)然后使用 Cholesky 分解来找到 Q。方法 1 似乎是文献中的常见选择,但是,关于如何实际求解线性系统的细节很少。很明显,B 是 6 个未知数的“3x3”对称矩阵。但是,考虑到度量约束(方程 16),我不知道如何在给定 3 个方程的情况下求解 6 个未知数。我忘记了对称矩阵的属性吗?

方法 II涉及使用非线性方法来估计 Q,并且在运动文献中的结构中不太常用。

任何人都可以就如何解决这个问题提供一些建议吗?提前致谢,如果我需要更清楚地说明我的问题,请告诉我。

4

1 回答 1

1

我^f可以写成{a_if b_if c_if}

j^f可以写成{a_jf b_jf c_jf}

问可以写成{{q11,q12,q13}{q12,q22,q23}{q13,q23,q33}}

所以我们的方程是:

所以第一个方程可以写成:


这相当于

为了简短起见,我们现在定义:

(我知道间距非常小,但是是的,这是一个向量......)

所以对于所有不同帧 f 中的所有方程,我们可以写出一个大方程:

(对不起,丑陋的公式......)现在你只需要解决QQ^T-Matrix 使用 Cholesky 分解或其他什么......

于 2017-01-31T14:50:17.570 回答