Search in sources :

Example 11 with NonMaxSuppression

use of boofcv.abst.feature.detect.extract.NonMaxSuppression in project BoofCV by lessthanoptimal.

the class TestCompleteSift method createAlg.

private CompleteSift createAlg() {
    SiftScaleSpace ss = new SiftScaleSpace(-1, 4, 3, 1.6);
    NonMaxSuppression nonmax = FactoryFeatureExtractor.nonmax(new ConfigExtract(1, 0, 1, true, true, true));
    NonMaxLimiter limiter = new NonMaxLimiter(nonmax, 300);
    OrientationHistogramSift<GrayF32> ori = new OrientationHistogramSift<>(36, 1.5, GrayF32.class);
    DescribePointSift<GrayF32> describe = new DescribePointSift<>(4, 4, 8, 1.5, 0.5, 0.2, GrayF32.class);
    return new CompleteSift(ss, 10, limiter, ori, describe);
}
Also used : ConfigExtract(boofcv.abst.feature.detect.extract.ConfigExtract) NonMaxLimiter(boofcv.abst.feature.detect.extract.NonMaxLimiter) OrientationHistogramSift(boofcv.alg.feature.orientation.OrientationHistogramSift) NonMaxSuppression(boofcv.abst.feature.detect.extract.NonMaxSuppression) GrayF32(boofcv.struct.image.GrayF32) DescribePointSift(boofcv.alg.feature.describe.DescribePointSift) SiftScaleSpace(boofcv.alg.feature.detect.interest.SiftScaleSpace)

Example 12 with NonMaxSuppression

use of boofcv.abst.feature.detect.extract.NonMaxSuppression in project BoofCV by lessthanoptimal.

the class DetectFastHessianApp method doStuff.

private static <T extends ImageGray<T>> void doStuff(Class<T> imageType, BufferedImage input) {
    T workImage = ConvertBufferedImage.convertFromSingle(input, null, imageType);
    NonMaxSuppression extractor = FactoryFeatureExtractor.nonmax(new ConfigExtract(5, 1, 5, true));
    FastHessianFeatureDetector<T> det = new FastHessianFeatureDetector<>(extractor, NUM_FEATURES, 2, 9, 4, 4, 6);
    T integral = GIntegralImageOps.transform(workImage, null);
    det.detect(integral);
    System.out.println("total features found: " + det.getFoundPoints().size());
    VisualizeFeatures.drawScalePoints(input.createGraphics(), det.getFoundPoints(), BoofDefaults.SURF_SCALE_TO_RADIUS);
    ShowImages.showWindow(input, "Found Features: " + imageType.getSimpleName(), true);
}
Also used : ConfigExtract(boofcv.abst.feature.detect.extract.ConfigExtract) NonMaxSuppression(boofcv.abst.feature.detect.extract.NonMaxSuppression) FastHessianFeatureDetector(boofcv.alg.feature.detect.interest.FastHessianFeatureDetector)

Example 13 with NonMaxSuppression

use of boofcv.abst.feature.detect.extract.NonMaxSuppression in project BoofCV by lessthanoptimal.

the class VideoDetectCorners method perform.

public static <T extends ImageGray<T>, D extends ImageGray<D>> void perform(String fileName, Class<T> imageType, Class<D> derivType) {
    SimpleImageSequence<T> sequence = BoofVideoManager.loadManagerDefault().load(fileName, ImageType.single(imageType));
    int maxCorners = 200;
    int radius = 2;
    GeneralFeatureIntensity<T, D> intensity = new WrapperGradientCornerIntensity<>(FactoryIntensityPointAlg.shiTomasi(radius, false, derivType));
    // GeneralFeatureIntensity<T, D> intensity =
    // new WrapperFastCornerIntensity<T, D>(FactoryIntensityPointAlg.createFast12(defaultType, 8 , 12));
    NonMaxSuppression extractor = new WrapperNonMaximumBlock(new NonMaxBlockStrict.Max());
    // FeatureExtractor extractor = new WrapperNonMaximumBlock( new NonMaxExtractorNaive(radius+10,10f));
    // FeatureExtractor extractor = new WrapperNonMaxCandidate(new NonMaxCandidateStrict(radius+10, 10f));
    extractor.setIgnoreBorder(radius + 10);
    extractor.setThresholdMaximum(10f);
    GeneralFeatureDetector<T, D> detector = new GeneralFeatureDetector<>(intensity, extractor);
    detector.setMaxFeatures(maxCorners);
    VideoDetectCorners<T, D> display = new VideoDetectCorners<>(sequence, detector, derivType);
    display.process();
}
Also used : NonMaxSuppression(boofcv.abst.feature.detect.extract.NonMaxSuppression) WrapperNonMaximumBlock(boofcv.abst.feature.detect.extract.WrapperNonMaximumBlock) NonMaxBlockStrict(boofcv.alg.feature.detect.extract.NonMaxBlockStrict) WrapperGradientCornerIntensity(boofcv.abst.feature.detect.intensity.WrapperGradientCornerIntensity) GeneralFeatureDetector(boofcv.alg.feature.detect.interest.GeneralFeatureDetector)

