Libmv: Replace region tracker with autotracker in Blender

The title actually tells it all, this commit switches Blender to use the new
autotrack API from Libmv.

From the user point of view it means that prediction model is now used when
tracking which gives really nice results.

All the other changes are not really visible for users, those are just frame
accessors, caches and so for the new API.
This commit is contained in:
Sergey Sharybin
2014-06-22 20:19:48 +06:00
parent 7013d55580
commit 606329d0f8
9 changed files with 1066 additions and 511 deletions

View File

@@ -67,21 +67,12 @@ int libmv_autoTrackMarker(libmv_AutoTrack* libmv_autotrack,
libmv_apiMarkerToMarker(*libmv_tracked_marker, &tracked_marker);
libmv_configureTrackRegionOptions(*libmv_options,
&options);
bool tracking_result
= ((AutoTrack*) libmv_autotrack)->TrackMarker(&tracked_marker,
&result,
&options);
(((AutoTrack*) libmv_autotrack)->TrackMarker(&tracked_marker,
&result,
&options));
libmv_markerToApiMarker(tracked_marker, libmv_tracked_marker);
libmv_regionTrackergetResult(result, libmv_result);
// TODO(keir): Update the termination string with failure details.
if (result.termination == TrackRegionResult::CONVERGENCE ||
result.termination == TrackRegionResult::NO_CONVERGENCE) {
tracking_result = true;
}
return tracking_result;
return result.is_usable();
}
void libmv_autoTrackAddMarker(libmv_AutoTrack* libmv_autotrack,