Minimization problem - matrix frobenius norm

Hey there, i am working on homework and i need to implement an algorithm from a paper. in the final stage, i have to smooth a matrix which represents movment of camera, (9xnumber of frames). this is done by fitting a 3 dim polynomial model, so if E is the camera matrix, i have to solve:
min ||C*E-C*K*B||
where K is 9*dim coeff matrix, and B is just the variable meshgridded: [1, 1^2, 1^3; 2 2^2 2^3;3 3^2 3^3] etc.
the norm is Frobenius norm. how can i solve this in matlab? i tried lsqnolin, it's working, but taking LONG time, and easily reaches memory limit with more than 400 frames.
Thanks

 採用された回答

Matt J
Matt J 2015 年 9 月 26 日
編集済み: Matt J 2015 年 9 月 26 日

0 投票

So, we're solving for K? Since there are no constraints, it is a purely linear least squares problem and an analytical solution is available,
K=C\(C*E)/B
If the matrix C is square, nonsingular, this of course reduces to
K=E/B

3 件のコメント

Matt J
Matt J 2015 年 9 月 26 日
Comment by aviel nah
Hey, thanks, it seems you are correct, i was quite sure i cannot use least squares since i am trying to minimize a matrix norm, which is differend than the 2d euclidian norm on 1d vectors.
but how would you add masking to this equation? i mean, i actually forgot to write one matrix in the eq. which is a bit-wise masking matrix, so i am trying to minimize: |W.*(C*E-B*K*E)|. W is size of C*E. how would you add that into the ls solution?
Matt J
Matt J 2015 年 9 月 26 日
編集済み: Matt J 2015 年 9 月 26 日
i was quite sure i cannot use least squares since i am trying to minimize a matrix norm, which is differend than the 2d euclidian norm on 1d vectors.
The Frobenius norm is not an induced matrix norm, so it is actually very much the same. The problem can be rewritten in 1D vector form as follows
y=reshape(C*E,[],1);
A=kron(B.',C);
min ||A*k-y||
where k=K(:).
aviel nah
aviel nah 2015 年 9 月 27 日
and can you also add the extra Matrix W? which is a binary masking matrix: min |W.*(C*E-C*K*B)|||?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeParticle & Nuclear Physics についてさらに検索

質問済み:

2015 年 9 月 26 日

コメント済み:

2015 年 9 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by