Search in sources :

Example 1 with WrapDescribeBrief

use of boofcv.abst.feature.describe.WrapDescribeBrief in project BoofCV by lessthanoptimal.

the class TestDdaManagerGeneralPoint method createTracker.

@Override
public PointTracker<GrayF32> createTracker() {
    DescribePointBrief<GrayF32> brief = FactoryDescribePointAlgs.brief(FactoryBriefDefinition.gaussian2(new Random(123), 16, 512), FactoryBlurFilter.gaussian(ImageType.single(GrayF32.class), 0, 4));
    GeneralFeatureDetector<GrayF32, GrayF32> corner = FactoryDetectPoint.createShiTomasi(new ConfigGeneralDetector(-1, 2, 0), false, GrayF32.class);
    ScoreAssociateHamming_B score = new ScoreAssociateHamming_B();
    AssociateDescription2D<TupleDesc_B> association = new AssociateDescTo2D<>(FactoryAssociation.greedy(score, 400, true));
    DescribeRegionPoint<GrayF32, TupleDesc_B> describe = new WrapDescribeBrief<>(brief, GrayF32.class);
    EasyGeneralFeatureDetector<GrayF32, GrayF32> easy = new EasyGeneralFeatureDetector<>(corner, GrayF32.class, GrayF32.class);
    DdaManagerGeneralPoint<GrayF32, GrayF32, TupleDesc_B> manager;
    manager = new DdaManagerGeneralPoint<>(easy, describe, 2);
    DetectDescribeAssociate<GrayF32, TupleDesc_B> tracker = new DetectDescribeAssociate<>(manager, association, false);
    return tracker;
}
Also used : ConfigGeneralDetector(boofcv.abst.feature.detect.interest.ConfigGeneralDetector) AssociateDescTo2D(boofcv.abst.feature.associate.AssociateDescTo2D) ScoreAssociateHamming_B(boofcv.abst.feature.associate.ScoreAssociateHamming_B) WrapDescribeBrief(boofcv.abst.feature.describe.WrapDescribeBrief) TupleDesc_B(boofcv.struct.feature.TupleDesc_B) GrayF32(boofcv.struct.image.GrayF32) Random(java.util.Random) EasyGeneralFeatureDetector(boofcv.alg.feature.detect.interest.EasyGeneralFeatureDetector)

Example 2 with WrapDescribeBrief

use of boofcv.abst.feature.describe.WrapDescribeBrief in project BoofCV by lessthanoptimal.

the class TestDetectDescribeAssociateTwoPass method createTracker.

@Override
public PointTrackerTwoPass<GrayF32> createTracker() {
    DescribePointBrief<GrayF32> brief = FactoryDescribePointAlgs.brief(FactoryBriefDefinition.gaussian2(new Random(123), 16, 512), FactoryBlurFilter.gaussian(ImageType.single(GrayF32.class), 0, 4));
    GeneralFeatureDetector<GrayF32, GrayF32> corner = FactoryDetectPoint.createShiTomasi(new ConfigGeneralDetector(-1, 2, 0), false, GrayF32.class);
    ScoreAssociateHamming_B score = new ScoreAssociateHamming_B();
    // use an association algorithm which uses the track's pose information
    AssociateDescription2D<TupleDesc_B> association = new AssociateMaxDistanceNaive<>(score, true, 400, 20);
    DescribeRegionPoint<GrayF32, TupleDesc_B> describe = new WrapDescribeBrief<>(brief, GrayF32.class);
    EasyGeneralFeatureDetector<GrayF32, GrayF32> easy = new EasyGeneralFeatureDetector<>(corner, GrayF32.class, GrayF32.class);
    DdaManagerGeneralPoint<GrayF32, GrayF32, TupleDesc_B> manager;
    manager = new DdaManagerGeneralPoint<>(easy, describe, 2);
    DetectDescribeAssociateTwoPass<GrayF32, TupleDesc_B> tracker = new DetectDescribeAssociateTwoPass<>(manager, association, association, false);
    return tracker;
}
Also used : ConfigGeneralDetector(boofcv.abst.feature.detect.interest.ConfigGeneralDetector) AssociateMaxDistanceNaive(boofcv.alg.feature.associate.AssociateMaxDistanceNaive) ScoreAssociateHamming_B(boofcv.abst.feature.associate.ScoreAssociateHamming_B) WrapDescribeBrief(boofcv.abst.feature.describe.WrapDescribeBrief) TupleDesc_B(boofcv.struct.feature.TupleDesc_B) GrayF32(boofcv.struct.image.GrayF32) Random(java.util.Random) EasyGeneralFeatureDetector(boofcv.alg.feature.detect.interest.EasyGeneralFeatureDetector)

Aggregations

ScoreAssociateHamming_B (boofcv.abst.feature.associate.ScoreAssociateHamming_B)2 WrapDescribeBrief (boofcv.abst.feature.describe.WrapDescribeBrief)2 ConfigGeneralDetector (boofcv.abst.feature.detect.interest.ConfigGeneralDetector)2 EasyGeneralFeatureDetector (boofcv.alg.feature.detect.interest.EasyGeneralFeatureDetector)2 TupleDesc_B (boofcv.struct.feature.TupleDesc_B)2 GrayF32 (boofcv.struct.image.GrayF32)2 Random (java.util.Random)2 AssociateDescTo2D (boofcv.abst.feature.associate.AssociateDescTo2D)1 AssociateMaxDistanceNaive (boofcv.alg.feature.associate.AssociateMaxDistanceNaive)1