/** Repeatedly calls scan_match with different temporal offsets in order to determine the time alignment of two video sequences. Currently only offsets between -1 and 1 second are evaluated. @param pose Pose estimate at the best found time offset. @return The temporal offset giving minimal alignment error. **/ float scan_match_temporal( const TrackHistory& a, const TrackHistory& b, TrackHistory& asc_a, TrackHistory& asc_b, ScanPose& pose, float timeThresh ) { pose.error = 9999999.f; float min_dt = 0.f; // will store the best offset found // Repeat scan matching for a number of time offsets from -1 to 1 second float dt = -1.f; while( dt <= 1.f ) { ScanPose result = scan_match( a, b, asc_a, asc_b, timeThresh, dt ); if ( result.error < pose.error ) { pose = result; min_dt = dt; } dt += 0.05f; } return min_dt; }
static void add_ttymatch(char *arg) { scan_match(&ttytab, arg, do_ttymatch); }
static void add_uidmatch(char *arg) { scan_match(&uidtab, arg, do_uidmatch); }