public class LocalWeightedHistogramRotRect<T extends boofcv.struct.image.ImageBase<T>>
extends java.lang.Object
TrackerMeanShiftComaniciu2003.
The histogram is stored in a row major format.| Modifier and Type | Field and Description |
|---|---|
protected float |
c |
protected float[] |
histogram |
float |
imageX |
float |
imageY |
protected float |
maxPixelValue |
protected float |
s |
protected int[] |
sampleHistIndex |
protected java.util.List<georegression.struct.point.Point2D_F32> |
samplePts |
protected float[] |
weights |
| Constructor and Description |
|---|
LocalWeightedHistogramRotRect(int numSamples,
double numSigmas,
int numHistogramBins,
int numBands,
float maxPixelValue,
boofcv.alg.interpolate.InterpolatePixelMB<T> interpolate)
Configures histogram calculation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeHistogram(T image,
boofcv.struct.RectangleRotate_F32 region)
Computes the histogram inside the specified region.
|
protected int |
computeHistogramBin(float[] value)
Given the value of a pixel, compute which bin in the histogram it belongs in
|
protected void |
computeHistogramBorder(T image,
boofcv.struct.RectangleRotate_F32 region)
Computes the histogram and skips pixels which are outside the image border
|
protected void |
computeHistogramInside(boofcv.struct.RectangleRotate_F32 region)
Computes the histogram quickly inside the image
|
protected void |
computeWeights(int numSamples,
double numSigmas)
compute the weights by convolving 1D gaussian kernel
|
protected void |
createSamplePoints(int numSamples)
create the list of points in square coordinates that it will sample.
|
float[] |
getHistogram() |
int[] |
getSampleHistIndex() |
java.util.List<georegression.struct.point.Point2D_F32> |
getSamplePts() |
protected boolean |
isInFastBounds(boofcv.struct.RectangleRotate_F32 region)
Checks to see if the region can be sampled using the fast algorithm
|
protected void |
normalizeHistogram() |
protected void |
squareToImageSample(float x,
float y,
boofcv.struct.RectangleRotate_F32 region)
Converts a point from square coordinates into image coordinates
|
protected float maxPixelValue
protected float c
protected float s
public float imageX
public float imageY
protected int[] sampleHistIndex
protected float[] weights
protected float[] histogram
protected java.util.List<georegression.struct.point.Point2D_F32> samplePts
public LocalWeightedHistogramRotRect(int numSamples,
double numSigmas,
int numHistogramBins,
int numBands,
float maxPixelValue,
boofcv.alg.interpolate.InterpolatePixelMB<T> interpolate)
numSamples - Number of points it samples along each axis of the rectangle.numSigmas - Number of standard deviations away the sides will be from the center. Try 3numHistogramBins - Number of bins in the histogramnumBands - Number of bands in the input imagemaxPixelValue - Maximum value of a pixel across all bandsinterpolate - Function used to interpolate the imageprotected void computeWeights(int numSamples,
double numSigmas)
protected void createSamplePoints(int numSamples)
public void computeHistogram(T image, boofcv.struct.RectangleRotate_F32 region)
getHistogram().image - Input imageregion - Region which is to be sampledprotected void computeHistogramInside(boofcv.struct.RectangleRotate_F32 region)
protected void computeHistogramBorder(T image, boofcv.struct.RectangleRotate_F32 region)
protected int computeHistogramBin(float[] value)
protected boolean isInFastBounds(boofcv.struct.RectangleRotate_F32 region)
protected void normalizeHistogram()
protected void squareToImageSample(float x,
float y,
boofcv.struct.RectangleRotate_F32 region)
public float[] getHistogram()
public int[] getSampleHistIndex()
public java.util.List<georegression.struct.point.Point2D_F32> getSamplePts()