Package boofcv.alg.tracker.meanshift
Class LikelihoodHistCoupled_PL_U8
java.lang.Object
boofcv.alg.tracker.meanshift.LikelihoodHistCoupled_PL_U8
- All Implemented Interfaces:
PixelLikelihood<Planar<GrayU8>>,SparseImageOperator<Planar<GrayU8>>,SparseImageSample_F32<Planar<GrayU8>>
Creates a histogram in a color image and is used to identify the likelihood of an color being a member of the original distribution. The histogram is computed in N-dimensional space, where N is the number of bands in the color image. The number of bins for each band is specified in the constructor. There is a total of N*numBins elements in the histogram.
Design Note:
The reason operations in GHistogramFeatureOps is not used internally is because
those are for histograms stored in double arrays, while this has to use floats/
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatcompute(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.voidSpecifies the image being processed.
-
Constructor Details
-
LikelihoodHistCoupled_PL_U8
public LikelihoodHistCoupled_PL_U8(int maxPixelValue, int numBins)
-
-
Method Details
-
setImage
Description copied from interface:SparseImageOperatorSpecifies the image being processed.- 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
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>>
-