Bartel
unread,May 21, 2011, 10:13:30 AM5/21/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CVXOPT
Small update, in trying to implement Li's Structure from Motion and
solving the above polynomial set:
I've been able to solve a very small problem (2 view 5 point, "2v5p")
using sparsePOP (Matlab version though there is also a free C++
distribution working with SDPA, but I haven't succeeded in compiling
it, some problem with not finding "mumps-for-sdpa"):
min f0 = sum ( [x(i), x(j)] * Ai * [x(i); x(j)] - y(k) )² over i,j,k
-> f0 is a polynomial of degree 4 with for the 2v5p 20 unknowns (2
times 5 "legs" x and binomial(5, 2) = 10 interpoint distances y)
sparsePOP was able to solve a (noise-free, random) example if at least
3 y(k)'s where known before hand (i.e. 17 dof remaining), which is
kind of OK (theoretically, I think fixing 1 y(k), to set the scene's
scale, should be enough)
However, when I tried to solve a slightly larger problem (2v8p),
SeDuMi, upon which sparsePOP relies for solving the relaxed sdp, ran
"out of memory". But 2v8p is still very small in structure from motion
problems.
I also tried a 3v4p setting, which also worked if setting 3 y(k)'s to
known (and correct) values.
I then tried the above relaxation in CVX, Matlab version, for 2v5p:
n = 2 * binomial(5, 2) -> number of polynomial equations (i,j,k)
var = 2 * 5 -> number of legs
m -> number of unkown inter-point distances y(k)
cvx_begin
variables Y(var, var) y(m);
minimize (trace(Y));
subject to
k = 1;
for i=1:n
if (known(i))
trace(A{i} * Y) == c(i)^2;
else
trace(A{i} * Y) == y(k);
k = k + 1;
end
end
Y == semidefinite(var);
y > 0;
cvx_end
where Y is supposed Y = x * xT and should have rank 1, i.e. x =
sqrt(diag(Y))
and c known interpoint distances
it worked only for m >= 9 (out of 10!), which is quiet bad.
Question:
would anyone know if using sdpa instead of sedumi in sparsePOP would
not "run out of memory"?
Or how to define the polynomial f0 such that the problem's size is
kept small? Because having to wait hours, even if there would be
sufficient memory, is not amusing.
Does f0 maybe happen to be a SOS (sum of square) polynomial? I think
not because [Ai, 0; 0, -1] is not sdp, though Ai is?
Any idea why sparsePOP is more robust in getting a good solution than
the manual relaxation in CVX?
I guess this has become the wrong media for the above problems, but I
thought to supply my progress, in case anyone happens to stumble upon
it.
Thank you!