Example 14 with NonMaxSuppression

use of boofcv.abst.feature.detect.extract.NonMaxSuppression in project BoofCV by lessthanoptimal.

the class FactoryDetectPoint method createGeneral.

public static <T extends ImageGray<T>, D extends ImageGray<D>> GeneralFeatureDetector<T, D> createGeneral(GeneralFeatureIntensity<T, D> intensity, ConfigGeneralDetector config) {
    // create a copy since it's going to modify the detector config
    ConfigGeneralDetector foo = new ConfigGeneralDetector();
    foo.setTo(config);
    config = foo;
    config.ignoreBorder += config.radius;
    NonMaxSuppression extractor = FactoryFeatureExtractor.nonmax(config);
    GeneralFeatureDetector<T, D> det = new GeneralFeatureDetector<>(intensity, extractor);
    det.setMaxFeatures(config.maxFeatures);
    return det;
}
Also used : NonMaxSuppression(boofcv.abst.feature.detect.extract.NonMaxSuppression) GeneralFeatureDetector(boofcv.alg.feature.detect.interest.GeneralFeatureDetector) ConfigGeneralDetector(boofcv.abst.feature.detect.interest.ConfigGeneralDetector)

Example 15 with NonMaxSuppression

use of boofcv.abst.feature.detect.extract.NonMaxSuppression in project BoofCV by lessthanoptimal.

the class FactoryInterestPoint method sift.

public static <T extends ImageGray<T>> InterestPointDetector<T> sift(ConfigSiftScaleSpace configSS, ConfigSiftDetector configDet, Class<T> imageType) {
    if (configSS == null)
        configSS = new ConfigSiftScaleSpace();
    if (configDet == null)
        configDet = new ConfigSiftDetector();
    SiftScaleSpace scaleSpace = new SiftScaleSpace(configSS.firstOctave, configSS.lastOctave, configSS.numScales, configSS.sigma0);
    NonMaxSuppression nonmax = FactoryFeatureExtractor.nonmax(configDet.extract);
    NonMaxLimiter limiter = new NonMaxLimiter(nonmax, configDet.maxFeaturesPerScale);
    SiftDetector detector = new SiftDetector(scaleSpace, configDet.edgeR, limiter);
    return new WrapSiftDetector<>(detector, imageType);
}
Also used : NonMaxLimiter(boofcv.abst.feature.detect.extract.NonMaxLimiter) NonMaxSuppression(boofcv.abst.feature.detect.extract.NonMaxSuppression) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace)

Aggregations

NonMaxSuppression (boofcv.abst.feature.detect.extract.NonMaxSuppression)23 ConfigExtract (boofcv.abst.feature.detect.extract.ConfigExtract)19 GrayF32 (boofcv.struct.image.GrayF32)7 NonMaxLimiter (boofcv.abst.feature.detect.extract.NonMaxLimiter)5 GeneralFeatureDetector (boofcv.alg.feature.detect.interest.GeneralFeatureDetector)5 WrapperGradientCornerIntensity (boofcv.abst.feature.detect.intensity.WrapperGradientCornerIntensity)3 SiftScaleSpace (boofcv.alg.feature.detect.interest.SiftScaleSpace)3 QueueCorner (boofcv.struct.QueueCorner)3 Point2D_I16 (georegression.struct.point.Point2D_I16)3 Test (org.junit.Test)3 ConfigSiftScaleSpace (boofcv.abst.feature.describe.ConfigSiftScaleSpace)2 DescribeRegionPoint (boofcv.abst.feature.describe.DescribeRegionPoint)2 DetectDescribeMulti (boofcv.abst.feature.detdesc.DetectDescribeMulti)2 DetectDescribeMultiFusion (boofcv.abst.feature.detdesc.DetectDescribeMultiFusion)2 GeneralFeatureIntensity (boofcv.abst.feature.detect.intensity.GeneralFeatureIntensity)2 WrapperHessianBlobIntensity (boofcv.abst.feature.detect.intensity.WrapperHessianBlobIntensity)2 ConfigGeneralDetector (boofcv.abst.feature.detect.interest.ConfigGeneralDetector)2 DetectorInterestPointMulti (boofcv.abst.feature.detect.interest.DetectorInterestPointMulti)2 GeneralToInterestMulti (boofcv.abst.feature.detect.interest.GeneralToInterestMulti)2 DescribePointSift (boofcv.alg.feature.describe.DescribePointSift)2