#!/usr/bin/perl -w # SHOOT IMAGES FROM THE MAC # # Greg Ercolano 2008 # my $frm = 546; my $filename = defined($ARGV[0]) ? $ARGV[0] : "out"; while ( 1 ) { my $out = sprintf("$filename-%04d.tga", $frm++); print STDERR "Working on $out\n"; print STDERR " 1) Snapshot..\n"; system("import -window root -crop 850x400+510+105 $out"); print STDERR " 2) Step frame..\n"; system("( echo 'tell app \"DVD Player\"'; echo step dvd; echo end tell ) | rsh tow osascript"); sleep(3); # system("import -window root -crop 50x400+1020+100 foo.tga"); # HANDLE PERSPECTIVE CONVERSION # system("rsh de \"cd /net/tmp/2001; ". # "convert foo.tga -distort Perspective '0,100 0,310 100,400 100,0 0,0 0,400 100,400 100,0' $out\""); # |_______________________| |________________________| # Input Trapezoid Output Image # } # import -window root -crop 50x400+1020+100 foo-0020.tga # convert foo-0020.tga -distort Perspective '7,40 4,30 4,124 4,123 85,122 100,123 85,2 100,30' out.tga