source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/MultiCamSelfCal/OutputFunctions/evalreprerror.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.6 KB
Line 
1% evalreprerror ... computes and plots the final error statistics
2%
3% cam = evalreprerror(cam,config)
4% cam, config ... see the main GOCAL script
5%
6% $Id: evalreprerror.m,v 2.0 2003/06/19 12:07:03 svoboda Exp $
7
8function cam = evalreprerror(cam,config)
9
10disp('2D reprojection error')
11disp(sprintf('All points: mean  %2.2f pixels, std is %2.2f',mean([cam.err2d]), std([cam.err2d])'));
12% disp(sprintf('Inliers:    mean  %2.2f pixels, std is %2.2f',mean([cam.inerr2d]), std([cam.inerr2d])'));
13if mean([cam.err2d])>1.5 | std([cam.err2d])>1.5
14        disp('***************************************************')
15        disp('W A R N I N G: the reprojection error is relatively high !')
16end
17
18%%%
19% evaluate the reprojection error for each camera separately to detect possible problems
20%%%
21for i=1:size(config.cal.cams2use,2),
22        cam(i).mean2Derr = mean(cam(i).err2d);
23        cam(i).std2Derr  = std(cam(i).err2d);
24end
25% sort the values and print them to the 2D graphs
26
27figure(30),
28clf
29plot(config.cal.cams2use,[cam.mean2Derr],'bd'),
30hold on, grid on,
31plot(config.cal.cams2use,[cam.mean2Derr],'b-'),
32plot(config.cal.cams2use,[cam.std2Derr],'rd')
33plot(config.cal.cams2use,[cam.std2Derr],'r-')
34xlabel('Id of the camera')
35title('2D error: mean (blue), std (red)')
36ylabel('pixels')
37
38figure(31)
39clf
40bar(config.cal.cams2use,[cam.mean2Derr;cam.std2Derr]',1.5)
41grid on
42xlabel('Id of the camera')
43title('2D error: mean (blue), std (red)')
44ylabel('pixels')
45
46figure(31),
47eval(['print -depsc ', config.paths.data, 'reprerrors.eps'])
48
49figure(4),
50eval(['print -depsc ', config.paths.data, 'reconstructedsetup.eps'])
51
52Ret = 1;
53return
Note: See TracBrowser for help on using the repository browser.