Search in sources :

Example 1 with OrientationIntegral

use of boofcv.abst.feature.orientation.OrientationIntegral in project BoofCV by lessthanoptimal.

the class FactoryPointTracker method combined_ST_SURF_KLT.

/**
 * Creates a tracker which detects Shi-Tomasi corner features, describes them with SURF, and
 * nominally tracks them using KLT.
 *
 * @see ShiTomasiCornerIntensity
 * @see DescribePointSurf
 * @see boofcv.abst.feature.tracker.DdaManagerDetectDescribePoint
 *
 * @param configExtract Configuration for extracting features
 * @param kltConfig Configuration for KLT
 * @param reactivateThreshold Tracks are reactivated after this many have been dropped.  Try 10% of maxMatches
 * @param configDescribe Configuration for SURF descriptor
 * @param configOrientation Configuration for region orientation.  If null then orientation isn't estimated
 * @param imageType      Type of image the input is.
 * @param derivType      Image derivative type.        @return SURF based tracker.
 */
public static <I extends ImageGray<I>, D extends ImageGray<D>> PointTracker<I> combined_ST_SURF_KLT(ConfigGeneralDetector configExtract, PkltConfig kltConfig, int reactivateThreshold, ConfigSurfDescribe.Stability configDescribe, ConfigSlidingIntegral configOrientation, Class<I> imageType, Class<D> derivType) {
    if (derivType == null)
        derivType = GImageDerivativeOps.getDerivativeType(imageType);
    GeneralFeatureDetector<I, D> corner = createShiTomasi(configExtract, derivType);
    InterestPointDetector<I> detector = FactoryInterestPoint.wrapPoint(corner, 1, imageType, derivType);
    DescribeRegionPoint<I, BrightFeature> regionDesc = FactoryDescribeRegionPoint.surfStable(configDescribe, imageType);
    ScoreAssociation<TupleDesc_F64> score = FactoryAssociation.scoreEuclidean(TupleDesc_F64.class, true);
    AssociateSurfBasic assoc = new AssociateSurfBasic(FactoryAssociation.greedy(score, 100000, true));
    AssociateDescription<BrightFeature> generalAssoc = new WrapAssociateSurfBasic(assoc);
    OrientationImage<I> orientation = null;
    if (configOrientation != null) {
        Class integralType = GIntegralImageOps.getIntegralType(imageType);
        OrientationIntegral orientationII = FactoryOrientationAlgs.sliding_ii(configOrientation, integralType);
        orientation = FactoryOrientation.convertImage(orientationII, imageType);
    }
    return combined(detector, orientation, regionDesc, generalAssoc, kltConfig, reactivateThreshold, imageType);
}
Also used : OrientationIntegral(boofcv.abst.feature.orientation.OrientationIntegral) AssociateSurfBasic(boofcv.alg.feature.associate.AssociateSurfBasic)

Aggregations

OrientationIntegral (boofcv.abst.feature.orientation.OrientationIntegral)1 AssociateSurfBasic (boofcv.alg.feature.associate.AssociateSurfBasic)1