Search in sources :

Example 1 with ConfigSiftOrientation

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

the class FactoryDetectDescribeAlgs method sift.

public static CompleteSift sift(@Nullable ConfigCompleteSift config) {
    if (config == null)
        config = new ConfigCompleteSift();
    ConfigSiftScaleSpace configSS = config.scaleSpace;
    ConfigSiftDetector configDetector = config.detector;
    ConfigSiftOrientation configOri = config.orientation;
    ConfigSiftDescribe configDesc = config.describe;
    var ss = new SiftScaleSpace(configSS.firstOctave, configSS.lastOctave, configSS.numScales, configSS.sigma0);
    SiftDetector detector = FactoryInterestPointAlgs.sift(configDetector);
    detector.maxFeaturesAll = configDetector.maxFeaturesAll;
    // Create the threaded variant if requested
    if (BoofConcurrency.USE_CONCURRENT) {
        return new CompleteSift_MT(ss, detector, () -> new OrientationHistogramSift<>(configOri.histogramSize, configOri.sigmaEnlarge, GrayF32.class), () -> new DescribePointSift<>(configDesc.widthSubregion, configDesc.widthGrid, configDesc.numHistogramBins, configDesc.sigmaToPixels, configDesc.weightingSigmaFraction, configDesc.maxDescriptorElementValue, GrayF32.class));
    } else {
        OrientationHistogramSift<GrayF32> orientation = new OrientationHistogramSift<>(configOri.histogramSize, configOri.sigmaEnlarge, GrayF32.class);
        DescribePointSift<GrayF32> describe = new DescribePointSift<>(configDesc.widthSubregion, configDesc.widthGrid, configDesc.numHistogramBins, configDesc.sigmaToPixels, configDesc.weightingSigmaFraction, configDesc.maxDescriptorElementValue, GrayF32.class);
        return new CompleteSift(ss, detector, orientation, describe);
    }
}
Also used : OrientationHistogramSift(boofcv.alg.feature.orientation.OrientationHistogramSift) ConfigSiftDescribe(boofcv.abst.feature.describe.ConfigSiftDescribe) CompleteSift_MT(boofcv.alg.feature.detdesc.CompleteSift_MT) DescribePointSift(boofcv.alg.feature.describe.DescribePointSift) ConfigCompleteSift(boofcv.abst.feature.detdesc.ConfigCompleteSift) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace) SiftScaleSpace(boofcv.alg.feature.detect.interest.SiftScaleSpace) CompleteSift(boofcv.alg.feature.detdesc.CompleteSift) ConfigCompleteSift(boofcv.abst.feature.detdesc.ConfigCompleteSift) SiftDetector(boofcv.alg.feature.detect.interest.SiftDetector) ConfigSiftDetector(boofcv.abst.feature.detect.interest.ConfigSiftDetector) ConfigSiftDetector(boofcv.abst.feature.detect.interest.ConfigSiftDetector) GrayF32(boofcv.struct.image.GrayF32) ConfigSiftOrientation(boofcv.abst.feature.orientation.ConfigSiftOrientation) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace)

Aggregations

ConfigSiftDescribe (boofcv.abst.feature.describe.ConfigSiftDescribe)1 ConfigSiftScaleSpace (boofcv.abst.feature.describe.ConfigSiftScaleSpace)1 ConfigCompleteSift (boofcv.abst.feature.detdesc.ConfigCompleteSift)1 ConfigSiftDetector (boofcv.abst.feature.detect.interest.ConfigSiftDetector)1 ConfigSiftOrientation (boofcv.abst.feature.orientation.ConfigSiftOrientation)1 DescribePointSift (boofcv.alg.feature.describe.DescribePointSift)1 CompleteSift (boofcv.alg.feature.detdesc.CompleteSift)1 CompleteSift_MT (boofcv.alg.feature.detdesc.CompleteSift_MT)1 SiftDetector (boofcv.alg.feature.detect.interest.SiftDetector)1 SiftScaleSpace (boofcv.alg.feature.detect.interest.SiftScaleSpace)1 OrientationHistogramSift (boofcv.alg.feature.orientation.OrientationHistogramSift)1 GrayF32 (boofcv.struct.image.GrayF32)1