The FXScript Reference

For Final Cut Pro created by Joe Maller

PointTrack

PointTrack(fromImage, srcPoint, toImage, guessPoint, range, deltaPoint)

Additional Notes

FXScript Manual

Scans a rectangle of the size specified in "range" around the specified source point in the "fromImage" buffer, looking for a match in the "toImage" buffer. This assesses the difference in position between the two image buffers. The offset of the matching image data in the "toImage" is placed in "deltaPoint."

guessPoint?

I think the guessPt is the center of the location where the funciton will look for a match. FCP's Image Stabilizer filter just uses the same location as the source point. This might work on simple clips with minimal motion, but doesn't do omuch good for clips with any normal range of motion or as the basis of a motion tracker.

Some sort of predictive algorithm needs to be implemented to provide a guesspoint closer to where the match would be expected to be. To do this, I'm going to need to use previous frame data as well as

Try previous 3-5 frames veelocity data combined with 3-5 frames directional data. WIll need to average out the speed with a bias towards what is actually happening.

making a motion tracker with PointTrack.

I've been playing with point track trying to implement a useful motion tracker in FCP. The wall I run up against is that to get something useful it has to be able to interpolate, and use the guess point. To do this you'd need to scan the previous clips, interpolate motion from them and apply it to the guess point. Because you can't store data between frames, you would have to recalculate the motion track for every preceding frame, for every frame. This could make renders somewhat glacial.

The other problem is that to apply the motion track to another layer, rather than as an image stabiliser, the plugin has to be implemented as a transition. Once the user gets used to this this isn't a problem, except that you can't key frame any of the controls for a transition.

Seems like apple added a really useful feature, but made it impossible to use..