[37] | 1 | function [align] = erlangen(in,config) |
---|
| 2 | % erlangen ... local routines for the hoengg installation |
---|
| 3 | % |
---|
| 4 | % [align] = erlangen(in,config) |
---|
| 5 | % in, cam, config ... see the main GOCAL script |
---|
| 6 | % |
---|
| 7 | % align ... structures aligned wit the specified world frame |
---|
| 8 | % |
---|
| 9 | % $Id: erlangen.m,v 1.3 2005/05/20 15:31:30 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 | |
---|
| 20 | if REALVIZ |
---|
| 21 | cam(1).C = [1.20055 -1.85769 4.02702]'; |
---|
| 22 | cam(2).C = [0.382772 -4.49652 5.28274]'; |
---|
| 23 | cam(3).C = [-2.99133 -3.90767 6.1968]'; |
---|
| 24 | cam(4).C = [-2.92944 -2.40276 -7.78579]'; |
---|
| 25 | cam(5).C = [-9.00505 -5.61218 -9.73132]'; |
---|
| 26 | cam(6).C = [-7.76965 -2.94546 -1.63609]'; |
---|
| 27 | else % own measurement |
---|
| 28 | cam(1).C = [1.16, 0.3, 1.8]'; |
---|
| 29 | cam(2).C = [1.1, 3.0, 2.5]'; |
---|
| 30 | cam(3).C = [-0.9, 2.4, 1.56]'; |
---|
| 31 | cam(4).C = [0.15, -2.5, 2.2]'; |
---|
| 32 | cam(5).C = [-1.95, -2.65, 2.45]'; |
---|
| 33 | cam(6).C = [-1.75, -2.2, 1.42]'; |
---|
| 34 | end |
---|
| 35 | % of the similarity computation |
---|
| 36 | |
---|
| 37 | [align.simT.s, align.simT.R, align.simT.t] = estsimt([Cst'],[cam(:).C]); |
---|
| 38 | [align.P, align.X] = align3d(in.Pe,in.Xe,align.simT); |
---|
| 39 | % save aligned data |
---|
| 40 | if 1 % SAVE_STEPHI | SAVE_PGUHA |
---|
| 41 | [align.Cst,align.Rot] = savecalpar(align.P,config); |
---|
| 42 | end |
---|
| 43 | drawscene(align.X,align.Cst',align.Rot,61,'cloud','Graphical Output Validation: Aligned data',config.cal.cams2use); |
---|
| 44 | |
---|
| 45 | set(gca,'CameraTarget',[0,0,0]); |
---|
| 46 | set(gca,'CameraPosition',[0,0,1]); |
---|
| 47 | |
---|
| 48 | figure(61), |
---|
| 49 | % print -depsc graphevalaligned.eps |
---|
| 50 | eval(['print -depsc ', config.paths.data, 'topview.eps']) |
---|
| 51 | |
---|
| 52 | drawscene(align.X,align.Cst',align.Rot,62,'cloud','Graphical Output Validation: Aligned data',config.cal.cams2use); |
---|
| 53 | |
---|
| 54 | set(gca,'CameraTarget',[0,0,0.9]); |
---|
| 55 | set(gca,'CameraPosition',[2,0,0.9]); |
---|
| 56 | |
---|
| 57 | figure(62), |
---|
| 58 | % print -depsc graphevalaligned.eps |
---|
| 59 | eval(['print -depsc ', config.paths.data, 'sideview.eps']) |
---|
| 60 | |
---|
| 61 | return |
---|