Search in sources :

Example 1 with ConfigSiftScaleSpace

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

the class FactoryOrientation method sift.

/**
 * Creates an implementation of the SIFT orientation estimation algorithm
 *
 * @param configSS Configuration of the scale-space.  null for default
 * @param configOri  Orientation configuration. null for default
 * @param imageType Type of input image
 * @return SIFT orientation image
 */
public static <T extends ImageGray<T>> OrientationImage<T> sift(ConfigSiftScaleSpace configSS, ConfigSiftOrientation configOri, Class<T> imageType) {
    if (configSS == null)
        configSS = new ConfigSiftScaleSpace();
    configSS.checkValidity();
    OrientationHistogramSift<GrayF32> ori = FactoryOrientationAlgs.sift(configOri, GrayF32.class);
    SiftScaleSpace ss = new SiftScaleSpace(configSS.firstOctave, configSS.lastOctave, configSS.numScales, configSS.sigma0);
    return new OrientationSiftToImage<>(ori, ss, imageType);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) SiftScaleSpace(boofcv.alg.feature.detect.interest.SiftScaleSpace) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace)

Example 2 with ConfigSiftScaleSpace

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

the class FactoryDetectDescribe method sift.

/**
 * Creates a new SIFT feature detector and describer.
 *
 * @see CompleteSift
 *
 * @param config Configuration for the SIFT detector and descriptor.
 * @return SIFT
 */
public static <T extends ImageGray<T>> DetectDescribePoint<T, BrightFeature> 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;
    SiftScaleSpace scaleSpace = new SiftScaleSpace(configSS.firstOctave, configSS.lastOctave, configSS.numScales, configSS.sigma0);
    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);
    NonMaxSuppression nns = FactoryFeatureExtractor.nonmax(configDetector.extract);
    NonMaxLimiter nonMax = new NonMaxLimiter(nns, configDetector.maxFeaturesPerScale);
    CompleteSift dds = new CompleteSift(scaleSpace, configDetector.edgeR, nonMax, orientation, describe);
    return new DetectDescribe_CompleteSift<>(dds);
}
Also used : OrientationHistogramSift(boofcv.alg.feature.orientation.OrientationHistogramSift) NonMaxSuppression(boofcv.abst.feature.detect.extract.NonMaxSuppression) ConfigSiftDescribe(boofcv.abst.feature.describe.ConfigSiftDescribe) DescribePointSift(boofcv.alg.feature.describe.DescribePointSift) SiftScaleSpace(boofcv.alg.feature.detect.interest.SiftScaleSpace) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace) CompleteSift(boofcv.alg.feature.detdesc.CompleteSift) NonMaxLimiter(boofcv.abst.feature.detect.extract.NonMaxLimiter) ConfigSiftDetector(boofcv.abst.feature.detect.interest.ConfigSiftDetector) GrayF32(boofcv.struct.image.GrayF32) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace)

Example 3 with ConfigSiftScaleSpace

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

the class FactoryInterestPointAlgs method sift.

/**
 * Creates a SIFT detector
 */
public static SiftDetector sift(@Nullable ConfigSiftScaleSpace configSS, @Nullable ConfigSiftDetector configDetector) {
    if (configSS == null)
        configSS = new ConfigSiftScaleSpace();
    if (configDetector == null)
        configDetector = new ConfigSiftDetector();
    NonMaxLimiter nonmax = FactoryFeatureExtractor.nonmaxLimiter(configDetector.extract, configDetector.maxFeaturesPerScale);
    SiftScaleSpace ss = new SiftScaleSpace(configSS.firstOctave, configSS.lastOctave, configSS.numScales, configSS.sigma0);
    return new SiftDetector(ss, configDetector.edgeR, nonmax);
}
Also used : NonMaxLimiter(boofcv.abst.feature.detect.extract.NonMaxLimiter) ConfigSiftDetector(boofcv.abst.feature.detect.interest.ConfigSiftDetector) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace) ConfigSiftDetector(boofcv.abst.feature.detect.interest.ConfigSiftDetector) ConfigSiftScaleSpace(boofcv.abst.feature.describe.ConfigSiftScaleSpace)

Example 4 with ConfigSiftScaleSpace

use of boofcv.abst.feature.describe.ConfigSiftScaleSpace 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

ConfigSiftScaleSpace (boofcv.abst.feature.describe.ConfigSiftScaleSpace)4 NonMaxLimiter (boofcv.abst.feature.detect.extract.NonMaxLimiter)3 NonMaxSuppression (boofcv.abst.feature.detect.extract.NonMaxSuppression)2 ConfigSiftDetector (boofcv.abst.feature.detect.interest.ConfigSiftDetector)2 SiftScaleSpace (boofcv.alg.feature.detect.interest.SiftScaleSpace)2 GrayF32 (boofcv.struct.image.GrayF32)2 ConfigSiftDescribe (boofcv.abst.feature.describe.ConfigSiftDescribe)1 DescribePointSift (boofcv.alg.feature.describe.DescribePointSift)1 CompleteSift (boofcv.alg.feature.detdesc.CompleteSift)1 OrientationHistogramSift (boofcv.alg.feature.orientation.OrientationHistogramSift)1