boofcv.alg.tracker.meanshift
Class LikelihoodHueSatHistCoupled_PL_U8
- java.lang.Object
-
- boofcv.alg.tracker.meanshift.LikelihoodHueSatHistCoupled_PL_U8
-
- All Implemented Interfaces:
- PixelLikelihood<Planar<GrayU8>>, SparseImageOperator<Planar<GrayU8>>, SparseImageSample_F32<Planar<GrayU8>>
public class LikelihoodHueSatHistCoupled_PL_U8 extends java.lang.Object implements PixelLikelihood<Planar<GrayU8>>
TODO redo comments 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.
-
-
Constructor Summary
Constructors Constructor and Description LikelihoodHueSatHistCoupled_PL_U8(int maxPixelValue, int numHistogramBins)Configures likelihood function
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description floatcompute(int x, int y)voidcreateModel(RectangleLength2D_I32 target)Specifies where the initial location of the target is in the image and computes the model using pixels inside the rectanglebooleanisInBounds(int x, int y)Checks to see if the entire sample region is contained inside the image or not.voidsetImage(Planar<GrayU8> image)Sets the input image
-
-
-
Constructor Detail
-
LikelihoodHueSatHistCoupled_PL_U8
public LikelihoodHueSatHistCoupled_PL_U8(int maxPixelValue, int numHistogramBins)Configures likelihood function- Parameters:
maxPixelValue- The maximum intensity value a pixel can take on.numHistogramBins- Number of bins in the Hue and Saturation histogram.
-
-
Method Detail
-
setImage
public void setImage(Planar<GrayU8> image)
Description copied from interface:PixelLikelihoodSets the input image- Specified by:
setImagein interfacePixelLikelihood<Planar<GrayU8>>- Specified by:
setImagein interfaceSparseImageOperator<Planar<GrayU8>>- Parameters:
image- Image being processed
-
isInBounds
public boolean isInBounds(int x, int y)Description copied from interface:SparseImageOperatorChecks to see if the entire sample region is contained inside the image or not. Depending on the implementation it might be able to handle out of bounds pixels or not.- Specified by:
isInBoundsin interfaceSparseImageOperator<Planar<GrayU8>>
-
createModel
public void createModel(RectangleLength2D_I32 target)
Description copied from interface:PixelLikelihoodSpecifies where the initial location of the target is in the image and computes the model using pixels inside the rectangle- Specified by:
createModelin interfacePixelLikelihood<Planar<GrayU8>>- Parameters:
target- Location of target inside the image
-
compute
public float compute(int x, int y)- Specified by:
computein interfaceSparseImageSample_F32<Planar<GrayU8>>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG