Class LikelihoodHistCoupled_SB_U8

java.lang.Object
boofcv.alg.tracker.meanshift.LikelihoodHistCoupled_SB_U8
All Implemented Interfaces:
PixelLikelihood<GrayU8>, SparseImageOperator<GrayU8>, SparseImageSample_F32<GrayU8>

public class LikelihoodHistCoupled_SB_U8 extends Object implements PixelLikelihood<GrayU8>

Creates a histogram in a gray scale image which is then used to compute the likelihood of a color being a member of the original distribution based on its frequency.

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 Details

    • LikelihoodHistCoupled_SB_U8

      public LikelihoodHistCoupled_SB_U8(int maxPixelValue, int numBins)
  • Method Details

    • setImage

      public void setImage(GrayU8 image)
      Description copied from interface: SparseImageOperator
      Specifies the image being processed.
      Specified by:
      setImage in interface SparseImageOperator<GrayU8>
      Parameters:
      image - Image being processed
    • isInBounds

      public boolean isInBounds(int x, int y)
      Description copied from interface: SparseImageOperator
      Checks 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:
      isInBounds in interface SparseImageOperator<GrayU8>
    • createModel

      public void createModel(RectangleLength2D_I32 target)
      Description copied from interface: PixelLikelihood
      Specifies where the initial location of the target is in the image and computes the model using pixels inside the rectangle
      Specified by:
      createModel in interface PixelLikelihood<GrayU8>
      Parameters:
      target - Location of target inside the image
    • compute

      public float compute(int x, int y)
      Specified by:
      compute in interface SparseImageSample_F32<GrayU8>