source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/image3dstiching/Batch/OneTaskPairModel.pl @ 37

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

Added original make3d

File size: 1.2 KB
Line 
1#!/usr/bin/perl
2
3$Task = $ARGV[0] or $Task='QuadNew';
4$PairListFlag = $ARGV[1] or $PairListFlag = 1;
5$Fdir = '/afs/cs/group/reconstruction3d/scratch/TestMultipleImage/';
6$File = `ls $Fdir$Task/jpg/*.jpg`;
7@File = split(/\.jpg/, $File);
8#print @File;
9$Path = $Fdir.$Task.'/jpg/';
10#print $Path."\n";
11if (1)
12{
13# run all possible pair of images
14if ($PairListFlag == 0)
15{
16
17        for ($i = 0; $i < @File; ++$i)
18        {
19                $File[$i] =~ s/$Path//;
20                $File[$i] =~ s/\n//;
21#               print $File[$i];
22        }
23        for ($i = 0; $i < @File-1; ++$i)
24        {
25                for ($j = 0; $j < (@File-1); ++$j)
26                {
27                        if ($i < $j)
28                        {
29                                $Img1 = $File[$i];
30                                $Img2 = $File[$j];
31                                print $Img1." ";
32                                print $Img2."\n";
33                                `qsub -l arch=i686 -v $Img1,$Img2,$Task PairModel.sh`;
34                        }
35                }
36        }
37}
38else
39{
40# run Pairs im PairList only
41        $file = $ARGV[2] or  $file = 'PairList.txt';
42        open(INFO, $file);
43        @PairList  = <INFO>;
44        close(INFO);
45
46        for ( $i = 0; $i < @PairList; ++$i)
47        {
48                @Target = split(/ /, $PairList[$i]);
49                $Target[0] =~ s/\n//;
50                $Target[1] =~ s/\n//;
51                `export Img1 = $Target[0]`;
52                `export Img2 = $Target[1]`;
53                `echo '$Img1'`;
54                `echo '$Img2'`;
55                #print $Img1." ";
56                #print $Img2."\n";
57                `qsub -l arch=i686 -v '$Img1','$Img2','$Task' PairModel.sh`;
58        }
59}
60}
Note: See TracBrowser for help on using the repository browser.