Commit 53e249bb authored by Paul Gay's avatar Paul Gay
Browse files

adding more visualisations

parent 59a20880
......@@ -21,7 +21,7 @@ tic
colzero=[];
rowzero=[];
allresults={};
for ii=1%:length(seqs)
ii=1; % choice of the sequence number
trackfile=fullfile(seqs(ii).folder, seqs(ii).name);
scene = get_scene_name_from_seq_name(seqs(ii).name);
base_dir = fullfile(scannet_dir, scene);
......@@ -97,8 +97,7 @@ Rec_new = recombine_ellipsoids(q_vec([1:3 5:6 8],:),S1); % the decomposed / reco
% ~~~~~~~~~~~~~~~~~~~~~~~~ PSfMO ~~~~~~~~~~~~~~~~~~~~~~~~~~
[Gs]=quadric2ellipsoide(q_vec);
angles=get_angles(Gs);
classes2=get_classes(labels, prs);
classes=get_classes(labels, prs);
method=1;
Gred = rebuild_Gred(R1,method);
inc.GT=GT; %these variables were used for inspection of the code and debugging
......@@ -110,7 +109,7 @@ inc.Rec=Rec;
inc.Imm=Imm;
inc.Quadrics_centered=Quadrics_centered;
default_noise=0.01;
[Gest,Eh,scales,axes_red,Sigma,out]=em_orient(prs,classes,Ccenter,Gred,ones(size(Ccenter,1),size(Ccenter,2)),angles,Gs,inc,default_noise);
[Gest,Eh,scales,axes_red,Sigma,out]=em(prs,classes,Ccenter,Gred,ones(size(Ccenter,1),size(Ccenter,2)),Gs,inc,default_noise);
Rec_post = recombine_ellipsoids(Eh,S1);
%transforming the quadrics into ellipsoids.
......@@ -135,4 +134,36 @@ x3cGT = compCent(GT);
fprintf('processed sequence number %d',ii);
[AP3D AP3D_p ]
rowzero = [];
colzero=[];
for f=1:max(1,round(length(Imm)/5)):length(Imm) % select 5 images in the sequence for visualisation
if sum(rowzero==f)~=0
continue
end
figure;
imshow(Imm{f}.I); hold on;
Crec = reprQ(R1,Rec,ones(Nf,No),'ortho',1);
Crec = retrasl(Crec,TT);
Crec_p = reprQ(R1,Rec_post,ones(Nf,No),'ortho',1);
%Crec_p = retrasl(Crec_p,TT);
rotpts = R1(2*f-1:2*f,:)*S1;
cc =inv(TT{f})*[rotpts(1:2,:); ones(1,size(S1,2))];
plot(cc(1,:),cc(2,:),'r+');
for i=1:(size(bbx,2)/4)
if sum(i==colzero)~=0
continue
end
if sum(isnan(bbx(f,(i*4-3):(i*4))))==0
plotBbx(bbx(f,(i*4-3):(i*4)),[1 1 0],8,i);
plotEllipse(Cnotrasl(3*f-2:3*f,3*i-2:3*i)/(-Cnotrasl(3*f,3*i)),[1 0 0],4); hold on;
plotEllipse(Crec(3*f-2:3*f,3*i-2:3*i)/(-Crec(3*f,3*i)),[0 0 1],4); hold on;
plotEllipse(Crec_p(3*f-2:3*f,3*i-2:3*i)/(-Crec_p(3*f,3*i)),[0 0 1],4); hold on;
end
end
[~] = plot3Dscene2( GT, Rec_postT_new, x3c_transf, No, 0, [], 0, [0 1 0], [0 0 1]);
title('GT and PSfMO quadrics')
[~] = plot3Dscene2( GT, RecT_new, x3c_transf, No, 0, [], 0, [0 1 0], [1 0 0]);
title('GT and SfMO quadrics')
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment