public class DescribeSiftCommon
extends java.lang.Object
SIFT descriptors. Provides common functionality between sparse and
dense computations.| Modifier and Type | Field and Description |
|---|---|
protected float[] |
gaussianWeight |
protected double |
histogramBinWidth |
protected double |
maxDescriptorElementValue |
protected int |
numHistogramBins |
protected int |
widthGrid |
protected int |
widthSubregion |
| Constructor and Description |
|---|
DescribeSiftCommon(int widthSubregion,
int widthGrid,
int numHistogramBins,
double weightingSigmaFraction,
double maxDescriptorElementValue)
Configures the descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static float[] |
createGaussianWeightKernel(double sigma,
int radius)
Creates a gaussian weighting kernel with an even number of elements along its width
|
int |
getCanonicalRadius()
Radius of descriptor in pixels.
|
int |
getDescriptorLength()
Number of elements in the descriptor.
|
static void |
normalizeDescriptor(TupleDesc_F64 descriptor,
double maxDescriptorElementValue)
Adjusts the descriptor.
|
protected void |
trilinearInterpolation(float weight,
float sampleX,
float sampleY,
double angle,
TupleDesc_F64 descriptor)
Applies trilinear interpolation across the descriptor
|
protected int widthSubregion
protected int widthGrid
protected int numHistogramBins
protected double histogramBinWidth
protected double maxDescriptorElementValue
protected float[] gaussianWeight
public DescribeSiftCommon(int widthSubregion,
int widthGrid,
int numHistogramBins,
double weightingSigmaFraction,
double maxDescriptorElementValue)
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.2public static void normalizeDescriptor(TupleDesc_F64 descriptor, double maxDescriptorElementValue)
protected static float[] createGaussianWeightKernel(double sigma,
int radius)
protected void trilinearInterpolation(float weight,
float sampleX,
float sampleY,
double angle,
TupleDesc_F64 descriptor)
public int getDescriptorLength()
public int getCanonicalRadius()