[37] | 1 | function [align] = g9(in,config) |
---|
| 2 | % g9 ... local alignment for room G9 |
---|
| 3 | % |
---|
| 4 | % [align] = G9(in,config) |
---|
| 5 | % in, cam, config ... see the main GOCAL script |
---|
| 6 | % |
---|
| 7 | % align ... structures aligned wit the specified world frame |
---|
| 8 | % |
---|
| 9 | % $Id: g9.m,v 1.1 2005/05/20 15:31:31 svoboda Exp $ |
---|
| 10 | |
---|
| 11 | REALVIZ = 0; |
---|
| 12 | |
---|
| 13 | Cst = in.Cst; |
---|
| 14 | Rot = in.Rot; |
---|
| 15 | |
---|
| 16 | drawscene(in.Xe,Cst',Rot,41,'cloud','Graphical Output Validation: View from top or bottom',config.cal.cams2use); |
---|
| 17 | |
---|
| 18 | % definition of the absolute world frame |
---|
| 19 | % cam(1).C = [3, 1.25, 0.57]'; |
---|
| 20 | cam(2).C = [3, 1.8, 0.2]'; |
---|
| 21 | cam(3).C = [-2.2, 2.05, 0.1]'; |
---|
| 22 | cam(4).C = [-2.2, 2.05, 3.2]'; |
---|
| 23 | |
---|
| 24 | idx = [2:4]; |
---|
| 25 | |
---|
| 26 | % of the similarity computation |
---|
| 27 | |
---|
| 28 | [align.simT.s, align.simT.R, align.simT.t] = estsimt([Cst(idx,:)'],[cam(idx).C]); |
---|
| 29 | [align.P, align.X] = align3d(in.Pe,in.Xe,align.simT); |
---|
| 30 | % save aligned data |
---|
| 31 | if 1 % SAVE_STEPHI | SAVE_PGUHA |
---|
| 32 | [align.Cst,align.Rot] = savecalpar(align.P,config); |
---|
| 33 | end |
---|
| 34 | drawscene(align.X,align.Cst',align.Rot,61,'cloud','Graphical Output Validation: Aligned data',config.cal.cams2use); |
---|
| 35 | |
---|
| 36 | set(gca,'CameraTarget',[0,0,0]); |
---|
| 37 | set(gca,'CameraPosition',[0,1,0]); |
---|
| 38 | |
---|
| 39 | figure(61), |
---|
| 40 | % print -depsc graphevalaligned.eps |
---|
| 41 | eval(['print -depsc ', config.paths.data, 'topview.eps']) |
---|
| 42 | |
---|
| 43 | drawscene(align.X,align.Cst',align.Rot,62,'cloud','Graphical Output Validation: Aligned data',config.cal.cams2use); |
---|
| 44 | |
---|
| 45 | set(gca,'CameraTarget',[0,2.05,0]); |
---|
| 46 | set(gca,'CameraPosition',[0,2.05,3]); |
---|
| 47 | |
---|
| 48 | figure(62), |
---|
| 49 | % print -depsc graphevalaligned.eps |
---|
| 50 | eval(['print -depsc ', config.paths.data, 'sideview.eps']) |
---|
| 51 | |
---|
| 52 | return |
---|