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

Contents of /eyes/make_eyes_alpha.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Tue Apr 10 04:13:58 2012 UTC (6 years, 3 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +9 -9 lines
File MIME type: text/plain
did a fix to randomify that was ever so slight.
For the hologram,  we flip the hologram values if base is lma darker than the pattern.
It is a slight difference,  but noticeable - that it seems to flow better, is softer.
I think it will jump out more, or less, I don't know.  But it has made a big deal.
I used the option 1 and not the objective values. Objective had blue as way too dark.
I guess it shouald all be on hte green in this case because the hologram is
572 nm (green laser pointer).
1 # This is congruent to workeyes - excepting that we are making alpha backgrounds
2 # this is useful so that if we have a high res picture, we can incorporate some of the image
3 # back in (using the randomize function
4 #
5 $val=1080;
6 # for larissa:
7 #$val=2160;
8 # for stephaine
9 #$val=4028;
10 # for the girls at 52 inches 720 dpi
11 #$val = 100;
12
13
14 $valxval = $val . "x" . $val;
15
16
17 # new!
18 $label_me = 1;
19
20 $lpart = "";
21
22 while (<>) {
23 ($x,$y,$fname,$width,$height,$cl,
24 $cr,$cg,$cb,$strength,$radius,$rtarget,$gtarget,$btarg,$tcolor) = split(/\|/);
25 $diff = $width - $height;
26 $name = $x . "_" . $y . ".png";
27
28 print "convert xc:\\#222222 -resize $width" . "x$height! m/j$name\n";
29 if ($diff >0) {
30 $dover2 = int($diff/2);
31 if ($diff/2 == int($diff/2)) {
32 print "convert m/j$name -bordercolor \\#c0c0c0 -border 0x" .
33 ($dover2) . " m/h$name\n";
34 }
35 else {
36 print "convert m/j$name -bordercolor \\#c0c0c0 -border 0x" .
37 ($dover2) . " m/i$name\n";
38 print "convert m/i$name -bordercolor \\#c0c0c0 -extent $width"
39 . "x" . "$width m/h$name\n";
40 }
41 }
42 elsif ($diff < 0) {
43 $diff = -$diff;
44 $dover2 = int($diff/2);
45 if ($diff/2 == int($diff/2)) {
46 print "convert m/j$name -bordercolor \\#c0c0c0 -border "
47 . ($dover2) . "x0 m/h$name\n";
48 }
49 else {
50 print "convert m/j$name -bordercolor \\#c0c0c0 -border " . ($dover2) . "x0 m/i$name\n";
51 print "convert m/i$name -bordercolor \\#c0c0c0 -extent $height" . "x" . "$height m/h$name\n";
52 }
53 }
54 else {
55 print "convert m/j$name m/h$name\n";
56 }
57 print "convert m/h$name -resize $valxval $lpart m/k$name\n";
58 print "rm m/[h-j]$name\n";
59 }
60
61
62
63

  ViewVC Help
Powered by ViewVC 1.1.5