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);
}
}
Aggregations