Word :   Username :  
 
Bottom
Author
 Thread :

Reversing a track

 
n°989
woodyrules​ok
Posted on 02-02-2006 at 09:49:24 AM  profilanswer
 

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.

n°991
Ronald
Posted on 02-02-2006 at 09:06:44 PM  profilanswer
 

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

n°1056
woodyrules​ok
Posted on 03-17-2006 at 01:21:15 PM  profilanswer
 

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?

n°1057
Ronald
Posted on 03-17-2006 at 01:22:44 PM  profilanswer
 

For this you should use scripting.  
Scripts can access to all 2D tracks and edit them

n°1059
woodyrules​ok
Posted on 03-17-2006 at 01:38:37 PM  profilanswer
 

oh ok cheers.
Are there any good scipting resources for this kind of stuff you know about?

n°1062
niko
Posted on 03-17-2006 at 02:11:24 PM  profilanswer
 

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 );
 }
}

n°1064
woodyrules​ok
Posted on 03-17-2006 at 03:18:37 PM  profilanswer
 

cheers Niko


Go to:
Add a reply