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

Contents of /eyes/build_antique_eye_source.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sun Apr 13 04:01:03 2014 UTC (4 years, 3 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -0 lines
File MIME type: text/plain
done with antique
1 # lines
2 # from build_jos_eye_source.pl
3 # read 1 files in the txt format
4 # 2. Distance of points
5 # 3. intensity of points
6
7 srand(1283191);
8
9
10 while (<>) {
11 $s=$_;
12 ($x,$y,$r,$g,$b) = split(/\|/,$s);
13 $avg = ($r+$g+$b)/3.0;
14 if ($avg > 245) {$avg = $avg * 2.0;}
15 elsif ($avg<180) {$avg = $avg * .5;}
16 $d = (0.75 + 100.0 * (($avg) / 255.));
17
18 # $d = $d + rand(70)/2600; # slight variance in height
19 $phase = rand(3.1415927*2.0);
20 # $phase = 0;
21 $x = $x * 20800.0/7095.0;
22 $y = $y * 33048.0/11273.0;
23 $z = $d / 3.2808399; # convert from feet to meters
24 $z = $z * 0.25 + 0.081; # scale back
25 print "$x|$y|$z|1|4.71" . "e-07|$phase\n";
26 }
27

  ViewVC Help
Powered by ViewVC 1.1.5