Package boofcv.alg.feature.dense
Class DescribeDenseSiftAlg<D extends ImageGray<D>>
java.lang.Object
boofcv.alg.feature.describe.DescribeSiftCommon
boofcv.alg.feature.dense.DescribeDenseSiftAlg<D>
Computes SIFT
features in a regular grid across an entire image at a single
scale and orientation. This is more computationally efficient than the more generic DescribePointSift
algorithm because it makes strong assumptions. If given the same center point, an orientation of 0, and
sigmaToPixels is 1, they should produce the same descriptor.
Sampling is done in regular increments in a grid pattern. The example sampling points are computed such that entire area sampled starts and ends at the most extreme possible pixels. This most likely will require that the sampling period be adjusted. Multiple descriptors can overlap the same area, so pixel orientation and magnitude is just computed once and saved.
-
Field Summary
Fields inherited from class boofcv.alg.feature.describe.DescribeSiftCommon
gaussianWeight, histogramBinWidth, maxDescriptorElementValue, numHistogramBins, widthGrid, widthSubregion
-
Constructor Summary
ConstructorDescriptionDescribeDenseSiftAlg
(int widthSubregion, int widthGrid, int numHistogramBins, double weightingSigmaFraction, double maxDescriptorElementValue, double periodColumns, double periodRows, Class<D> derivType) Specifies SIFT descriptor structure and sampling frequency. -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeDescriptor
(int cx, int cy, TupleDesc_F64 desc) Computes the descriptor centered at the specified coordinateReturns where in the image it sampled the featuresdouble
double
void
process()
Computes SIFT descriptors across the entire imagevoid
setImageGradient
(D derivX, D derivY) Sets the gradient and precomputes pixel orientation and magnitudevoid
setPeriodColumns
(double periodColumns) void
setPeriodRows
(double periodRows) Methods inherited from class boofcv.alg.feature.describe.DescribeSiftCommon
createGaussianWeightKernel, getCanonicalRadius, getDescriptorLength, normalizeDescriptor, trilinearInterpolation
-
Constructor Details
-
DescribeDenseSiftAlg
public DescribeDenseSiftAlg(int widthSubregion, int widthGrid, int numHistogramBins, double weightingSigmaFraction, double maxDescriptorElementValue, double periodColumns, double periodRows, Class<D> derivType) Specifies SIFT descriptor structure and sampling frequency.- Parameters:
widthSubregion
- Width of sub-region in samples. Try 4widthGrid
- Width of grid in subregions. Try 4.numHistogramBins
- Number of bins in histogram. Try 8weightingSigmaFraction
- Sigma for Gaussian weighting function is set to this value * region width. Try 0.5maxDescriptorElementValue
- Helps with non-affine changes in lighting. See paper. Try 0.2periodColumns
- Number of pixels between samples along x-axisperiodRows
- Number of pixels between samples along y-axisderivType
- Type of input derivative image
-
-
Method Details
-
setImageGradient
Sets the gradient and precomputes pixel orientation and magnitude- Parameters:
derivX
- image derivative x-axisderivY
- image derivative y-axis
-
process
public void process()Computes SIFT descriptors across the entire image -
computeDescriptor
Computes the descriptor centered at the specified coordinate- Parameters:
cx
- center of region x-axiscy
- center of region y-axisdesc
- The descriptor
-
getPeriodRows
public double getPeriodRows() -
setPeriodRows
public void setPeriodRows(double periodRows) -
getPeriodColumns
public double getPeriodColumns() -
setPeriodColumns
public void setPeriodColumns(double periodColumns) -
getDescriptors
-
getLocations
Returns where in the image it sampled the features -
getDerivType
-