public class LikelihoodHueSatHistInd_PL_U8 extends java.lang.Object implements PixelLikelihood<boofcv.struct.image.Planar<boofcv.struct.image.GrayU8>>
Converts an RGB image into HSV image to add invariance to changes in lighting conditions. Creates independent histograms for the target's Hue and Saturation, which are then normalized such that their sums are equal to one. Likelihood is computed multiply the value of the histograms together.
Colors with a very small "Value" are ignored since their hue and saturation are not reliable.
| Modifier and Type | Field and Description |
|---|---|
protected float[] |
binsH |
protected float[] |
binsS |
protected float |
sizeH |
protected float |
sizeS |
| Constructor and Description |
|---|
LikelihoodHueSatHistInd_PL_U8(int maxPixelValue,
int numHistogramBins)
Configures likelihood function
|
| Modifier and Type | Method and Description |
|---|---|
float |
compute(int x,
int y) |
void |
createModel(georegression.struct.shapes.RectangleLength2D_I32 target)
Specifies where the initial location of the target is in the image and computes the model using pixels
inside the rectangle
|
boolean |
isInBounds(int x,
int y) |
void |
setImage(boofcv.struct.image.Planar<boofcv.struct.image.GrayU8> image)
Sets the input image
|
protected float[] binsH
protected float[] binsS
protected float sizeH
protected float sizeS
public LikelihoodHueSatHistInd_PL_U8(int maxPixelValue,
int numHistogramBins)
maxPixelValue - The maximum intensity value a pixel can take on.numHistogramBins - Number of bins in the Hue and Saturation histogram.public void setImage(boofcv.struct.image.Planar<boofcv.struct.image.GrayU8> image)
PixelLikelihoodsetImage in interface PixelLikelihood<boofcv.struct.image.Planar<boofcv.struct.image.GrayU8>>setImage in interface boofcv.struct.sparse.SparseImageOperator<boofcv.struct.image.Planar<boofcv.struct.image.GrayU8>>public boolean isInBounds(int x,
int y)
isInBounds in interface boofcv.struct.sparse.SparseImageOperator<boofcv.struct.image.Planar<boofcv.struct.image.GrayU8>>public void createModel(georegression.struct.shapes.RectangleLength2D_I32 target)
PixelLikelihoodcreateModel in interface PixelLikelihood<boofcv.struct.image.Planar<boofcv.struct.image.GrayU8>>target - Location of target inside the imagepublic float compute(int x,
int y)
compute in interface boofcv.struct.sparse.SparseImageSample_F32<boofcv.struct.image.Planar<boofcv.struct.image.GrayU8>>