 |
 |
» » woodyrulesok | Hi all,
is there an easy way to reverse your tracks so you can solve the shot backwards?
I can reverse the actual image sequence easily enough but would I then have to redo all my 2d tracks from scratch?
Thanks. |
Ronald | Hi.
When you create a track, you can track it forward, backward or bidirectionnally.
For automatic tracking, it's fully symmetric, so doing it backward will lead to the same result.
Bye |
woodyrulesok | Thanks, but thats not what I meant really.
What I mean is say I have in my plate loads of objects moving from the left hand side of the screen to right hand side. I spend ages puting in tracks manualy. The plate gets reversed so now the objects are moving from right to left instead of left to right. I don't want to have to retrack all the manual tracks I have just done so is there a way to reverse my 2d tracks so they still fit the plate?
Also what about if for some reason the plate gets flopped? |
Ronald | For this you should use scripting. Scripts can access to all 2D tracks and edit them |
woodyrulesok | oh ok cheers.
Are there any good scipting resources for this kind of stuff you know about? |
niko | Hi,
You can have a look to "mmToolBox" in the "scripts" folder of MatchMover, there is some useful functions to access and modify tracks.
Find below an example of a perl script that gets all selected 2D tracks and modify x coordinate.
Hope it helps,
Niko
-------------------------------------------------------------------------
# get sequence/cameras settings
my %sequenceAttribs = %{$mm->getSequenceAttribs( $mm->getSequenceId() )}; # attributes of current sequence
my %cameraAttribs = %{$mm->getCameraAttribs( $sequenceAttribs{camera} )}; # corresponding camera attributes
my $width = $cameraAttribs{w}; # image height
my $height = $cameraAttribs{h}; # image height
# get selection
my @selection = @{$mm->getSelection( 2 )};
my $itemCount = scalar @selection;
foreach $track ( 1..$itemCount ) {
my @track2Dinfos = @{$mm->getTrack2D( @selection[ $track ] )}; # get track 2D positions
foreach $t2Dinfo ( @track2Dinfos ) { my %hash = %{ $t2Dinfo };
my $t = $hash{t};
my $x = $hash{x};
my $y = $hash{y};
print "t: $t\tx: $x\ty:$y\n";
$mm->setTrack2D( @selection[ $track ], $width-$x, $y, $t );
}
} |
» »
|
 |
 |
|