Search in sources :

Example 1 with AssociateSurfBasic

use of boofcv.alg.feature.associate.AssociateSurfBasic in project BoofCV by lessthanoptimal.

the class FactoryPointTracker method dda_FH_SURF_Stable.

/**
 * Creates a tracker which detects Fast-Hessian features and describes them with SURF using the faster variant
 * of SURF.
 *
 * @see DescribePointSurf
 * @see boofcv.abst.feature.tracker.DdaManagerDetectDescribePoint
 *
 * @param configDetector Configuration for SURF detector
 * @param configDescribe Configuration for SURF descriptor
 * @param configOrientation Configuration for orientation
 * @param imageType      Type of image the input is.
 * @return SURF based tracker.
 */
// TODO remove maxTracks?  Use number of detected instead
public static <I extends ImageGray<I>> PointTracker<I> dda_FH_SURF_Stable(ConfigFastHessian configDetector, ConfigSurfDescribe.Stability configDescribe, ConfigSlidingIntegral configOrientation, Class<I> imageType) {
    ScoreAssociation<TupleDesc_F64> score = FactoryAssociation.scoreEuclidean(TupleDesc_F64.class, true);
    AssociateSurfBasic assoc = new AssociateSurfBasic(FactoryAssociation.greedy(score, 5, true));
    AssociateDescription2D<BrightFeature> generalAssoc = new AssociateDescTo2D<>(new WrapAssociateSurfBasic(assoc));
    DetectDescribePoint<I, BrightFeature> fused = FactoryDetectDescribe.surfStable(configDetector, configDescribe, configOrientation, imageType);
    DdaManagerDetectDescribePoint<I, BrightFeature> manager = new DdaManagerDetectDescribePoint<>(fused);
    return new DetectDescribeAssociate<>(manager, generalAssoc, false);
}
Also used : AssociateSurfBasic(boofcv.alg.feature.associate.AssociateSurfBasic)

Example 2 with AssociateSurfBasic

use of boofcv.alg.feature.associate.AssociateSurfBasic 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)

Example 3 with AssociateSurfBasic

use of boofcv.alg.feature.associate.AssociateSurfBasic in project BoofCV by lessthanoptimal.

the class FactoryPointTracker method combined_FH_SURF_KLT.

/**
 * Creates a tracker which detects Fast-Hessian features, describes them with SURF, nominally tracks them using KLT.
 *
 * @see DescribePointSurf
 * @see boofcv.abst.feature.tracker.DdaManagerDetectDescribePoint
 *
 * @param kltConfig Configuration for KLT tracker
 * @param reactivateThreshold Tracks are reactivated after this many have been dropped.  Try 10% of maxMatches
 * @param configDetector Configuration for SURF detector
 * @param configDescribe Configuration for SURF descriptor
 * @param configOrientation Configuration for region orientation
 * @param imageType      Type of image the input is.
 * @param <I>            Input image type.
 * @return SURF based tracker.
 */
public static <I extends ImageGray<I>> PointTracker<I> combined_FH_SURF_KLT(PkltConfig kltConfig, int reactivateThreshold, ConfigFastHessian configDetector, ConfigSurfDescribe.Stability configDescribe, ConfigSlidingIntegral configOrientation, Class<I> imageType) {
    ScoreAssociation<TupleDesc_F64> score = FactoryAssociation.defaultScore(TupleDesc_F64.class);
    AssociateSurfBasic assoc = new AssociateSurfBasic(FactoryAssociation.greedy(score, 100000, true));
    AssociateDescription<BrightFeature> generalAssoc = new WrapAssociateSurfBasic(assoc);
    DetectDescribePoint<I, BrightFeature> fused = FactoryDetectDescribe.surfStable(configDetector, configDescribe, configOrientation, imageType);
    return combined(fused, generalAssoc, kltConfig, reactivateThreshold, imageType);
}
Also used : AssociateSurfBasic(boofcv.alg.feature.associate.AssociateSurfBasic)

Example 4 with AssociateSurfBasic

use of boofcv.alg.feature.associate.AssociateSurfBasic in project BoofCV by lessthanoptimal.

the class FactoryPointTracker method dda_FH_SURF_Fast.

/**
 * Creates a tracker which detects Fast-Hessian features and describes them with SURF using the faster variant
 * of SURF.
 *
 * @see DescribePointSurf
 * @see boofcv.abst.feature.tracker.DdaManagerDetectDescribePoint
 *
 * @param configDetector Configuration for SURF detector
 * @param configDescribe Configuration for SURF descriptor
 * @param configOrientation Configuration for orientation
 * @param imageType      Type of image the input is.
 * @return SURF based tracker.
 */
// TODO remove maxTracks?  Use number of detected instead
public static <I extends ImageGray<I>> PointTracker<I> dda_FH_SURF_Fast(ConfigFastHessian configDetector, ConfigSurfDescribe.Speed configDescribe, ConfigAverageIntegral configOrientation, Class<I> imageType) {
    ScoreAssociation<TupleDesc_F64> score = FactoryAssociation.scoreEuclidean(TupleDesc_F64.class, true);
    AssociateSurfBasic assoc = new AssociateSurfBasic(FactoryAssociation.greedy(score, 5, true));
    AssociateDescription2D<BrightFeature> generalAssoc = new AssociateDescTo2D<>(new WrapAssociateSurfBasic(assoc));
    DetectDescribePoint<I, BrightFeature> fused = FactoryDetectDescribe.surfFast(configDetector, configDescribe, configOrientation, imageType);
    DdaManagerDetectDescribePoint<I, BrightFeature> manager = new DdaManagerDetectDescribePoint<>(fused);
    return new DetectDescribeAssociate<>(manager, generalAssoc, false);
}
Also used : AssociateSurfBasic(boofcv.alg.feature.associate.AssociateSurfBasic)

Example 5 with AssociateSurfBasic

use of boofcv.alg.feature.associate.AssociateSurfBasic in project BoofCV by lessthanoptimal.

the class TestWrapAssociateSurfBasic method createAlg.

@Override
public AssociateDescription<BrightFeature> createAlg() {
    ScoreAssociation<TupleDesc_F64> score = new ScoreAssociateEuclidean_F64();
    AssociateDescription<TupleDesc_F64> assoc = FactoryAssociation.greedy(score, Double.MAX_VALUE, false);
    AssociateSurfBasic basic = new AssociateSurfBasic(assoc);
    return new WrapAssociateSurfBasic(basic);
}
Also used : TupleDesc_F64(boofcv.struct.feature.TupleDesc_F64) AssociateSurfBasic(boofcv.alg.feature.associate.AssociateSurfBasic)

Aggregations

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