/[opencvs]/eyes/build_kristie_eye_source.pl
ViewVC logotype

Contents of /eyes/build_kristie_eye_source.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sat Nov 12 21:31:09 2011 UTC (6 years, 8 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
I think I got kristie working
1 # lines
2
3
4 srand(3897624);
5
6
7
8 open(F1,"holo_extract2.txt");
9 open(F2,"depth_estimate3.txt");
10 while (<F1>) {
11 $s=$_;
12 ($x,$y,$r,$g,$b) = split(/\|/,$s);
13 $d=<F2>;
14 ($x2,$y2,$r2,$g2,$b2) = split(/\|/,$d);
15 if (($x ne $x2)||($y ne $y2)) {
16 print STDERR "Errror mismatch:\n\n$s\n$d\n";
17 exit(-1);
18 }
19 if ($r eq 255) {
20 $avg = ($r2+$g2+$b2)/3.;
21 $d = (35.-3.)* ($avg / 255.);
22 $phase = rand(3.1415927*2.0);
23 $x = $x * 63360. / 2160. + rand(29.)-14.5;
24 $y = $y * 84880./ 2880. + rand(29.)-14.5 ;
25 $z = $d / 3.2808399; # convert from feet to meters
26 print "$x|$y|$z|1|671e-9|$phase\n";
27 }
28 }
29

  ViewVC Help
Powered by ViewVC 1.1.5