Search in sources :

Example 1 with AssociatedPairTrack

use of boofcv.alg.sfm.d2.AssociatedPairTrack in project BoofCV by lessthanoptimal.

the class WrapImageMotionPtkSmartRespawn method checkInitialize.

private void checkInitialize() {
    if (!inliersMarked) {
        inliersMarked = true;
        List<PointTrack> active = alg.getMotion().getTracker().getActiveTracks(null);
        allTracks.clear();
        long tick = alg.getMotion().getTotalFramesProcessed();
        inliers.resize(active.size());
        for (int i = 0; i < active.size(); i++) {
            PointTrack t = active.get(i);
            AssociatedPairTrack info = t.getCookie();
            allTracks.add(t);
            // if it was used in the previous update then it is in the inlier set
            inliers.data[i] = info.lastUsed == tick;
        }
    }
}
Also used : AssociatedPairTrack(boofcv.alg.sfm.d2.AssociatedPairTrack) PointTrack(boofcv.abst.feature.tracker.PointTrack)

Aggregations

PointTrack (boofcv.abst.feature.tracker.PointTrack)1 AssociatedPairTrack (boofcv.alg.sfm.d2.AssociatedPairTrack)1